u_analytics/spc/mod.rs
1//! Statistical Process Control (SPC) charts.
2//!
3//! Provides control chart implementations for both variables and attributes data.
4//!
5//! # Variables Charts
6//!
7//! - [`XBarRChart`] — X-bar and Range chart for subgroup data (n=2..=25)
8//! - [`XBarSChart`] — X-bar and Standard Deviation chart for subgroup data (n=2..=25)
9//! - [`IndividualMRChart`] — Individual and Moving Range chart for individual observations
10//!
11//! # Attributes Charts
12//!
13//! - [`PChart`] — Proportion nonconforming (variable sample size)
14//! - [`NPChart`] — Count of nonconforming items (constant sample size)
15//! - [`CChart`] — Count of defects per unit (constant area of opportunity)
16//! - [`UChart`] — Defects per unit (variable area of opportunity)
17//!
18//! # Run Rules
19//!
20//! - [`RuleSet`] — any subset of the eight tests; [`RuleSet::nelson`] is the default
21//! - [`WesternElectricRules`] — the 4 classic run rules
22//! - [`NelsonRules`] — 8 rules (superset of Western Electric)
23//!
24//! # References
25//!
26//! - Montgomery, D.C. (2019). *Introduction to Statistical Quality Control*, 8th ed.
27//! - ASTM E2587 — Standard Practice for Use of Control Charts
28//! - Nelson, L.S. (1984). "The Shewhart Control Chart — Tests for Special Causes",
29//! *Journal of Quality Technology* 16(4), pp. 237-239.
30
31mod attributes;
32mod chart;
33mod rules;
34mod variables;
35
36pub use attributes::{
37 g_chart, laney_p_chart, laney_u_chart, t_chart, AttributeChartPoint, CChart, GChart,
38 GChartPoint, LaneyAttributePoint, LaneyPChart, LaneyUChart, NPChart, PChart, TChart,
39 TChartPoint, UChart,
40};
41pub use chart::{
42 ChartPoint, ControlChart, ControlChartError, ControlLimits, Violation, ViolationType,
43 MAX_SUBGROUP_SIZE, MIN_SUBGROUP_SIZE,
44};
45pub use rules::{NelsonRules, RuleSet, RunRule, WesternElectricRules};
46pub use variables::{IndividualMRChart, XBarRChart, XBarSChart};