DlSolver

Struct DlSolver 

Source
pub struct DlSolver<'i, I, C> { /* private fields */ }
Expand description

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

More precisely, this structure embodies an implementation of Algorithm C, as presented by D. E. Knuth in Section 7.2.2.1 of TAOCP 4B, part 2, pages 87–91.

Trait Implementations§

Source§

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

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<'i, I, C> Freeze for Solver<'i, I, C>

§

impl<'i, I, C> RefUnwindSafe for Solver<'i, I, C>

§

impl<'i, I, C> Send for Solver<'i, I, C>
where C: Send, I: Sync,

§

impl<'i, I, C> Sync for Solver<'i, I, C>
where C: Sync, I: Sync,

§

impl<'i, I, C> Unpin for Solver<'i, I, C>
where C: Unpin,

§

impl<'i, I, C> UnwindSafe for Solver<'i, I, C>

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.