\section{Basic\-Random\-Number\-Generator Class Reference}
\label{class_basic_random_number_generator}\index{BasicRandomNumberGenerator@{BasicRandomNumberGenerator}}
A C++ interface to system random number generators.  


{\tt \#include $<$Basic\-Random\-Number\-Generator.h$>$}

Collaboration diagram for Basic\-Random\-Number\-Generator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=139pt]{class_basic_random_number_generator__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Basic\-Random\-Number\-Generator} ()
\item 
void {\bf set\-Seed} (const unsigned int {\bf seed})
\begin{CompactList}\small\item\em Set the random seed. \item\end{CompactList}\item 
unsigned int {\bf get\-Seed} ()
\item 
bool {\bf get\-Bool} ()
\begin{CompactList}\small\item\em Returns one bit from the random buffer. \item\end{CompactList}\item 
long {\bf get\-Integer} (const long min=0, const long max=RAND\_\-MAX)
\item 
double {\bf get\-Ratio} ()
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Basic\-Random\-Number\-Generator} $\ast$ {\bf get\-Instance} ()
\begin{CompactList}\small\item\em Get a pointer to an instance of Basic\-Random\-Number\-Generator. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf $\sim$Basic\-Random\-Number\-Generator} ()
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
unsigned int {\bf seed}
\item 
int {\bf bit\-Buf}
\item 
unsigned int {\bf bits}
\end{CompactItemize}
\subsection*{Static Private Attributes}
\begin{CompactItemize}
\item 
{\bf Basic\-Random\-Number\-Generator} $\ast$ {\bf singleton} = NULL
\end{CompactItemize}


\subsection{Detailed Description}
A C++ interface to system random number generators. 



\subsection{Constructor \& Destructor Documentation}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!BasicRandomNumberGenerator@{BasicRandomNumberGenerator}}
\index{BasicRandomNumberGenerator@{BasicRandomNumberGenerator}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Basic\-Random\-Number\-Generator::Basic\-Random\-Number\-Generator ()\hspace{0.3cm}{\tt  [inline]}}\label{class_basic_random_number_generator_a0}


\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!~BasicRandomNumberGenerator@{$\sim$BasicRandomNumberGenerator}}
\index{~BasicRandomNumberGenerator@{$\sim$BasicRandomNumberGenerator}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Basic\-Random\-Number\-Generator::$\sim${\bf Basic\-Random\-Number\-Generator} ()\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{class_basic_random_number_generator_b0}




\subsection{Member Function Documentation}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!getBool@{getBool}}
\index{getBool@{getBool}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Basic\-Random\-Number\-Generator::get\-Bool ()}\label{class_basic_random_number_generator_a3}


Returns one bit from the random buffer. 

\begin{Desc}
\item[Returns:]A random boolean value. \end{Desc}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!getInstance@{getInstance}}
\index{getInstance@{getInstance}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Basic\-Random\-Number\-Generator} $\ast$ Basic\-Random\-Number\-Generator::get\-Instance ()\hspace{0.3cm}{\tt  [static]}}\label{class_basic_random_number_generator_e0}


Get a pointer to an instance of Basic\-Random\-Number\-Generator. 

Creates an instance of the default implementation.

\begin{Desc}
\item[Returns:]A pointer to an instance of Basic\-Random\-Number\-Generator. \end{Desc}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!getInteger@{getInteger}}
\index{getInteger@{getInteger}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long Basic\-Random\-Number\-Generator::get\-Integer (const long {\em min} = {\tt 0}, const long {\em max} = {\tt RAND\_\-MAX})}\label{class_basic_random_number_generator_a4}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em min}]Minimum value inclusive. \item[{\em max}]Maximum value inclusive.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A random integer in the range [min, max]. \end{Desc}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!getRatio@{getRatio}}
\index{getRatio@{getRatio}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Basic\-Random\-Number\-Generator::get\-Ratio ()}\label{class_basic_random_number_generator_a5}


\begin{Desc}
\item[Returns:]A random double in the range [0, 1). \end{Desc}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!getSeed@{getSeed}}
\index{getSeed@{getSeed}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int Basic\-Random\-Number\-Generator::get\-Seed ()\hspace{0.3cm}{\tt  [inline]}}\label{class_basic_random_number_generator_a2}


\begin{Desc}
\item[Returns:]The seed used to initialize this sequence of random numbers. \end{Desc}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!setSeed@{setSeed}}
\index{setSeed@{setSeed}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Basic\-Random\-Number\-Generator::set\-Seed (const unsigned int {\em seed})}\label{class_basic_random_number_generator_a1}


Set the random seed. 

Using the same seed will generate the same sequence of random numbers. 

\subsection{Member Data Documentation}
\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!bitBuf@{bitBuf}}
\index{bitBuf@{bitBuf}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf Basic\-Random\-Number\-Generator::bit\-Buf}\hspace{0.3cm}{\tt  [private]}}\label{class_basic_random_number_generator_r1}


\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!bits@{bits}}
\index{bits@{bits}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf Basic\-Random\-Number\-Generator::bits}\hspace{0.3cm}{\tt  [private]}}\label{class_basic_random_number_generator_r2}


\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!seed@{seed}}
\index{seed@{seed}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf Basic\-Random\-Number\-Generator::seed}\hspace{0.3cm}{\tt  [private]}}\label{class_basic_random_number_generator_r0}


\index{BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}!singleton@{singleton}}
\index{singleton@{singleton}!BasicRandomNumberGenerator@{Basic\-Random\-Number\-Generator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Basic\-Random\-Number\-Generator} $\ast$ {\bf Basic\-Random\-Number\-Generator::singleton} = NULL\hspace{0.3cm}{\tt  [static, private]}}\label{class_basic_random_number_generator_v0}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf Basic\-Random\-Number\-Generator.h}\item 
{\bf Basic\-Random\-Number\-Generator.cpp}\end{CompactItemize}
