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

Classes

struct  param_type
 

Public Types

typedef student_t_distribution< _Ty > _Myt
 
typedef _Ty result_type
 

Public Member Functions

 student_t_distribution (_Ty _N0=_Ty(1))
 
 student_t_distribution (param_type _Par0)
 
_Ty n () 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 student_t_distribution<_Ty> student_t_distribution< _Ty >::_Myt
template<class _Ty = double>
typedef _Ty student_t_distribution< _Ty >::result_type

Constructor & Destructor Documentation

template<class _Ty = double>
student_t_distribution< _Ty >::student_t_distribution ( _Ty  _N0 = _Ty(1))
inlineexplicit
5373  : _Par(_N0)
5374  { // construct
5375  }
param_type _Par
Definition: random:5463
template<class _Ty = double>
student_t_distribution< _Ty >::student_t_distribution ( param_type  _Par0)
inlineexplicit
5378  : _Par(_Par0)
5379  { // construct from parameter package
5380  }
param_type _Par
Definition: random:5463

Member Function Documentation

template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::_Eval ( _Engine &  _Eng,
const param_type _Par0 
) const
inlineprivate
5445  { // return next value
5446  _Ty _V1, _V2, _R, _Rs;
5447  uniform_real<_Ty> _Dist(-1, 1);
5448  for (; ; )
5449  { // get a point inside unit circle
5450  _V1 = _Dist(_Eng);
5451  _V2 = _Dist(_Eng);
5452  _Rs = _V1 * _V1 + _V2 * _V2;
5453 
5454  if (_Rs < _Ty(1))
5455  break;
5456  }
5457  _R = _CSTD sqrt(_Rs);
5458 
5459  return (_V1 * _CSTD sqrt(_Par0._Nx
5460  * (_CSTD pow(_R, -_Ty(4) / _Par0._Nx) - _Ty(1)) / _Rs));
5461  }
float sqrt(float _X) __GPU_ONLY
Calculates the squre root of the argument
Definition: amp_math.h:1100
Definition: random:3520
#define _CSTD
Definition: yvals.h:559
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>& student_t_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
5427  { // read state from _Istr
5428  _Ty _N0;
5429  _Istr >> _N0;
5430  _Par._Init(_N0);
5431  return (_Istr);
5432  }
void _Init(_Ty _N0)
Definition: random:5362
param_type _Par
Definition: random:5463
template<class _Ty = double>
template<class _Elem , class _Traits >
basic_ostream<_Elem, _Traits>& student_t_distribution< _Ty >::_Write ( basic_ostream< _Elem, _Traits > &  _Ostr) const
inline
5438  { // write state to _Ostr
5439  return (_Ostr << ' ' << _Par._Nx);
5440  }
_Ty _Nx
Definition: random:5369
param_type _Par
Definition: random:5463
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::max ( ) const
inline
5403  { // get largest possible result
5404  return ((numeric_limits<result_type>::max)());
5405  }
Definition: limits:79
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::min ( ) const
inline
5398  { // get smallest possible result
5399  return (-(numeric_limits<result_type>::max)());
5400  }
Definition: limits:79
template<class _Ty = double>
_Ty student_t_distribution< _Ty >::n ( ) const
inline
5383  { // return n value
5384  return (_Par.n());
5385  }
_Ty n() const
Definition: random:5357
param_type _Par
Definition: random:5463
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
5413  { // return next value
5414  return (_Eval(_Eng, _Par));
5415  }
param_type _Par
Definition: random:5463
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5444
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
5419  { // return next value, given parameter package
5420  return (_Eval(_Eng, _Par0));
5421  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5444
template<class _Ty = double>
param_type student_t_distribution< _Ty >::param ( ) const
inline
5388  { // return parameter package
5389  return (_Par);
5390  }
param_type _Par
Definition: random:5463
template<class _Ty = double>
void student_t_distribution< _Ty >::param ( const param_type _Par0)
inline
5393  { // set parameter package
5394  _Par = _Par0;
5395  }
param_type _Par
Definition: random:5463
template<class _Ty = double>
void student_t_distribution< _Ty >::reset ( )
inline
5408  { // clear internal state
5409  }

Member Data Documentation

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

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