pub struct AcceptedCountForager<S>where
S: PlanningSolution,{ /* private fields */ }Expand description
A forager that collects a limited number of accepted moves.
Once the limit is reached, it quits early. It picks the best move among those collected.
Implementations§
Source§impl<S> AcceptedCountForager<S>where
S: PlanningSolution,
impl<S> AcceptedCountForager<S>where
S: PlanningSolution,
Trait Implementations§
Source§impl<S> Clone for AcceptedCountForager<S>where
S: PlanningSolution,
impl<S> Clone for AcceptedCountForager<S>where
S: PlanningSolution,
Source§impl<S> Debug for AcceptedCountForager<S>where
S: PlanningSolution,
impl<S> Debug for AcceptedCountForager<S>where
S: PlanningSolution,
Source§impl<S, M> LocalSearchForager<S, M> for AcceptedCountForager<S>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> LocalSearchForager<S, M> for AcceptedCountForager<S>where
S: PlanningSolution,
M: Move<S>,
Source§fn step_started(&mut self)
fn step_started(&mut self)
Called at the start of each step to reset state.
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 AcceptedCountForager<S>
impl<S> RefUnwindSafe for AcceptedCountForager<S>
impl<S> Send for AcceptedCountForager<S>
impl<S> Sync for AcceptedCountForager<S>
impl<S> Unpin for AcceptedCountForager<S>
impl<S> UnwindSafe for AcceptedCountForager<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