#[non_exhaustive]pub struct McEvalConfig {
pub samples: usize,
pub seed: u64,
pub confidence: f64,
pub max_nonmonotone_iterations: usize,
pub sampling_method: Option<McSamplingMethod>,
pub allow_cpu_oracle_fallback: bool,
}Expand description
Configuration for Monte Carlo probabilistic inference.
Use McEvalConfig::default() as a starting point and then update the
individual fields you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.samples: usizeNumber of Monte Carlo samples.
seed: u64RNG seed (deterministic).
confidence: f64Two-sided confidence level in (0,1) (e.g., 0.95).
max_nonmonotone_iterations: usizeMaximum SCC iteration steps for non-monotone cycle detection.
sampling_method: Option<McSamplingMethod>Sampling method override. None = auto-select (EvidenceClamping when forceable, Rejection otherwise).
allow_cpu_oracle_fallback: boolAllow the host CPU oracle (McProgram::evaluate_cpu) when the
resident GPU engine rejects the program. Default false: a rejected
program fails closed with the typed rejection instead of silently
running on the CPU. When set, the oracle result is labeled
McEngine::CpuOracle and must never serve as GPU-native evidence.
Implementations§
Source§impl McEvalConfig
impl McEvalConfig
Sourcepub fn from_directives(directives: &Directives) -> Result<Self>
pub fn from_directives(directives: &Directives) -> Result<Self>
Resolves Monte Carlo settings from program directives and validates them.
Sourcepub fn apply_overrides(&mut self, overrides: McEvalOverrides) -> Result<()>
pub fn apply_overrides(&mut self, overrides: McEvalOverrides) -> Result<()>
Apply only explicitly supplied caller values, then validate the resolved config.
Trait Implementations§
Source§impl Clone for McEvalConfig
impl Clone for McEvalConfig
Source§fn clone(&self) -> McEvalConfig
fn clone(&self) -> McEvalConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more