[−][src]Struct gkquad::single::Integrator
This is supported on
feature="single"
only.Integration Executor
This object is useful when you want to re-use the configuration.
use std::cell::Cell; use gkquad::Tolerance; use gkquad::single::Integrator; let m = Cell::new(1); let mut result = 1.0; let mut integrator = Integrator::auto(|x: f64| x.powi(m.get())) .tolerance(Tolerance::Relative(1e-7)) .limit(100); while m.get() <= 10 { result *= integrator.run(0.0..1.0).estimate().unwrap(); // increment the exponent m.set(m.get() + 1); }
Methods
impl<F: Integrand> Integrator<F, AUTO>
[src]
pub fn auto(integrand: F) -> Integrator<F, AUTO>
[src]
This is supported on
feature="single"
only.impl<F: Integrand, A: Algorithm<F>> Integrator<F, A>
[src]
pub fn new(integrand: F, algorithm: A) -> Integrator<F, A>
[src]
This is supported on
feature="single"
only.pub fn tolerance(self, t: Tolerance) -> Self
[src]
This is supported on
feature="single"
only.Set tolerance
pub fn limit(self, limit: usize) -> Self
[src]
This is supported on
feature="single"
only.Set maximum number of subintervals
pub fn points(self, pts: &[f64]) -> Self
[src]
This is supported on
feature="single"
only.Set singular points
pub fn get_algorithm(&self) -> &A
[src]
This is supported on
feature="single"
only.pub fn run<T: Into<Interval>>(&mut self, interval: T) -> IntegrationResult
[src]
This is supported on
feature="single"
only.Trait Implementations
impl<F: Clone + Integrand, A: Clone + Algorithm<F>> Clone for Integrator<F, A>
[src]
fn clone(&self) -> Integrator<F, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: Debug + Integrand, A: Debug + Algorithm<F>> Debug for Integrator<F, A>
[src]
impl<F: Default + Integrand, A: Default + Algorithm<F>> Default for Integrator<F, A>
[src]
fn default() -> Integrator<F, A>
[src]
impl<F: PartialEq + Integrand, A: PartialEq + Algorithm<F>> PartialEq<Integrator<F, A>> for Integrator<F, A>
[src]
fn eq(&self, other: &Integrator<F, A>) -> bool
[src]
fn ne(&self, other: &Integrator<F, A>) -> bool
[src]
impl<F: Integrand, A: Algorithm<F>> StructuralPartialEq for Integrator<F, A>
[src]
Auto Trait Implementations
impl<F, A> RefUnwindSafe for Integrator<F, A> where
A: RefUnwindSafe,
F: RefUnwindSafe,
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, A> Send for Integrator<F, A> where
A: Send,
F: Send,
A: Send,
F: Send,
impl<F, A> Sync for Integrator<F, A> where
A: Sync,
F: Sync,
A: Sync,
F: Sync,
impl<F, A> Unpin for Integrator<F, A> where
A: Unpin,
F: Unpin,
A: Unpin,
F: Unpin,
impl<F, A> UnwindSafe for Integrator<F, A> where
A: UnwindSafe,
F: UnwindSafe,
A: UnwindSafe,
F: UnwindSafe,
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>,