![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Random.h>
Public Member Functions | |
| template<typename InputIt > | |
| DiscreteGenerator (InputIt first, InputIt last) | |
| T | operator() () |
| Call this to generate a discretely distributed integer value. More... | |
Protected Attributes | |
| std::discrete_distribution< T > | distribution_ |
Generate discretely distributed integer values according to a range of weight values. This class is globally seeded by utility::random::Seed(). This class is a wrapper around std::discrete_distribution.
Example:
|
inline |
Generate discretely distributed integer values according to a range of weight values.
| first | The iterator or pointer pointing to the first element in the range of weights. |
| last | The iterator or pointer pointing to one past the last element in the range of weights. |
Definition at line 206 of file Random.h.
References LogError.
|
inline |
Call this to generate a discretely distributed integer value.
Definition at line 214 of file Random.h.
References cloudViewer::utility::random::DiscreteGenerator< T >::distribution_, cloudViewer::utility::random::GetEngine(), and cloudViewer::utility::random::GetMutex().
|
protected |
Definition at line 220 of file Random.h.
Referenced by cloudViewer::utility::random::DiscreteGenerator< T >::operator()().