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
geometric_distribution< _Ty > Class Template Reference

Classes

struct  param_type
 

Public Types

typedef geometric_distribution< _Ty > _Myt
 
typedef double _Ty1
 
typedef _Ty result_type
 

Public Member Functions

 geometric_distribution (_Ty1 _P0=_Ty1(0.5))
 
 geometric_distribution (const param_type &_Par0)
 
_Ty1 p () 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 = int>
typedef geometric_distribution<_Ty> geometric_distribution< _Ty >::_Myt
template<class _Ty = int>
typedef double geometric_distribution< _Ty >::_Ty1
template<class _Ty = int>
typedef _Ty geometric_distribution< _Ty >::result_type

Constructor & Destructor Documentation

template<class _Ty = int>
geometric_distribution< _Ty >::geometric_distribution ( _Ty1  _P0 = _Ty1(0.5))
inlineexplicit
2641  : _Par(_P0)
2642  { // construct
2643  }
param_type _Par
Definition: random:2719
template<class _Ty = int>
geometric_distribution< _Ty >::geometric_distribution ( const param_type _Par0)
inlineexplicit
2646  : _Par(_Par0)
2647  { // construct from parameter package
2648  }
param_type _Par
Definition: random:2719

Member Function Documentation

template<class _Ty = int>
template<class _Engine >
result_type geometric_distribution< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
2714  { // return next value
2715  return ((_Ty)(_CSTD log(_NRAND(_Eng, _Ty1))
2716  / _Par0._Log_1_p));
2717  }
float log(float _X) __GPU_ONLY
Calculates the base-e logarithm of the argument
Definition: amp_math.h:774
double _Ty1
Definition: random:2597
#define _NRAND(eng, resty)
Definition: random:323
#define _CSTD
Definition: yvals.h:570
template<class _Ty = int>
template<class _Elem , class _Traits >
basic_istream<_Elem, _Traits>& geometric_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
2695  { // read state from _Istr
2696  _Ty1 _P0;
2697  _In(_Istr, _P0);
2698  _Par._Init(_P0);
2699  return (_Istr);
2700  }
param_type _Par
Definition: random:2719
double _Ty1
Definition: random:2597
basic_istream< _Elem, _Traits > & _In(basic_istream< _Elem, _Traits > &_Is, _Ty &_Dx)
Definition: random:133
void _Init(_Ty1 _P0)
Definition: random:2628
template<class _Ty = int>
template<class _Elem , class _Traits >
basic_ostream<_Elem, _Traits>& geometric_distribution< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
2706  { // write state to _Ostr
2707  _Out(_Ostr, _Par._Px);
2708  return (_Ostr);
2709  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:151
param_type _Par
Definition: random:2719
_Ty1 _Px
Definition: random:2636
template<class _Ty = int>
result_type() geometric_distribution< _Ty >::max ( ) const
inline
2671  { // get largest possible result
2672  return ((numeric_limits<result_type>::max)());
2673  }
Definition: limits:101
template<class _Ty = int>
result_type() geometric_distribution< _Ty >::min ( ) const
inline
2666  { // get smallest possible result
2667  return (0);
2668  }
template<class _Ty = int>
template<class _Engine >
result_type geometric_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
2681  { // return next value
2682  return (_Eval(_Eng, _Par));
2683  }
param_type _Par
Definition: random:2719
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:2713
template<class _Ty = int>
template<class _Engine >
result_type geometric_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
2687  { // return next value, given parameter package
2688  return (_Eval(_Eng, _Par0));
2689  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:2713
template<class _Ty = int>
_Ty1 geometric_distribution< _Ty >::p ( ) const
inline
2651  { // return probability
2652  return (_Par.p());
2653  }
param_type _Par
Definition: random:2719
_Ty1 p() const
Definition: random:2623
template<class _Ty = int>
param_type geometric_distribution< _Ty >::param ( ) const
inline
2656  { // return parameter package
2657  return (_Par);
2658  }
param_type _Par
Definition: random:2719
template<class _Ty = int>
void geometric_distribution< _Ty >::param ( const param_type _Par0)
inline
2661  { // set parameter package
2662  _Par = _Par0;
2663  }
param_type _Par
Definition: random:2719
template<class _Ty = int>
void geometric_distribution< _Ty >::reset ( )
inline
2676  { // clear internal state
2677  }

Member Data Documentation

template<class _Ty = int>
param_type geometric_distribution< _Ty >::_Par
private

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