STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
_Mul_mod< _Ity, _Ty, _Ax, _Cx, _Mx > Struct Template Reference

Public Member Functions

 _Mul_mod (_Ty _Val=0)
 
_Ty operator() ()
 

Public Attributes

_Ty _Prev
 

Constructor & Destructor Documentation

template<class _Ity , class _Ty , _Max_type _Ax, _Max_type _Cx, _Max_type _Mx>
_Mul_mod< _Ity, _Ty, _Ax, _Cx, _Mx >::_Mul_mod ( _Ty  _Val = 0)
inline
370  : _Prev(_Val)
371  { // construct
372  }
_Ty _Prev
Definition: random:385
_FwdIt const _Ty _Val
Definition: algorithm:1938

Member Function Documentation

template<class _Ity , class _Ty , _Max_type _Ax, _Max_type _Cx, _Max_type _Mx>
_Ty _Mul_mod< _Ity, _Ty, _Ax, _Cx, _Mx >::operator() ( )
inline
375  { // return next value
376  _Ty _Divisor = (_Ty)_Mx;
377 
378  _Prev = _Mx ? ((_Ity)_Ax * _Prev + (_Ty)_Cx) % _Divisor
379  : ((_Ity)_Ax * _Prev + (_Ty)_Cx);
380  if (_Prev < static_cast<_Ty>(0))
381  _Prev += (_Ty)_Mx;
382  return (_Prev);
383  }
return
Definition: corecrt_memcpy_s.h:60
_Ty _Prev
Definition: random:385
if(_Source==NULL||_DestinationSize< _SourceSize)
Definition: corecrt_memcpy_s.h:48

Member Data Documentation

template<class _Ity , class _Ty , _Max_type _Ax, _Max_type _Cx, _Max_type _Mx>
_Ty _Mul_mod< _Ity, _Ty, _Ax, _Cx, _Mx >::_Prev

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