[][src]Trait gauss_quad::gaussian_quadrature::QuadratureRule

pub trait QuadratureRule {
    fn nodes_and_weights(deg: usize) -> (Vec<f64>, Vec<f64>);
}

Required methods

Loading content...

Implementors

impl QuadratureRule for GaussHermite[src]

fn nodes_and_weights(deg: usize) -> (Vec<f64>, Vec<f64>)[src]

Apply Golub-Welsch algorithm to determine Gauss-Hermite nodes & weights construct companion matrix A for the Hermite Polynomial using the relation: 1/2 H_{n+1} + n H_{n-1} = x H_n A similar matrix that is symmetrized is constructed by D A D^{-1} Resulting in a symmetric tridiagonal matrix with 0 on the diagonal & sqrt(n/2) on the off-diagonal root & weight finding are equivalent to eigenvalue problem see Gil, Segura, Temme - Numerical Methods for Special Functions

impl QuadratureRule for GaussLegendre[src]

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

Loading content...