pub struct ScenarioSource {
pub sampling_scheme: SamplingScheme,
pub seed: Option<i64>,
pub selection_mode: Option<ExternalSelectionMode>,
}Expand description
Top-level scenario source configuration, parsed from stages.json.
Groups the sampling scheme, random seed, and external selection mode
that govern how forward-pass scenarios are produced. Populated during
case loading by cobre-io from the scenario_source field in
stages.json. Distinct from ScenarioSourceConfig,
which also holds the branching factor (num_scenarios).
See Input Scenarios §1.4, §1.8.
§Examples
use cobre_core::scenario::{SamplingScheme, ScenarioSource};
let source = ScenarioSource {
sampling_scheme: SamplingScheme::InSample,
seed: Some(42),
selection_mode: None,
};
assert_eq!(source.sampling_scheme, SamplingScheme::InSample);Fields§
§sampling_scheme: SamplingSchemeNoise source used during the forward pass.
seed: Option<i64>Random seed for reproducible opening tree generation.
None means non-deterministic (OS entropy).
selection_mode: Option<ExternalSelectionMode>Selection mode when sampling_scheme is SamplingScheme::External.
None for InSample and Historical schemes.
Trait Implementations§
Source§impl Clone for ScenarioSource
impl Clone for ScenarioSource
Source§fn clone(&self) -> ScenarioSource
fn clone(&self) -> ScenarioSource
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 moreSource§impl Debug for ScenarioSource
impl Debug for ScenarioSource
Source§impl Default for ScenarioSource
impl Default for ScenarioSource
Source§impl PartialEq for ScenarioSource
impl PartialEq for ScenarioSource
impl StructuralPartialEq for ScenarioSource
Auto Trait Implementations§
impl Freeze for ScenarioSource
impl RefUnwindSafe for ScenarioSource
impl Send for ScenarioSource
impl Sync for ScenarioSource
impl Unpin for ScenarioSource
impl UnsafeUnpin for ScenarioSource
impl UnwindSafe for ScenarioSource
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