Skip to main content

SeedPurpose

Enum SeedPurpose 

Source
#[repr(u8)]
pub enum SeedPurpose { Init = 0, Selection = 1, Crossover = 2, Mutation = 3, Replacement = 4, Trial = 5, Other = 6, LocalSearch = 7, EdaSampling = 8, Representative = 9, Transposition = 10, CmaSampling = 11, }
Expand description

Tag identifying which evolutionary operation a sub-stream is for.

Mixing the purpose into the seed means that, within a single generation, selection and mutation draw from non-overlapping PRNG streams — critical for reproducing trial-level determinism across refactors that reorder operator calls.

Variants§

§

Init = 0

Initial population sampling.

§

Selection = 1

Parent selection.

§

Crossover = 2

Recombination / crossover.

§

Mutation = 3

Mutation.

§

Replacement = 4

Replacement / survivor selection.

§

Trial = 5

Differential-evolution trial-vector construction.

§

Other = 6

Catch-all for strategy-specific stochastic steps.

§Isolation caveat

Unlike the named purposes (each owning a distinct operator role), Other is a shared bucket used by many unrelated strategies (evolutionary programming, ES, NEAT, NAS, and the swarm family: SALP/WOA/GWO/ABC/PSO/BAT). Two different strategies both passing Other get the same domain constant, so their cross-strategy isolation relies entirely on each call site passing a distinct base (and/or generation) — typically a fresh rng.next_u64(). If two Other call sites ever share the same (base, generation), their streams alias. Prefer a dedicated named variant for any operator that needs guaranteed isolation within a fixed (base, generation).

Note: this variant’s constant 0x9E37_79B9_7F4A_7C15 coincides with the φ64 golden-ratio multiplier applied to generation in seed_stream. No concrete collision exists today (no purpose uses constant 0, and the generation term is multiplied), but it is a latent footgun — do not assume the Other domain is independent of the generation axis.

§

LocalSearch = 7

Local-search refinement (memetic algorithms).

Used by crate::local_search searchers so a memetic wrapper’s per-individual refinement draws from a stream independent of the inner strategy’s selection/mutation/crossover/replacement streams.

§

EdaSampling = 8

Model sampling in estimation-of-distribution (EDA) strategies.

Used by crate::algorithms::eda so each generation draws its new population from an independent per-generation stream, isolated from every other operator purpose.

§

Representative = 9

Representative selection in cooperative co-evolution (CCGA).

Used by crate::coevolution so the Random and Archive representative-selection policies draw their opposing-population representatives from a stream independent of either sub-strategy’s selection/mutation/crossover/replacement streams.

§

Transposition = 10

Transposition operators (gene expression programming).

Used by crate::algorithms::gep so IS/RIS transposition draws from a stream independent of the point-mutation (Mutation) and crossover (Crossover) streams within the same generation.

§

CmaSampling = 11

Multivariate-Gaussian sampling in covariance-matrix strategies.

Used by crate::algorithms::cma_es and crate::algorithms::cmsa_es so each generation draws its N(m, σ²C) offspring (and, for CMSA-ES, the per-individual log-normal σ mutations) from a stream independent of every other operator purpose.

Trait Implementations§

Source§

impl Clone for SeedPurpose

Source§

fn clone(&self) -> SeedPurpose

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SeedPurpose

Source§

impl Debug for SeedPurpose

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SeedPurpose

Source§

impl Hash for SeedPurpose

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SeedPurpose

Source§

fn eq(&self, other: &SeedPurpose) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SeedPurpose

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Adaptor<()> for T

Source§

fn adapt(&self)

Adapt the type to be passed to a metric.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<C> CloneExpand for C
where C: Clone,

Source§

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CompilationArg for T
where T: Clone + PartialEq + Eq + Hash + Debug + Send + Sync + 'static,

Source§

fn dynamic_cast<Arg>(&self) -> Arg
where Arg: CompilationArg,

Compilation args should be the same even with different element types. However, it isn’t possible to enforce it with the type system. So, we make the compilation args serializable and dynamically cast them. Read more
Source§

impl<T> CubeComptime for T
where T: Debug + Hash + Eq + Clone + Copy,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more