FixableStateModel Class Reference

List of all members.


Detailed Description

Model with fixable state variables.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
$Version$
Date:
Date
Allows one or more state variables to be fixed. Fixing a variable removes it from the state, reducing the state size by one. The state may then be projected up into the full space of both state and fixed variables using the fromState() method, and back again using the toState() method.

The main purpose of this class is to allow the fixing of parameters, which is useful for diagnostics and model testing, with minimal changes to a model. For example, the transition() method of a ParticleFilterModel derived class can apply fromState() to the particle s passed to it to standardise its representation regardless of which variables are fixed, transition the standardised particle, then apply toState() before returning the result.

Definition at line 31 of file FixableStateModel.hpp.


Public Member Functions

 FixableStateModel ()
 Default constructor for restoring from serialization.
 FixableStateModel (const unsigned int N)
 Constructor.
virtual ~FixableStateModel ()
 Destructor.
virtual unsigned int getVariableSize () const
 Get number of non-fixed variables.
virtual unsigned int getFixedSize () const
 Get number of fixed variables.
void fix (const unsigned int i, const double value)
 Fix the value of a variable.
bool isFixed (const unsigned int i) const
 Is the value of a particular variable fixed?
double getFixedValue (const unsigned int i) const
 Get the value to which a particular variable is fixed.
indii::ml::aux::vector condense (const indii::ml::aux::vector &x) const
 Project vector of both fixed and state variables to state variables only.
indii::ml::aux::vector expand (const indii::ml::aux::vector &x) const
 Project vector of state variables into state and fixed variables.
indii::ml::aux::DiracPdf condense (const indii::ml::aux::DiracPdf &x) const
 Project vector of both fixed and state variables to state variables only.
indii::ml::aux::DiracPdf expand (const indii::ml::aux::DiracPdf &x) const
 Project vector of state variables into state and fixed variables.
template<class M>
condense (const M &x) const
 Project matrix (e.g.
template<class M>
expand (const M &x) const
 Project matrix (e.g.

Constructor & Destructor Documentation

FixableStateModel (  ) 

Default constructor for restoring from serialization.

Definition at line 8 of file FixableStateModel.cpp.

FixableStateModel ( const unsigned int  N  ) 

Constructor.

Parameters:
N Initial state size. One or more components of the state may subsequently be fixed and the state size will be reduced.

Definition at line 12 of file FixableStateModel.cpp.

~FixableStateModel (  )  [virtual]

Destructor.

Definition at line 23 of file FixableStateModel.cpp.


Member Function Documentation

unsigned int getVariableSize (  )  const [virtual]

Get number of non-fixed variables.

Definition at line 27 of file FixableStateModel.cpp.

unsigned int getFixedSize (  )  const [virtual]

Get number of fixed variables.

Definition at line 31 of file FixableStateModel.cpp.

void fix ( const unsigned int  i,
const double  value 
)

Fix the value of a variable.

If the variable is already fixed, its value is updated to the new value given.

Parameters:
i The index of the variable amongst both the fixed and state variables.
value Value to which to fix the variable.
Deprecated:
Use fix()

Todo:
Preservation in resize() is not yet implemented in uBLAS for sparse matrices. Copy into dense matrix at present, sparse matrices are used here for computational rather than storage efficiency after all. Review in future if preservation for sparse matrices is implemented in uBLAS.

Definition at line 35 of file FixableStateModel.cpp.

bool isFixed ( const unsigned int  i  )  const [inline]

Is the value of a particular variable fixed?

Parameters:
i The index of the variable amongst both the fixed and state variables.
Returns:
True if the value i is fixed, false otherwise.

Definition at line 194 of file FixableStateModel.hpp.

double getFixedValue ( const unsigned int  i  )  const [inline]

Get the value to which a particular variable is fixed.

Parameters:
i The index of the variable amongst both the fixed and state variables.
Returns:
The value of the variable if fixed, undefined if not fixed.

Definition at line 209 of file FixableStateModel.hpp.

indii::ml::aux::vector condense ( const indii::ml::aux::vector x  )  const [inline]

Project vector of both fixed and state variables to state variables only.

Parameters:
x Vector of both fixed and state variables.
Returns:
Vector of state variables only.

Definition at line 217 of file FixableStateModel.hpp.

indii::ml::aux::vector expand ( const indii::ml::aux::vector x  )  const [inline]

Project vector of state variables into state and fixed variables.

Parameters:
x Vector of state variables only.
Returns:
Vector of both fixed and state variables.

Definition at line 233 of file FixableStateModel.hpp.

indii::ml::aux::DiracPdf condense ( const indii::ml::aux::DiracPdf x  )  const [inline]

Project vector of both fixed and state variables to state variables only.

Parameters:
x Vector of both fixed and state variables.
Returns:
Vector of state variables only.

Definition at line 250 of file FixableStateModel.hpp.

indii::ml::aux::DiracPdf expand ( const indii::ml::aux::DiracPdf x  )  const [inline]

Project vector of state variables into state and fixed variables.

Parameters:
x Vector of state variables only.
Returns:
Vector of both fixed and state variables.

Definition at line 266 of file FixableStateModel.hpp.

M condense ( const M &  x  )  const [inline]

Project matrix (e.g.

covariance matrix) of both fixed and state variables to state variables only.

Parameters:
x Matrix of both fixed and state variables.
Returns:
Matrix of state variables only.

Definition at line 283 of file FixableStateModel.hpp.

M expand ( const M &  x  )  const [inline]

Project matrix (e.g.

covariance matrix) of state variables only to both fixed and state variables.

Parameters:
x Matrix of state variables only.
Returns:
Matrix of both fixed and state variables.

Definition at line 300 of file FixableStateModel.hpp.


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