pub struct Calibration<F> {
pub slope: F,
pub offset: F,
pub rms: Option<F>,
pub rsq: Option<F>,
}Expand description
Calibration struct as a convenience wrapper.
This includes optional elements for goodness of fit variables. The calibration model is linear, i.e. $y = m x + c$
Fields§
§slope: F§offset: F§rms: Option<F>§rsq: Option<F>Implementations§
Source§impl<F> Calibration<F>where
F: Copy,
impl<F> Calibration<F>where
F: Copy,
pub fn new( slope: F, offset: F, rms: Option<F>, rsq: Option<F>, ) -> Calibration<F>
Sourcepub fn with_slope(&self, slope: F) -> Calibration<F>
pub fn with_slope(&self, slope: F) -> Calibration<F>
Modifies the slope
pub fn with_offset(&self, offset: F) -> Calibration<F>
Trait Implementations§
Source§impl<'a, M: Copy + Default, F: Copy + ApproxEq<Margin = M>> ApproxEq for &'a Calibration<F>
Implements ApproxEq trait for Calibration struct
impl<'a, M: Copy + Default, F: Copy + ApproxEq<Margin = M>> ApproxEq for &'a Calibration<F>
Implements ApproxEq trait for Calibration struct
Source§type Margin = M
type Margin = M
This type type defines a margin within which two values are to be
considered approximately equal. It must implement
Default so that
approx_eq() can be called on unknown types.Auto Trait Implementations§
impl<F> Freeze for Calibration<F>where
F: Freeze,
impl<F> RefUnwindSafe for Calibration<F>where
F: RefUnwindSafe,
impl<F> Send for Calibration<F>where
F: Send,
impl<F> Sync for Calibration<F>where
F: Sync,
impl<F> Unpin for Calibration<F>where
F: Unpin,
impl<F> UnwindSafe for Calibration<F>where
F: UnwindSafe,
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