pub enum BasicLeafSelector<S: PlanningSolution> {
Change(EitherChangeMoveSelector<S, usize, FromSolutionEntitySelector, StaticTypedValueSelector<S, usize>>),
Swap(EitherSwapMoveSelector<S, usize, FromSolutionEntitySelector, FromSolutionEntitySelector>),
}Expand description
A monomorphized leaf selector for basic (non-list) planning variables.
Wraps either a change or swap move selector in a uniform enum so that
VecUnionSelector<S, EitherMove<S, usize>, BasicLeafSelector<S>> has a
single concrete type regardless of which selectors are active.
Variants§
Change(EitherChangeMoveSelector<S, usize, FromSolutionEntitySelector, StaticTypedValueSelector<S, usize>>)
A change move selector yielding EitherMove::Change.
Swap(EitherSwapMoveSelector<S, usize, FromSolutionEntitySelector, FromSolutionEntitySelector>)
A swap move selector yielding EitherMove::Swap.
Trait Implementations§
Source§impl<S: PlanningSolution> Debug for BasicLeafSelector<S>
impl<S: PlanningSolution> Debug for BasicLeafSelector<S>
Source§impl<S> MoveSelector<S, EitherMove<S, usize>> for BasicLeafSelector<S>where
S: PlanningSolution,
impl<S> MoveSelector<S, EitherMove<S, usize>> for BasicLeafSelector<S>where
S: PlanningSolution,
Source§fn iter_moves<'a, D: Director<S>>(
&'a self,
score_director: &'a D,
) -> impl Iterator<Item = EitherMove<S, usize>> + 'a
fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &'a D, ) -> impl Iterator<Item = EitherMove<S, usize>> + 'a
Returns an iterator over typed moves.
Source§fn size<D: Director<S>>(&self, score_director: &D) -> usize
fn size<D: Director<S>>(&self, score_director: &D) -> usize
Returns the approximate number of moves.
Source§fn is_never_ending(&self) -> bool
fn is_never_ending(&self) -> bool
Returns true if this selector may return the same move multiple times.
Auto Trait Implementations§
impl<S> Freeze for BasicLeafSelector<S>
impl<S> RefUnwindSafe for BasicLeafSelector<S>
impl<S> Send for BasicLeafSelector<S>
impl<S> Sync for BasicLeafSelector<S>
impl<S> Unpin for BasicLeafSelector<S>
impl<S> UnsafeUnpin for BasicLeafSelector<S>
impl<S> UnwindSafe for BasicLeafSelector<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> 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