pub struct QuadratureSolution { /* private fields */ }Expand description
The outcome of a single quadrature lane.
The fields are private on purpose, on the same reasoning as
OdeLaneSolution: Self::value returns Option<f64> and hands back
Some only for a lane that ran to completion, while the raw number is behind
the deliberately-named Self::last_value.
Copy, so it can be read out of a QuadratureBatch without cloning.
§Units
Self::value, Self::last_value and Self::error_estimate are in the
integral’s units (integrand times abscissa); Self::evaluations is a
dimensionless count.
Implementations§
Source§impl QuadratureSolution
impl QuadratureSolution
Sourcepub fn value(&self) -> Option<f64>
pub fn value(&self) -> Option<f64>
The integral, if this lane ran to completion.
None for every failure status. This is the accessor to reach for; the
Option is the point.
Sourcepub fn last_value(&self) -> f64
pub fn last_value(&self) -> f64
The last value the rule accumulated, complete or not.
The integral only when Self::status is
QuadratureStatus::Evaluated. For
QuadratureStatus::ToleranceNotMet this is the best estimate the
adaptive lane reached and is offered for diagnosis — for deciding whether
the lane was close or wildly off. For the other two statuses it is NaN,
because there is no honest number to report.
Sourcepub fn error_estimate(&self) -> f64
pub fn error_estimate(&self) -> f64
Estimated absolute error, in the integral’s units.
Meaningful only for adaptive_quadrature_batch, where it is the
summed Richardson estimate |S_2 - S_1| / 15 over the accepted
sub-intervals. NaN for every fixed QuadratureRule, because a fixed
rule has no error estimate to give and returning 0.0 would be a
falsehood.
Sourcepub fn evaluations(&self) -> u32
pub fn evaluations(&self) -> u32
Integrand evaluations this lane performed, dimensionless.
Fixed and predictable for a QuadratureRule; data-dependent for the
adaptive path, where it is the honest measure of how hard the integrand
was and the source of the load imbalance work-stealing exists to absorb.
Sourcepub fn status(&self) -> QuadratureStatus
pub fn status(&self) -> QuadratureStatus
How this lane ended.