pixled-lib  1.0
Public Member Functions | Protected Attributes | List of all members
pixled::random::RandomEngineConfig Class Reference

#include <random.h>

Inheritance diagram for pixled::random::RandomEngineConfig:
Inheritance graph
[legend]

Public Member Functions

 RandomEngineConfig (time period)
 
 RandomEngineConfig (time period, unsigned long seed)
 

Protected Attributes

time period
 
unsigned long seed
 

Detailed Description

A class storing the two parameters required to define a random engine: a period and a seed.

The period defines the frame count during which the random engine stays in its current state.

The seed can be used to generate different random sequences.

Note that this class does not generate any random number, it just stores some configuration.

Constructor & Destructor Documentation

◆ RandomEngineConfig() [1/2]

pixled::random::RandomEngineConfig::RandomEngineConfig ( time  period)
inline

RandomEngineConfig constructor.

The seed is initialized randomly using an [std::random_device][https://en.cppreference.com/w/cpp/numeric/random/random_device) instance.

Parameters
periodrandom engine period

◆ RandomEngineConfig() [2/2]

pixled::random::RandomEngineConfig::RandomEngineConfig ( time  period,
unsigned long  seed 
)
inline

RandomEngineConfig constructor.

Parameters
periodrandom engine period
seedrandom engine seed

Member Data Documentation

◆ period

time pixled::random::RandomEngineConfig::period
protected

Random engine period.

The random value of the engine effectively changes at each period.

◆ seed

unsigned long pixled::random::RandomEngineConfig::seed
protected

Seed used to initiate the random number sequence.


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