StochasticAdaptiveRungeKutta Class Template Reference

Inheritance diagram for StochasticAdaptiveRungeKutta:

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::StochasticAdaptiveRungeKutta< DT, DDT >

Stochastic Adaptive Runge-Kutta method 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 adaptive time step 4th/5th order (~2th/2.5th order for stochastic systems) Runge-Kutta-Fehlberg method, as implemented in the GSL.

The general usage idiom is as for indii::ml::ode::AdaptiveRungeKutta. The class will automatically keep track of Wiener process increments.

References

Wilkie, J. Numerical methods for stochastic differential equations. Physical Review E, 2004, 70

Särkkä, S. Recursive Bayesian Inference on Stochastic Differential Equations. PhD thesis, Helsinki University of Technology, 2006.

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

Definition at line 51 of file StochasticAdaptiveRungeKutta.hpp.


Public Member Functions

 StochasticAdaptiveRungeKutta (StochasticDifferentialModel< DT, DDT > *model)
 Constructor.
 StochasticAdaptiveRungeKutta (StochasticDifferentialModel< DT, DDT > *model, const indii::ml::aux::vector &y0)
 Constructor.
virtual ~StochasticAdaptiveRungeKutta ()
 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

StochasticAdaptiveRungeKutta ( 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 166 of file StochasticAdaptiveRungeKutta.hpp.

StochasticAdaptiveRungeKutta ( 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 185 of file StochasticAdaptiveRungeKutta.hpp.

~StochasticAdaptiveRungeKutta (  )  [inline, virtual]

Destructor.

Definition at line 207 of file StochasticAdaptiveRungeKutta.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 212 of file StochasticAdaptiveRungeKutta.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 326 of file StochasticAdaptiveRungeKutta.hpp.

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

Calculate derivatives for forwards step.

Implements NumericalSolver.

Definition at line 334 of file StochasticAdaptiveRungeKutta.hpp.

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

Calculate derivatives for backwards step.

Implements NumericalSolver.

Definition at line 341 of file StochasticAdaptiveRungeKutta.hpp.


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