vg
tools for working with variation graphs
Public Types | Public Member Functions | Protected Attributes | List of all members
vg::WideningPRNG< PRNG, OutType > Class Template Reference

#include <statistics.hpp>

Public Types

using result_type = OutType
 

Public Member Functions

 WideningPRNG (PRNG &to_widen)
 
OutType min () const
 
OutType max () const
 
OutType operator() ()
 Generate a random number filling all OutType's bits with random bits. More...
 

Protected Attributes

PRNG & base
 

Detailed Description

template<typename PRNG, typename OutType>
class vg::WideningPRNG< PRNG, OutType >

We use this widerer to widen the output of a PRNG that generates only numbers in a smaller range so they cover a wider int type.

Member Typedef Documentation

◆ result_type

template<typename PRNG , typename OutType >
using vg::WideningPRNG< PRNG, OutType >::result_type = OutType

Constructor & Destructor Documentation

◆ WideningPRNG()

template<typename PRNG , typename OutType >
vg::WideningPRNG< PRNG, OutType >::WideningPRNG ( PRNG &  to_widen)
inline

Member Function Documentation

◆ max()

template<typename PRNG , typename OutType >
OutType vg::WideningPRNG< PRNG, OutType >::max ( ) const
inline

◆ min()

template<typename PRNG , typename OutType >
OutType vg::WideningPRNG< PRNG, OutType >::min ( ) const
inline

◆ operator()()

template<typename PRNG , typename OutType >
OutType vg::WideningPRNG< PRNG, OutType >::operator() ( )
inline

Generate a random number filling all OutType's bits with random bits.

Member Data Documentation

◆ base

template<typename PRNG , typename OutType >
PRNG& vg::WideningPRNG< PRNG, OutType >::base
protected

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