CMP++: Uncertainty Quantification & Bayesian Calibration
Loading...
Searching...
No Matches
cmp::grid::ScrambledSobolGrid Class Reference

Owen-scrambled Sobol low-discrepancy sequence grid generator. More...

#include <grid.h>

Inheritance diagram for cmp::grid::ScrambledSobolGrid:
Collaboration diagram for cmp::grid::ScrambledSobolGrid:

Public Member Functions

 ScrambledSobolGrid (const Eigen::Ref< const Eigen::VectorXd > &lowerBound, const Eigen::Ref< const Eigen::VectorXd > &upperBound, unsigned int seed=42)
 
Eigen::MatrixXd construct (const size_t &nPoints) override
 
Eigen::VectorXd operator() ()
 
size_t dim () const override
 
- Public Member Functions inherited from cmp::grid::Grid
virtual ~Grid ()=default
 

Static Private Member Functions

static uint64_t hash_prefix (uint64_t prefix, uint64_t seed)
 
static uint64_t owen_scramble (uint64_t val, uint64_t seed)
 

Private Attributes

boost::random::sobol gen_
 Boost Sobol sequence generator.
 
size_t dimension_
 Number of dimensions.
 
Eigen::VectorXd lowerBound_
 Lower bounds vector.
 
Eigen::VectorXd upperBound_
 Upper bounds vector.
 
std::vector< uint64_t > dim_seeds_
 Seeds used to initialize scrambling for each coordinate dimension.
 

Detailed Description

Owen-scrambled Sobol low-discrepancy sequence grid generator.

Mathematical Formulation Owen scrambling randomized digital nets by applying random permutations on the digital trees. It preserves the low-discrepancy property:

\[ D_N^*(\mathcal{P}) = O\left( \frac{\log^D N}{N} \right) \]

while providing unbiased estimates and improving the numerical integration variance rate to \(o(N^{-1})\).

Implementation Algorithm

  1. Obtains Sobol sequences from the underlying Boost generator.
  2. Maps values to 64-bit unsigned integers representing fractional components.
  3. Applies a recursive bitwise Owen scrambled hash permutation using the prefix history.
  4. Maps the scrambled values back to floating point space and scales them to the boundaries.

Constructor & Destructor Documentation

◆ ScrambledSobolGrid()

cmp::grid::ScrambledSobolGrid::ScrambledSobolGrid ( const Eigen::Ref< const Eigen::VectorXd > &  lowerBound,
const Eigen::Ref< const Eigen::VectorXd > &  upperBound,
unsigned int  seed = 42 
)
inline

Member Function Documentation

◆ construct()

Eigen::MatrixXd cmp::grid::ScrambledSobolGrid::construct ( const size_t &  nPoints)
inlineoverridevirtual

Implements cmp::grid::Grid.

◆ dim()

size_t cmp::grid::ScrambledSobolGrid::dim ( ) const
inlineoverridevirtual

Implements cmp::grid::Grid.

◆ hash_prefix()

static uint64_t cmp::grid::ScrambledSobolGrid::hash_prefix ( uint64_t  prefix,
uint64_t  seed 
)
inlinestaticprivate

◆ operator()()

Eigen::VectorXd cmp::grid::ScrambledSobolGrid::operator() ( )
inline

◆ owen_scramble()

static uint64_t cmp::grid::ScrambledSobolGrid::owen_scramble ( uint64_t  val,
uint64_t  seed 
)
inlinestaticprivate

Member Data Documentation

◆ dim_seeds_

std::vector<uint64_t> cmp::grid::ScrambledSobolGrid::dim_seeds_
private

Seeds used to initialize scrambling for each coordinate dimension.

◆ dimension_

size_t cmp::grid::ScrambledSobolGrid::dimension_
private

Number of dimensions.

◆ gen_

boost::random::sobol cmp::grid::ScrambledSobolGrid::gen_
private

Boost Sobol sequence generator.

◆ lowerBound_

Eigen::VectorXd cmp::grid::ScrambledSobolGrid::lowerBound_
private

Lower bounds vector.

◆ upperBound_

Eigen::VectorXd cmp::grid::ScrambledSobolGrid::upperBound_
private

Upper bounds vector.


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