MUQ  0.4.3
AbstractSamplingProblem.cpp
Go to the documentation of this file.
2 
3 #include <iostream>
4 
5 using namespace muq;
6 using namespace SamplingAlgorithms;
7 
8 AbstractSamplingProblem::AbstractSamplingProblem(Eigen::VectorXi const& blockSizesIn,
9  Eigen::VectorXi const& blockSizesQOIIn) :
10  numBlocks(blockSizesIn.size()),
11  blockSizes(blockSizesIn),
12  numBlocksQOI(blockSizesQOIIn.size()),
13  blockSizesQOI(blockSizesQOIIn)
14 {
15  assert(blockSizes.size()==numBlocks);
16  assert(blockSizesQOI.size()==numBlocksQOI);
17 }
18 
19 AbstractSamplingProblem::AbstractSamplingProblem(Eigen::VectorXi const& blockSizesIn) :
20  AbstractSamplingProblem(blockSizesIn, Eigen::VectorXi::Zero(0))
21 {
22 
23 }
24 
25 std::shared_ptr<SamplingState> AbstractSamplingProblem::QOI() {
26  return nullptr;
27 }
28 
29 Eigen::VectorXd AbstractSamplingProblem::GradLogDensity(std::shared_ptr<SamplingState> const& state,
30  unsigned const blockWrt)
31 {
32  std::cerr << "ERROR: AbstractSamplingProblem::GradLogDensity is not yet implemented!" << std::endl;
33  assert(false);
34 }
Abstract base class for MCMC and Importance Sampling problems.
virtual std::shared_ptr< SamplingState > QOI()
AbstractSamplingProblem(Eigen::VectorXi const &blockSizesIn, Eigen::VectorXi const &blockSizesQOIIn)
virtual Eigen::VectorXd GradLogDensity(std::shared_ptr< SamplingState > const &state, unsigned const blockWrt)