Skip to main content

MoveSelector

Trait MoveSelector 

Source
pub trait MoveSelector<S: PlanningSolution, M: Move<S>>: Send + Debug {
    type Cursor<'a>: MoveCursor<S, M> + 'a
       where Self: 'a;

    // Required methods
    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;

    // Provided methods
    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 { ... }
}
Expand description

A zero-erasure move selector that yields stable candidate indices plus borrowable move views. Ownership is transferred only via take_candidate.

Required Associated Types§

Source

type Cursor<'a>: MoveCursor<S, M> + 'a where Self: 'a

Required Methods§

Source

fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> Self::Cursor<'a>

Source

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

Provided Methods§

Source

fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &D, ) -> MoveSelectorIter<S, M, Self::Cursor<'a>>

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, DescriptorMoveUnion<S>> for DescriptorLeafSelector<S>
where S: PlanningSolution + 'static, S::Score: Score,

Source§

type Cursor<'a> = ArenaMoveCursor<S, DescriptorMoveUnion<S>> where Self: 'a

Source§

impl<S> MoveSelector<S, DescriptorMoveUnion<S>> for DescriptorSelectorNode<S>
where S: PlanningSolution + 'static, S::Score: Score,

Source§

type Cursor<'a> = DescriptorSelectorCursor<S> where Self: 'a

Source§

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

Source§

type Cursor<'a> = ArenaMoveCursor<S, DescriptorMoveUnion<S>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = ArenaMoveCursor<S, DescriptorMoveUnion<S>> where Self: 'a

Source§

impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for ConflictRepairSelector<S>
where S: PlanningSolution + 'static,

Source§

type Cursor<'a> = ConflictRepairCursor<S> where Self: 'a

Source§

impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for CoverageRepairSelector<S>
where S: PlanningSolution + 'static,

Source§

type Cursor<'a> = CoverageRepairCursor<S> where Self: 'a

Source§

impl<S> MoveSelector<S, ScalarMoveUnion<S, usize>> for GroupedScalarSelector<S>
where S: PlanningSolution + 'static,

Source§

type Cursor<'a> = GroupedScalarCursor<S> where Self: 'a

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§

type Cursor<'a> = UnionMoveCursor<S, M, <A as MoveSelector<S, M>>::Cursor<'a>, <B as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = IndexedMoveCursor<S, M, <Inner as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = IndexedMoveCursor<S, M, <Inner as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = IndexedMoveCursor<S, M, <Inner as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = IndexedMoveCursor<S, M, <Inner as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = VecUnionMoveCursor<S, M, <Leaf as MoveSelector<S, M>>::Cursor<'a>> where Self: 'a

Source§

impl<S, M, Left, Right> MoveSelector<S, M> for CartesianProductSelector<S, M, Left, Right>
where S: PlanningSolution, M: Move<S> + 'static, Left: MoveSelector<S, M>, Right: MoveSelector<S, M>,

Source§

type Cursor<'a> = CartesianProductCursor<S, M> where Self: 'a

Source§

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

Source§

type Cursor<'a> = ArenaMoveCursor<S, ListRuinMove<S, V>> where Self: 'a

Source§

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

Source§

type Cursor<'a> = ArenaMoveCursor<S, RuinMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ListChangeMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ListSwapMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, KOptMove<S, V>> where Self: 'a

Source§

impl<S, V, DM, IDM> MoveSelector<S, NeighborhoodMove<S, V>> for CartesianChildSelector<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§

type Cursor<'a> = CartesianChildCursor<'a, S, V, DM, IDM> where Self: 'a

Source§

impl<S, V, DM, IDM> MoveSelector<S, NeighborhoodMove<S, V>> for Neighborhood<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§

type Cursor<'a> = NeighborhoodCursor<'a, S, V, DM, IDM> where Self: 'a

Source§

impl<S, V, DM, IDM> MoveSelector<S, NeighborhoodMove<S, V>> for NeighborhoodLeaf<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§

type Cursor<'a> = NeighborhoodLeafCursor<'a, S, V, DM, IDM> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, KOptMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ListChangeMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ListReverseMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ListSwapMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, SublistChangeMove<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, SublistSwapMove<S, V>> where Self: 'a

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>,

Source§

type Cursor<'a> = ArenaMoveCursor<S, ScalarMoveUnion<S, V>> where Self: 'a

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§

type Cursor<'a> = ArenaMoveCursor<S, ChangeMove<S, V>> where Self: 'a

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>,

Source§

type Cursor<'a> = ArenaMoveCursor<S, ScalarMoveUnion<S, V>> where Self: 'a

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>,

Source§

type Cursor<'a> = ArenaMoveCursor<S, SwapMove<S, V>> where Self: 'a