pub struct SendableCostNode<D, S, C, L> { /* private fields */ }Expand description
Node ordered by the cost.
Implementations§
Source§impl<D, S, C, L> SendableCostNode<D, S, C, L>
impl<D, S, C, L> SendableCostNode<D, S, C, L>
Sourcepub fn create_root(dp: &D, state: S, cost: C) -> Self
pub fn create_root(dp: &D, state: S, cost: C) -> Self
Creates a new root node given the state and the cost.
Sourcepub fn create_child(&self, dp: &D, state: S, cost: C, transition: L) -> Self
pub fn create_child(&self, dp: &D, state: S, cost: C, transition: L) -> Self
Creates a new child node given the state, the cost, and the transition.
Trait Implementations§
Source§impl<D, S, C, L> Clone for SendableCostNode<D, S, C, L>
impl<D, S, C, L> Clone for SendableCostNode<D, S, C, L>
impl<D, S, C, L> Eq for SendableCostNode<D, S, C, L>where
C: Eq,
Source§impl<D, S, C, L> Ord for SendableCostNode<D, S, C, L>
impl<D, S, C, L> Ord for SendableCostNode<D, S, C, L>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<D, S, C, L> PartialEq for SendableCostNode<D, S, C, L>where
C: PartialEq,
impl<D, S, C, L> PartialEq for SendableCostNode<D, S, C, L>where
C: PartialEq,
Source§impl<D, S, C, L> PartialOrd for SendableCostNode<D, S, C, L>
impl<D, S, C, L> PartialOrd for SendableCostNode<D, S, C, L>
Source§impl<D, S, C, L> SearchNode for SendableCostNode<D, S, C, L>
impl<D, S, C, L> SearchNode for SendableCostNode<D, S, C, L>
Source§fn get_state_mut(&mut self, _: &Self::DpData) -> &mut Self::State
fn get_state_mut(&mut self, _: &Self::DpData) -> &mut Self::State
Returns the state of the node.
Source§fn get_bound(&self, _: &Self::DpData) -> Option<Self::CostType>
fn get_bound(&self, _: &Self::DpData) -> Option<Self::CostType>
Returns the dual bound of the path cost extending the node.
Source§fn get_transitions(&self, _: &D) -> Vec<L>
fn get_transitions(&self, _: &D) -> Vec<L>
Returns the transitions to reach the node.
Source§fn check_solution(
&self,
dp: &mut Self::DpData,
) -> Option<(Self::CostType, Vec<Self::Label>)>
fn check_solution( &self, dp: &mut Self::DpData, ) -> Option<(Self::CostType, Vec<Self::Label>)>
Checks if the node is a solution and returns the cost and transitions if it is.
Source§fn ordered_by_bound() -> bool
fn ordered_by_bound() -> bool
Returns whether the nodes are ordered by dual bound values.
Auto Trait Implementations§
impl<D, S, C, L> !Freeze for SendableCostNode<D, S, C, L>
impl<D, S, C, L> RefUnwindSafe for SendableCostNode<D, S, C, L>where
S: RefUnwindSafe,
C: RefUnwindSafe,
Arc<ArcIdTree<L>>: RefUnwindSafe,
PhantomData<(D, L)>: RefUnwindSafe,
impl<D, S, C, L> Send for SendableCostNode<D, S, C, L>
impl<D, S, C, L> Sync for SendableCostNode<D, S, C, L>
impl<D, S, C, L> Unpin for SendableCostNode<D, S, C, L>
impl<D, S, C, L> UnsafeUnpin for SendableCostNode<D, S, C, L>where
S: UnsafeUnpin,
C: UnsafeUnpin,
Arc<ArcIdTree<L>>: UnsafeUnpin,
PhantomData<(D, L)>: UnsafeUnpin,
impl<D, S, C, L> UnwindSafe for SendableCostNode<D, S, C, L>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more