Skip to main content

QualityGateCheckInputs

Struct QualityGateCheckInputs 

Source
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 Posterior

Current posterior distribution.

§prior_cov_marginal: &'a Matrix9

Marginal 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: f64

Effect threshold θ in nanoseconds (user’s requested threshold).

§n_total: usize

Total samples per class collected so far.

§elapsed_secs: f64

Elapsed 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: f64

Samples 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: f64

Floor-rate constant (c_floor) from calibration. Used to compute theta_floor(n) = c_floor / sqrt(n).

§theta_tick: f64

Timer 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: f64

Projection 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§

Source§

impl<'a> Debug for QualityGateCheckInputs<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.