#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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
pub fn from_directives(directives: &Directives) -> Result<Self>
pub fn validate(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for McEvalConfig
impl Clone for McEvalConfig
Source§fn clone(&self) -> McEvalConfig
fn clone(&self) -> McEvalConfig
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 McEvalConfig
impl Debug for McEvalConfig
Auto Trait Implementations§
impl Freeze for McEvalConfig
impl RefUnwindSafe for McEvalConfig
impl Send for McEvalConfig
impl Sync for McEvalConfig
impl Unpin for McEvalConfig
impl UnsafeUnpin for McEvalConfig
impl UnwindSafe for McEvalConfig
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