[][src]Struct gkquad::IntegrationResult

pub struct IntegrationResult { /* fields omitted */ }

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]

impl Debug for IntegrationResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.