pub struct ExperimentSeed {
pub master_seed: u64,
pub component_seeds: HashMap<String, u64>,
pub ieee_strict: bool,
}Expand description
Seed management for reproducible experiments.
Implements EDD-03: Deterministic Reproducibility.
ⓘ
let seed = ExperimentSeed::new(42);
let arrival_rng = seed.derive_rng("arrivals");
let service_rng = seed.derive_rng("service");Fields§
§master_seed: u64Master seed for all RNG operations
component_seeds: HashMap<String, u64>Per-component seeds derived from master
ieee_strict: boolIEEE 754 strict mode for floating-point reproducibility
Implementations§
Source§impl ExperimentSeed
impl ExperimentSeed
Sourcepub fn with_component(self, component: &str, seed: u64) -> Self
pub fn with_component(self, component: &str, seed: u64) -> Self
Pre-register a component seed.
Sourcepub fn derive_seed(&self, component: &str) -> u64
pub fn derive_seed(&self, component: &str) -> u64
Derive a seed for a specific component.
Uses deterministic derivation from master seed if not pre-registered.
Trait Implementations§
Source§impl Clone for ExperimentSeed
impl Clone for ExperimentSeed
Source§fn clone(&self) -> ExperimentSeed
fn clone(&self) -> ExperimentSeed
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExperimentSeed
impl RefUnwindSafe for ExperimentSeed
impl Send for ExperimentSeed
impl Sync for ExperimentSeed
impl Unpin for ExperimentSeed
impl UnsafeUnpin for ExperimentSeed
impl UnwindSafe for ExperimentSeed
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