|
TraceMaker
C++ API of the engine
|
(D) Legalisation (design doc 04 §3 D): Tetris-style greedy, largest parts first, each part moved to the nearest legal position (minimum Euclidean displacement over a lattice searched in rings) from its target. More...
Go to the source code of this file.
Classes | |
| struct | tmk::place::LegaliseStats |
Namespaces | |
| namespace | tmk |
| namespace | tmk::place |
Functions | |
| LegaliseStats | tmk::place::legalise (const Problem &p, Placement &pl, bool only_illegal, Coord cell=0, const std::vector< int > *first=nullptr) |
| only_illegal: parts that are already legal (inside the board, conflict-free) stay where they are and only the others are re-placed (refine mode). | |
(D) Legalisation (design doc 04 §3 D): Tetris-style greedy, largest parts first, each part moved to the nearest legal position (minimum Euclidean displacement over a lattice searched in rings) from its target.
Candidates are screened with the conservative occupancy raster and always confirmed by the exact test.
Definition in file legalize.hpp.