Open3D (C++ API)  0.18.0+252c867
Public Member Functions | Static Public Member Functions
open3d::utility::random::RandomContext Class Reference

Public Member Functions

 RandomContext (RandomContext const &)=delete
 
void operator= (RandomContext const &)=delete
 
void Seed (const int seed)
 Seed the random number generator (globally). More...
 
std::mt19937 * GetEngine ()
 
std::mutex * GetMutex ()
 Get global singleton mutex to protect the engine call. More...
 

Static Public Member Functions

static RandomContextGetInstance ()
 Returns the singleton instance. More...
 

Detailed Description

Global thread-safe singleton instance for random generation. Generates compiler/OS/device independent random numbers.

Constructor & Destructor Documentation

◆ RandomContext()

open3d::utility::random::RandomContext::RandomContext ( RandomContext const &  )
delete

Member Function Documentation

◆ GetEngine()

std::mt19937* open3d::utility::random::RandomContext::GetEngine ( )
inline

This is used by other downstream random generators. You must also lock the GetMutex() before calling the engine.

◆ GetInstance()

static RandomContext& open3d::utility::random::RandomContext::GetInstance ( )
inlinestatic

Returns the singleton instance.

◆ GetMutex()

std::mutex* open3d::utility::random::RandomContext::GetMutex ( )
inline

Get global singleton mutex to protect the engine call.

◆ operator=()

void open3d::utility::random::RandomContext::operator= ( RandomContext const &  )
delete

◆ Seed()

void open3d::utility::random::RandomContext::Seed ( const int  seed)
inline

Seed the random number generator (globally).


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