[][src]Trait ddo::core::abstraction::heuristics::VariableHeuristic

pub trait VariableHeuristic<T> {
    fn next_var<'a>(
        &self,
        free_vars: &'a VarSet,
        current: Layer<'a, T>,
        next: Layer<'a, T>
    ) -> Option<Variable>; }

This trait defines an heuristic to determine the best variable to branch on while developing an MDD.

Required methods

fn next_var<'a>(
    &self,
    free_vars: &'a VarSet,
    current: Layer<'a, T>,
    next: Layer<'a, T>
) -> Option<Variable>

Returns the best variable to branch on from the set of free_vars or None in case no branching is useful (free_vars is empty, no decision left to make, etc...).

Loading content...

Implementors

impl<T> VariableHeuristic<T> for NaturalOrder[src]

impl<T, F> VariableHeuristic<T> for Func<F> where
    F: Fn(&VarSet, Layer<T>, Layer<T>) -> Option<Variable>, 
[src]

Whenever the parameter function of Func is a function/closure that possibly returns a variable based on a set of free variables and two layers (current and next), then Func will auto implement the VariableHeuristic trait for that function.

Loading content...