Crates.io | xcc |
lib.rs | xcc |
version | 0.1.0 |
source | src |
created_at | 2023-12-23 16:04:38.168718 |
updated_at | 2023-12-23 16:04:38.168718 |
description | Exact Cover solver with color extensions |
homepage | |
repository | https://github.com/pbevin/xcc |
max_upload_size | |
id | 1079179 |
size | 169,274 |
This is a Rust implementation of Exact Cover, with the addition of the ability to color secondary items. The algorithm is based on Donald Knuth's Algorithm C, as described in The Art of Computer Programming, Volume 4B, under "Color-controlled covering".
The solver takes:
The solver's job is to find a subset of the options that
Options can contain secondary items with or without colors. If a secondary item has no color, then the solver will not use it more than once (so that it defines a "zero or one" constraint). If an option has a secondary item with a color, then the solver can use it with the same color as many times as it wants, but not uncolored or with a different color.
The solver can be used to solve many different kinds of problems:
There are some examples in the examples
directory.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.