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
uniform_real< _Ty > Class Template Reference
Inheritance diagram for uniform_real< _Ty >:
uniform_real_distribution< _Ty >

Classes

struct  param_type
 

Public Types

typedef uniform_real< _Ty > _Myt
 
typedef _Ty input_type
 
typedef _Ty result_type
 

Public Member Functions

 uniform_real (_Ty _Min0=_Ty(0), _Ty _Max0=_Ty(1))
 
 uniform_real (param_type _Par0)
 
result_type a () const
 
result_type b () 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 uniform_real<_Ty> uniform_real< _Ty >::_Myt
template<class _Ty = double>
typedef _Ty uniform_real< _Ty >::input_type
template<class _Ty = double>
typedef _Ty uniform_real< _Ty >::result_type

Constructor & Destructor Documentation

template<class _Ty = double>
uniform_real< _Ty >::uniform_real ( _Ty  _Min0 = _Ty(0),
_Ty  _Max0 = _Ty(1) 
)
inlineexplicit
3571  : _Par(_Min0, _Max0)
3572  { // construct
3573  }
param_type _Par
Definition: random:3654
template<class _Ty = double>
uniform_real< _Ty >::uniform_real ( param_type  _Par0)
inlineexplicit
3576  : _Par(_Par0)
3577  { // construct from parameter package
3578  }
param_type _Par
Definition: random:3654

Member Function Documentation

template<class _Ty = double>
template<class _Engine >
result_type uniform_real< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
3650  { // return next value
3651  return (_NRAND(_Eng, _Ty) * (_Par0._Max - _Par0._Min) + _Par0._Min);
3652  }
#define _NRAND(eng, resty)
Definition: random:74
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_istream<_Elem, _Traits>& uniform_real< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
3629  { // read state from _Istr
3630  _Ty _Min0;
3631  _Ty _Max0;
3632  _In(_Istr, _Min0);
3633  _In(_Istr, _Max0);
3634  _Par._Init(_Min0, _Max0);
3635  return (_Istr);
3636  }
void _Init(_Ty _Min0, _Ty _Max0)
Definition: random:3557
param_type _Par
Definition: random:3654
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>& uniform_real< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
3641  { // write state to _Ostr
3642  _Out(_Ostr, _Par._Min);
3643  _Out(_Ostr, _Par._Max);
3644  return (_Ostr);
3645  }
result_type _Max
Definition: random:3566
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
param_type _Par
Definition: random:3654
result_type _Min
Definition: random:3565
template<class _Ty = double>
result_type uniform_real< _Ty >::a ( ) const
inline
3581  { // return a value
3582  return (_Par.a());
3583  }
param_type _Par
Definition: random:3654
result_type a() const
Definition: random:3547
template<class _Ty = double>
result_type uniform_real< _Ty >::b ( ) const
inline
3586  { // return b value
3587  return (_Par.b());
3588  }
result_type b() const
Definition: random:3552
param_type _Par
Definition: random:3654
template<class _Ty = double>
result_type() uniform_real< _Ty >::max ( ) const
inline
3606  { // return maximum possible generated value
3607  return (_Par._Max);
3608  }
result_type _Max
Definition: random:3566
param_type _Par
Definition: random:3654
template<class _Ty = double>
result_type() uniform_real< _Ty >::min ( ) const
inline
3601  { // return minimum possible generated value
3602  return (_Par._Min);
3603  }
param_type _Par
Definition: random:3654
result_type _Min
Definition: random:3565
template<class _Ty = double>
template<class _Engine >
result_type uniform_real< _Ty >::operator() ( _Engine &  _Eng) const
inline
3616  { // return next value
3617  return (_Eval(_Eng, _Par));
3618  }
param_type _Par
Definition: random:3654
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3649
template<class _Ty = double>
template<class _Engine >
result_type uniform_real< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
3622  { // return next value, given parameter package
3623  return (_Eval(_Eng, _Par0));
3624  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:3649
template<class _Ty = double>
param_type uniform_real< _Ty >::param ( ) const
inline
3591  { // return parameter package
3592  return (_Par);
3593  }
param_type _Par
Definition: random:3654
template<class _Ty = double>
void uniform_real< _Ty >::param ( const param_type _Par0)
inline
3596  { // set parameter package
3597  _Par = _Par0;
3598  }
param_type _Par
Definition: random:3654
template<class _Ty = double>
void uniform_real< _Ty >::reset ( )
inline
3611  { // clear internal state
3612  }

Member Data Documentation

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

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