[][src]Struct nikisas_test::error::Error

pub struct Error<F, In> { /* fields omitted */ }

Aggregator structure that compares computed and real values, input by input, computes the corresponding errors and stores them.

The first generic parameter specifies the type of floating point used. The second one specifies the input argument(s). In most cases, this will be a single floating point number, however, for multiple argument functions this can be a tuple.

Implementations

impl<F: FloatExt, In: Debug + Default + Copy> Error<F, In>[src]

pub fn new() -> Self[src]

Initializes the structure without any bounds.

pub fn with_bounds(bounds: ErrorBounds<F>) -> Self[src]

Initializes the structure with given bounds.

pub fn calculate(&mut self, arg: In, computed: F, real: F)[src]

Calculates the errors between computed value and real value. If it is the current maximum, its value is stored along with the argument that caused it.

pub fn max_rel(&self) -> F[src]

Returns maximum relative error encountered.

pub fn max_rel_arg(&self) -> In[src]

Returns the argument for maximum relative error encountered.

pub fn max_abs(&self) -> F[src]

Returns maximum absolute error encountered.

pub fn max_abs_arg(&self) -> In[src]

Returns the argument for absolute relative error encountered.

pub fn rms(&self) -> F[src]

Returns root-mean-square error for all values encountered.

pub fn assert(&self)[src]

Asserts the bounds for the errors that were encountered.

pub fn print_plain(&self, name: &str)[src]

Prints the errors (and arguments) in a plain, human-readable form.

pub fn print_csv(&self, name: &str)[src]

Prints the errors (and arguments) as one line in CSV format. Use print_csv_header method to print the header for the CSV file.

pub fn print_csv_header()[src]

Prints the header for CSV file which contents are given by print_csv method.

Auto Trait Implementations

impl<F, In> RefUnwindSafe for Error<F, In> where
    F: RefUnwindSafe,
    In: RefUnwindSafe

impl<F, In> Send for Error<F, In> where
    F: Send,
    In: Send

impl<F, In> Sync for Error<F, In> where
    F: Sync,
    In: Sync

impl<F, In> Unpin for Error<F, In> where
    F: Unpin,
    In: Unpin

impl<F, In> UnwindSafe for Error<F, In> where
    F: UnwindSafe,
    In: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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