[−][src]Struct ddo::core::implementation::heuristics::NbUnassigned
This is the default max width heuristic. This strategy specifies a variable maximum width for the layers of an approximate MDD. When using this heuristic, each layer of an approximate MDD is allowed to have as many nodes as there are free variables to decide upon.
Example
Assuming a problem with 5 variables (0..=4). If we are calling this heuristic
to derive the maximum allowed width for the layers of an approximate MDD
when variables {1, 3, 4} have been fixed, then the set of free_vars
will
contain only the variables {0, 2}. In that case, this strategy will return
a max width of two.
let mut var_set = VarSet::all(5); // assume a problem with 5 variables var_set.remove(Variable(1)); // variables {1, 3, 4} have been fixed var_set.remove(Variable(3)); var_set.remove(Variable(4)); // only variables {0, 2} remain in the set assert_eq!(2, NbUnassigned.max_width(&var_set));
Trait Implementations
impl Clone for NbUnassigned
[src]
fn clone(&self) -> NbUnassigned
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NbUnassigned
[src]
impl WidthHeuristic for NbUnassigned
[src]
Auto Trait Implementations
impl RefUnwindSafe for NbUnassigned
impl Send for NbUnassigned
impl Sync for NbUnassigned
impl Unpin for NbUnassigned
impl UnwindSafe for NbUnassigned
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>,