pub enum ScalarMoveUnion<S, V> {
Change(ChangeMove<S, V>),
Swap(SwapMove<S, V>),
PillarChange(PillarChangeMove<S, V>),
PillarSwap(PillarSwapMove<S, V>),
RuinRecreate(RuinRecreateMove<S>),
Composite(SequentialCompositeMove<S, ScalarMoveUnion<S, V>>),
CompoundScalar(CompoundScalarMove<S>),
ConflictRepair(ConflictRepairMove<S>),
}Expand description
A monomorphized union of the canonical scalar move family.
Implements Move<S> by delegating to the inner variant.
Copy when V: Copy, avoiding heap allocation in the move selector hot path.
Variants§
Change(ChangeMove<S, V>)
Swap(SwapMove<S, V>)
PillarChange(PillarChangeMove<S, V>)
PillarSwap(PillarSwapMove<S, V>)
RuinRecreate(RuinRecreateMove<S>)
Composite(SequentialCompositeMove<S, ScalarMoveUnion<S, V>>)
CompoundScalar(CompoundScalarMove<S>)
ConflictRepair(ConflictRepairMove<S>)
Trait Implementations§
Source§impl<S, V> Clone for ScalarMoveUnion<S, V>
impl<S, V> Clone for ScalarMoveUnion<S, V>
Source§impl<S, V> Debug for ScalarMoveUnion<S, V>
impl<S, V> Debug for ScalarMoveUnion<S, V>
Source§impl<S, V> Move<S> for ScalarMoveUnion<S, V>
impl<S, V> Move<S> for ScalarMoveUnion<S, V>
fn is_doable<D: Director<S>>(&self, score_director: &D) -> bool
fn do_move<D: Director<S>>(&self, score_director: &mut D)
fn descriptor_index(&self) -> usize
fn entity_indices(&self) -> &[usize]
fn variable_name(&self) -> &str
fn requires_hard_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> MoveCursor<S, ScalarMoveUnion<S, usize>> for ConflictRepairCursor<S>where
S: PlanningSolution + 'static,
impl<S> MoveCursor<S, ScalarMoveUnion<S, usize>> for ConflictRepairCursor<S>where
S: PlanningSolution + 'static,
fn next_candidate(&mut self) -> Option<CandidateId>
fn candidate( &self, id: CandidateId, ) -> Option<MoveCandidateRef<'_, S, ScalarMoveUnion<S, usize>>>
fn take_candidate(&mut self, id: CandidateId) -> ScalarMoveUnion<S, usize>
fn selector_index(&self, _id: CandidateId) -> Option<usize>
Source§impl<S> MoveCursor<S, ScalarMoveUnion<S, usize>> for GroupedScalarCursor<S>where
S: PlanningSolution + 'static,
impl<S> MoveCursor<S, ScalarMoveUnion<S, usize>> for GroupedScalarCursor<S>where
S: PlanningSolution + 'static,
fn next_candidate(&mut self) -> Option<CandidateId>
fn candidate( &self, id: CandidateId, ) -> Option<MoveCandidateRef<'_, S, ScalarMoveUnion<S, usize>>>
fn take_candidate(&mut self, id: CandidateId) -> ScalarMoveUnion<S, usize>
fn selector_index(&self, _id: CandidateId) -> Option<usize>
Source§impl<S, V, ES, VS> MoveSelector<S, ScalarMoveUnion<S, V>> for ScalarChangeMoveSelector<S, V, ES, VS>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
ES: EntitySelector<S>,
VS: ValueSelector<S, V>,
impl<S, V, ES, VS> MoveSelector<S, ScalarMoveUnion<S, V>> for ScalarChangeMoveSelector<S, V, ES, VS>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
ES: EntitySelector<S>,
VS: ValueSelector<S, V>,
type Cursor<'a> = ArenaMoveCursor<S, ScalarMoveUnion<S, V>> where Self: 'a
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> 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
Source§impl<S, V, LES, RES> MoveSelector<S, ScalarMoveUnion<S, V>> for ScalarSwapMoveSelector<S, V, LES, RES>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
LES: EntitySelector<S>,
RES: EntitySelector<S>,
impl<S, V, LES, RES> MoveSelector<S, ScalarMoveUnion<S, V>> for ScalarSwapMoveSelector<S, V, LES, RES>where
S: PlanningSolution,
V: Clone + PartialEq + Send + Sync + Debug + 'static,
LES: EntitySelector<S>,
RES: EntitySelector<S>,
type Cursor<'a> = ArenaMoveCursor<S, ScalarMoveUnion<S, V>> where Self: 'a
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> 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
Source§impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for ConflictRepairSelector<S>where
S: PlanningSolution + 'static,
impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for ConflictRepairSelector<S>where
S: PlanningSolution + 'static,
type Cursor<'a> = ConflictRepairCursor<S> where Self: 'a
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> 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
Source§impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for GroupedScalarSelector<S>where
S: PlanningSolution + 'static,
impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for GroupedScalarSelector<S>where
S: PlanningSolution + 'static,
type Cursor<'a> = GroupedScalarCursor<S> where Self: 'a
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> 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 ScalarMoveUnion<S, V>where
V: Freeze,
impl<S, V> RefUnwindSafe for ScalarMoveUnion<S, V>where
V: RefUnwindSafe,
impl<S, V> Send for ScalarMoveUnion<S, V>where
V: Send,
impl<S, V> Sync for ScalarMoveUnion<S, V>where
V: Sync,
impl<S, V> Unpin for ScalarMoveUnion<S, V>where
V: Unpin,
impl<S, V> UnsafeUnpin for ScalarMoveUnion<S, V>where
V: UnsafeUnpin,
impl<S, V> UnwindSafe for ScalarMoveUnion<S, V>where
V: UnwindSafe,
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