pub trait ControlChart {
// Required methods
fn add_sample(&mut self, sample: &[f64]);
fn control_limits(&self) -> Option<ControlLimits>;
fn is_in_control(&self) -> bool;
fn violations(&self) -> Vec<Violation>;
fn points(&self) -> &[ChartPoint];
}Expand description
Trait for control charts that process subgroup or individual data.
Implementors accumulate sample data, compute control limits from the accumulated data, and detect violations using run rules.
Required Methods§
Sourcefn add_sample(&mut self, sample: &[f64])
fn add_sample(&mut self, sample: &[f64])
Add a sample (subgroup) to the chart.
For subgroup charts (X-bar-R, X-bar-S), the slice contains the individual measurements within one subgroup.
For individual charts (I-MR), the slice should contain exactly one element.
Sourcefn control_limits(&self) -> Option<ControlLimits>
fn control_limits(&self) -> Option<ControlLimits>
Get the computed control limits, or None if insufficient data.
Sourcefn is_in_control(&self) -> bool
fn is_in_control(&self) -> bool
Check if the process is in statistical control.
Returns true if no violations have been detected across all points.
Sourcefn violations(&self) -> Vec<Violation>
fn violations(&self) -> Vec<Violation>
Get all violations detected across all chart points.
Sourcefn points(&self) -> &[ChartPoint]
fn points(&self) -> &[ChartPoint]
Get all chart points.