Function fang_oost::get_discrete_cf [−][src]
pub fn get_discrete_cf<T>(
num_u: usize,
x_min: f64,
x_max: f64,
cf_fn: T
) -> Vec<Complex<f64>> where
T: Fn(&Complex<f64>) -> Complex<f64> + Sync + Send,
Expand description
Returns “raw” discrete cf @num_u the number of discrete steps in complex space @x_min the minimum value of the truncated x domain @x_max the maximum value of the truncated x domain @cf_fn characteristic function
Examples
extern crate num_complex;
use num_complex::Complex;
extern crate fang_oost;
let num_u = 256;
let x_min = -20.0;
let x_max = 25.0;
let mu=2.0;
let sigma:f64=5.0;
let norm_cf = |u:&Complex<f64>|(u*mu+0.5*u*u*sigma*sigma).exp();
let discrete_cf=fang_oost::get_discrete_cf(num_u, x_min, x_max, &norm_cf);