All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
blaze::Rand< T > Class Template Reference

Default implementation of the Rand class for integral data types.This default implementation of the Rand class creates random, integral numbers in the range $ [0..max] $, where max is the maximal value of the given data type T. More...

#include <Random.h>

Public Member Functions

Constructors
 Rand ()
 Default constructor of the default implementation of the Rand class.
 
 Rand (T min, T max)
 Range constructor of the default implementation of the Rand class.
 
Conversion operators
 operator T () const
 Conversion to the created random number.
 

Private Attributes

Member variables
value_
 The random number.
 

Detailed Description

template<typename T>
class blaze::Rand< T >

Default implementation of the Rand class for integral data types.

This default implementation of the Rand class creates random, integral numbers in the range $ [0..max] $, where max is the maximal value of the given data type T.

Constructor & Destructor Documentation

template<typename T >
Rand< T >::Rand ( )
inlineexplicit

Default constructor of the default implementation of the Rand class.

The default constructor of the default implementation of the Rand class creates a random number in the range $ [0..max] $, where max is the maximal value of the given data type T.

template<typename T >
Rand< T >::Rand ( min,
max 
)
inlineexplicit

Range constructor of the default implementation of the Rand class.

Parameters
minThe smallest possible random value.
maxThe largest possible random value.

This constructor creates a random number in the range $ [min..max] $, where min must be smaller or equal to max. This requirement is only checked in debug mode. In release mode, no check is performed to enforce the validity of the values. Therefore the returned value is undefined if min is larger than max.

Member Function Documentation

template<typename T >
Rand< T >::operator T ( ) const
inline

Conversion to the created random number.

Returns
The random value.

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