MUQ  0.4.3
muq::SamplingAlgorithms::SamplingAlgorithm Class Referenceabstract

#include <SamplingAlgorithm.h>

Inheritance diagram for muq::SamplingAlgorithms::SamplingAlgorithm:

Detailed Description

Definition at line 20 of file SamplingAlgorithm.h.

Public Member Functions

 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samples)
 
 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samplesIn, std::shared_ptr< SampleCollection > const &QOIsIn)
 
 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samplesIn, std::shared_ptr< parcer::Communicator > const &comm)
 
virtual ~SamplingAlgorithm ()=default
 
virtual std::shared_ptr< SampleCollectionGetSamples () const
 
virtual std::shared_ptr< SampleCollectionGetQOIs () const
 
virtual void SetState (std::vector< Eigen::VectorXd > const &x0)
 
virtual std::shared_ptr< SampleCollectionRun (std::vector< Eigen::VectorXd > const &x0=std::vector< Eigen::VectorXd >())
 
template<typename... Args>
std::shared_ptr< SampleCollectionRun (Args const &... args)
 
std::shared_ptr< parcer::Communicator > GetCommunicator () const
 

Constructor & Destructor Documentation

◆ SamplingAlgorithm() [1/3]

SamplingAlgorithm::SamplingAlgorithm ( std::shared_ptr< SampleCollection > const &  samples)

Definition at line 7 of file SamplingAlgorithm.cpp.

◆ SamplingAlgorithm() [2/3]

SamplingAlgorithm::SamplingAlgorithm ( std::shared_ptr< SampleCollection > const &  samplesIn,
std::shared_ptr< SampleCollection > const &  QOIsIn 
)

Definition at line 5 of file SamplingAlgorithm.cpp.

◆ SamplingAlgorithm() [3/3]

SamplingAlgorithm::SamplingAlgorithm ( std::shared_ptr< SampleCollection > const &  samplesIn,
std::shared_ptr< parcer::Communicator > const &  comm 
)

Definition at line 10 of file SamplingAlgorithm.cpp.

◆ ~SamplingAlgorithm()

virtual muq::SamplingAlgorithms::SamplingAlgorithm::~SamplingAlgorithm ( )
virtualdefault

Member Function Documentation

◆ GetCommunicator()

std::shared_ptr< parcer::Communicator > SamplingAlgorithm::GetCommunicator ( ) const

Definition at line 22 of file SamplingAlgorithm.cpp.

References comm.

◆ GetQOIs()

std::shared_ptr< SampleCollection > SamplingAlgorithm::GetQOIs ( ) const
virtual

Reimplemented in muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC.

Definition at line 15 of file SamplingAlgorithm.cpp.

References QOIs.

◆ GetSamples()

std::shared_ptr< SampleCollection > SamplingAlgorithm::GetSamples ( ) const
virtual

Reimplemented in muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC.

Definition at line 13 of file SamplingAlgorithm.cpp.

References samples.

◆ Run() [1/2]

template<typename... Args>
std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::Run ( Args const &...  args)
inline

Definition at line 42 of file SamplingAlgorithm.h.

References RunRecurse().

◆ Run() [2/2]

std::shared_ptr< SampleCollection > SamplingAlgorithm::Run ( std::vector< Eigen::VectorXd > const &  x0 = std::vector<Eigen::VectorXd>())
virtual

Definition at line 19 of file SamplingAlgorithm.cpp.

References RunImpl().

Referenced by main(), and RunRecurse().

◆ RunImpl()

virtual std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::RunImpl ( std::vector< Eigen::VectorXd > const &  x0)
protectedpure virtual

◆ RunRecurse() [1/2]

template<typename... Args>
std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::RunRecurse ( std::vector< Eigen::VectorXd > &  vec,
Eigen::VectorXd const &  ith,
Args const &...  args 
)
inlineprivate

Definition at line 76 of file SamplingAlgorithm.h.

Referenced by Run().

◆ RunRecurse() [2/2]

std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::RunRecurse ( std::vector< Eigen::VectorXd > &  vec,
Eigen::VectorXd const &  last 
)
inlineprivate

Definition at line 81 of file SamplingAlgorithm.h.

References nlohmann::detail::last, and Run().

◆ SetState()

void SamplingAlgorithm::SetState ( std::vector< Eigen::VectorXd > const &  x0)
virtual

Definition at line 17 of file SamplingAlgorithm.cpp.

Member Data Documentation

◆ comm

std::shared_ptr<parcer::Communicator> muq::SamplingAlgorithms::SamplingAlgorithm::comm = nullptr
protected

Definition at line 70 of file SamplingAlgorithm.h.

Referenced by GetCommunicator().

◆ QOIs

std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::QOIs
protected

Definition at line 67 of file SamplingAlgorithm.h.

Referenced by GetQOIs().

◆ samples

std::shared_ptr<SampleCollection> muq::SamplingAlgorithms::SamplingAlgorithm::samples
protected

Inputs:

  1. Parameters for the algorithm
  2. The muq::SamplingAlgorithms::SamplingProblem that evaluates/samples the target distribution
Parameters
[in]inputsInputs to the algorithm

Definition at line 65 of file SamplingAlgorithm.h.

Referenced by GetSamples(), and muq::SamplingAlgorithms::ImportanceSampling::RunImpl().


The documentation for this class was generated from the following files: