PSCF v1.1
Public Member Functions | List of all members
Util::Ar1Process Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Ar1Process() [1/2]

Util::Ar1Process::Ar1Process ( )

Constructor.

Definition at line 16 of file Ar1Process.cpp.

◆ Ar1Process() [2/2]

Util::Ar1Process::Ar1Process ( Random random)

Constructor.

Parameters
randomassociated random number generator.

Definition at line 27 of file Ar1Process.cpp.

Member Function Documentation

◆ setRNG()

void Util::Ar1Process::setRNG ( Random random)

Associate a random number generator.

Parameters
randomassociated random number generator.

Definition at line 38 of file Ar1Process.cpp.

◆ init()

void Util::Ar1Process::init ( double  tau)

Initialize process.

Parameters
taudecay time (in discrete steps)

Definition at line 46 of file Ar1Process.cpp.

References Util::Random::gaussian(), and UTIL_THROW.

◆ operator()()

double Util::Ar1Process::operator() ( )
inline

Generate and return a new value.

Definition at line 77 of file Ar1Process.h.

References Util::Random::gaussian().


The documentation for this class was generated from the following files: