7 #include <parcer/Queue.h>
14 namespace SamplingAlgorithms {
26 GMHKernel(boost::property_tree::ptree
const& pt, std::shared_ptr<AbstractSamplingProblem>
problem);
33 GMHKernel(boost::property_tree::ptree
const& pt, std::shared_ptr<AbstractSamplingProblem>
problem, std::shared_ptr<MCMCProposal> proposalIn);
42 virtual void PreStep(
unsigned int const t, std::shared_ptr<SamplingState> state)
override;
51 virtual std::vector<std::shared_ptr<SamplingState> >
Step(
unsigned int const t, std::shared_ptr<SamplingState> state)
override;
77 void SerialProposal(
unsigned int const t, std::shared_ptr<SamplingState> state);
85 void ParallelProposal(
unsigned int const t, std::shared_ptr<SamplingState> state);
103 const unsigned int N;
112 const unsigned int M;
A kernel for the generalized Metropolis-Hastings kernel.
void SerialProposal(unsigned int const t, std::shared_ptr< SamplingState > state)
Propose points in serial and evaluate the log target.
Eigen::MatrixXd AcceptanceMatrix(Eigen::VectorXd const &R) const
const unsigned int N
Number of proposals.
const unsigned int Np1
Number of proposals plus one.
void ParallelProposal(unsigned int const t, std::shared_ptr< SamplingState > state)
Propose points in parallel and evaluate the log target.
Eigen::VectorXd stationaryAcceptance
The cumulative stationary accepatnce probability.
std::shared_ptr< parcer::Communicator > GetCommunicator() const
std::vector< std::shared_ptr< SamplingState > > SampleStationary() const
Sample the stationary distribution.
GMHKernel(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem, std::shared_ptr< MCMCProposal > proposalIn)
Eigen::VectorXd StationaryAcceptance() const
Get the cumulative stationary acceptance probability.
void ComputeStationaryAcceptance(Eigen::VectorXd const &R)
Compute the cumulative acceptance density.
virtual std::vector< std::shared_ptr< SamplingState > > Step(unsigned int const t, std::shared_ptr< SamplingState > state) override
std::vector< std::shared_ptr< SamplingState > > proposedStates
Proposed states.
void AcceptanceDensity(Eigen::VectorXd &R)
Compute the stationary transition density.
virtual void PreStep(unsigned int const t, std::shared_ptr< SamplingState > state) override
const unsigned int M
Number of accepted points (number of points added to the chain)
GMHKernel(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem)
An implementation of the standard Metropolis-Hastings transition kernel.
std::shared_ptr< AbstractSamplingProblem > problem
The sampling problem that evaluates/samples the target distribution.