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();
76 std::vector<MatchCost> match_costs;
77 for (
int r = 0; r < num_rows; r++) {
78 for (
int c = 0; c < num_cols; c++) {
81 match_costs.push_back(item);
87 std::sort(match_costs.begin(), match_costs.end());
90 for (
size_t i = 0; i < match_costs.size(); ++i) {
91 size_t rid = match_costs[i].RowIdx();
92 size_t cid = match_costs[i].ColIdx();
96 assignments->push_back(std::make_pair(rid, cid));
100 for (
int i = 0; i < num_rows; i++) {
102 unassigned_rows->push_back(i);
106 for (
int i = 0; i < num_cols; i++) {
108 unassigned_cols->push_back(i);