Skip to main content

UChart

Struct UChart 

Source
pub struct UChart { /* private fields */ }
Expand description

Defects per unit (U) chart.

Monitors the defect rate when the area of opportunity (inspection size) varies between subgroups. Control limits are computed individually for each subgroup based on its inspection size.

§Formulas

  • CL = u-bar = total_defects / total_units
  • UCL_i = u-bar + 3 * sqrt(u-bar / n_i)
  • LCL_i = max(0, u-bar - 3 * sqrt(u-bar / n_i))

§Reference

Montgomery, D.C. (2019). Introduction to Statistical Quality Control, 8th ed., Chapter 7, Section 7.4.

Implementations§

Source§

impl UChart

Source

pub fn new() -> Self

Create a new U chart.

Source

pub fn add_sample(&mut self, defects: u64, units_inspected: f64)

Add a sample with the number of defects and the number of units inspected.

The units_inspected can be fractional (e.g., area or length). Ignores samples where units_inspected <= 0 or is not finite.

Source

pub fn u_bar(&self) -> Option<f64>

Get the overall defect rate (u-bar), or None if no data.

Source

pub fn points(&self) -> &[AttributeChartPoint]

Get all chart points.

Source

pub fn is_in_control(&self) -> bool

Check if the process is in statistical control.

Trait Implementations§

Source§

impl Default for UChart

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for UChart

§

impl RefUnwindSafe for UChart

§

impl Send for UChart

§

impl Sync for UChart

§

impl Unpin for UChart

§

impl UnwindSafe for UChart

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V