[−][src]Function cf_dist_utils::get_expectation_discrete_cf
pub fn get_expectation_discrete_cf(
x_min: f64,
x_max: f64,
discrete_cf: &[Complex<f64>]
) -> f64
Returns expectation given a discrete characteristic function.
Examples
extern crate num_complex; use num_complex::Complex; #[macro_use] extern crate approx; extern crate cf_dist_utils; let mu=2.0; let sigma=5.0; let num_u=128; let x_min=-20.0; let x_max=25.0; let norm_cf=vec![Complex::new(1.0, 1.0), Complex::new(-1.0, 1.0)]; let expectation=cf_dist_utils::get_expectation_discrete_cf( x_min, x_max, &norm_cf );