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

Classes

struct  param_type
 

Public Types

typedef weibull_distribution< _Ty > _Myt
 
typedef _Ty result_type
 

Public Member Functions

 _RNG_REQUIRE_REALTYPE (weibull_distribution, _Ty)
 
 weibull_distribution (_Ty _A0=_Ty(1), _Ty _B0=_Ty(1))
 
 weibull_distribution (const param_type &_Par0)
 
_Ty a () const
 
_Ty 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 weibull_distribution<_Ty> weibull_distribution< _Ty >::_Myt
template<class _Ty = double>
typedef _Ty weibull_distribution< _Ty >::result_type

Constructor & Destructor Documentation

template<class _Ty = double>
weibull_distribution< _Ty >::weibull_distribution ( _Ty  _A0 = _Ty(1),
_Ty  _B0 = _Ty(1) 
)
inlineexplicit
4126  : _Par(_A0, _B0)
4127  { // construct
4128  }
param_type _Par
Definition: random:4212
template<class _Ty = double>
weibull_distribution< _Ty >::weibull_distribution ( const param_type _Par0)
inlineexplicit
4131  : _Par(_Par0)
4132  { // construct from parameter package
4133  }
param_type _Par
Definition: random:4212

Member Function Documentation

template<class _Ty = double>
template<class _Engine >
result_type weibull_distribution< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
4207  { // generate pseudo-random value
4208  _Ty _Px = (_Ty(1) - _NRAND(_Eng, _Ty));
4209  return (_Par0._Bx * _CSTD pow(-_CSTD log(_Px), _Ty(1) / _Par0._Ax));
4210  }
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:345
#define _CSTD
Definition: yvals.h:570
float pow(float _X, float _Y) __GPU_ONLY
Calculates _X raised to the power of _Y
Definition: amp_math.h:898
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_istream<_Elem, _Traits>& weibull_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
4185  { // read state from _Istr
4186  _Ty _A0;
4187  _Ty _B0;
4188  _In(_Istr, _A0);
4189  _In(_Istr, _B0);
4190  _Par._Init(_A0, _B0);
4191  return (_Istr);
4192  }
void _Init(_Ty _A0, _Ty _B0)
Definition: random:4110
basic_istream< _Elem, _Traits > & _In(basic_istream< _Elem, _Traits > &_Is, _Ty &_Dx)
Definition: random:156
param_type _Par
Definition: random:4212
template<class _Ty = double>
weibull_distribution< _Ty >::_RNG_REQUIRE_REALTYPE ( weibull_distribution< _Ty >  ,
_Ty   
)
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_ostream<_Elem, _Traits>& weibull_distribution< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
4198  { // write state to _Ostr
4199  _Out(_Ostr, _Par._Ax);
4200  _Out(_Ostr, _Par._Bx);
4201  return (_Ostr);
4202  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:174
_Ty _Bx
Definition: random:4121
_Ty _Ax
Definition: random:4120
param_type _Par
Definition: random:4212
template<class _Ty = double>
_Ty weibull_distribution< _Ty >::a ( ) const
inline
4136  { // return a value
4137  return (_Par.a());
4138  }
param_type _Par
Definition: random:4212
_Ty a() const
Definition: random:4100
template<class _Ty = double>
_Ty weibull_distribution< _Ty >::b ( ) const
inline
4141  { // return b value
4142  return (_Par.b());
4143  }
_Ty b() const
Definition: random:4105
param_type _Par
Definition: random:4212
template<class _Ty = double>
result_type() weibull_distribution< _Ty >::max ( ) const
inline
4161  { // get largest possible result
4162  return ((numeric_limits<result_type>::max)());
4163  }
Definition: limits:102
template<class _Ty = double>
result_type() weibull_distribution< _Ty >::min ( ) const
inline
4156  { // get smallest possible result
4157  return (0);
4158  }
template<class _Ty = double>
template<class _Engine >
result_type weibull_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
4171  { // return next value
4172  return (_Eval(_Eng, _Par));
4173  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:4206
param_type _Par
Definition: random:4212
template<class _Ty = double>
template<class _Engine >
result_type weibull_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
4177  { // return next value, given parameter package
4178  return (_Eval(_Eng, _Par0));
4179  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:4206
template<class _Ty = double>
param_type weibull_distribution< _Ty >::param ( ) const
inline
4146  { // return parameter package
4147  return (_Par);
4148  }
param_type _Par
Definition: random:4212
template<class _Ty = double>
void weibull_distribution< _Ty >::param ( const param_type _Par0)
inline
4151  { // set parameter package
4152  _Par = _Par0;
4153  }
param_type _Par
Definition: random:4212
template<class _Ty = double>
void weibull_distribution< _Ty >::reset ( )
inline
4166  { // clear internal state
4167  }

Member Data Documentation

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

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