[−][src]Struct ddo::core::implementation::heuristics::NaturalOrder
This is the default variable branching heuristic
This strategy branches on the variables in their ''natural'' order. That is,
it will first pick Variable(0)
then Variable(1)
, Variable(2)
, etc...
until there are no variables left to branch on.
Example
let mut variables = VarSet::all(3); assert_eq!(Some(Variable(0)), NaturalOrder.next_var(&variables, current_layer, next_layer)); variables.remove(Variable(0)); // move on to the next layer assert_eq!(Some(Variable(1)), NaturalOrder.next_var(&variables, current_layer, next_layer)); variables.remove(Variable(1)); // move on to the next layer assert_eq!(Some(Variable(2)), NaturalOrder.next_var(&variables, current_layer, next_layer)); variables.remove(Variable(2)); // move on to the last layer, no more var to branch on assert_eq!(None, NaturalOrder.next_var(&variables, current_layer, next_layer));
Note:
Even though any variable heuristic may access the current and next layers of the mdd being developed, the natural ordering heuristic does not use that access.
Trait Implementations
impl Clone for NaturalOrder
[src]
fn clone(&self) -> NaturalOrder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NaturalOrder
[src]
impl Default for NaturalOrder
[src]
fn default() -> NaturalOrder
[src]
impl<T> VariableHeuristic<T> for NaturalOrder
[src]
Auto Trait Implementations
impl RefUnwindSafe for NaturalOrder
impl Send for NaturalOrder
impl Sync for NaturalOrder
impl Unpin for NaturalOrder
impl UnwindSafe for NaturalOrder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,