StochasticEulerMaruyama Class Template Reference

Inheritance diagram for StochasticEulerMaruyama:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class DT = indii::ml::aux::matrix, class DDT = indii::ml::aux::zero_matrix>
class indii::ml::sde::StochasticEulerMaruyama< DT, DDT >

Stochastic Euler-Maruyama method with fixed time step for solving a system of stochastic differential equations.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
Parameters:
DT Type of the diffusion matrix.
DDT Type of the diffusion partial derivative matrices.
This class numerically solves StochasticDifferentialModel models defining a system of stochastic differential equations using an Euler-Maruyama scheme. The time step is fixed and no error control used.

The general usage idiom is as for indii::ml::ode::AdaptiveRungeKutta.

Todo:
This class is tightly coupled with the GSL and would benefit from greater independence.

Definition at line 33 of file StochasticEulerMaruyama.hpp.


Public Member Functions

 StochasticEulerMaruyama (StochasticDifferentialModel< DT, DDT > *model)
 Constructor.
 StochasticEulerMaruyama (StochasticDifferentialModel< DT, DDT > *model, const indii::ml::aux::vector &y0)
 Constructor.
virtual ~StochasticEulerMaruyama ()
 Destructor.
virtual double step (double upper)
 Advance the system one time step.
virtual double stepBack (double lower)
 Rewind the system one time step.
virtual int calculateDerivativesForward (double t, const double y[], double dydt[])
 Calculate derivatives for forwards step.
virtual int calculateDerivativesBackward (double t, const double y[], double dydt[])
 Calculate derivatives for backwards step.

Constructor & Destructor Documentation

StochasticEulerMaruyama ( StochasticDifferentialModel< DT, DDT > *  model  )  [inline]

Constructor.

Parameters:
model Model to estimate.
The time is initialised to zero, but the state is uninitialised and should be set with setVariable() or setState().

Definition at line 98 of file StochasticEulerMaruyama.hpp.

StochasticEulerMaruyama ( StochasticDifferentialModel< DT, DDT > *  model,
const indii::ml::aux::vector y0 
) [inline]

Constructor.

Parameters:
model Model to estimate.
y0 Initial state.
The time is initialised to zero and the state to that given.

Definition at line 109 of file StochasticEulerMaruyama.hpp.

~StochasticEulerMaruyama (  )  [inline, virtual]

Destructor.

Definition at line 123 of file StochasticEulerMaruyama.hpp.


Member Function Documentation

double step ( double  upper  )  [inline, virtual]

Advance the system one time step.

The size of the step is chosen to be optimal given the provided error bounds. State variables are updated to this new time after completion of the step.

Parameters:
upper Upper bound on time. This must be greater than the current time. The current time is guaranteed not to exceed this value after the step is complete. It may equal this time, and indeed if step() is continuously called with the same upper bound it will eventually do so.
Returns:
The new current time.

Reimplemented from NumericalSolver.

Definition at line 128 of file StochasticEulerMaruyama.hpp.

double stepBack ( double  lower  )  [inline, virtual]

Rewind the system one time step.

This works in the same fashion at step(), except that the step is backwards in time.

Parameters:
lower Lower bound on time. This must be less than the current time. The current time is guaranteed not to be below this value after the step is complete. It may equal this time, and indeed if stepBack() is continuously called with the same lower bound it will eventually do so.
Returns:
The new current time.

Reimplemented from NumericalSolver.

Definition at line 176 of file StochasticEulerMaruyama.hpp.

int calculateDerivativesForward ( double  t,
const double  y[],
double  dydt[] 
) [inline, virtual]

Calculate derivatives for forwards step.

Implements NumericalSolver.

Definition at line 184 of file StochasticEulerMaruyama.hpp.

int calculateDerivativesBackward ( double  t,
const double  y[],
double  dydt[] 
) [inline, virtual]

Calculate derivatives for backwards step.

Implements NumericalSolver.

Definition at line 193 of file StochasticEulerMaruyama.hpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3