pub struct Node<State, Action, Cost> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<State, Action, Cost> TreeNode for Node<State, Action, Cost>
impl<State, Action, Cost> TreeNode for Node<State, Action, Cost>
Source§type Cost = Cost
type Cost = Cost
The type used to decide whether to prefer one node over another. Lower
values are preferable.
Source§fn parent(&self) -> Option<(usize, &Self::Action)>
fn parent(&self) -> Option<(usize, &Self::Action)>
If the node has a parent, get the identity of that parent and the action
used to arrive from it.
Source§fn cost(&self) -> Self::Cost
fn cost(&self) -> Self::Cost
Get the actual cost of arriving at this node from its initial state.
Source§fn queue_evaluation(&self) -> Self::Cost
fn queue_evaluation(&self) -> Self::Cost
Evaluate this node for its placement in the search queue. For an
uninformed node this would simply return its aggregated cost. For an
informed node this would return its aggregated cost plus its remaining
cost estimate.
Source§fn queue_bias(&self) -> Option<Self::Cost>
fn queue_bias(&self) -> Option<Self::Cost>
Give a bias to this node. When queue_evaluation is exactly equal, the
node will be ordered by this bias instead. Higher bias will push it
later in the queue. For an informed node this could be its remaining
cost estimate.
Auto Trait Implementations§
impl<State, Action, Cost> Freeze for Node<State, Action, Cost>
impl<State, Action, Cost> RefUnwindSafe for Node<State, Action, Cost>
impl<State, Action, Cost> Send for Node<State, Action, Cost>
impl<State, Action, Cost> Sync for Node<State, Action, Cost>
impl<State, Action, Cost> Unpin for Node<State, Action, Cost>
impl<State, Action, Cost> UnwindSafe for Node<State, Action, Cost>
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.