PSCF v1.1
|
Generator for a discrete AR(1) Markov process. More...
#include <Ar1Process.h>
Public Member Functions | |
Ar1Process () | |
Constructor. More... | |
Ar1Process (Random &random) | |
Constructor. More... | |
void | setRNG (Random &random) |
Associate a random number generator. More... | |
void | init (double tau) |
Initialize process. More... | |
double | operator() () |
Generate and return a new value. More... | |
Generator for a discrete AR(1) Markov process.
An auto-regressive AR(1) process is a discrete stationary Markov process x(n) with an autocorrelation function <x(n)*x(n+m)> = exp(-m/tau), where tau is a decay time. It is a discrete version of the Ornstein-Uhlenbeck continuous Markov process.
Definition at line 27 of file Ar1Process.h.
Util::Ar1Process::Ar1Process | ( | ) |
Constructor.
Definition at line 16 of file Ar1Process.cpp.
Util::Ar1Process::Ar1Process | ( | Random & | random | ) |
Constructor.
random | associated random number generator. |
Definition at line 27 of file Ar1Process.cpp.
void Util::Ar1Process::setRNG | ( | Random & | random | ) |
Associate a random number generator.
random | associated random number generator. |
Definition at line 38 of file Ar1Process.cpp.
void Util::Ar1Process::init | ( | double | tau | ) |
Initialize process.
tau | decay time (in discrete steps) |
Definition at line 46 of file Ar1Process.cpp.
References Util::Random::gaussian(), and UTIL_THROW.
|
inline |
Generate and return a new value.
Definition at line 77 of file Ar1Process.h.
References Util::Random::gaussian().