Random.h File Reference

Detailed Description

#include "core/DataTypes.h"
#include "core/debug/Debug.h"
#include <random>
#include <limits>

Classes

class  walberla::math::IntRandom< INT >
 
class  walberla::math::RealRandom< REAL_TYPE >
 
class  walberla::math::BoolRandom
 

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::math
 
 walberla::math::internal
 

Functions

std::mt19937 & walberla::math::internal::getGenerator ()
 
void walberla::math::seedRandomGenerator (const std::mt19937::result_type &seed)
 
template<typename INT >
INT walberla::math::intRandom (const INT min, const INT max, std::mt19937 &generator)
 Returns a random integral number of type INT in the range [min,max] (max included!) More...
 
template<>
char walberla::math::intRandom< char > (const char min, const char max, std::mt19937 &generator)
 
template<>
unsigned char walberla::math::intRandom< unsigned char > (const unsigned char min, const unsigned char max, std::mt19937 &generator)
 
template<>
signed char walberla::math::intRandom< signed char > (const signed char min, const signed char max, std::mt19937 &generator)
 
template<typename INT >
INT walberla::math::intRandom (const INT min)
 
template<typename INT >
INT walberla::math::intRandom (const INT min, const INT max)
 
template<typename INT >
INT walberla::math::intRandom ()
 
template<typename REAL_TYPE = real_t>
REAL_TYPE walberla::math::realRandom (const REAL_TYPE min=REAL_TYPE(0), const REAL_TYPE max=REAL_TYPE(1), std::mt19937 &generator=internal::getGenerator())
 Returns a random floating point number of type REAL in the range [min,max) (max excluded!) More...
 
bool walberla::math::boolRandom ()