[−][src]Trait ddo::core::abstraction::mdd::MDD
This trait describes an MDD
Type param
The type parameter <T>
denotes the type of the state defined/manipulated
by the Problem
definition.
Required methods
fn mdd_type(&self) -> MDDType
Tells whether this MDD is exact, relaxed, or restricted.
fn root(&self) -> Node<T>
Generates the root node of the problem
fn exact(&mut self, root: &Node<T>, best_lb: i32)
Expands this MDD into an exact MDD
fn restricted(&mut self, root: &Node<T>, best_lb: i32)
Expands this MDD into a restricted (lower bound approximation) version of the exact MDD.
fn relaxed(&mut self, root: &Node<T>, best_lb: i32)
Expands this MDD into a relaxed (upper bound approximation) version of the exact MDD.
fn consume_cutset<F>(&mut self, f: F) where
F: FnMut(T, NodeInfo),
F: FnMut(T, NodeInfo),
Consumes (removes) all nodes from the cutset of this mdd ands applies
the given function f
to each pair of (state, node_info)
present in
this mdd.
Note:
Because the nodes are consumed, they are no longer available for use after a call to this method completes.
All nodes from the cutset are considered to be used even though the
function may decide to skip them. Hence, calling for_each_cutset_node
after a call to this method completes will have absolutely no effect.
fn is_exact(&self) -> bool
Return true iff this MDD
is exact. That is to say, it returns true if
no nodes have been merged (because of relaxation) or suppressed (because
of restriction).
fn best_value(&self) -> i32
Returns the length of the longest path between the root and the terminal
node of this MDD
.
fn best_node(&self) -> &Option<NodeInfo>
Returns the terminal node having the longest associated path in this MDD
.
fn longest_path(&self) -> Vec<Decision>
Returns the list of decisions along the longest path between the
root node and the best terminal node of this MDD
.
Implementors
impl<T, C> MDD<T> for FlatMDD<T, C> where
T: Hash + Eq + Clone,
C: Config<T>,
[src]
T: Hash + Eq + Clone,
C: Config<T>,
FlatMDD implements the MDD abstract data type. Check its documentation for further details.
fn mdd_type(&self) -> MDDType
[src]
fn root(&self) -> Node<T>
[src]
fn exact(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn restricted(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn relaxed(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn consume_cutset<F>(&mut self, f: F) where
F: FnMut(T, NodeInfo),
[src]
F: FnMut(T, NodeInfo),
fn is_exact(&self) -> bool
[src]
fn best_value(&self) -> i32
[src]
fn best_node(&self) -> &Option<NodeInfo>
[src]
fn longest_path(&self) -> Vec<Decision>
[src]
impl<T, C> MDD<T> for PooledMDD<T, C> where
T: Eq + Hash + Clone,
C: Config<T>,
[src]
T: Eq + Hash + Clone,
C: Config<T>,
PooledMDD implements the MDD abstract data type. Check its documentation for further details.
fn mdd_type(&self) -> MDDType
[src]
fn root(&self) -> Node<T>
[src]
fn exact(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn restricted(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn relaxed(&mut self, root: &Node<T>, best_lb: i32)
[src]
fn consume_cutset<F>(&mut self, f: F) where
F: FnMut(T, NodeInfo),
[src]
F: FnMut(T, NodeInfo),