pub struct SudokuSolver { /* private fields */ }Implementations§
Source§impl SudokuSolver
impl SudokuSolver
pub fn new() -> Self
pub fn new_with_strategies(strategies: Vec<Box<dyn SolvingStrategy>>) -> Self
pub fn set_max_iterations(&mut self, max_iterations: usize)
pub fn set_use_backtracking(&mut self, use_backtracking: bool)
pub fn solve(&mut self, sudoku: Sudoku) -> Result<Sudoku, String>
pub fn solve_with_stats( &mut self, sudoku: Sudoku, ) -> Result<(Sudoku, SolverStats), String>
pub fn get_hint(&mut self, sudoku: &mut Sudoku) -> Option<(usize, usize, u8)>
pub fn validate_solution(&self, sudoku: &Sudoku) -> bool
pub fn count_solutions(&mut self, sudoku: Sudoku, max_solutions: usize) -> usize
pub fn generate_puzzle( &mut self, size: usize, difficulty: Difficulty, ) -> Result<Sudoku, String>
pub fn solve_step(&self, sudoku: &mut Sudoku) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SudokuSolver
impl !RefUnwindSafe for SudokuSolver
impl !Send for SudokuSolver
impl !Sync for SudokuSolver
impl Unpin for SudokuSolver
impl !UnwindSafe for SudokuSolver
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