[−][src]Trait dancing_links::ExactCover
An instance of an exact cover problem.
Associated Types
type Possibility: Debug
The type of values that are elements of a solution to the exact cover problem.
type Constraint: Debug
The type of value that are constraints on a given instance of an exact cover problem.
Required methods
fn satisfies(&self, poss: &Self::Possibility, cons: &Self::Constraint) -> bool
Return true if the given Possibility
will satisfy the given
Constraint
.
fn is_optional(&self, cons: &Self::Constraint) -> bool
Return true if the given Constraint
is optional.
fn possibilities(&self) -> &[Self::Possibility]
Return a list of possibilities for this instance of the problem.
fn constraints(&self) -> &[Self::Constraint]
Return a list of constraints that must be satisfied for this instance of the problem.
Provided methods
fn solver(&self) -> Solver<Self>ⓘImportant traits for Solver<'e, E>
impl<'e, E> Iterator for Solver<'e, E> where
E: ExactCover, type Item = Vec<&'e E::Possibility>;
where
Self: Sized,
Important traits for Solver<'e, E>
impl<'e, E> Iterator for Solver<'e, E> where
E: ExactCover, type Item = Vec<&'e E::Possibility>;
Self: Sized,
Return an iterator over all solutions to this instance of the exact cover problem.