#[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
impl Clone for SeedPurpose
Source§fn clone(&self) -> SeedPurpose
fn clone(&self) -> SeedPurpose
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SeedPurpose
Source§impl Debug for SeedPurpose
impl Debug for SeedPurpose
impl Eq for SeedPurpose
Source§impl Hash for SeedPurpose
impl Hash for SeedPurpose
Source§impl PartialEq for SeedPurpose
impl PartialEq for SeedPurpose
impl StructuralPartialEq for SeedPurpose
Auto Trait Implementations§
impl Freeze for SeedPurpose
impl RefUnwindSafe for SeedPurpose
impl Send for SeedPurpose
impl Sync for SeedPurpose
impl Unpin for SeedPurpose
impl UnsafeUnpin for SeedPurpose
impl UnwindSafe for SeedPurpose
Blanket Implementations§
impl<T> Boilerplate for T
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompilationArg for T
impl<T> CompilationArg for T
Source§fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
impl<T> CubeComptime for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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