pub struct NasState<B: Backend> { /* private fields */ }Expand description
Evolving state for ArchNasStrategy: resident population plus best-ever
tracking.
Carries no PRNG state (the harness owns all stochasticity). Not Clone
(it holds a NasGenome, which is intentionally not Clone); the strategy
threads state by explicit reconstruction.
Implementations§
Source§impl<B: Backend> NasState<B>
impl<B: Backend> NasState<B>
Sourcepub fn generation(&self) -> usize
pub fn generation(&self) -> usize
Completed-generation counter (number of tell calls).
Sourcepub fn population(&self) -> &NasGenome<B>
pub fn population(&self) -> &NasGenome<B>
Sourcepub fn best_fitness(&self) -> f32
pub fn best_fitness(&self) -> f32
Best-ever fitness seen so far (canonical maximise), or −∞ before the
first tell.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for NasState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for NasState<B>where
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for NasState<B>
impl<B> Sync for NasState<B>
impl<B> Unpin for NasState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for NasState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for NasState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: 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