pub struct BatState<B: Backend> {
pub positions: Tensor<B, 2>,
pub velocities: Tensor<B, 2>,
pub loudness: Vec<f32>,
pub pulse_rate: Vec<f32>,
pub fitness: Vec<f32>,
pub best_genome: Option<Tensor<B, 2>>,
pub best_fitness: f32,
pub generation: usize,
pub pending_accept: Vec<bool>,
}Expand description
Generation state for BatAlgorithm.
Fields§
§positions: Tensor<B, 2>Current positions, shape (pop_size, D).
velocities: Tensor<B, 2>Current velocities, shape (pop_size, D).
loudness: Vec<f32>Per-bat loudness.
pulse_rate: Vec<f32>Per-bat pulse rate.
fitness: Vec<f32>Host-side fitness cache for the current positions.
best_genome: Option<Tensor<B, 2>>Best-so-far genome.
best_fitness: f32Best-so-far fitness.
generation: usizeGeneration counter.
pending_accept: Vec<bool>Per-generation “accept this candidate?” decisions recorded in
ask so tell can gate the loudness/pulse updates consistently
with the RNG draws.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for BatState<B>where
<B as Backend>::FloatTensorPrimitive: Freeze,
<B as Backend>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for BatState<B>where
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for BatState<B>
impl<B> Sync for BatState<B>
impl<B> Unpin for BatState<B>
impl<B> UnsafeUnpin for BatState<B>where
<B as Backend>::FloatTensorPrimitive: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for BatState<B>where
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::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> 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