pub struct ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,{ /* private fields */ }Implementations§
Source§impl<S, M> ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn from_moves<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = M>,
pub fn push(&mut self, mov: M) -> CandidateId
pub fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = M>,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<S, M> Debug for ArenaMoveCursor<S, M>
impl<S, M> Debug for ArenaMoveCursor<S, M>
Source§impl<S, M> Default for ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> Default for ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
Source§impl<S, M> MoveCursor<S, M> for ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
impl<S, M> MoveCursor<S, M> for ArenaMoveCursor<S, M>where
S: PlanningSolution,
M: Move<S>,
Source§fn next_candidate(&mut self, _solution: &S) -> Option<CandidateId>
fn next_candidate(&mut self, _solution: &S) -> Option<CandidateId>
Pulls the next candidate against the caller’s live working solution. Read more
fn candidate(&self, id: CandidateId) -> Option<MoveCandidateRef<'_, S, M>>
fn take_candidate(&mut self, id: CandidateId) -> M
fn release_candidate(&mut self, id: CandidateId) -> bool
Source§fn next_candidate_with_director<D: Director<S>>(
&mut self,
director: &mut D,
) -> Option<CandidateId>
fn next_candidate_with_director<D: Director<S>>( &mut self, director: &mut D, ) -> Option<CandidateId>
Pulls the next candidate while lending the live director. Read more
Source§fn next_candidate_with_control<ShouldStop>(
&mut self,
solution: &S,
should_stop: &mut ShouldStop,
) -> Option<CandidateId>
fn next_candidate_with_control<ShouldStop>( &mut self, solution: &S, should_stop: &mut ShouldStop, ) -> Option<CandidateId>
Pulls the next candidate while allowing expensive cursor implementations
to observe solve control between units of generation work. A
None
result may mean either exhaustion or requested interruption, so callers
must recheck the same control signal before resolving an exhausted scan.fn next_owned_candidate(&mut self, solution: &S) -> Option<M>
fn next_owned_candidate_matching( &mut self, solution: &S, predicate: for<'a> fn(MoveCandidateRef<'a, S, M>) -> bool, ) -> Option<M>
fn next_owned_candidate_inspected<T, F>( &mut self, solution: &S, 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>
Auto Trait Implementations§
impl<S, M> Freeze for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: Freeze,
impl<S, M> RefUnwindSafe for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: RefUnwindSafe,
impl<S, M> Send for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: Send,
impl<S, M> Sync for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: Sync,
impl<S, M> Unpin for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: Unpin,
impl<S, M> UnsafeUnpin for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: UnsafeUnpin,
impl<S, M> UnwindSafe for ArenaMoveCursor<S, M>where
CandidateStore<S, M>: 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> 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