[−][src]Struct nikisas_test::error::ErrorBounds
Bounds for errors to be asserted. By default, all are empty and therefore not checked. By specifying a bound for given error type, you enable checking it.
Examples
use nikisas_test::error::ErrorBounds; // Specify bounds for relative and absolute errors. let bounds = ErrorBounds::new().rel(0.001).abs(0.0001);
Implementations
impl<F: FloatExt> ErrorBounds<F>
[src]
pub fn new() -> Self
[src]
Creates empty bounds, that is, none is checked.
pub fn rel(self, bound: F) -> Self
[src]
Specifies the bound for maximum relative error.
pub fn abs(self, bound: F) -> Self
[src]
Specifies the bound for maximum absolute error.
pub fn rms(self, bound: F) -> Self
[src]
Specifies the bound for root-mean-square error.
pub fn check_rel_or_abs(&self, rel_err: F, abs_err: F) -> bool
[src]
Checks if the relative and absolute errors satisfy specified bounds.
pub fn check_abs(&self, abs_error: F) -> bool
[src]
Checks if the absolute error satisfies specified bound. This is mainly used when the relative error is undefined due to dividing by zero.
pub fn check_rms(&self, rms_error: F) -> bool
[src]
Checks if the root-mean-square error satisfies specified bound.
Auto Trait Implementations
impl<F> RefUnwindSafe for ErrorBounds<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for ErrorBounds<F> where
F: Send,
F: Send,
impl<F> Sync for ErrorBounds<F> where
F: Sync,
F: Sync,
impl<F> Unpin for ErrorBounds<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for ErrorBounds<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,