This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
of::random::Engine Class Reference
#include <ofRandomEngine.h>
Inheritance diagram for of::random::Engine:

Public Member Functions | |
Engine () | |
auto & | gen () |
void | seed (unsigned long new_seed) |
passes a value to seed the mt19937 generator | |
auto | is_deterministic () const |
Additional Inherited Members | |
![]() | |
static void | construct (Args &&... args) |
static Engine * | instance () |
static void | destruct () |
![]() | |
Singleton ()=default | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&) noexcept=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&) noexcept=delete |
virtual | ~Singleton ()=default |
Detailed Description
An mt19937 instance wrapped in a singleton, with default non-deterministic seeding A balance is aimed between ease-of-use, and versatility, and minimize reliance on advanced concepts (e.g. the lib is templated, but default usage does not require template parameters) The goal is to have a centralized, thread-safe source of randomness that can be deterministic or not.
Constructor & Destructor Documentation
◆ Engine()
|
inline |
Member Function Documentation
◆ gen()
|
inline |
return the generator for use in random distributions or functions
- Returns
- a reference to the mt19937 generator
◆ is_deterministic()
|
inline |
- Returns
- true or fall depending if the engine is deterministic
◆ seed()
|
inline |
passes a value to seed the mt19937 generator
The documentation for this class was generated from the following file:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/utils/ofRandomEngine.h