pub struct FirstAcceptedForager<S>where
S: PlanningSolution,{ /* private fields */ }Expand description
A forager that picks the first accepted move.
This is the simplest forager - it quits after the first accepted move.
Implementations§
Source§impl<S> FirstAcceptedForager<S>where
S: PlanningSolution,
impl<S> FirstAcceptedForager<S>where
S: PlanningSolution,
Trait Implementations§
Source§impl<S> Clone for FirstAcceptedForager<S>where
S: PlanningSolution,
impl<S> Clone for FirstAcceptedForager<S>where
S: PlanningSolution,
Source§impl<S> Debug for FirstAcceptedForager<S>where
S: PlanningSolution,
impl<S> Debug for FirstAcceptedForager<S>where
S: PlanningSolution,
Source§impl<S> Default for FirstAcceptedForager<S>where
S: PlanningSolution,
impl<S> Default for FirstAcceptedForager<S>where
S: PlanningSolution,
Source§impl<S, M> LocalSearchForager<S, M> for FirstAcceptedForager<S>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> LocalSearchForager<S, M> for FirstAcceptedForager<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 FirstAcceptedForager<S>
impl<S> RefUnwindSafe for FirstAcceptedForager<S>
impl<S> Send for FirstAcceptedForager<S>
impl<S> Sync for FirstAcceptedForager<S>
impl<S> Unpin for FirstAcceptedForager<S>
impl<S> UnwindSafe for FirstAcceptedForager<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