pub struct AdmissibilityEnvelope {
pub residual_lower: f64,
pub residual_upper: f64,
pub drift_limit: f64,
pub slew_limit: f64,
pub phase: WorkloadPhase,
pub boundary_fraction: f64,
}Expand description
Admissibility envelope for a single residual source under a specific workload phase.
The envelope defines upper and lower bounds on the residual value, drift, and slew. A residual sign is classified based on its position relative to these bounds.
Fields§
§residual_lower: f64Lower bound on acceptable residual magnitude.
residual_upper: f64Upper bound on acceptable residual magnitude.
drift_limit: f64Maximum acceptable drift magnitude (absolute value).
slew_limit: f64Maximum acceptable slew magnitude (absolute value).
phase: WorkloadPhaseWorkload phase this envelope applies to.
boundary_fraction: f64Boundary fraction: the fraction of the envelope width at which the grammar transitions from Admissible to Boundary. Typically 0.8 (i.e., 80% of the way to the limit).
Implementations§
Source§impl AdmissibilityEnvelope
impl AdmissibilityEnvelope
Sourcepub fn new(
residual_lower: f64,
residual_upper: f64,
drift_limit: f64,
slew_limit: f64,
phase: WorkloadPhase,
boundary_fraction: f64,
) -> Self
pub fn new( residual_lower: f64, residual_upper: f64, drift_limit: f64, slew_limit: f64, phase: WorkloadPhase, boundary_fraction: f64, ) -> Self
Create a new envelope with the given bounds.
boundary_fraction is clamped to [0.5, 0.99].
Sourcepub fn symmetric(
half_width: f64,
drift_limit: f64,
slew_limit: f64,
phase: WorkloadPhase,
) -> Self
pub fn symmetric( half_width: f64, drift_limit: f64, slew_limit: f64, phase: WorkloadPhase, ) -> Self
Construct a symmetric envelope centered at zero with the given half-width.
Sourcepub fn classify(&self, sign: &ResidualSign) -> EnvelopePosition
pub fn classify(&self, sign: &ResidualSign) -> EnvelopePosition
Classify a residual sign against this envelope.
The classification considers residual magnitude, drift, and slew independently. The most severe classification wins.
Sourcepub fn residual_width(&self) -> f64
pub fn residual_width(&self) -> f64
Envelope width (upper - lower) for the residual dimension.
Sourcepub fn fractional_position(&self, residual: f64) -> f64
pub fn fractional_position(&self, residual: f64) -> f64
Fractional position of a residual value within the envelope [0.0, 1.0+]. Values > 1.0 indicate exterior position.
Trait Implementations§
Source§impl Clone for AdmissibilityEnvelope
impl Clone for AdmissibilityEnvelope
Source§fn clone(&self) -> AdmissibilityEnvelope
fn clone(&self) -> AdmissibilityEnvelope
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more