Trait sudoku_variants::solver::Solver[][src]

pub trait Solver {
    fn solve(&self, sudoku: &Sudoku<impl Constraint + Clone>) -> Solution;
}

A trait for structs which have the ability to solve Sudoku. Not all implementers must be able to find a unique solution to every uniquely solveable Sudoku, some solvers may be less powerful, similar to a less experienced human solver. This may make sense to check whether some Sudoku is solveable using some strategy.

Required methods

fn solve(&self, sudoku: &Sudoku<impl Constraint + Clone>) -> Solution[src]

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.

Loading content...

Implementors

impl Solver for BacktrackingSolver[src]

impl<S: Strategy> Solver for StrategicBacktrackingSolver<S>[src]

impl<S: Strategy> Solver for StrategicSolver<S>[src]

Loading content...