Skip to content

Sobol random numbers generator (C++)

Notifications You must be signed in to change notification settings

GerHobbelt/RNGSobol

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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
  }
}

About

Sobol random numbers generator (C++)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%