hops
Public Member Functions | List of all members
hops::MarkovChainAdapter< MarkovChainImpl > Class Template Reference

#include <MarkovChainAdapter.hpp>

Inheritance diagram for hops::MarkovChainAdapter< MarkovChainImpl >:
Inheritance graph
Collaboration diagram for hops::MarkovChainAdapter< MarkovChainImpl >:
Collaboration graph

Public Member Functions

 MarkovChainAdapter (const MarkovChainImpl &markovChainImpl)
 
void draw (RandomNumberGenerator &randomNumberGenerator, long numberOfSamples) override
 Updates internal state of the chain and stores numberOfSamples samples in memory. More...
 
void draw (RandomNumberGenerator &randomNumberGenerator, long numberOfSamples, long thinning) override
 Updates internal state of the chain and stores numberOfSamples samples in memory. More...
 
void writeHistory (FileWriter *const fileWriter) override
 Writes all stored chain history using the fileWriter. More...
 
void installDataObject (ChainData &chainData) override
 
const std::vector< Eigen::VectorXd > & getStateRecords () override
 
void reserveStateRecords (long numberOfSamples) override
 
void clearHistory () override
 Deletes all stored chain history. More...
 
std::string getName () override
 
double getAcceptanceRate () override
 
void setAttribute (MarkovChainAttribute markovChainAttribute, double value) override
 
void setState (Eigen::Matrix< double, -1, 1, 0, -1, 1 > state) override
 
double getAttribute (MarkovChainAttribute markovChainAttribute) override
 
- Public Member Functions inherited from hops::MarkovChainInterface< StateType >
virtual ~MarkovChainInterface ()=default
 
virtual void setState (StateType state)=0
 

Constructor & Destructor Documentation

◆ MarkovChainAdapter()

template<typename MarkovChainImpl >
hops::MarkovChainAdapter< MarkovChainImpl >::MarkovChainAdapter ( const MarkovChainImpl &  markovChainImpl)
inlineexplicit

Member Function Documentation

◆ clearHistory()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::clearHistory ( )
inlineoverridevirtual

Deletes all stored chain history.

Implements hops::MarkovChainInterface< StateType >.

◆ draw() [1/2]

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::draw ( RandomNumberGenerator randomNumberGenerator,
long  numberOfSamples 
)
inlineoverridevirtual

Updates internal state of the chain and stores numberOfSamples samples in memory.

Parameters
randomNumberGenerator
numberOfSamplesNumber of samples to draw.

Implements hops::MarkovChainInterface< StateType >.

◆ draw() [2/2]

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::draw ( RandomNumberGenerator randomNumberGenerator,
long  numberOfSamples,
long  thinning 
)
inlineoverridevirtual

Updates internal state of the chain and stores numberOfSamples samples in memory.

Parameters
randomNumberGenerator
numberOfSamplesNumber of samples to draw.
thinningNumber of internal state updates between every state that is stored.

Implements hops::MarkovChainInterface< StateType >.

◆ getAcceptanceRate()

template<typename MarkovChainImpl >
double hops::MarkovChainAdapter< MarkovChainImpl >::getAcceptanceRate ( )
inlineoverridevirtual

◆ getAttribute()

template<typename MarkovChainImpl >
double hops::MarkovChainAdapter< MarkovChainImpl >::getAttribute ( MarkovChainAttribute  markovChainAttribute)
inlineoverridevirtual

◆ getName()

template<typename MarkovChainImpl >
std::string hops::MarkovChainAdapter< MarkovChainImpl >::getName ( )
inlineoverridevirtual

◆ getStateRecords()

template<typename MarkovChainImpl >
const std::vector<Eigen::VectorXd>& hops::MarkovChainAdapter< MarkovChainImpl >::getStateRecords ( )
inlineoverridevirtual

◆ installDataObject()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::installDataObject ( ChainData chainData)
inlineoverridevirtual

◆ reserveStateRecords()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::reserveStateRecords ( long  numberOfSamples)
inlineoverridevirtual

◆ setAttribute()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::setAttribute ( MarkovChainAttribute  markovChainAttribute,
double  value 
)
inlineoverridevirtual

◆ setState()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::setState ( Eigen::Matrix< double, -1, 1, 0, -1, 1 >  state)
inlineoverride

◆ writeHistory()

template<typename MarkovChainImpl >
void hops::MarkovChainAdapter< MarkovChainImpl >::writeHistory ( FileWriter *const  fileWriter)
inlineoverridevirtual

Writes all stored chain history using the fileWriter.

Parameters
fileWriter

Implements hops::MarkovChainInterface< StateType >.


The documentation for this class was generated from the following file: