NetDEM v1.0
Loading...
Searching...
No Matches
netdem::RandomEngine Class Reference

A class for generating random numbers. More...

#include <utils_distributions.hpp>

Public Member Functions

 RandomEngine (const RandomEngine &)=delete
 Delete copy constructor.
 
RandomEngineoperator= (const RandomEngine &)=delete
 Delete copy assignment operator.
 
double GetUniformDistribution (double bound_min, double bound_max)
 Generate a random number from a uniform distribution.
 
VecXT< double > GetUniformDistribution (double bound_min, double bound_max, int num)
 Generate a list of random numbers from a uniform distribution.
 

Static Public Member Functions

static RandomEngineGetInstance ()
 Get a reference to the singleton RandomEngine instance.
 

Detailed Description

A class for generating random numbers.

This class provides methods for generating random numbers using a uniform distribution.

Constructor & Destructor Documentation

◆ RandomEngine()

netdem::RandomEngine::RandomEngine ( const RandomEngine & )
delete

Delete copy constructor.

Member Function Documentation

◆ GetInstance()

static RandomEngine & netdem::RandomEngine::GetInstance ( )
inlinestatic

Get a reference to the singleton RandomEngine instance.

This static method returns a reference to the singleton instance of the RandomEngine class.

Returns
A reference to the singleton instance of the RandomEngine class.

◆ GetUniformDistribution() [1/2]

double netdem::RandomEngine::GetUniformDistribution ( double bound_min,
double bound_max )
inline

Generate a random number from a uniform distribution.

This method generates a single random number from a uniform distribution with the given bounds.

Parameters
bound_minThe lower bound of the uniform distribution.
bound_maxThe upper bound of the uniform distribution.
Returns
A random number from the uniform distribution with the given bounds.

◆ GetUniformDistribution() [2/2]

VecXT< double > netdem::RandomEngine::GetUniformDistribution ( double bound_min,
double bound_max,
int num )
inline

Generate a list of random numbers from a uniform distribution.

This method generates a list of random numbers from a uniform distribution with the given bounds and number of elements.

Parameters
bound_minThe lower bound of the uniform distribution.
bound_maxThe upper bound of the uniform distribution.
numThe number of elements in the generated list.
Returns
A vector of random numbers from the uniform distribution with the given bounds and number of elements.

◆ operator=()

RandomEngine & netdem::RandomEngine::operator= ( const RandomEngine & )
delete

Delete copy assignment operator.


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