Skip to main content

select_variable

Function select_variable 

Source
pub fn select_variable<D: Domain>(
    stack: &[VarId],
    variables: &[Variable<D>],
    ordering: Ordering,
    var_wdeg: &[f64],
) -> Option<usize>
Expand description

Select the next unassigned variable from the stack according to the ordering heuristic.

Returns the index into stack of the chosen variable, or None if empty. var_wdeg is the precompute_var_wdeg output — consulted only by Ordering::Mrv, and empty for the orderings that ignore it.