1 #ifndef SAMPLINGALGORITHM_H_
2 #define SAMPLINGALGORITHM_H_
7 #include <parcer/Communicator.h>
17 namespace SamplingAlgorithms {
25 SamplingAlgorithm(std::shared_ptr<SampleCollection>
const& samplesIn, std::shared_ptr<SampleCollection>
const& QOIsIn);
28 SamplingAlgorithm(std::shared_ptr<SampleCollection>
const& samplesIn, std::shared_ptr<parcer::Communicator>
const&
comm);
33 virtual std::shared_ptr<SampleCollection>
GetSamples()
const;
35 virtual std::shared_ptr<SampleCollection>
GetQOIs()
const;
37 virtual void SetState(std::vector<Eigen::VectorXd>
const& x0);
39 virtual std::shared_ptr<SampleCollection>
Run(std::vector<Eigen::VectorXd>
const& x0 = std::vector<Eigen::VectorXd>());
41 template<
typename... Args>
42 inline std::shared_ptr<SampleCollection>
Run(Args
const&... args) {
43 std::vector<Eigen::VectorXd> vec;
53 virtual std::shared_ptr<SampleCollection>
RunImpl(std::vector<Eigen::VectorXd>
const& x0) = 0;
65 std::shared_ptr<SampleCollection>
samples;
67 std::shared_ptr<SampleCollection>
QOIs;
70 std::shared_ptr<parcer::Communicator>
comm =
nullptr;
75 template<
typename... Args>
76 inline std::shared_ptr<SampleCollection>
RunRecurse(std::vector<Eigen::VectorXd>& vec, Eigen::VectorXd
const& ith, Args
const&... args) {
81 inline std::shared_ptr<SampleCollection>
RunRecurse(std::vector<Eigen::VectorXd>& vec, Eigen::VectorXd
const&
last) {
virtual std::shared_ptr< SampleCollection > GetSamples() const
virtual void SetState(std::vector< Eigen::VectorXd > const &x0)
virtual std::shared_ptr< SampleCollection > RunImpl(std::vector< Eigen::VectorXd > const &x0)=0
std::shared_ptr< SampleCollection > QOIs
virtual std::shared_ptr< SampleCollection > GetQOIs() const
virtual ~SamplingAlgorithm()=default
std::shared_ptr< SampleCollection > RunRecurse(std::vector< Eigen::VectorXd > &vec, Eigen::VectorXd const &last)
std::shared_ptr< parcer::Communicator > comm
std::shared_ptr< parcer::Communicator > GetCommunicator() const
std::shared_ptr< SampleCollection > RunRecurse(std::vector< Eigen::VectorXd > &vec, Eigen::VectorXd const &ith, Args const &... args)
virtual std::shared_ptr< SampleCollection > Run(std::vector< Eigen::VectorXd > const &x0=std::vector< Eigen::VectorXd >())
std::shared_ptr< SampleCollection > Run(Args const &... args)
SamplingAlgorithm(std::shared_ptr< SampleCollection > const &samples)
std::shared_ptr< SampleCollection > samples