Moving, conditional moving and weighting
Classes and functions which deal with collections of sampler proposal “moves”.
This file contains definitions of smc::moveset. It deals with the collections of proposal moves (including initialisation and MCMC moves) which must be dealt with by the sampler.
Defines
-
__SMC_MOVESET_HH
-
namespace smc
The Sequential Monte Carlo namespace.
The classes and functions within this namespace are intended to be used for producing implemenetations of SMC samplers and related simulation techniques.
-
template<class Space, class Params>
class moveset - #include <moveset.h>
A template class for a set of moves for use in an SMC samplers framework.
Public Functions
-
moveset()
Create a completely unspecified moveset.
The argument free smc::moveset constructor simply sets the number of available moves to zero and sets all of the associated function pointers to NULL.
-
moveset(void (*pfInit)(Space&, double&, Params&), void (*pfNewMove)(long, Space&, double&, Params&), bool (*pfNewMCMC)(long, Space&, double&, Params&))
An alternative constructor for backwards compatibility.
-
moveset(void (*pfInit)(Space&, double&, Params&), void (*pfNewMove)(long, Space&, double&, Params&), bool (*pfNewMCMC)(long, Space&, double&, Params&), void (*pfNewWeight)(long, Space&, double&, Params&))
An alternative constructor used for conditional SMC specifically.
-
inline virtual ~moveset()
Free the workspace allocated for the algorithm parameters.
-
inline virtual void pfInitialise(Space &value, double &weight, Params &myParams)
Holder function for updates to be done before the move step.
-
inline virtual void pfMove(long time, Space &value, double &weight, Params &myParams)
Holder function for updates to be done before the MCMC step.
-
inline virtual bool pfMCMC(long time, Space &value, double &weight, Params &myParams)
Holder function for updates to be done at the end of each iteration.
-
inline virtual void pfWeight(long time, Space &referenceValue, double &referenceWeight, Params &myParams)
Holder function for weighting of conditioning reference trajectory.
-
virtual void DoInit(population<Space> &pFrom, long N, Params&)
Initialise the population of particles.
-
virtual bool DoMCMC(long lTime, population<Space> &pFrom, long N, int nRepeats, int &nAccepted, Params&)
Perform an MCMC move on the particles.
-
virtual void DoMove(long lTime, population<Space> &pFrom, long N, Params&)
Select an appropriate move at time lTime and apply it to pFrom.
-
virtual void DoConditionalMove(long lTime, population<Space> &pFrom, const Space &referenceValue, long lReferenceIndex, Params ¶ms)
Performs a conditional move: sets conditional reference value and re-weights corresponding particle coordinate.
Private Members
-
void (*defaultInitialise)(Space&, double&, Params&)
Default functions (only needed so that they can be overriden for backwards compatibility) The function which initialises a single particle.
-
void (*defaultMove)(long, Space&, double&, Params&)
The functions which perform actual moves on a single particle.
-
moveset()
-
template<class Space, class Params>