pub trait IntegrationOutput<S>: Clone + Default {
type Float: IntegrableFloat;
// Required methods
fn add(&self, other: &Self) -> Self;
fn sub(&self, other: &Self) -> Self;
fn mul_scalar(&self, scalar: &S) -> Self;
fn modulus(&self) -> Self::Float;
fn is_finite(&self) -> bool;
fn max_component(&self) -> Self::Float;
fn mean_component(&self) -> Self::Float;
// Provided method
fn reduce_error(&self, mode: ErrorNorm) -> Self::Float { ... }
}Expand description
Type that can be used as an integrand output.
The integrator forms linear combinations of integrand outputs using scalar weights from the integration domain. Therefore an output must support addition, subtraction, multiplication by its scalar type, and division by its scalar type.
IntegrationOutput also provides scalar diagnostics:
modulus, used for absolute integral estimates,is_finite, used to detect invalid integrand values,reduce_error, used to convert an output-valued local error estimate into a scalar adaptive error.
§Associated types
Float: underlying real floating-point type.
Required Associated Types§
Sourcetype Float: IntegrableFloat
type Float: IntegrableFloat
Underlying real floating-point type.
Required Methods§
fn add(&self, other: &Self) -> Self
fn sub(&self, other: &Self) -> Self
fn mul_scalar(&self, scalar: &S) -> Self
Sourcefn modulus(&self) -> Self::Float
fn modulus(&self) -> Self::Float
Returns a scalar magnitude for this output.
For scalar outputs this is the absolute value or complex modulus. For array-like outputs this should return a norm-like aggregate magnitude.
Sourcefn max_component(&self) -> Self::Float
fn max_component(&self) -> Self::Float
Returns the largest component magnitude.
Sourcefn mean_component(&self) -> Self::Float
fn mean_component(&self) -> Self::Float
Returns the mean component magnitude.
Provided Methods§
Sourcefn reduce_error(&self, mode: ErrorNorm) -> Self::Float
fn reduce_error(&self, mode: ErrorNorm) -> Self::Float
Reduces this output to a scalar error according to mode.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".