SG++-Doxygen-Documentation
sgpp::quadrature::StratifiedSampleGenerator Class Reference

The class StratifiedSampleGenerator subdivides every dimension in a given number of strata. More...

#include <StratifiedSampleGenerator.hpp>

Inheritance diagram for sgpp::quadrature::StratifiedSampleGenerator:
sgpp::quadrature::SampleGenerator

Public Member Functions

void getSample (sgpp::base::DataVector &sample)
 This method generates one sample . More...
 
 StratifiedSampleGenerator (std::vector< size_t > &strataPerDimension, std::uint64_t seed=std::mt19937_64::default_seed)
 Standard constructor. More...
 
virtual ~StratifiedSampleGenerator ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::quadrature::SampleGenerator
size_t getDimensions ()
 
void getSamples (sgpp::base::DataMatrix &samples)
 This method generates a given number of samples. More...
 
 SampleGenerator (size_t dimensions, std::uint64_t seed=std::mt19937_64::default_seed)
 Standard constructor. More...
 
void setDimensions (size_t dimensions)
 Sets the number of dimensions for sample generation to the given value. More...
 
virtual ~SampleGenerator ()
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::quadrature::SampleGenerator
size_t dimensions
 
std::mt19937_64 rng
 
std::uint64_t seed
 

Detailed Description

The class StratifiedSampleGenerator subdivides every dimension in a given number of strata.

For each strata one sample point is generated. In case one sample has already been generated for every strata, the next requested sample will be placed into the first strata.

Constructor & Destructor Documentation

◆ StratifiedSampleGenerator()

sgpp::quadrature::StratifiedSampleGenerator::StratifiedSampleGenerator ( std::vector< size_t > &  strataPerDimension,
std::uint64_t  seed = std::mt19937_64::default_seed 
)

Standard constructor.

Parameters
strataPerDimensionarray holding the number of strata used to subdivide the specific dimension
seedcustom seed (defaults to default seed of mt19937_64)

References sgpp::quadrature::SampleGenerator::dimensions, and python.statsfileInfo::i.

◆ ~StratifiedSampleGenerator()

sgpp::quadrature::StratifiedSampleGenerator::~StratifiedSampleGenerator ( )
virtual

Destructor.

Member Function Documentation

◆ getSample()

void sgpp::quadrature::StratifiedSampleGenerator::getSample ( sgpp::base::DataVector sample)
virtual

This method generates one sample .

Implementation of the abstract Method getSample from SampelGenerator.

Parameters
sampleDataVector storing the new generated sample vector.

Reimplemented from sgpp::quadrature::SampleGenerator.

References sgpp::quadrature::SampleGenerator::dimensions, sgpp::base::DataVector::getSize(), python.statsfileInfo::i, and sgpp::quadrature::SampleGenerator::rng.


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