[−][src]Struct gauss_quad::Midpoint
A midpoint rule quadrature scheme.
// initialize a midpoint rule with 100 cells let quad: Midpoint = Midpoint::init(100); // numerically integrate a function from -1.0 to 1.0 using the midpoint rule let approx = quad.integrate(-1.0, 1.0, |x| x * x);
Implementations
impl Midpoint
[src]
pub fn init(degree: usize) -> Self
[src]
Initialize a new midpoint rule with degree
number of cells.
pub fn integrate<F>(&self, a: f64, b: f64, integrand: F) -> f64 where
F: Fn(f64) -> f64,
[src]
F: Fn(f64) -> f64,
Integrate over the domain [a, b].
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Midpoint
impl Send for Midpoint
impl Sync for Midpoint
impl Unpin for Midpoint
impl UnwindSafe for Midpoint
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> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
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>,