Tenncor
Namespaces | Typedefs | Functions
random.hpp File Reference
#include <random>
#include <type_traits>
#include <functional>
Include dependency graph for random.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 eteq
 

Typedefs

using eteq::EngineT = std::default_random_engine
 RNG engine used. More...
 
template<typename T >
using eteq::GenF = std::function< T()>
 Function that returns a generated number. More...
 

Functions

EngineT & eteq::get_engine (void)
 Return global random generator. More...
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
eteq::unif (const T &a, const T &b)
 Return uniformly generated number between a and b (integers only) More...
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
GenF< T > eteq::unif_gen (const T &a, const T &b)
 Return uniformly generator function that produces numbers between a and b (integers only) More...
 
template<typename T , typename std::enable_if<!std::is_integral< T >::value >::type * = nullptr>
GenF< T > eteq::unif_gen (T a, T b)
 Return uniformly generator function that produces numbers between a and b (decimals only) More...
 
template<typename T , typename std::enable_if<!std::is_integral< T >::value >::type * = nullptr>
GenF< T > eteq::norm_gen (T mean, T stdev)
 Return normally generator function that produces numbers with mean and stdev (decimals only) More...