[−][src]Struct nikisas_test::error::Error
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,
F: RefUnwindSafe,
In: RefUnwindSafe,
impl<F, In> Send for Error<F, In> where
F: Send,
In: Send,
F: Send,
In: Send,
impl<F, In> Sync for Error<F, In> where
F: Sync,
In: Sync,
F: Sync,
In: Sync,
impl<F, In> Unpin for Error<F, In> where
F: Unpin,
In: Unpin,
F: Unpin,
In: Unpin,
impl<F, In> UnwindSafe for Error<F, In> where
F: UnwindSafe,
In: UnwindSafe,
F: UnwindSafe,
In: 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>,