Crate autoregressive[][src]

Create for sampling data from an autoregressive random process.

For more information, please see https://en.wikipedia.org/wiki/Autoregressive_model.

fn main() {
   let mut ar = autoregressive::univariate::Autoregressive::new(5.0, 1.0, &[0.5]);

   // Sample next value
   let n = ar.step();

   // Take 10 values as an iterator
   let n10 = ar.into_iter().take(10).collect::<Vec<f32>>();
}

Modules

univariate

Univariate AR model