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 input_type
 
typedef _Ty result_type
 

Public Member Functions

 exponential_distribution (_Ty _Lambda0=_Ty(1))
 
 exponential_distribution (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 >::input_type
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
3766  : _Par(_Lambda0)
3767  { // construct
3768  }
param_type _Par
Definition: random:3843
template<class _Ty = double>
exponential_distribution< _Ty >::exponential_distribution ( param_type  _Par0)
inlineexplicit
3771  : _Par(_Par0)
3772  { // construct from parameter package
3773  }
param_type _Par
Definition: random:3843

Member Function Documentation

template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
3839  { // return next value
3840  return (-_CSTD log(_Ty(1) - _NRAND(_Eng, _Ty)) / _Par0._Lambda);
3841  }
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:74
#define _CSTD
Definition: yvals.h:559
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_istream<_Elem, _Traits>& exponential_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
3820  { // read state from _Istr
3821  _Ty _Lambda0;
3822  _In(_Istr, _Lambda0);
3823  _Par._Init(_Lambda0);
3824  return (_Istr);
3825  }
param_type _Par
Definition: random:3843
void _Init(_Ty _Lambda0)
Definition: random:3755
basic_istream< _Elem, _Traits > & _In(basic_istream< _Elem, _Traits > &_Is, _Ty &_Dx)
Definition: random:151
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_ostream<_Elem, _Traits>& exponential_distribution< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
3831  { // write state to _Ostr
3832  _Out(_Ostr, _Par._Lambda);
3833  return (_Ostr);
3834  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
param_type _Par
Definition: random:3843
_Ty _Lambda
Definition: random:3762
template<class _Ty = double>
_Ty exponential_distribution< _Ty >::lambda ( ) const
inline
3776  { // return lambda value
3777  return (_Par.lambda());
3778  }
param_type _Par
Definition: random:3843
_Ty lambda() const
Definition: random:3750
template<class _Ty = double>
result_type() exponential_distribution< _Ty >::max ( ) const
inline
3796  { // get largest possible result
3797  return ((numeric_limits<result_type>::max)());
3798  }
Definition: limits:79
template<class _Ty = double>
result_type() exponential_distribution< _Ty >::min ( ) const
inline
3791  { // get smallest possible result
3792  return (0);
3793  }
template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
3806  { // return next value
3807  return (_Eval(_Eng, _Par));
3808  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3838
param_type _Par
Definition: random:3843
template<class _Ty = double>
template<class _Engine >
result_type exponential_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
3812  { // return next value, given parameter package
3813  return (_Eval(_Eng, _Par0));
3814  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3838
template<class _Ty = double>
param_type exponential_distribution< _Ty >::param ( ) const
inline
3781  { // return parameter package
3782  return (_Par);
3783  }
param_type _Par
Definition: random:3843
template<class _Ty = double>
void exponential_distribution< _Ty >::param ( const param_type _Par0)
inline
3786  { // set parameter package
3787  _Par = _Par0;
3788  }
param_type _Par
Definition: random:3843
template<class _Ty = double>
void exponential_distribution< _Ty >::reset ( )
inline
3801  { // clear internal state
3802  }

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: