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> | |
| M | condense (const M &x) const |
| Project matrix (e.g. | |
| template<class M> | |
| M | expand (const M &x) const |
| Project matrix (e.g. | |
Default constructor for restoring from serialization.
Definition at line 8 of file FixableStateModel.cpp.
| FixableStateModel | ( | const unsigned int | N | ) |
Constructor.
| 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] |
| unsigned int getVariableSize | ( | ) | const [virtual] |
| unsigned int getFixedSize | ( | ) | const [virtual] |
| 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.
| i | The index of the variable amongst both the fixed and state variables. | |
| value | Value to which to fix the variable. |
Definition at line 35 of file FixableStateModel.cpp.
| bool isFixed | ( | const unsigned int | i | ) | const [inline] |
Is the value of a particular variable fixed?
| i | The index of the variable amongst both the fixed and state variables. |
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.
| i | The index of the variable amongst both the fixed and state variables. |
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.
| x | Vector of both fixed and state variables. |
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.
| x | Vector of state variables only. |
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.
| x | Vector of both fixed and state variables. |
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.
| x | Vector of state variables only. |
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.
| x | Matrix of both fixed and state variables. |
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.
| x | Matrix of state variables only. |
Definition at line 300 of file FixableStateModel.hpp.
1.5.3