1 #ifndef PARALLELABSTRACTSAMPLINGPROBLEM_H_
2 #define PARALLELABSTRACTSAMPLINGPROBLEM_H_
12 #include <parcer/Communicator.h>
18 namespace SamplingAlgorithms {
51 virtual double LogDensity(std::shared_ptr<SamplingState>
const& state)
override {
53 if (
comm->GetRank() == 0) {
54 for (
int dest = 1; dest <
comm->GetSize(); dest++) {
64 virtual std::shared_ptr<SamplingState>
QOI()
override {
74 std::shared_ptr<parcer::Communicator>
comm;
Abstract base class for MCMC and Importance Sampling problems.
const Eigen::VectorXi blockSizesQOI
const Eigen::VectorXi blockSizes
Parallelization layer supporting parallel models underlying a SamplingProblem.
virtual std::shared_ptr< SamplingState > QOI() override
std::shared_ptr< AbstractSamplingProblem > GetSequentialProblem()
std::shared_ptr< AbstractSamplingProblem > abstractSamplingProblem
virtual ~ParallelAbstractSamplingProblem()=default
std::shared_ptr< parcer::Communicator > comm
virtual double LogDensity(std::shared_ptr< SamplingState > const &state) override
ParallelAbstractSamplingProblem(std::shared_ptr< parcer::Communicator > comm, int id, std::shared_ptr< AbstractSamplingProblem > abstractSamplingProblem)