pub struct NelsonRules;Expand description
Nelson rules (8 rules, superset of Western Electric).
The full set of eight tests for special causes as defined by Nelson (1984). Rules 1, 2, 5, and 6 correspond to the Western Electric rules.
§Examples
use u_analytics::spc::{NelsonRules, RunRule, ChartPoint, ControlLimits};
let limits = ControlLimits { ucl: 28.0, cl: 25.0, lcl: 22.0 };
let points: Vec<ChartPoint> = vec![
ChartPoint { value: 25.0, index: 0, violations: vec![] },
ChartPoint { value: 29.0, index: 1, violations: vec![] },
];
let violations = NelsonRules.check(&points, &limits);
assert!(!violations.is_empty()); // Rule 1: point beyond UCLTrait Implementations§
Source§impl RunRule for NelsonRules
impl RunRule for NelsonRules
Source§fn check(
&self,
points: &[ChartPoint],
limits: &ControlLimits,
) -> Vec<(usize, ViolationType)>
fn check( &self, points: &[ChartPoint], limits: &ControlLimits, ) -> Vec<(usize, ViolationType)>
Apply all 8 Nelson run rules.
Auto Trait Implementations§
impl Freeze for NelsonRules
impl RefUnwindSafe for NelsonRules
impl Send for NelsonRules
impl Sync for NelsonRules
impl Unpin for NelsonRules
impl UnwindSafe for NelsonRules
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