![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
Quadrature on any sparse grid (that has OperationMultipleEval implemented) using various Monte Carlo Methods (Advanced). More...
#include <OperationQuadratureMCAdvanced.hpp>
  
 Public Member Functions | |
| virtual double | doQuadrature (sgpp::base::DataVector &alpha) | 
| Quadrature using advanced MC in \(\Omega=[0,1]^d\).  More... | |
| double | doQuadratureFunc (FUNC func, void *clientdata) | 
| Quadrature of an arbitrary function using advanced MC in \(\Omega=[0,1]^d\).  More... | |
| double | doQuadratureL2Error (FUNC func, void *clientdata, sgpp::base::DataVector &alpha) | 
| Quadrature of the \(L^2\)-norm of the error, \( ||f(x)-u(x)||_{L^2} \), between a given function and the current sparse grid function using advanced MC in \(\Omega=[0,1]^d\).  More... | |
| size_t | getDimensions () | 
| Method returns the total number of samples which can be generated according to the sample generator settings (dimensions and subdivision into strata)  More... | |
| OperationQuadratureMCAdvanced (sgpp::base::Grid &grid, size_t numberOfSamples, std::uint64_t seed=std::mt19937_64::default_seed) | |
| Constructor of OperationQuadratureMCAdvanced, specifying a grid object and the number of samples to use.  More... | |
| OperationQuadratureMCAdvanced (size_t dimensions, size_t numberOfSamples, std::uint64_t seed=std::mt19937_64::default_seed) | |
| Constructor of OperationQuadratureMCAdvanced, specifying dimensions and the number of samples to use.  More... | |
| void | useLatinHypercubeMonteCarlo () | 
| Initialize SampleGenerator for LatinHypercubeMC.  More... | |
| void | useNaiveMonteCarlo () | 
| Initialize SampleGenerator for NaiveMC.  More... | |
| void | useQuasiMonteCarloWithHaltonSequences () | 
| Initialize SampleGenerator for HaltonSequenceGenerator.  More... | |
| void | useQuasiMonteCarloWithScrambledSobolSequences () | 
| Initialize SampleGenerator for ScrambledSobolSequenceGenerator.  More... | |
| void | useQuasiMonteCarloWithSobolSequences () | 
| Initialize SampleGenerator for SobolSequenceGenerator.  More... | |
| void | useStratifiedMonteCarlo (std::vector< size_t > &n) | 
| Initialize SampleGenerator for StratifiedMC.  More... | |
| virtual | ~OperationQuadratureMCAdvanced () | 
| Descructor.  More... | |
  Public Member Functions inherited from sgpp::base::OperationQuadrature | |
| OperationQuadrature () | |
| Constructor.  More... | |
| virtual | ~OperationQuadrature () | 
| Destructor.  More... | |
Protected Attributes | |
| size_t | dimensions | 
| sgpp::base::Grid * | grid | 
| sgpp::quadrature::SampleGenerator * | myGenerator | 
| size_t | numberOfSamples | 
| std::uint64_t | seed | 
Quadrature on any sparse grid (that has OperationMultipleEval implemented) using various Monte Carlo Methods (Advanced).
| sgpp::quadrature::OperationQuadratureMCAdvanced::OperationQuadratureMCAdvanced | ( | sgpp::base::Grid & | grid, | 
| size_t | numberOfSamples, | ||
| std::uint64_t | seed = std::mt19937_64::default_seed  | 
        ||
| ) | 
Constructor of OperationQuadratureMCAdvanced, specifying a grid object and the number of samples to use.
| grid | Reference to the grid object | 
| numberOfSamples | Number of Monte Carlo samples | 
| seed | Custom seed (defaults to default seed of mt19937_64) | 
References dimensions, sgpp::base::Grid::getDimension(), and myGenerator.
| sgpp::quadrature::OperationQuadratureMCAdvanced::OperationQuadratureMCAdvanced | ( | size_t | dimensions, | 
| size_t | numberOfSamples, | ||
| std::uint64_t | seed = std::mt19937_64::default_seed  | 
        ||
| ) | 
Constructor of OperationQuadratureMCAdvanced, specifying dimensions and the number of samples to use.
| dimensions | dimensionality of this problem | 
| numberOfSamples | Number of Monte Carlo samples | 
| seed | Custom seed (defaults to default seed of mt19937_64) | 
References myGenerator.
      
  | 
  virtual | 
Descructor.
References myGenerator.
      
  | 
  virtual | 
Quadrature using advanced MC in \(\Omega=[0,1]^d\).
| alpha | Coefficient vector for current grid | 
Implements sgpp::base::OperationQuadrature.
References sgpp::op_factory::createOperationMultipleEval(), dimensions, sgpp::quadrature::SampleGenerator::getSamples(), grid, sgpp::base::OperationMultipleEval::mult(), myGenerator, numberOfSamples, and sgpp::base::DataVector::sum().
| double sgpp::quadrature::OperationQuadratureMCAdvanced::doQuadratureFunc | ( | FUNC | func, | 
| void * | clientdata | ||
| ) | 
Quadrature of an arbitrary function using advanced MC in \(\Omega=[0,1]^d\).
| func | The function to integrate | 
| clientdata | Optional data to pass to FUNC | 
References dimensions, sgpp::base::DataVector::getPointer(), sgpp::base::DataMatrix::getRow(), sgpp::quadrature::SampleGenerator::getSamples(), python.statsfileInfo::i, myGenerator, and numberOfSamples.
| double sgpp::quadrature::OperationQuadratureMCAdvanced::doQuadratureL2Error | ( | FUNC | func, | 
| void * | clientdata, | ||
| sgpp::base::DataVector & | alpha | ||
| ) | 
Quadrature of the \(L^2\)-norm of the error, \( ||f(x)-u(x)||_{L^2} \), between a given function and the current sparse grid function using advanced MC in \(\Omega=[0,1]^d\).
| func | The function \(f(x)\) | 
| clientdata | Optional data to pass to FUNC | 
| alpha | Coefficient vector for current grid | 
References sgpp::op_factory::createOperationEval(), dimensions, sgpp::base::OperationEval::eval(), sgpp::base::DataMatrix::get(), sgpp::quadrature::SampleGenerator::getSamples(), grid, python.statsfileInfo::i, myGenerator, numberOfSamples, friedman::p, chess::point, and sgpp::combigrid::pow().
| size_t sgpp::quadrature::OperationQuadratureMCAdvanced::getDimensions | ( | ) | 
Method returns the total number of samples which can be generated according to the sample generator settings (dimensions and subdivision into strata)
References dimensions.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useLatinHypercubeMonteCarlo | ( | ) | 
Initialize SampleGenerator for LatinHypercubeMC.
References dimensions, myGenerator, numberOfSamples, and seed.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useNaiveMonteCarlo | ( | ) | 
Initialize SampleGenerator for NaiveMC.
References dimensions, myGenerator, and seed.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useQuasiMonteCarloWithHaltonSequences | ( | ) | 
Initialize SampleGenerator for HaltonSequenceGenerator.
References dimensions, and myGenerator.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useQuasiMonteCarloWithScrambledSobolSequences | ( | ) | 
Initialize SampleGenerator for ScrambledSobolSequenceGenerator.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useQuasiMonteCarloWithSobolSequences | ( | ) | 
Initialize SampleGenerator for SobolSequenceGenerator.
| void sgpp::quadrature::OperationQuadratureMCAdvanced::useStratifiedMonteCarlo | ( | std::vector< size_t > & | n | ) | 
Initialize SampleGenerator for StratifiedMC.
| n | Array of dimension proerties | 
References myGenerator, and seed.
      
  | 
  protected | 
      
  | 
  protected | 
Referenced by python.uq.learner.Interpolant.Interpolant::doLearningIteration(), doQuadrature(), doQuadratureL2Error(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), python.uq.learner.SimulationLearner.SimulationLearner::getCollocationNodes(), python.uq.learner.SimulationLearner.SimulationLearner::getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getLearner(), python.uq.learner.Regressor.Regressor::learnData(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), python.learner.Classifier.Classifier::refineGrid(), python.learner.Regressor.Regressor::refineGrid(), python.uq.learner.Regressor.Regressor::refineGrid(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), python.learner.Classifier.Classifier::updateResults(), python.learner.Regressor.Regressor::updateResults(), and python.uq.learner.Regressor.Regressor::updateResults().
      
  | 
  protected | 
      
  | 
  protected | 
Referenced by doQuadrature(), doQuadratureFunc(), doQuadratureL2Error(), and useLatinHypercubeMonteCarlo().
      
  | 
  protected | 
Referenced by useLatinHypercubeMonteCarlo(), useNaiveMonteCarlo(), and useStratifiedMonteCarlo().