Random Number Generation Engine Class. More...

#include <random.h>

Public Member Functions

 randomEngine (randomEngineType typeIn=AF_RANDOM_ENGINE_DEFAULT, unsigned long long seedIn=0)
 This function creates a af::randomEngine object with a af::randomEngineType and a seed. More...
 
 randomEngine (const randomEngine &other)
 Copy constructor for af::randomEngine. More...
 
 randomEngine (af_random_engine engine)
 Creates a copy of the random engine object from a af_random_engine handle. More...
 
 ~randomEngine ()
 Destructor for af::randomEngine. More...
 
randomEngineoperator= (const randomEngine &other)
 Assigns the internal state of randome engine. More...
 
void setType (const randomEngineType type)
 Sets the random type of the random engine. More...
 
randomEngineType getType (void)
 Return the random type of the random engine. More...
 
void setSeed (const unsigned long long seed)
 Sets the seed of the random engine. More...
 
unsigned long long getSeed (void) const
 Returns the seed of the random engine. More...
 
af_random_engine get (void) const
 Returns the af_random_engine handle of this object. More...
 

Detailed Description

Random Number Generation Engine Class.

The af::randomEngine class is used to set the type and seed of random number generation engine based on af::randomEngineType.

Definition at line 34 of file random.h.

Constructor & Destructor Documentation

◆ randomEngine() [1/3]

randomEngine ( randomEngineType  typeIn = AF_RANDOM_ENGINE_DEFAULT,
unsigned long long  seedIn = 0 
)
explicit

This function creates a af::randomEngine object with a af::randomEngineType and a seed.

// creates random engine of default type with seed = 1

◆ randomEngine() [2/3]

randomEngine ( const randomEngine other)

Copy constructor for af::randomEngine.

Parameters
[in]otherThe input random engine object

◆ randomEngine() [3/3]

Creates a copy of the random engine object from a af_random_engine handle.

Parameters
[in]engineThe input random engine object

◆ ~randomEngine()

Destructor for af::randomEngine.

Member Function Documentation

◆ get()

af_random_engine get ( void  ) const

Returns the af_random_engine handle of this object.

Returns
the handle to the af_random_engine associated with this random engine

◆ getSeed()

unsigned long long getSeed ( void  ) const

Returns the seed of the random engine.

Returns
the seed associated with random engine

◆ getType()

randomEngineType getType ( void  )

Return the random type of the random engine.

Returns
the af::randomEngineType associated with random engine

◆ operator=()

randomEngine& operator= ( const randomEngine other)

Assigns the internal state of randome engine.

Parameters
[in]otherThe object to be assigned to the random engine
Returns
the reference to this

◆ setSeed()

void setSeed ( const unsigned long long  seed)

Sets the seed of the random engine.

Parameters
[in]seedThe initializing seed of the random number generator

◆ setType()

void setType ( const randomEngineType  type)

Sets the random type of the random engine.

Parameters
[in]typeThe type of the random number generator

The documentation for this class was generated from the following file:
AF_RANDOM_ENGINE_DEFAULT
@ AF_RANDOM_ENGINE_DEFAULT
Definition: defines.h:445
af::randomEngine::randomEngine
randomEngine(randomEngineType typeIn=AF_RANDOM_ENGINE_DEFAULT, unsigned long long seedIn=0)
This function creates a af::randomEngine object with a af::randomEngineType and a seed.