[−][src]Function bacon_sci::special::hermite
pub fn hermite<N: ComplexField>(
n: u32,
tol: N::RealField
) -> Result<Polynomial<N>, String>
Get the nth hermite polynomial.
Gets the nth physicist's hermite polynomial over a specified field. This is done using the recurrance relation so the normalization is standard for the physicist's hermite polynomial.
Examples
use bacon_sci::special::hermite; fn example() { let h_3 = hermite::<f64>(3, 1e-8).unwrap(); assert_eq!(h_3.order(), 3); assert!(h_3.get_coefficient(0).abs() < 0.0001); assert!((h_3.get_coefficient(1) - 12.0).abs() < 0.0001); assert!(h_3.get_coefficient(2).abs() < 0.0001); assert!((h_3.get_coefficient(3) - 8.0).abs() < 0.0001); }