pub struct ExhaustiveSearchNode<S: PlanningSolution> { /* private fields */ }Expand description
A node in the exhaustive search tree.
Each node represents a partial solution state, containing:
- The depth in the search tree (number of variables assigned)
- The score at this node
- An optimistic bound (best possible score from this node)
- The move sequence to reach this node from the root
Implementations§
Source§impl<S: PlanningSolution> ExhaustiveSearchNode<S>
impl<S: PlanningSolution> ExhaustiveSearchNode<S>
Sourcepub fn child(
parent_index: usize,
depth: usize,
score: S::Score,
entity_index: usize,
value_index: usize,
) -> Self
pub fn child( parent_index: usize, depth: usize, score: S::Score, entity_index: usize, value_index: usize, ) -> Self
Creates a child node.
Sourcepub fn optimistic_bound(&self) -> Option<&S::Score>
pub fn optimistic_bound(&self) -> Option<&S::Score>
Returns the optimistic bound for this node.
Sourcepub fn set_optimistic_bound(&mut self, bound: S::Score)
pub fn set_optimistic_bound(&mut self, bound: S::Score)
Sets the optimistic bound for this node.
Sourcepub fn entity_index(&self) -> Option<usize>
pub fn entity_index(&self) -> Option<usize>
Returns the entity index being assigned at this node.
Sourcepub fn value_index(&self) -> Option<usize>
pub fn value_index(&self) -> Option<usize>
Returns the value index assigned at this node.
Sourcepub fn parent_index(&self) -> Option<usize>
pub fn parent_index(&self) -> Option<usize>
Returns the parent node index.
Sourcepub fn is_expanded(&self) -> bool
pub fn is_expanded(&self) -> bool
Returns whether this node has been expanded.
Sourcepub fn mark_expanded(&mut self)
pub fn mark_expanded(&mut self)
Marks this node as expanded.
Trait Implementations§
Source§impl<S: Clone + PlanningSolution> Clone for ExhaustiveSearchNode<S>
impl<S: Clone + PlanningSolution> Clone for ExhaustiveSearchNode<S>
Source§fn clone(&self) -> ExhaustiveSearchNode<S>
fn clone(&self) -> ExhaustiveSearchNode<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> Freeze for ExhaustiveSearchNode<S>
impl<S> RefUnwindSafe for ExhaustiveSearchNode<S>
impl<S> Send for ExhaustiveSearchNode<S>
impl<S> Sync for ExhaustiveSearchNode<S>
impl<S> Unpin for ExhaustiveSearchNode<S>
impl<S> UnwindSafe for ExhaustiveSearchNode<S>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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