Crate algoxcc

Crate algoxcc 

Source
Expand description

The crate implements an algorithm for solving exact cover problems using:

  • backtracking and minimal remain values heuristic logic and
  • an optimzed data structure called dancing cells based on sparse sets

Define a Problem and use function solve to find solution(s) for the generalized problem with both primary items and secondary items with colors, and for the standard problem with only primary items.

See usage examples for function solve.

Structs§

DancingCells
Implementation using Dancing Cells data structure and the logic used by the main solve function
Option
eXact Cover with Colors option
ParamError
Parameter error messages for invalid parameters used in problem setup
Problem
eXact Cover with Colors problem
Solutions
eXact Cover with Colors solutions

Functions§

new_item_validate
Validate new item in items
new_option_validate
Validate new option
new_primary_validate
Validate new item in primary items
new_secondary_validate
Validate new item in secondary items
option_validate
Validate primary and secondary items in and option
problem_validate
Validate options, primary and secondary items in a problem
solve
Function solve looks for Solutions (exact covers)