Function fang_oost::get_density [−][src]
pub fn get_density<'a, 'b: 'a, T>(
num_u: usize,
x: &'b [f64],
fn_inv: T
) -> impl IndexedParallelIterator<Item = f64> + 'a where
T: Fn(&Complex<f64>) -> Complex<f64> + Sync + Send + 'a,
Returns iterator over density from user supplied domain
Remarks
The endpoints of the x vector should have a large enough domain for accuracy.
Examples
extern crate num_complex; use num_complex::Complex; extern crate fang_oost; let x = vec![-20.0, 3.0, 25.0]; let num_u = 256; let mu = 2.0; let sigma = 5.0; let norm_cf = |u:&Complex<f64>|(u*mu+0.5*u*u*sigma*sigma).exp(); let density = fang_oost::get_density( num_u, &x, &norm_cf );