pub struct BestScoreForager<S>where
S: PlanningSolution,{ /* private fields */ }Expand description
A forager that evaluates all accepted moves and picks the best.
Unlike AcceptedCountForager(N), this forager never quits early — it
always evaluates the full move space before selecting the best score.
Implementations§
Source§impl<S> BestScoreForager<S>where
S: PlanningSolution,
impl<S> BestScoreForager<S>where
S: PlanningSolution,
Trait Implementations§
Source§impl<S> Clone for BestScoreForager<S>where
S: PlanningSolution,
impl<S> Clone for BestScoreForager<S>where
S: PlanningSolution,
Source§impl<S> Debug for BestScoreForager<S>where
S: PlanningSolution,
impl<S> Debug for BestScoreForager<S>where
S: PlanningSolution,
Source§impl<S> Default for BestScoreForager<S>where
S: PlanningSolution,
impl<S> Default for BestScoreForager<S>where
S: PlanningSolution,
Source§impl<S, M> LocalSearchForager<S, M> for BestScoreForager<S>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> LocalSearchForager<S, M> for BestScoreForager<S>where
S: PlanningSolution,
M: Move<S>,
Source§fn step_started(&mut self, _best_score: S::Score, _last_step_score: S::Score)
fn step_started(&mut self, _best_score: S::Score, _last_step_score: S::Score)
Called at the start of each step to reset state. Read more
Source§fn add_move_index(&mut self, index: usize, score: S::Score)
fn add_move_index(&mut self, index: usize, score: S::Score)
Adds an accepted move index to the forager. Read more
Source§fn is_quit_early(&self) -> bool
fn is_quit_early(&self) -> bool
Returns true if the forager has collected enough moves and
wants to stop evaluating more.
Auto Trait Implementations§
impl<S> Freeze for BestScoreForager<S>
impl<S> RefUnwindSafe for BestScoreForager<S>
impl<S> Send for BestScoreForager<S>
impl<S> Sync for BestScoreForager<S>
impl<S> Unpin for BestScoreForager<S>
impl<S> UnsafeUnpin for BestScoreForager<S>
impl<S> UnwindSafe for BestScoreForager<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