\section{include/sphinxbase/genrand.h File Reference}
\label{genrand_8h}\index{include/sphinxbase/genrand.\+h@{include/sphinxbase/genrand.\+h}}


High performance prortable random generator created by Takuji Nishimura and Makoto Matsumoto.  


{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bfseries S3\+\_\+\+R\+A\+N\+D\+\_\+\+M\+A\+X\+\_\+\+I\+N\+T32}~0x7fffffff\label{genrand_8h_a29d6253e4a57e7c4d56cf7f6155b4007}

\item 
\#define {\bf s3\+\_\+rand\+\_\+seed}(s)~{\bf genrand\+\_\+seed}(s);\label{genrand_8h_a88ed88daecb88e115d8559c1b0a09bb7}

\begin{DoxyCompactList}\small\item\em Macros to simplify calling of random generator function. \end{DoxyCompactList}\item 
\#define {\bfseries s3\+\_\+rand\+\_\+int31}()~{\bf genrand\+\_\+int31}()\label{genrand_8h_a3dcc058023a95c0a0ca1f12d1fdec9b9}

\item 
\#define {\bfseries s3\+\_\+rand\+\_\+real}()~{\bf genrand\+\_\+real3}()\label{genrand_8h_a85a5844eace98dcbb4742d408a75d5e7}

\item 
\#define {\bfseries s3\+\_\+rand\+\_\+res53}()~{\bf genrand\+\_\+res53}()\label{genrand_8h_a226b9a1deec002aeb1f1775b830a3062}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T void {\bf genrand\+\_\+seed} (unsigned long s)\label{genrand_8h_a2881c7b606d9a2b2852e5946d71d32b7}

\begin{DoxyCompactList}\small\item\em Initialize the seed of the random generator. \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T long {\bf genrand\+\_\+int31} (void)\label{genrand_8h_a10263695978c84103fb3526fdae21d4c}

\begin{DoxyCompactList}\small\item\em generates a random number on [0,0x7fffffff]-\/interval \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T double {\bf genrand\+\_\+real3} (void)\label{genrand_8h_ad5fbfda1cb738d2beff277444bc71b1a}

\begin{DoxyCompactList}\small\item\em generates a random number on (0,1)-\/real-\/interval \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T double {\bf genrand\+\_\+res53} (void)\label{genrand_8h_a2fca03c5dad1835f55e09c6e66d3b960}

\begin{DoxyCompactList}\small\item\em generates a random number on [0,1) with 53-\/bit resolution \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
High performance prortable random generator created by Takuji Nishimura and Makoto Matsumoto. 

A high performance which applied Mersene twister primes to generate random number. If probably seeded, the random generator can achieve 19937-\/bits period. For technical detail. Please take a look at (F\+I\+X\+M\+E! Need to search for the web site.) {\tt http\+://www}. 

Definition in file {\bf genrand.\+h}.

