pub fn simulate<D, G, SC>(
drift: &D,
diffusion: &G,
scheme: &SC,
x0: f64,
t0: f64,
t1: f64,
n_paths: usize,
n_steps: usize,
seed: u64,
) -> Result<Array2<f64>, PathwiseError>Expand description
Simulate n_paths paths of a scalar SDE from t0 to t1 with n_steps steps.
Returns Array2(n_paths, n_steps + 1).
Generates both dw and dz per step; schemes that do not use dz ignore it.
Non-finite values are stored as NaN.