pub struct StrategicBacktrackingSolver<S: Strategy> { /* private fields */ }
Expand description
A perfect Solver which uses a Strategy to accelerate the solving process. Under the assumption that the strategy is correct, this should yield the same result as a BacktrackingSolver. Note that using a complicated strategy can also reduce performance if its utility is too low.
Implementations§
Source§impl<S: Strategy> StrategicBacktrackingSolver<S>
impl<S: Strategy> StrategicBacktrackingSolver<S>
Sourcepub fn new(strategy: S) -> StrategicBacktrackingSolver<S>
pub fn new(strategy: S) -> StrategicBacktrackingSolver<S>
Creates a new strategic backtracing solver that uses the given
strategy
.
Trait Implementations§
Source§impl<S: Strategy> Solver for StrategicBacktrackingSolver<S>
impl<S: Strategy> Solver for StrategicBacktrackingSolver<S>
Source§fn solve(&self, sudoku: &Sudoku<impl Constraint + Clone>) -> Solution
fn solve(&self, sudoku: &Sudoku<impl Constraint + Clone>) -> Solution
Solves, or attempts to solve, the provided Sudoku. If the solver cannot
prove that a Sudoku is impossible or uniquely solveable (either
because it isn’t or the solver is not powerful enough), they shall
return
Solution::Ambiguous
.Auto Trait Implementations§
impl<S> Freeze for StrategicBacktrackingSolver<S>where
S: Freeze,
impl<S> RefUnwindSafe for StrategicBacktrackingSolver<S>where
S: RefUnwindSafe,
impl<S> Send for StrategicBacktrackingSolver<S>where
S: Send,
impl<S> Sync for StrategicBacktrackingSolver<S>where
S: Sync,
impl<S> Unpin for StrategicBacktrackingSolver<S>where
S: Unpin,
impl<S> UnwindSafe for StrategicBacktrackingSolver<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more