npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::HOSobolGenerator Class Reference

#include <HOSobolGenerator.hh>

Inheritance diagram for npstat::HOSobolGenerator:
npstat::SobolGenerator npstat::AbsRandomGenerator

Public Member Functions

 HOSobolGenerator (unsigned dim, unsigned interlacingFactor, unsigned maxPowerOfTwo, unsigned nSkip=0U)
 
virtual unsigned dim () const
 
virtual void run (double *buf, unsigned bufSize, unsigned nPoints)
 
- Public Member Functions inherited from npstat::SobolGenerator
 SobolGenerator (unsigned dim, unsigned maxPowerOfTwo=LOG_MAX, unsigned nSkip=0U)
 
double operator() ()
 
unsigned long long maxPoints () const
 

Additional Inherited Members

- Public Types inherited from npstat::SobolGenerator
enum  { DIM_MAX = 1111 , LOG_MAX = 62 }
 
- Protected Member Functions inherited from npstat::SobolGenerator
void nextBitSet (long long *buf, unsigned bufSize)
 
unsigned maxPowerOfTwo () const
 

Detailed Description

Generator of higher order scrambled Sobol sequences. The theory behind this method is described in http://arxiv.org/abs/1007.0842

Sampling according to the points produced by this generator is supposed to achieve convergence rate of O(N^(-gamma-1/2+eps)), where "gamma" equals to min(interlacingFactor, alpha). Here, alpha is the maximum order of square-integrable continuous partial derivatives in the integrand, and "interlacingFactor" is a parameter of the scrambling algorithm. "eps" in the convergence rate stands for terms which look like log(N)^dim. For large N, "eps" becomes vanishingly small.

The "interlacingFactor" parameter can not be made very high due to certain limitations in the algorithm implementation. The main problem is that, to construct scrambled random sequences with 2^k points, the algorithm is using integers with magnitudes up to 2^(interlacingFactor*k). This typically means that the product interlacingFactor*k can not be easily made larger than 64 on 64-bit systems. Therefore, if one uses interlacingFactor of 2, one can produce 2^32 quasi-random numbers, for interlacingFactor of 3 this becomes 2^21, for interlacingFactor of 4 this becomes 2^16, etc. Also, the dimensionality of the underlying Sobol sequence becomes larger than the dimensionality of the generated higher order sequence by the interlacing factor.

If this generator is used with the "interlacingFactor" parameter of 1 then it reproduces the original underlying Sobol sequence (which can have up to 2^62 points).

The theoretical convergence rate claims should be taken with a grain of salt. In a simple numerical study which I did using multivariate exponentials, "interlacingFactor" value of 2 did provide significant improvement over the original Sobol sequence. "interlacingFactor" value of 3 worked significantly better than "interlacingFactor" of 2 in 1 dimension, marginally better in 2 dimensions, and did not improve anything in 3 dimensions. "interlacingFactor" value of 4 worked marginally better than "interlacingFactor" of 3 in 1 dimension and did not improve anything in higher dimensions. Since big values of N can not be generated with this code for large interlacing factors, perhaps this just means that one needs to reach higher N in order to see the improvement due to scrambling. However, one can expect that in this case the limited precision of the integrand evaluation will become a dominant source of uncertainty and will spoil things anyway.

Member Function Documentation

◆ dim()

virtual unsigned npstat::HOSobolGenerator::dim ( ) const
inlinevirtual

Dimensionality of the generated vectors (or points). It is expected that "dim()" will always be 1 for pseudo-random (as opposed to quasi-random) generators.

Reimplemented from npstat::SobolGenerator.

◆ run()

virtual void npstat::HOSobolGenerator::run ( double *  buf,
unsigned  bufLen,
unsigned  nPt 
)
virtual

Generate a bunch of points. Multivariate generators must override this. Here, the effective dimensionality of the generator is bufLen/nPt.

Reimplemented from npstat::SobolGenerator.


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