[−][src]Struct ddo::core::common::Node
A node is the simplest constituent of an MDD. It basically consists of an
user specified state together with some meta data (stored in a NodeInfo
which does some bookkeeping about the position, longest path.. of this node
in the decision diagram).
Fields
state: T
This is the (user-specified) state. It is the state reached by following the best path from the root node applying the transition relation at each decision.
info: NodeInfo
This is the node info which stores the metadata about the node.
Methods
impl<T> Node<T>
[src]
pub fn new(
state: T,
lp_len: i32,
lp_arc: Option<Edge>,
is_exact: bool,
is_relaxed: bool
) -> Node<T>
[src]
state: T,
lp_len: i32,
lp_arc: Option<Edge>,
is_exact: bool,
is_relaxed: bool
) -> Node<T>
Constructor.
Creates a new node info from the state, longest path information
(lp_len
and lp_arc
) and a flag indicating if this denotes an
exaxct node or not. The upper bound is set to a default value
(the greatest i32)
pub fn merged(state: T, lp_len: i32, lp_arc: Option<Edge>) -> Node<T>
[src]
Alt-Constructor
This constructor explicitly creates a merged node. That is, a node which is going to be marked as 'not exact'.
Trait Implementations
impl<T: Clone> Clone for Node<T>
[src]
impl<T> Compare<Node<T>, Node<T>> for MinLP
[src]
fn compare(&self, a: &Node<T>, b: &Node<T>) -> Ordering
[src]
fn compares_lt(&self, l: &L, r: &R) -> bool
[src]
fn compares_le(&self, l: &L, r: &R) -> bool
[src]
fn compares_ge(&self, l: &L, r: &R) -> bool
[src]
fn compares_gt(&self, l: &L, r: &R) -> bool
[src]
fn compares_eq(&self, l: &L, r: &R) -> bool
[src]
fn compares_ne(&self, l: &L, r: &R) -> bool
[src]
fn borrowing(self) -> Borrowing<Self, L, R>
[src]
fn rev(self) -> Rev<Self>
[src]
fn swap(self) -> Swap<Self>
[src]
fn then<D>(self, then: D) -> Then<Self, D> where
D: Compare<L, R>,
[src]
D: Compare<L, R>,
impl<T> Compare<Node<T>, Node<T>> for MaxUB
[src]
fn compare(&self, a: &Node<T>, b: &Node<T>) -> Ordering
[src]
fn compares_lt(&self, l: &L, r: &R) -> bool
[src]
fn compares_le(&self, l: &L, r: &R) -> bool
[src]
fn compares_ge(&self, l: &L, r: &R) -> bool
[src]
fn compares_gt(&self, l: &L, r: &R) -> bool
[src]
fn compares_eq(&self, l: &L, r: &R) -> bool
[src]
fn compares_ne(&self, l: &L, r: &R) -> bool
[src]
fn borrowing(self) -> Borrowing<Self, L, R>
[src]
fn rev(self) -> Rev<Self>
[src]
fn swap(self) -> Swap<Self>
[src]
fn then<D>(self, then: D) -> Then<Self, D> where
D: Compare<L, R>,
[src]
D: Compare<L, R>,
impl<T, F> Compare<Node<T>, Node<T>> for Func<F> where
F: Clone + Fn(&Node<T>, &Node<T>) -> Ordering,
[src]
F: Clone + Fn(&Node<T>, &Node<T>) -> Ordering,
If the function is a node comparator, then Func
will auto implement the
Compare
trait for that function.
fn compare(&self, a: &Node<T>, b: &Node<T>) -> Ordering
[src]
fn compares_lt(&self, l: &L, r: &R) -> bool
[src]
fn compares_le(&self, l: &L, r: &R) -> bool
[src]
fn compares_ge(&self, l: &L, r: &R) -> bool
[src]
fn compares_gt(&self, l: &L, r: &R) -> bool
[src]
fn compares_eq(&self, l: &L, r: &R) -> bool
[src]
fn compares_ne(&self, l: &L, r: &R) -> bool
[src]
fn borrowing(self) -> Borrowing<Self, L, R>
[src]
fn rev(self) -> Rev<Self>
[src]
fn swap(self) -> Swap<Self>
[src]
fn then<D>(self, then: D) -> Then<Self, D> where
D: Compare<L, R>,
[src]
D: Compare<L, R>,
impl<T: Debug> Debug for Node<T>
[src]
impl<T: Eq> Eq for Node<T>
[src]
impl<T> Hash for Node<T> where
T: Hash,
[src]
T: Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
A node acts as a mere pass through for the state. Hence it is hashed on basis of the state only.
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> PartialEq<Node<T>> for Node<T> where
T: Eq,
[src]
T: Eq,
fn eq(&self, other: &Self) -> bool
[src]
To be coherent with Hash
, nodes implement an equality test that bears
on the node state only.
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> StructuralEq for Node<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Node<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Node<T> where
T: Send,
T: Send,
impl<T> Sync for Node<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Node<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Node<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,