[−][src]Struct gkquad::prelude::IntegrationResult
Store the estimation of integral and estimated absolute error (delta) of calculation.
Methods
impl IntegrationResult
[src]
pub fn new(estimate: f64, delta: f64, error: Option<RuntimeError>) -> Self
[src]
Create IntegrationResult
object
pub fn estimate(&self) -> Result<f64, RuntimeError>
[src]
Get the estimation of integral.
Returns Err
if integration error has occured.
pub fn delta(&self) -> Result<f64, RuntimeError>
[src]
Get the estimated absolute error of integral.
Returns Err
if integration error has occured.
pub fn estimate_delta(&self) -> Result<(f64, f64), RuntimeError>
[src]
Get the estimation of integral and absolute error.
Returns Err
if integration error has occured.
Examples
use gkquad::single::integral; use core::f64::NEG_INFINITY; let result = integral(|x: f64| x.exp(), NEG_INFINITY..0.0); let (estimate, delta) = result.estimate_delta().unwrap();
pub unsafe fn estimate_unchecked(&self) -> f64
[src]
Get the estimation of integral even if integration error occured.
Safety
If integration error occured during computation, integration function will return the current estimation of integral anyway. In this case the estimation does not achieve the given tolerance.
You should use this function only if you don't care about the estimation error.
pub unsafe fn delta_unchecked(&self) -> f64
[src]
Get the estimated absolute error even if integration error has occured.
Safety
If integration error occured during computation, integration function will return the current estimation of integral anyway. In this case the estimation does not achieve the given tolerance, and the error estimation (delta) may not be reliable.
pub unsafe fn estimate_delta_unchecked(&self) -> (f64, f64)
[src]
Get the estimation of integral and absolute error even if integration error has occured.
Safety
See Safety secion
of estimate_unchecked
method and delta_unchecked
method.
pub fn has_err(&self) -> bool
[src]
Return true if integration error has occured.
pub fn err(&self) -> Option<RuntimeError>
[src]
Get integration error.
Return None
if any integration error has not occured.
Trait Implementations
impl Clone for IntegrationResult
[src]
fn clone(&self) -> IntegrationResult
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for IntegrationResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for IntegrationResult
impl Send for IntegrationResult
impl Sync for IntegrationResult
impl Unpin for IntegrationResult
impl UnwindSafe for IntegrationResult
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,