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

#include <random.h>

Inheritance diagram for pixled::random::RandomT:
Inheritance graph
[legend]
Collaboration diagram for pixled::random::RandomT:
Collaboration graph
[legend]

Public Member Functions

random_engine operator() (led l, time t) const override
 
RandomTcopy () const override
 
 RandomEngineConfig (time period)
 
 RandomEngineConfig (time period, unsigned long seed)
 

Additional Inherited Members

- Public Types inherited from pixled::base::Function< random_engine >
typedef random_engine Type
 

Detailed Description

A time dependent random engine.

The sequence of generated values varies in time, but is the same for any point.

Examples
pixled/random/normal.cpp, and pixled/random/uniform.cpp.

Member Function Documentation

◆ operator()()

std::minstd_rand pixled::random::RandomT::operator() ( led  l,
time  t 
) const
overridevirtual

Computes the value of this Function for led l at time t.

Parameters
lled
ttime
Returns
Result of this Function, evaluated on led l at time t. Notice that evaluating a function usually requires the recursive evaluation of other Functions (that are actually parameters of this function) until a Constant is reached for example.

Implements pixled::base::Function< random_engine >.

◆ copy()

RandomT* pixled::random::RandomT::copy ( ) const
inlineoverridevirtual

Returns a dynamically allocated copy of this function.

Returns
copy of this function

Implements pixled::base::Function< random_engine >.

◆ RandomEngineConfig() [1/2]

pixled::random::RandomEngineConfig::RandomEngineConfig
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
inline

RandomEngineConfig constructor.

Parameters
periodrandom engine period
seedrandom engine seed

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