versatile-mcmc  0.1.7
Public Member Functions | Friends | List of all members
vmcmc::Sample Class Reference

A 'sample' represents a node or data point in a Markov Chain. More...

#include <sample.hpp>

Public Member Functions

 Sample (const Vector &pValues)
 
 Sample (std::initializer_list< double > pValues)
 
 Sample (size_t nParams=0)
 
void SetGeneration (size_t value)
 
size_t GetGeneration () const
 
size_t IncrementGeneration ()
 
Vector & Values ()
 
const Vector & Values () const
 
double & operator[] (size_t index)
 
const double & operator[] (size_t index) const
 
size_t size () const
 
Sampleoperator= (std::initializer_list< double > pValues)
 
void Reset ()
 Reset ::fLikelihood, ::fNegLogLikelihood and ::fPrior to their default values.
 
void SetLikelihood (double value)
 
double GetLikelihood () const
 
void SetNegLogLikelihood (double value)
 
double GetNegLogLikelihood () const
 
void SetPrior (double value)
 
double GetPrior () const
 
void SetAccepted (bool value)
 
double IsAccepted () const
 
void operator+= (const Sample &other)
 
void operator-= (const Sample &other)
 
void operator*= (double factor)
 
void operator/= (double factor)
 
bool operator== (const Sample &other) const
 
bool operator!= (const Sample &other) const
 

Friends

Sample operator+ (const Sample &s1, const Sample &s2)
 
Sample operator- (const Sample &s1, const Sample &s2)
 
Sample operator* (const Sample &s1, double f)
 
Sample operator/ (const Sample &s1, double f)
 

Detailed Description

A 'sample' represents a node or data point in a Markov Chain.

It holds information about the generation, when it was sampled, the point in the parameter space and the corresponding values for the likelihood, -log(likelihood) and the prior value.


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