1 #ifndef SAMPLINGPROBLEM_H_
2 #define SAMPLINGPROBLEM_H_
9 namespace SamplingAlgorithms {
21 SamplingProblem(std::shared_ptr<muq::Modeling::ModPiece>
const& targetIn);
27 SamplingProblem(std::shared_ptr<muq::Modeling::ModPiece>
const& targetIn,
28 std::shared_ptr<muq::Modeling::ModPiece>
const& qoiIn);
32 virtual std::shared_ptr<AbstractSamplingProblem>
Clone()
const override{
return std::make_shared<SamplingProblem>(
target,
qoi);};
34 virtual double LogDensity(std::shared_ptr<SamplingState>
const& state)
override;
36 virtual Eigen::VectorXd
GradLogDensity(std::shared_ptr<SamplingState>
const& state,
37 unsigned const blockWrt)
override;
41 virtual std::shared_ptr<SamplingState>
QOI()
override;
46 std::shared_ptr<muq::Modeling::ModPiece>
target;
48 std::shared_ptr<muq::Modeling::ModPiece>
qoi;
55 static std::vector<int>
GetBlockSizes(std::shared_ptr<muq::Modeling::ModPiece>
const&
target);
Abstract base class for MCMC and Importance Sampling problems.
Class for sampling problems based purely on a density function.
virtual Eigen::VectorXd GradLogDensity(std::shared_ptr< SamplingState > const &state, unsigned const blockWrt) override
std::shared_ptr< muq::Modeling::ModPiece > qoi
static unsigned GetNumBlocks(std::shared_ptr< muq::Modeling::ModPiece > const &target)
std::shared_ptr< muq::Modeling::ModPiece > target
The target distribution (the prior in the inference case)
virtual ~SamplingProblem()=default
virtual double LogDensity(std::shared_ptr< SamplingState > const &state) override
std::shared_ptr< muq::Modeling::ModPiece > GetDistribution()
static std::vector< int > GetBlockSizes(std::shared_ptr< muq::Modeling::ModPiece > const &target)
virtual std::shared_ptr< AbstractSamplingProblem > Clone() const override
SamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &targetIn)
std::shared_ptr< SamplingState > lastState
virtual std::shared_ptr< SamplingState > QOI() override