![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
Quadrature on any sparse grid (that has OperationMultipleEval implemented) using Monte Carlo. More...
#include <OperationQuadratureMC.hpp>
  
 Public Member Functions | |
| double | doQuadrature (sgpp::base::DataVector &alpha) override | 
| Quadrature using simple MC in \(\Omega=[0,1]^d\).  More... | |
| double | doQuadratureFunc (FUNC func, void *clientdata) | 
| Quadrature of an arbitrary function using simple 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 simple MC in \(\Omega=[0,1]^d\).  More... | |
| OperationQuadratureMC (sgpp::base::Grid &grid, int mcPaths) | |
| Constructor of OperationQuadratureMC, specifying a grid object and the number of samples to use.  More... | |
| ~OperationQuadratureMC () override | |
  Public Member Functions inherited from sgpp::base::OperationQuadrature | |
| OperationQuadrature () | |
| Constructor.  More... | |
| virtual | ~OperationQuadrature () | 
| Destructor.  More... | |
Protected Attributes | |
| sgpp::base::Grid * | grid | 
| size_t | mcPaths | 
| std::minstd_rand | simple_rand | 
Quadrature on any sparse grid (that has OperationMultipleEval implemented) using Monte Carlo.
| sgpp::base::OperationQuadratureMC::OperationQuadratureMC | ( | sgpp::base::Grid & | grid, | 
| int | mcPaths | ||
| ) | 
Constructor of OperationQuadratureMC, specifying a grid object and the number of samples to use.
| grid | Reference to the grid object | 
| mcPaths | Number of Monte Carlo samples | 
      
  | 
  inlineoverride | 
References alpha, doQuadrature(), doQuadratureFunc(), and doQuadratureL2Error().
      
  | 
  overridevirtual | 
Quadrature using simple MC in \(\Omega=[0,1]^d\).
| alpha | Coefficient vector for current grid | 
Implements sgpp::base::OperationQuadrature.
References sgpp::op_factory::createOperationMultipleEval(), chess::dim, sgpp::base::Grid::getBoundingBox(), sgpp::base::Grid::getDimension(), sgpp::base::BoundingBox::getIntervalWidth(), grid, python.statsfileInfo::i, mcPaths, sgpp::base::DataMatrix::set(), sgpp::base::DataVector::sum(), and sgpp::base::BoundingBox::transformPointToBoundingBox().
Referenced by ~OperationQuadratureMC().
| double sgpp::base::OperationQuadratureMC::doQuadratureFunc | ( | FUNC | func, | 
| void * | clientdata | ||
| ) | 
Quadrature of an arbitrary function using simple MC in \(\Omega=[0,1]^d\).
| func | The function to integrate | 
| clientdata | Optional data to pass to FUNC | 
References chess::dim, sgpp::base::Grid::getBoundingBox(), sgpp::base::Grid::getDimension(), sgpp::base::BoundingBox::getIntervalWidth(), grid, python.statsfileInfo::i, mcPaths, friedman::p, simple_rand, and sgpp::base::BoundingBox::transformPointToBoundingBox().
Referenced by ~OperationQuadratureMC().
| double sgpp::base::OperationQuadratureMC::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 simple 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(), chess::dim, sgpp::base::Grid::getBoundingBox(), sgpp::base::Grid::getDimension(), sgpp::base::BoundingBox::getIntervalWidth(), grid, python.statsfileInfo::i, mcPaths, friedman::p, chess::point, sgpp::combigrid::pow(), simple_rand, and sgpp::base::BoundingBox::transformPointToBoundingBox().
Referenced by ~OperationQuadratureMC().
      
  | 
  protected | 
Referenced by python.uq.dists.SGDEdist.SGDEdist::__str__(), python.learner.Learner.Learner::applyData(), python.tools.Matrix::ApplyMatrix(), python.uq.dists.SGDEdist.SGDEdist::cdf(), python.uq.learner.Interpolant.Interpolant::doLearningIteration(), python.learner.Learner.Learner::doLearningIteration(), doQuadrature(), doQuadratureFunc(), doQuadratureL2Error(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), python.tools.Matrix::generateb(), python.controller.CheckpointController.CheckpointController::generateFoldValidationJob(), 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.learner.Learner.Learner::learnData(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.learner.Learner.Learner::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), python.learner.Learner.Learner::learnDataWithTest(), python.controller.CheckpointController.CheckpointController::loadAll(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makePositive(), python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::makePositive(), python.uq.dists.SGDEdist.SGDEdist::mean(), python.uq.dists.SGDEdist.SGDEdist::pdf(), python.uq.dists.SGDEdist.SGDEdist::ppf(), python.learner.Classifier.Classifier::refineGrid(), python.learner.Regressor.Regressor::refineGrid(), python.uq.learner.Regressor.Regressor::refineGrid(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), python.controller.CheckpointController.CheckpointController::saveGrid(), python.controller.CheckpointController.CheckpointController::setGrid(), python.uq.learner.Learner.Learner::setGrid(), python.learner.Learner.Learner::setGrid(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::split(), python.uq.dists.SGDEdist.SGDEdist::toJson(), python.learner.Classifier.Classifier::updateResults(), python.learner.Regressor.Regressor::updateResults(), python.uq.learner.Regressor.Regressor::updateResults(), and python.uq.dists.SGDEdist.SGDEdist::var().
      
  | 
  protected | 
Referenced by doQuadrature(), doQuadratureFunc(), and doQuadratureL2Error().
      
  | 
  protected | 
Referenced by doQuadratureFunc(), and doQuadratureL2Error().