Skip to main content

ControlChart

Trait ControlChart 

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

Source

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.

Source

fn control_limits(&self) -> Option<ControlLimits>

Get the computed control limits, or None if insufficient data.

Source

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.

Source

fn violations(&self) -> Vec<Violation>

Get all violations detected across all chart points.

Source

fn points(&self) -> &[ChartPoint]

Get all chart points.

Implementors§