Skip to main content

MoveSelector

Trait MoveSelector 

Source
pub trait MoveSelector<S: PlanningSolution, M: Move<S>>: Send + Debug {
    // Required methods
    fn iter_moves<'a, D: Director<S>>(
        &'a self,
        score_director: &'a D,
    ) -> impl Iterator<Item = M> + 'a;
    fn size<D: Director<S>>(&self, score_director: &D) -> usize;

    // Provided methods
    fn append_moves<D: Director<S>>(
        &self,
        score_director: &D,
        arena: &mut MoveArena<M>,
    ) { ... }
    fn is_never_ending(&self) -> bool { ... }
}
Expand description

A typed move selector that yields moves of type M directly.

Unlike erased selectors, this returns concrete moves inline, eliminating heap allocation per move.

§Type Parameters

  • S - The planning solution type
  • M - The move type

Required Methods§

Source

fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &'a D, ) -> impl Iterator<Item = M> + 'a

Source

fn size<D: Director<S>>(&self, score_director: &D) -> usize

Provided Methods§

Source

fn append_moves<D: Director<S>>( &self, score_director: &D, arena: &mut MoveArena<M>, )

Source

fn is_never_ending(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S> MoveSelector<S, DescriptorEitherMove<S>> for DescriptorLeafSelector<S>
where S: PlanningSolution + 'static,

Source§

impl<S> MoveSelector<S, DescriptorEitherMove<S>> for DescriptorChangeMoveSelector<S>
where S: PlanningSolution + 'static,

Source§

impl<S> MoveSelector<S, DescriptorEitherMove<S>> for DescriptorSwapMoveSelector<S>
where S: PlanningSolution + 'static,

Source§

impl<S, M, A, B> MoveSelector<S, M> for UnionMoveSelector<S, M, A, B>
where S: PlanningSolution, M: Move<S>, A: MoveSelector<S, M>, B: MoveSelector<S, M>,

Source§

impl<S, M, Inner> MoveSelector<S, M> for FilteringMoveSelector<S, M, Inner>
where S: PlanningSolution, M: Move<S>, Inner: MoveSelector<S, M>,

Source§

impl<S, M, Inner> MoveSelector<S, M> for ProbabilityMoveSelector<S, M, Inner>
where S: PlanningSolution, M: Move<S>, Inner: MoveSelector<S, M>,

Source§

impl<S, M, Inner> MoveSelector<S, M> for SelectedCountLimitMoveSelector<S, M, Inner>
where S: PlanningSolution, M: Move<S>, Inner: MoveSelector<S, M>,

Source§

impl<S, M, Inner> MoveSelector<S, M> for ShufflingMoveSelector<S, M, Inner>
where S: PlanningSolution, M: Move<S>, Inner: MoveSelector<S, M>,

Source§

impl<S, M, Inner> MoveSelector<S, M> for SortingMoveSelector<S, M, Inner>
where S: PlanningSolution, M: Move<S>, Inner: MoveSelector<S, M>,

Source§

impl<S, M, Leaf> MoveSelector<S, M> for VecUnionSelector<S, M, Leaf>
where S: PlanningSolution, M: Move<S>, Leaf: MoveSelector<S, M>,

Source§

impl<S, V> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveListRuinSelector<S, V>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static,

Source§

impl<S, V> MoveSelector<S, ListRuinMove<S, V>> for ListRuinMoveSelector<S, V>
where S: PlanningSolution, V: Clone + Send + Sync + Debug + 'static,

Source§

impl<S, V> MoveSelector<S, RuinMove<S, V>> for RuinMoveSelector<S, V>
where S: PlanningSolution, V: Clone + Send + Sync + Debug + 'static,

Source§

impl<S, V, D, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveNearbyListChangeSelector<S, V, D, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, D: CrossEntityDistanceMeter<S>, ES: EntitySelector<S>,

Source§

impl<S, V, D, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveNearbyListSwapSelector<S, V, D, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, D: CrossEntityDistanceMeter<S>, ES: EntitySelector<S>,

Source§

impl<S, V, D, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveNearbyKOptSelector<S, V, D, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, D: ListPositionDistanceMeter<S> + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, D, ES> MoveSelector<S, ListChangeMove<S, V>> for NearbyListChangeMoveSelector<S, V, D, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, D: CrossEntityDistanceMeter<S>, ES: EntitySelector<S>,

Source§

impl<S, V, D, ES> MoveSelector<S, ListSwapMove<S, V>> for NearbyListSwapMoveSelector<S, V, D, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, D: CrossEntityDistanceMeter<S>, ES: EntitySelector<S>,

Source§

impl<S, V, DM, ES> MoveSelector<S, KOptMove<S, V>> for NearbyKOptMoveSelector<S, V, DM, ES>
where S: PlanningSolution, V: Clone + Send + Sync + Debug + 'static, DM: ListPositionDistanceMeter<S> + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, DM, IDM> MoveSelector<S, UnifiedMove<S, V>> for UnifiedNeighborhood<S, V, DM, IDM>
where S: PlanningSolution + 'static, V: Clone + PartialEq + Send + Sync + Debug + 'static, DM: CrossEntityDistanceMeter<S> + Clone + Debug + 'static, IDM: CrossEntityDistanceMeter<S> + Clone + Debug + 'static,

Source§

impl<S, V, DM, IDM> MoveSelector<S, ListMoveImpl<S, V>> for ListLeafSelector<S, V, DM, IDM>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, DM: CrossEntityDistanceMeter<S>, IDM: CrossEntityDistanceMeter<S> + 'static,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveListReverseSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveListSwapSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveSubListChangeSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveSubListSwapSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveKOptSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListMoveImpl<S, V>> for ListMoveListChangeSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, KOptMove<S, V>> for KOptMoveSelector<S, V, ES>
where S: PlanningSolution, ES: EntitySelector<S>, V: Clone + Send + Sync + Debug + 'static,

Source§

impl<S, V, ES> MoveSelector<S, ListChangeMove<S, V>> for ListChangeMoveSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListReverseMove<S, V>> for ListReverseMoveSelector<S, V, ES>
where S: PlanningSolution, V: Clone + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, ListSwapMove<S, V>> for ListSwapMoveSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, SubListChangeMove<S, V>> for SubListChangeMoveSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES> MoveSelector<S, SubListSwapMove<S, V>> for SubListSwapMoveSelector<S, V, ES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>,

Source§

impl<S, V, ES, VS> MoveSelector<S, EitherMove<S, V>> for EitherChangeMoveSelector<S, V, ES, VS>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>, VS: ValueSelector<S, V>,

Source§

impl<S, V, ES, VS> MoveSelector<S, ChangeMove<S, V>> for ChangeMoveSelector<S, V, ES, VS>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, ES: EntitySelector<S>, VS: ValueSelector<S, V>,

Source§

impl<S, V, LES, RES> MoveSelector<S, EitherMove<S, V>> for EitherSwapMoveSelector<S, V, LES, RES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, LES: EntitySelector<S>, RES: EntitySelector<S>,

Source§

impl<S, V, LES, RES> MoveSelector<S, SwapMove<S, V>> for SwapMoveSelector<S, V, LES, RES>
where S: PlanningSolution, V: Clone + PartialEq + Send + Sync + Debug + 'static, LES: EntitySelector<S>, RES: EntitySelector<S>,