Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 588 Bytes

README.md

File metadata and controls

18 lines (16 loc) · 588 Bytes

RNGSobol

Sobol quadi-random numbers generator (C++)

Note that unlike pseudo-random numbers, quasi-random numbers care about dimensionality of points. Don't forget to call nextSeed() when you start new point. To generate uniformly distributed points in 3 dimensions, do this:

RNGSobol rng;
for (unsigned u = 0; u < 10000; ++u) // generate 10000 points
{
  m_rng.nextSeed(); // start from dimension 0 for each point
  float vPoint[3];
  for (unsigned uDim = 0; uDim < 3; ++uDim)
  {
     point[uDim] = rng.generate01(); // generates number and goes to next dimension
  }
}