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 (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
5204  : _Par(_N0)
5205  { // construct
5206  }
param_type _Par
Definition: random:5294
template<class _Ty = double>
student_t_distribution< _Ty >::student_t_distribution ( const param_type _Par0)
inlineexplicit
5209  : _Par(_Par0)
5210  { // construct from parameter package
5211  }
param_type _Par
Definition: random:5294

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
5276  { // return next value
5277  _Ty _V1, _V2, _R, _Rs;
5278  uniform_real<_Ty> _Dist(-1, 1);
5279  for (; ; )
5280  { // get a point inside unit circle
5281  _V1 = _Dist(_Eng);
5282  _V2 = _Dist(_Eng);
5283  _Rs = _V1 * _V1 + _V2 * _V2;
5284 
5285  if (_Rs < _Ty(1))
5286  break;
5287  }
5288  _R = _CSTD sqrt(_Rs);
5289 
5290  return (_V1 * _CSTD sqrt(_Par0._Nx
5291  * (_CSTD pow(_R, -_Ty(4) / _Par0._Nx) - _Ty(1)) / _Rs));
5292  }
float sqrt(float _X) __GPU_ONLY
Calculates the squre root of the argument
Definition: amp_math.h:1100
Definition: random:3211
#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
5258  { // read state from _Istr
5259  _Ty _N0;
5260  _Istr >> _N0;
5261  _Par._Init(_N0);
5262  return (_Istr);
5263  }
void _Init(_Ty _N0)
Definition: random:5193
param_type _Par
Definition: random:5294
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
5269  { // write state to _Ostr
5270  return (_Ostr << ' ' << _Par._Nx);
5271  }
_Ty _Nx
Definition: random:5200
param_type _Par
Definition: random:5294
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::max ( ) const
inline
5234  { // get largest possible result
5235  return ((numeric_limits<result_type>::max)());
5236  }
Definition: limits:101
template<class _Ty = double>
result_type() student_t_distribution< _Ty >::min ( ) const
inline
5229  { // get smallest possible result
5230  return (-(numeric_limits<result_type>::max)());
5231  }
Definition: limits:101
template<class _Ty = double>
_Ty student_t_distribution< _Ty >::n ( ) const
inline
5214  { // return n value
5215  return (_Par.n());
5216  }
_Ty n() const
Definition: random:5188
param_type _Par
Definition: random:5294
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng) const
inline
5244  { // return next value
5245  return (_Eval(_Eng, _Par));
5246  }
param_type _Par
Definition: random:5294
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5275
template<class _Ty = double>
template<class _Engine >
result_type student_t_distribution< _Ty >::operator() ( _Engine &  _Eng,
const param_type _Par0 
) const
inline
5250  { // return next value, given parameter package
5251  return (_Eval(_Eng, _Par0));
5252  }
result_type _Eval(_Engine &_Eng, const param_type &_Par0) const
Definition: random:5275
template<class _Ty = double>
param_type student_t_distribution< _Ty >::param ( ) const
inline
5219  { // return parameter package
5220  return (_Par);
5221  }
param_type _Par
Definition: random:5294
template<class _Ty = double>
void student_t_distribution< _Ty >::param ( const param_type _Par0)
inline
5224  { // set parameter package
5225  _Par = _Par0;
5226  }
param_type _Par
Definition: random:5294
template<class _Ty = double>
void student_t_distribution< _Ty >::reset ( )
inline
5239  { // clear internal state
5240  }

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: