Login Languish
Functions
random_utils.h File Reference

handles pseudo-random tasks More...

#include <vector>
#include <random>
Include dependency graph for random_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int rand_utils::randomInt (int min, int max)
 retrieves a pseudo-random integer More...
 
size_t rand_utils::randomSizeT (size_t min, size_t max)
 retrieves a pseudo-random size_t More...
 
size_t rand_utils::randomSizeT (size_t max)
 retrieves a pseudo-random size_t More...
 
template<typename T >
void rand_utils::shuffle (std::vector< T > &vector)
 

Detailed Description

handles pseudo-random tasks

Author
Cameron Bruce

Function Documentation

◆ randomInt()

int rand_utils::randomInt ( int  min,
int  max 
)

retrieves a pseudo-random integer

Parameters
minlower bound
maxupper bound
Returns
the random integer

◆ randomSizeT() [1/2]

size_t rand_utils::randomSizeT ( size_t  min,
size_t  max 
)

retrieves a pseudo-random size_t

Parameters
minlower bound
maxupper bound
Returns
the random size_t

◆ randomSizeT() [2/2]

size_t rand_utils::randomSizeT ( size_t  max)

retrieves a pseudo-random size_t

Parameters
maxupper bound
Returns
the random size_t