pub struct QualityGateCheckInputs<'a> {Show 14 fields
pub posterior: &'a Posterior,
pub prior_cov_marginal: &'a Matrix9,
pub theta_ns: f64,
pub n_total: usize,
pub elapsed_secs: f64,
pub recent_kl_sum: Option<f64>,
pub samples_per_second: f64,
pub calibration_snapshot: Option<&'a CalibrationSnapshot>,
pub current_stats_snapshot: Option<&'a CalibrationSnapshot>,
pub c_floor: f64,
pub theta_tick: f64,
pub projection_mismatch_q: Option<f64>,
pub projection_mismatch_thresh: f64,
pub lambda_mixing_ok: Option<bool>,
}Expand description
Inputs required to check quality gates.
This is a stateless struct that contains all the information needed to check quality gates, avoiding the need for mutable state or time tracking.
Fields§
§posterior: &'a PosteriorCurrent posterior distribution.
prior_cov_marginal: &'a Matrix9Marginal prior covariance matrix Λ₀^marginal = 2σ²R (for ν=4). This is the unconditional prior variance of δ under the t-prior. Used by Gate 1 for the KL divergence check (spec §3.5.2).
theta_ns: f64Effect threshold θ in nanoseconds (user’s requested threshold).
n_total: usizeTotal samples per class collected so far.
elapsed_secs: f64Elapsed time in seconds since adaptive phase started.
recent_kl_sum: Option<f64>Sum of recent KL divergences (last 5 batches).
Pass None if fewer than 5 batches have been collected.
samples_per_second: f64Samples per second (throughput from calibration).
calibration_snapshot: Option<&'a CalibrationSnapshot>Calibration snapshot for drift detection.
Pass None to skip drift detection.
current_stats_snapshot: Option<&'a CalibrationSnapshot>Current stats snapshot for drift detection.
Pass None to skip drift detection.
c_floor: f64Floor-rate constant (c_floor) from calibration. Used to compute theta_floor(n) = c_floor / sqrt(n).
theta_tick: f64Timer tick floor (theta_tick) from calibration. The floor below which timer quantization dominates.
projection_mismatch_q: Option<f64>Projection mismatch Q statistic (r^T Σ^{-1} r).
Pass None if not yet computed.
projection_mismatch_thresh: f64Projection mismatch threshold from bootstrap calibration.
lambda_mixing_ok: Option<bool>Whether the Gibbs sampler’s lambda chain mixed well (v5.4).
None if not using Gibbs sampler (mixture mode).
When Some(false), indicates potential posterior unreliability.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QualityGateCheckInputs<'a>
impl<'a> RefUnwindSafe for QualityGateCheckInputs<'a>
impl<'a> Send for QualityGateCheckInputs<'a>
impl<'a> Sync for QualityGateCheckInputs<'a>
impl<'a> Unpin for QualityGateCheckInputs<'a>
impl<'a> UnwindSafe for QualityGateCheckInputs<'a>
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.