MCPcopy Create free account
hub / github.com/dds-bridge/dds / detect_solve_duplicates

Function detect_solve_duplicates

library/src/solve_board.cpp:282–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282auto detect_solve_duplicates(
283 const Boards& bds,
284 vector<int>& uniques,
285 vector<int>& crossrefs) -> void
286{
287 const unsigned nu = static_cast<unsigned>(bds.no_of_boards);
288
289 uniques.clear();
290 crossrefs.resize(nu);
291
292 for (unsigned i = 0; i < nu; i++)
293 crossrefs[i] = -1;
294
295 for (unsigned i = 0; i < nu; i++)
296 {
297 if (crossrefs[i] != -1)
298 continue;
299
300 uniques.push_back(static_cast<int>(i));
301
302 for (unsigned index = i+1; index < nu; index++)
303 {
304 if (same_board(bds, i, index))
305 crossrefs[index] = static_cast<int>(i);
306 }
307 }
308}
309
310
311auto same_board(

Callers 1

detect_calc_duplicatesFunction · 0.85

Calls 1

same_boardFunction · 0.85

Tested by

no test coverage detected