Class FastExactCover
Defined in File FastExactCover.h
Nested Relationships
Nested Types
Class Documentation
-
class FastExactCover
the exact cover with colors on sparse sets (dancing cells)
Public Functions
-
FastExactCover(int primary, int secondary = 0)
the items 0 , … , primary - 1 primary, the next secondary ones
- Pre:
primary >= 0 and secondary >= 0
-
int addOption(const std::vector<int> &items, const std::vector<int> &colors = {})
a new option, its index; colors[ k ] > 0 is the color of items[ k ], 0 or no colors none
- Pre:
items distinct, in [ 0 , primary + secondary ), one primary; colors empty or of the size of items, not negative, 0 on the primary items
-
FastExactCover(int primary, int secondary = 0)