Represents a Markov Chain Monte Carlo sampler that returns samples from a distribution.
More...
#include <mcmc.hpp>
Represents a Markov Chain Monte Carlo sampler that returns samples from a distribution.
stateline::mcmc::Sampler::Sampler |
( |
const MCMCSettings & |
s, |
|
|
const DBSettings & |
d, |
|
|
uint |
stateDim, |
|
|
volatile bool & |
interrupted |
|
) |
| |
|
inline |
Create a new sampler.
- Parameters
-
s | Settings to tune various parameters of the MCMC. |
d | Settings for configuring the database for storing samples. |
stateDim | The number of dimensions in each sample. |
interrupted | A flag used to monitor whether the sampler has been interrupted. |
Get the MCMC chain array.
- Returns
- A copy of the chain array.
const ChainArray& stateline::mcmc::Sampler::chains |
( |
| ) |
const |
|
inline |
Get the MCMC chain array.
- Returns
- A const reference to the chain array.
template<class AsyncPolicy , class PropFn >
void stateline::mcmc::Sampler::run |
( |
AsyncPolicy & |
policy, |
|
|
const std::vector< Eigen::VectorXd > & |
initialStates, |
|
|
PropFn & |
propFn, |
|
|
uint |
numSeconds |
|
) |
| |
|
inline |
Run the sampler for a period of time.
- Parameters
-
policy | Async policy to evaluate states. |
initialStates | Initial chain states. Ignored if recovering. |
propFn | The proposal function. |
numSeconds | The number of seconds to run the MCMC for. |
The documentation for this class was generated from the following file:
- /home/lb/code/GDF/src/infer/mcmc.hpp