MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / makeMatch

Method makeMatch

eval/LANE_evaluation/lane2d/src/counter.cpp:141–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139
140
141void Counter::makeMatch(const vector<vector<double> > &similarity, vector<int> &match1, vector<int> &match2) {
142 int m = similarity.size();
143 int n = similarity[0].size();
144 pipartiteGraph gra;
145 bool have_exchange = false;
146 if (m > n) {
147 have_exchange = true;
148 swap(m, n);
149 }
150 gra.resize(m, n);
151 for (int i = 0; i < gra.leftNum; i++) {
152 for (int j = 0; j < gra.rightNum; j++) {
153 if(have_exchange)
154 gra.mat[i][j] = similarity[j][i];
155 else
156 gra.mat[i][j] = similarity[i][j];
157 }
158 }
159 gra.match();
160 match1 = gra.leftMatch;
161 match2 = gra.rightMatch;
162 if (have_exchange) swap(match1, match2);
163}

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
matchMethod · 0.80

Tested by

no test coverage detected