61 std::vector<NodeNodePair>* assignments,
62 std::vector<size_t>* unassigned_rows,
63 std::vector<size_t>* unassigned_cols) {
65 unassigned_rows->clear();
66 unassigned_cols->clear();
78 std::vector<MatchCost> match_costs;
79 for (
int r = 0; r < num_rows; r++) {
80 for (
int c = 0; c < num_cols; c++) {
83 match_costs.push_back(item);
89 std::sort(match_costs.begin(), match_costs.end());
92 for (
size_t i = 0; i < match_costs.size(); ++i) {
93 size_t rid = match_costs[i].RowIdx();
94 size_t cid = match_costs[i].ColIdx();
103 assignments->push_back(std::make_pair(rid, cid));
109 for (
int i = 0; i < num_rows; i++) {
111 unassigned_rows->push_back(i);
115 for (
int i = 0; i < num_cols; i++) {
117 unassigned_cols->push_back(i);