Struct puzzle_solver::PuzzleSearch
[−]
[src]
pub struct PuzzleSearch<'a> { /* fields omitted */ }
Intermediate puzzle search state.
Methods
impl<'a> PuzzleSearch<'a>
[src]
fn is_assigned(&self, var: VarToken) -> bool
Check if the variable has been assigned to a value.
fn get_assigned(&self, var: VarToken) -> Option<Val>
Get the value assigned to a variable, or None.
This should be used if the variable may potentially be unassigned. For example, when implementing constraints.
fn get_unassigned(&'a self, var: VarToken) -> Box<Iterator<Item = Val> + 'a>
Get an iterator over the candidates to an unassigned variable.
fn get_min_max(&self, var: VarToken) -> PsResult<(Val, Val)>
Get the minimum and maximum values for variable.
fn set_candidate(&mut self, var: VarToken, val: Val) -> PsResult<()>
Set a variable to a value.
fn remove_candidate(&mut self, var: VarToken, val: Val) -> PsResult<()>
Remove a single candidate from a variable.
fn bound_candidate_range(
&mut self,
var: VarToken,
min: Val,
max: Val
) -> PsResult<(Val, Val)>
&mut self,
var: VarToken,
min: Val,
max: Val
) -> PsResult<(Val, Val)>
Bound an variable to the given range.
fn unify(&mut self, from: VarToken, to: VarToken) -> PsResult<()>
Unify the "from" variable with the "to" variable.
Trait Implementations
impl<'a> Clone for PuzzleSearch<'a>
[src]
fn clone(&self) -> PuzzleSearch<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more