DcSolver

Struct DcSolver 

Source
pub struct DcSolver;
Expand description

Visits all solutions to a given XCC problem by means of dancing cells.

More precisely, this structure embodies an implementation of Algorithm C, as presented by D. E. Knuth in Section 7.2.2.3 of TAOCP 4C (June 25, 2024), Pre-Fascicle 7A (preliminary draft), pages 63–64.

Trait Implementations§

Source§

impl<'i, I: Eq, C: Eq + Copy> Solver<'i, I, C> for Solver

Source§

fn new(primary: &'i [I], secondary: &'i [I]) -> Self

Creates a solver for an XCC problem on the given primary and secondary items. Read more
Source§

fn add_option<P, S>(&mut self, primary: P, secondary: S)
where P: AsRef<[I]>, S: AsRef<[(I, Option<C>)]>,

Appends an option to the XCC problem. Read more
Source§

fn solve<F>(self, visit: F)
where F: FnMut(Solution<'_, 'i, I, C, Self>) -> ControlFlow<()>,

Calls a closure on each solution to the XCC problem. Read more

Auto Trait Implementations§

§

impl Freeze for Solver

§

impl RefUnwindSafe for Solver

§

impl Send for Solver

§

impl Sync for Solver

§

impl Unpin for Solver

§

impl UnwindSafe for Solver

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.