STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
exponential_distribution< _Ty > Class Template Reference

Classes

struct  param_type
 

Public Types

typedef exponential_distribution< _Ty > _Myt
 
typedef _Ty result_type
 

Public Member Functions

 exponential_distribution (_Ty _Lambda0=_Ty(1))
 
 exponential_distribution (const param_type &_Par0)
 
_Ty lambda () const
 
param_type param () const
 
void param (const param_type &_Par0)
 
result_type() min () const
 
result_type() max () const
 
void reset ()
 
template<class _Engine >
result_type operator() (_Engine &_Eng) const
 
template<class _Engine >
result_type operator() (_Engine &_Eng, const param_type &_Par0) const
 
template<class _Elem , class _Traits >
basic_istream< _Elem, _Traits > & _Read (basic_istream< _Elem, _Traits > &_Istr)
 
template<class _Elem , class _Traits >
basic_ostream< _Elem, _Traits > & _Write (basic_ostream< _Elem, _Traits > &_Ostr) const
 

Private Member Functions

template<class _Engine >
result_type _Eval (_Engine &_Eng, const param_type &_Par0) const
 

Private Attributes

param_type _Par
 

Member Typedef Documentation

template<class _Ty = double>
typedef exponential_distribution<_Ty> exponential_distribution< _Ty >::_Myt
template<class _Ty = double>
typedef _Ty exponential_distribution< _Ty >::result_type

Constructor & Destructor Documentation

template<class _Ty = double>
exponential_distribution< _Ty >::exponential_distribution ( _Ty  _Lambda0 = _Ty(1))
inlineexplicit
3473  : _Par(_Lambda0)
3474  { // construct
3475  }
param_type _Par
Definition: random:3550
template<class _Ty = double>
exponential_distribution< _Ty >::exponential_distribution ( const param_type _Par0)
inlineexplicit
3478  : _Par(_Par0)
3479  { // construct from parameter package
3480  }
param_type _Par
Definition: random:3550

Member Function Documentation

template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
3546  { // return next value
3547  return (-_CSTD log(_Ty(1) - _NRAND(_Eng, _Ty)) / _Par0._Lambda);
3548  }
float log(float _X) __GPU_ONLY
Calculates the base-e logarithm of the argument
Definition: amp_math.h:774
#define _NRAND(eng, resty)
Definition: random:323
#define _CSTD
Definition: yvals.h:570
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_istream<_Elem, _Traits>& exponential_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
3527  { // read state from _Istr
3528  _Ty _Lambda0;
3529  _In(_Istr, _Lambda0);
3530  _Par._Init(_Lambda0);
3531  return (_Istr);
3532  }
param_type _Par
Definition: random:3550
void _Init(_Ty _Lambda0)
Definition: random:3462
basic_istream< _Elem, _Traits > & _In(basic_istream< _Elem, _Traits > &_Is, _Ty &_Dx)
Definition: random:133
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_ostream<_Elem, _Traits>& exponential_distribution< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
3538  { // write state to _Ostr
3539  _Out(_Ostr, _Par._Lambda);
3540  return (_Ostr);
3541  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:151
param_type _Par
Definition: random:3550
_Ty _Lambda
Definition: random:3469
template<class _Ty = double>
_Ty exponential_distribution< _Ty >::lambda ( ) const
inline
3483  { // return lambda value
3484  return (_Par.lambda());
3485  }
param_type _Par
Definition: random:3550
_Ty lambda() const
Definition: random:3457
template<class _Ty = double>
result_type() exponential_distribution< _Ty >::max ( ) const
inline
3503  { // get largest possible result
3504  return ((numeric_limits<result_type>::max)());
3505  }
Definition: limits:101
template<class _Ty = double>
result_type() exponential_distribution< _Ty >::min ( ) const
inline
3498  { // get smallest possible result
3499  return (0);
3500  }
template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
3513  { // return next value
3514  return (_Eval(_Eng, _Par));
3515  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3545
param_type _Par
Definition: random:3550
template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
3519  { // return next value, given parameter package
3520  return (_Eval(_Eng, _Par0));
3521  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3545
template<class _Ty = double>
param_type exponential_distribution< _Ty >::param ( ) const
inline
3488  { // return parameter package
3489  return (_Par);
3490  }
param_type _Par
Definition: random:3550
template<class _Ty = double>
void exponential_distribution< _Ty >::param ( const param_type _Par0)
inline
3493  { // set parameter package
3494  _Par = _Par0;
3495  }
param_type _Par
Definition: random:3550
template<class _Ty = double>
void exponential_distribution< _Ty >::reset ( )
inline
3508  { // clear internal state
3509  }

Member Data Documentation

template<class _Ty = double>
param_type exponential_distribution< _Ty >::_Par
private

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