[][src]Function bacon_sci::special::laguerre

pub fn laguerre<N: ComplexField>(n: u32) -> Polynomial<N>

Get the nth (positive) laguerre polynomial.

Gets the nth (positive) laguerre polynomial over a specified field. This is done using the direct formula and is properly normalized.

Examples

use bacon_sci::special::laguerre;
fn example() {
    let p_3 = laguerre::<f64>(3);
    assert_eq!(p_3.order(), 3);
    assert!((p_3.get_coefficient(0) - 1.0).abs() < 0.00001);
    assert!((p_3.get_coefficient(1) + 3.0).abs() < 0.00001);
    assert!((p_3.get_coefficient(2) - 9.0/6.0).abs() < 0.00001);
    assert!((p_3.get_coefficient(3) + 1.0/6.0).abs() < 0.00001);
}