SolidUtils
Public Member Functions | List of all members
sl::FastIntDistribution< T > Class Template Reference

This distribution is designed to be fast and consistent across platforms. However, it will not be uniform. More...

#include <FastIntDistribution.hpp>

Public Member Functions

 FastIntDistribution (T const min, T const max)
 Create a new FastIntDistribution which will result in numbers [min,max]. More...
 
template<class RNG >
operator() (RNG &rng)
 Generate a number in the range of [min, max]. The distribution may not be uniform, particularily for larger ranges. More...
 

Detailed Description

template<typename T>
class sl::FastIntDistribution< T >

This distribution is designed to be fast and consistent across platforms. However, it will not be uniform.

Template Parameters
T

Constructor & Destructor Documentation

◆ FastIntDistribution()

template<typename T>
sl::FastIntDistribution< T >::FastIntDistribution ( T const  min,
T const  max 
)
inline

Create a new FastIntDistribution which will result in numbers [min,max].

Parameters
minThe minimum number.
maxThe maximum number.

Member Function Documentation

◆ operator()()

template<typename T>
template<class RNG >
T sl::FastIntDistribution< T >::operator() ( RNG &  rng)
inline

Generate a number in the range of [min, max]. The distribution may not be uniform, particularily for larger ranges.

Template Parameters
RNGThe random engine type.
Parameters
rngThe random engine.
Returns
A number in the range of [min, max].

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