git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
48 lines
1.7 KiB
TeX
48 lines
1.7 KiB
TeX
\section{random\_\-generator$<$ T $>$ Class Template Reference}
|
|
\label{classrandom__generator}\index{random_generator@{random\_\-generator}}
|
|
The class random\_\-generator can be used in the STL generate function to easily generate random ints either between [0, \_\-max) if only one value (\_\-max) is given to the ctor or in [\_\-min,\_\-max) if 2 values are given (\_\-min, \_\-max).
|
|
|
|
|
|
{\tt \#include $<$rnd\_\-generators.h$>$}
|
|
|
|
\subsection*{Public Member Functions}
|
|
\begin{CompactItemize}
|
|
\item
|
|
{\bf random\_\-generator} (T \_\-max, {\bf eo\-Rng} \&\_\-rng=rng)\label{classrandom__generator_a0}
|
|
|
|
\item
|
|
{\bf random\_\-generator} (T \_\-min, T \_\-max, {\bf eo\-Rng} \&\_\-rng=rng)\label{classrandom__generator_a1}
|
|
|
|
\item
|
|
T {\bf operator()} (void)\label{classrandom__generator_a2}
|
|
|
|
\item
|
|
template$<$$>$ bool {\bf operator()} (void)\label{classrandom__generator_a3}
|
|
|
|
\end{CompactItemize}
|
|
\subsection*{Private Attributes}
|
|
\begin{CompactItemize}
|
|
\item
|
|
T {\bf minim}\label{classrandom__generator_r0}
|
|
|
|
\item
|
|
T {\bf range}\label{classrandom__generator_r1}
|
|
|
|
\item
|
|
{\bf eo\-Rng} \& {\bf random}\label{classrandom__generator_r2}
|
|
|
|
\end{CompactItemize}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
\subsubsection*{template$<$class T = uint32\_\-t$>$ class random\_\-generator$<$ T $>$}
|
|
|
|
The class random\_\-generator can be used in the STL generate function to easily generate random ints either between [0, \_\-max) if only one value (\_\-max) is given to the ctor or in [\_\-min,\_\-max) if 2 values are given (\_\-min, \_\-max).
|
|
|
|
|
|
|
|
Definition at line 87 of file rnd\_\-generators.h.
|
|
|
|
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
|
\item
|
|
rnd\_\-generators.h\end{CompactItemize}
|