pub struct MissingnessAwareGrammar { /* private fields */ }Expand description
Applies the missingness policy across all features in a run sequence.
Call MissingnessAwareGrammar::process once per feature with the
raw imputed-value vector and the corresponding is_imputed mask.
The returned MissingnessAwareRecord vector can be used to gate the
downstream grammar layer: any record with
suppressed_by_missingness = true should be held at the previous
grammar state rather than allowing a new transition.
Implementations§
Source§impl MissingnessAwareGrammar
impl MissingnessAwareGrammar
pub fn new() -> Self
Sourcepub fn process(
&mut self,
feature_id: &str,
values: &[f64],
is_imputed: &[bool],
) -> Vec<MissingnessAwareRecord>
pub fn process( &mut self, feature_id: &str, values: &[f64], is_imputed: &[bool], ) -> Vec<MissingnessAwareRecord>
Process a feature’s run sequence and return annotated records.
§Arguments
feature_id— sensor identifier.values— slice of imputed sensor values (one per run).is_imputed— parallel slice indicating which values were imputed (i.e., the original sensor reading was missing).
Sourcepub fn trackers(&self) -> &HashMap<String, FeatureMissingnessTracker>
pub fn trackers(&self) -> &HashMap<String, FeatureMissingnessTracker>
Return all feature trackers for serialisation into the traceability manifest.
Sourcepub fn summary(&self) -> MissingSummary
pub fn summary(&self) -> MissingSummary
Return a summary for embedding in the run manifest JSON.
Trait Implementations§
Source§impl Debug for MissingnessAwareGrammar
impl Debug for MissingnessAwareGrammar
Source§impl Default for MissingnessAwareGrammar
impl Default for MissingnessAwareGrammar
Source§fn default() -> MissingnessAwareGrammar
fn default() -> MissingnessAwareGrammar
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MissingnessAwareGrammar
impl RefUnwindSafe for MissingnessAwareGrammar
impl Send for MissingnessAwareGrammar
impl Sync for MissingnessAwareGrammar
impl Unpin for MissingnessAwareGrammar
impl UnsafeUnpin for MissingnessAwareGrammar
impl UnwindSafe for MissingnessAwareGrammar
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