pub enum ListMoveUnion<S, V> {
ListChange(ListChangeMove<S, V>),
ListSwap(ListSwapMove<S, V>),
ListMultiSwap(ListMultiSwapMove<S, V>),
ListPermute(ListPermuteMove<S, V>),
SublistChange(SublistChangeMove<S, V>),
SublistSwap(SublistSwapMove<S, V>),
ListReverse(ListReverseMove<S, V>),
KOpt(KOptMove<S, V>),
ListRuin(ListRuinMove<S, V>),
}Expand description
A monomorphized union of all list-variable move types.
Implements Move<S> by delegating to the inner variant.
Enables combining ListChangeMoveSelector, ListSwapMoveSelector,
ListPermuteMoveSelector, SublistChangeMoveSelector, SublistSwapMoveSelector,
ListReverseMoveSelector, KOptMoveSelector, and
ListRuinMoveSelector without type erasure.
§Example
use solverforge_solver::heuristic::r#move::ListMoveUnion;Variants§
ListChange(ListChangeMove<S, V>)
ListSwap(ListSwapMove<S, V>)
ListMultiSwap(ListMultiSwapMove<S, V>)
ListPermute(ListPermuteMove<S, V>)
SublistChange(SublistChangeMove<S, V>)
SublistSwap(SublistSwapMove<S, V>)
ListReverse(ListReverseMove<S, V>)
KOpt(KOptMove<S, V>)
ListRuin(ListRuinMove<S, V>)
Trait Implementations§
Source§impl<S, V> Clone for ListMoveUnion<S, V>
impl<S, V> Clone for ListMoveUnion<S, V>
Source§impl<S, V> Debug for ListMoveUnion<S, V>
impl<S, V> Debug for ListMoveUnion<S, V>
Source§impl<S, V> Move<S> for ListMoveUnion<S, V>
impl<S, V> Move<S> for ListMoveUnion<S, V>
type Undo = ListMoveUnionUndo<S, V>
fn is_doable<D: Director<S>>(&self, score_director: &D) -> bool
fn do_move<D: Director<S>>(&self, score_director: &mut D) -> Self::Undo
fn undo_move<D: Director<S>>(&self, score_director: &mut D, undo: Self::Undo)
fn descriptor_index(&self) -> usize
fn entity_indices(&self) -> &[usize]
fn variable_name(&self) -> &str
fn telemetry_label(&self) -> &'static str
fn requires_hard_improvement(&self) -> bool
fn requires_score_improvement(&self) -> bool
fn tabu_signature<D: Director<S>>( &self, score_director: &D, ) -> MoveTabuSignature
fn for_each_affected_entity( &self, visitor: &mut dyn FnMut(MoveAffectedEntity<'_>), )
Source§impl<S, V> MoveCursor<S, ListMoveUnion<S, V>> for ListPrecedenceMoveCursor<S, V>
impl<S, V> MoveCursor<S, ListMoveUnion<S, V>> for ListPrecedenceMoveCursor<S, V>
fn next_candidate(&mut self) -> Option<CandidateId>
fn candidate( &self, id: CandidateId, ) -> Option<MoveCandidateRef<'_, S, ListMoveUnion<S, V>>>
fn take_candidate(&mut self, id: CandidateId) -> ListMoveUnion<S, V>
fn selector_index(&self, _id: CandidateId) -> Option<usize>
Source§impl<S, V, ES> MoveSelector<S, ListMoveUnion<S, V>> for ListPrecedenceMoveSelector<S, V, ES>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
ES: EntitySelector<S>,
impl<S, V, ES> MoveSelector<S, ListMoveUnion<S, V>> for ListPrecedenceMoveSelector<S, V, ES>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
ES: EntitySelector<S>,
type Cursor<'a> = ListPrecedenceMoveCursor<S, V> where Self: 'a
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> Self::Cursor<'a>
fn open_cursor_with_context<'a, D: Director<S>>( &'a self, score_director: &D, _context: MoveStreamContext, ) -> Self::Cursor<'a>
fn size<D: Director<S>>(&self, score_director: &D) -> usize
fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &D, ) -> MoveSelectorIter<S, M, Self::Cursor<'a>> ⓘ
fn append_moves<D: Director<S>>( &self, score_director: &D, arena: &mut MoveArena<M>, )
fn is_never_ending(&self) -> bool
Auto Trait Implementations§
impl<S, V> Freeze for ListMoveUnion<S, V>
impl<S, V> RefUnwindSafe for ListMoveUnion<S, V>
impl<S, V> Send for ListMoveUnion<S, V>
impl<S, V> Sync for ListMoveUnion<S, V>
impl<S, V> Unpin for ListMoveUnion<S, V>
impl<S, V> UnsafeUnpin for ListMoveUnion<S, V>
impl<S, V> UnwindSafe for ListMoveUnion<S, V>
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