[][src]Function cf_dist_utils::get_cdf

pub fn get_cdf<T>(
    num_x: usize,
    num_u: usize,
    x_min: f64,
    x_max: f64,
    cf: T
) -> Vec<f64> where
    T: Fn(&Complex<f64>) -> Complex<f64> + Sync + Send

Returns vector of cumulative density function given a characteristic function.

Examples

extern crate num_complex;
use num_complex::Complex;
extern crate cf_dist_utils;
let mu = 2.0;
let sigma = 5.0;
let num_u = 128;
let num_x = 1024;
let x_min=-20.0;
let x_max=25.0;
let norm_cf=|u:&Complex<f64>| (u*mu+0.5*sigma*sigma*u*u).exp();
let cdf=cf_dist_utils::get_cdf(
    num_x, num_u, x_min, x_max, &norm_cf
);