pub struct ListRuinMove<S, V> { /* private fields */ }Expand description
A self-contained list ruin-and-recreate move.
Its public function-pointer constructor remains unchanged. Candidate
mutation, restore, undo, owner policy, precedence filtering, and tabu
mechanics live in move::list_kernel so runtime list moves reuse the same
implementation instead of translating through this facade.
Implementations§
Source§impl<S, V> ListRuinMove<S, V>
impl<S, V> ListRuinMove<S, V>
pub fn new( entity_index: usize, element_indices: &[usize], entity_count: fn(&S) -> usize, list_len: fn(&S, usize) -> usize, list_get: fn(&S, usize, usize) -> Option<V>, list_remove: fn(&mut S, usize, usize) -> V, list_insert: fn(&mut S, usize, usize, V), variable_name: &'static str, descriptor_index: usize, ) -> Self
pub fn with_element_owner_fn( self, element_owner_fn: Option<fn(&S, &V) -> Option<usize>>, ) -> Self
pub fn with_skip_empty_destinations(self, skip_empty_destinations: bool) -> Self
pub fn entity_index(&self) -> usize
pub fn element_indices(&self) -> &[usize]
pub fn ruin_count(&self) -> usize
Trait Implementations§
Source§impl<S, V> Clone for ListRuinMove<S, V>
impl<S, V> Clone for ListRuinMove<S, V>
Source§impl<S, V: Debug> Debug for ListRuinMove<S, V>
impl<S, V: Debug> Debug for ListRuinMove<S, V>
Source§impl<S, V> Move<S> for ListRuinMove<S, V>
impl<S, V> Move<S> for ListRuinMove<S, V>
type Undo = SmallVec<[(usize, usize, usize); 8]>
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 tabu_signature<D: Director<S>>( &self, score_director: &D, ) -> MoveTabuSignature
fn requires_hard_improvement(&self) -> bool
fn requires_score_improvement(&self) -> bool
Source§fn candidate_trace_identity(&self) -> Option<CandidateTraceIdentity>
fn candidate_trace_identity(&self) -> Option<CandidateTraceIdentity>
Returns the canonical identity used by opt-in candidate-pull tracing. Read more
fn for_each_affected_entity( &self, visitor: &mut dyn FnMut(MoveAffectedEntity<'_>), )
Source§impl<S, V> MoveCursor<S, ListRuinMove<S, V>> for ListRuinMoveCursor<S, V>
impl<S, V> MoveCursor<S, ListRuinMove<S, V>> for ListRuinMoveCursor<S, V>
fn next_candidate(&mut self) -> Option<CandidateId>
fn candidate( &self, id: CandidateId, ) -> Option<MoveCandidateRef<'_, S, ListRuinMove<S, V>>>
fn take_candidate(&mut self, id: CandidateId) -> ListRuinMove<S, V>
fn next_owned_candidate(&mut self) -> Option<ListRuinMove<S, V>>
fn next_owned_candidate_matching( &mut self, predicate: for<'a> fn(MoveCandidateRef<'a, S, ListRuinMove<S, V>>) -> bool, ) -> Option<ListRuinMove<S, V>>
fn release_candidate(&mut self, id: CandidateId) -> bool
fn next_owned_candidate_inspected<T, F>(&mut self, inspect: F) -> Option<(M, T)>
fn apply_owned_candidate<D: Director<S>>( &mut self, id: CandidateId, score_director: &mut D, )
fn selector_index(&self, _id: CandidateId) -> Option<usize>
Source§impl<S, V> MoveSelector<S, ListRuinMove<S, V>> for ListRuinMoveSelector<S, V>
impl<S, V> MoveSelector<S, ListRuinMove<S, V>> for ListRuinMoveSelector<S, V>
type Cursor<'a> = ListRuinMoveCursor<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 is_never_ending(&self) -> bool
Source§fn validate_cursor<D: Director<S>>(&self, _score_director: &D)
fn validate_cursor<D: Director<S>>(&self, _score_director: &D)
Validates director-dependent selector configuration without producing candidates. Read more
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>, )
Auto Trait Implementations§
impl<S, V> Freeze for ListRuinMove<S, V>
impl<S, V> RefUnwindSafe for ListRuinMove<S, V>
impl<S, V> Send for ListRuinMove<S, V>
impl<S, V> Sync for ListRuinMove<S, V>
impl<S, V> Unpin for ListRuinMove<S, V>
impl<S, V> UnsafeUnpin for ListRuinMove<S, V>
impl<S, V> UnwindSafe for ListRuinMove<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