Random Number Distributions Class Templates

/* A normal_distribution random number distribution produces floating point Normally distributed random numbers. */template <typename RealType = double> class thrust::random::normal_distribution;
/* A uniform_int_distribution random number distribution produces signed or unsigned integer uniform random numbers from a given range. */template <typename IntType = int> class thrust::random::uniform_int_distribution;
/* A uniform_real_distribution random number distribution produces floating point uniform random numbers from a half-open interval. */template <typename RealType = double> class thrust::random::uniform_real_distribution;
template <typename RealType> _CCCL_HOST_DEVICE bool operator==(const normal_distribution< RealType > & lhs,   const normal_distribution< RealType > & rhs);
template <typename RealType> _CCCL_HOST_DEVICE bool operator!=(const normal_distribution< RealType > & lhs,   const normal_distribution< RealType > & rhs);
template <typename RealType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const normal_distribution< RealType > & d);
template <typename RealType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   normal_distribution< RealType > & d);
template <typename IntType> _CCCL_HOST_DEVICE bool operator==(const uniform_int_distribution< IntType > & lhs,   const uniform_int_distribution< IntType > & rhs);
template <typename IntType> _CCCL_HOST_DEVICE bool operator!=(const uniform_int_distribution< IntType > & lhs,   const uniform_int_distribution< IntType > & rhs);
template <typename IntType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const uniform_int_distribution< IntType > & d);
template <typename IntType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   uniform_int_distribution< IntType > & d);
template <typename RealType> _CCCL_HOST_DEVICE bool operator==(const uniform_real_distribution< RealType > & lhs,   const uniform_real_distribution< RealType > & rhs);
template <typename RealType> _CCCL_HOST_DEVICE bool operator!=(const uniform_real_distribution< RealType > & lhs,   const uniform_real_distribution< RealType > & rhs);
template <typename RealType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const uniform_real_distribution< RealType > & d);
template <typename RealType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   uniform_real_distribution< RealType > & d);

Member Classes

Class thrust::random::normal_distribution

A normal_distribution random number distribution produces floating point Normally distributed random numbers.

Inherits From: detail::normal_distribution_base::type

Class thrust::random::uniform_int_distribution

A uniform_int_distribution random number distribution produces signed or unsigned integer uniform random numbers from a given range.

Class thrust::random::uniform_real_distribution

A uniform_real_distribution random number distribution produces floating point uniform random numbers from a half-open interval.

Functions

Function operator==

template <typename RealType> _CCCL_HOST_DEVICE bool operator==(const normal_distribution< RealType > & lhs,   const normal_distribution< RealType > & rhs); This function checks two normal_distributions for equality.

Function Parameters:

Returns: true if lhs is equal to rhs; false, otherwise.

Function operator!=

template <typename RealType> _CCCL_HOST_DEVICE bool operator!=(const normal_distribution< RealType > & lhs,   const normal_distribution< RealType > & rhs); This function checks two normal_distributions for inequality.

Function Parameters:

Returns: true if lhs is not equal to rhs; false, otherwise.

Function operator<<

template <typename RealType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const normal_distribution< RealType > & d); This function streams a normal_distribution to a std::basic_ostream.

Function Parameters:

Returns: os

Function operator>>

template <typename RealType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   normal_distribution< RealType > & d); This function streams a normal_distribution in from a std::basic_istream.

Function Parameters:

Returns: is

Function operator==

template <typename IntType> _CCCL_HOST_DEVICE bool operator==(const uniform_int_distribution< IntType > & lhs,   const uniform_int_distribution< IntType > & rhs); This function checks two uniform_int_distributions for equality.

Function Parameters:

Returns: true if lhs is equal to rhs; false, otherwise.

Function operator!=

template <typename IntType> _CCCL_HOST_DEVICE bool operator!=(const uniform_int_distribution< IntType > & lhs,   const uniform_int_distribution< IntType > & rhs); This function checks two uniform_int_distributions for inequality.

Function Parameters:

Returns: true if lhs is not equal to rhs; false, otherwise.

Function operator<<

template <typename IntType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const uniform_int_distribution< IntType > & d); This function streams a uniform_int_distribution to a std::basic_ostream.

Function Parameters:

Returns: os

Function operator>>

template <typename IntType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   uniform_int_distribution< IntType > & d); This function streams a uniform_int_distribution in from a std::basic_istream.

Function Parameters:

Returns: is

Function operator==

template <typename RealType> _CCCL_HOST_DEVICE bool operator==(const uniform_real_distribution< RealType > & lhs,   const uniform_real_distribution< RealType > & rhs); This function checks two uniform_real_distributions for equality.

Function Parameters:

Returns: true if lhs is equal to rhs; false, otherwise.

Function operator!=

template <typename RealType> _CCCL_HOST_DEVICE bool operator!=(const uniform_real_distribution< RealType > & lhs,   const uniform_real_distribution< RealType > & rhs); This function checks two uniform_real_distributions for inequality.

Function Parameters:

Returns: true if lhs is not equal to rhs; false, otherwise.

Function operator<<

template <typename RealType,   typename CharT,   typename Traits> std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > & os,   const uniform_real_distribution< RealType > & d); This function streams a uniform_real_distribution to a std::basic_ostream.

Function Parameters:

Returns: os

Function operator>>

template <typename RealType,   typename CharT,   typename Traits> std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > & is,   uniform_real_distribution< RealType > & d); This function streams a uniform_real_distribution in from a std::basic_istream.

Function Parameters:

Returns: is