[−][src]Struct gauss_quad::legendre::GaussLegendre
Fields
nodes: Vec<f64>
weights: Vec<f64>
Implementations
impl GaussLegendre
[src]
pub fn init(deg: usize) -> GaussLegendre
[src]
pub fn nodes_and_weights(deg: usize) -> (Vec<f64>, Vec<f64>)
[src]
Apply Golub-Welsch algorithm to determine Gauss-Legendre nodes & weights construct companion matrix A for the Hermite Polynomial using the relation: (n+1)/(2n+1) P_{n+1} + n/(2n+1) P_{n-1} = x P_n A similar matrix that is symmetrized is constructed by C = D A D^{-1} where D is a diagonal matrix and det(C-t1) = det(A-t1) Resulting in a symmetric tridiagonal matrix with 0 on the diagonal & n/sqrt(4n^2 - 1) on the off-diagonal. Root & weight finding are equivalent to eigenvalue problem. see Gil, Segura, Temme - Numerical Methods for Special Functions
pub fn integrate<F>(&self, a: f64, b: f64, integrand: F) -> f64 where
F: Fn(f64) -> f64,
[src]
F: Fn(f64) -> f64,
Perform quadrature of integrand using given nodes x and weights w
Auto Trait Implementations
impl RefUnwindSafe for GaussLegendre
impl Send for GaussLegendre
impl Sync for GaussLegendre
impl Unpin for GaussLegendre
impl UnwindSafe for GaussLegendre
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, 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>,