ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::utility::random Namespace Reference

Classes

class  RandomContext
 
class  UniformIntGenerator
 
class  UniformRealGenerator
 
class  NormalGenerator
 
class  DiscreteGenerator
 

Functions

void Seed (const int seed)
 Set CloudViewer global random seed. More...
 
std::mt19937 * GetEngine ()
 
std::mutex * GetMutex ()
 
uint32_t RandUint32 ()
 

Function Documentation

◆ GetEngine()

std::mt19937 * cloudViewer::utility::random::GetEngine ( )

◆ GetMutex()

◆ RandUint32()

uint32_t cloudViewer::utility::random::RandUint32 ( )

Generate a random uint32. This function is globally seeded by utility::random::Seed(). This function is automatically protected by the global random mutex.

Definition at line 59 of file Random.cpp.

References GetEngine(), and GetMutex().

Referenced by cloudViewer::core::SlabNodeManager::SlabNodeManager().

◆ Seed()

void cloudViewer::utility::random::Seed ( const int  seed)

Set CloudViewer global random seed.

Definition at line 53 of file Random.cpp.

References cloudViewer::utility::random::RandomContext::GetInstance(), and cloudViewer::utility::random::RandomContext::Seed().