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

 _RNG_REQUIRE_REALTYPE (student_t_distribution, _Ty)
 
 student_t_distribution (_Ty _N0=_Ty(1))
 
 student_t_distribution (const 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
5223  : _Par(_N0)
5224  { // construct
5225  }
param_type _Par
Definition: random:5313
template<class _Ty = double>
student_t_distribution< _Ty >::student_t_distribution ( const param_type _Par0)
inlineexplicit
5228  : _Par(_Par0)
5229  { // construct from parameter package
5230  }
param_type _Par
Definition: random:5313

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
5295  { // return next value
5296  _Ty _V1, _V2, _R, _Rs;
5297  uniform_real<_Ty> _Dist(-1, 1);
5298  for (; ; )
5299  { // get a point inside unit circle
5300  _V1 = _Dist(_Eng);
5301  _V2 = _Dist(_Eng);
5302  _Rs = _V1 * _V1 + _V2 * _V2;
5303 
5304  if (_Rs < _Ty(1))
5305  break;
5306  }
5307  _R = _CSTD sqrt(_Rs);
5308 
5309  return (_V1 * _CSTD sqrt(_Par0._Nx
5310  * (_CSTD pow(_R, -_Ty(4) / _Par0._Nx) - _Ty(1)) / _Rs));
5311  }
float sqrt(float _X) __GPU_ONLY
Calculates the square root of the argument
Definition: amp_math.h:1100
Definition: random:3241
#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>& student_t_distribution< _Ty >::_Read ( basic_istream< _Elem, _Traits > &  _Istr)
inline
5277  { // read state from _Istr
5278  _Ty _N0;
5279  _Istr >> _N0;
5280  _Par._Init(_N0);
5281  return (_Istr);
5282  }
void _Init(_Ty _N0)
Definition: random:5212
param_type _Par
Definition: random:5313
template<class _Ty = double>
student_t_distribution< _Ty >::_RNG_REQUIRE_REALTYPE ( student_t_distribution< _Ty >  ,
_Ty   
)
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
5288  { // write state to _Ostr
5289  return (_Ostr << ' ' << _Par._Nx);
5290  }
_Ty _Nx
Definition: random:5219
param_type _Par
Definition: random:5313
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::max ( ) const
inline
5253  { // get largest possible result
5254  return ((numeric_limits<result_type>::max)());
5255  }
Definition: limits:102
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::min ( ) const
inline
5248  { // get smallest possible result
5249  return (-(numeric_limits<result_type>::max)());
5250  }
Definition: limits:102
template<class _Ty = double>
_Ty student_t_distribution< _Ty >::n ( ) const
inline
5233  { // return n value
5234  return (_Par.n());
5235  }
_Ty n() const
Definition: random:5207
param_type _Par
Definition: random:5313
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
5263  { // return next value
5264  return (_Eval(_Eng, _Par));
5265  }
param_type _Par
Definition: random:5313
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5294
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
5269  { // return next value, given parameter package
5270  return (_Eval(_Eng, _Par0));
5271  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5294
template<class _Ty = double>
param_type student_t_distribution< _Ty >::param ( ) const
inline
5238  { // return parameter package
5239  return (_Par);
5240  }
param_type _Par
Definition: random:5313
template<class _Ty = double>
void student_t_distribution< _Ty >::param ( const param_type _Par0)
inline
5243  { // set parameter package
5244  _Par = _Par0;
5245  }
param_type _Par
Definition: random:5313
template<class _Ty = double>
void student_t_distribution< _Ty >::reset ( )
inline
5258  { // clear internal state
5259  }

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: