pub trait FallibleIntegrable {
type Float: IntegrableFloat;
type Input: ComplexField<RealField = Self::Float> + Copy;
type Output: Clone;
type Error: Send + Sync + Debug + 'static;
// Required method
fn fallible_integrand(
&self,
input: &Self::Input,
) -> Result<Self::Output, Self::Error>;
}Expand description
Function-like object that can be numerically integrated.
An Integrable defines:
- the scalar type used internally by the integrator (
Float), - the input domain (
Input), - the output type (
Output),
together with a method for evaluating the integrand.
§Associated types
Float: underlying floating-point type.Input: integration domain. This may be real or complex.Output: value returned by the integrand.Error: error returned by the integrand.
§Examples
A real-valued function:
f : ℝ → ℝA contour integrand:
f : ℂ → ℂA vector-valued integrand:
f : ℝ → ℝⁿRequired Associated Types§
Sourcetype Float: IntegrableFloat
type Float: IntegrableFloat
Underlying floating-point type used by the integrator.
Sourcetype Input: ComplexField<RealField = Self::Float> + Copy
type Input: ComplexField<RealField = Self::Float> + Copy
Input domain of the integrand.
This may be a real scalar such as f64 or a complex scalar used for
contour integration.
Sourcetype Output: Clone
type Output: Clone
Output of the integrand.
This may be a scalar, complex scalar, vector, matrix, or other type
implementing [IntegrationOutput].
type Error: Send + Sync + Debug + 'static
Required Methods§
Sourcefn fallible_integrand(
&self,
input: &Self::Input,
) -> Result<Self::Output, Self::Error>
fn fallible_integrand( &self, input: &Self::Input, ) -> Result<Self::Output, Self::Error>
Evaluates the integrand at input.
This method performs no validation and may return non-finite values.
Integrators should generally call
checked_integrand instead unless they
explicitly wish to handle invalid values themselves.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".