\doxysection{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$>$}\newline
{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\newline
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ S3\+\_\+\+RAND\+\_\+\+MAX\+\_\+\+INT32}~0x7fffffff
\item 
\#define \textbf{ s3\+\_\+rand\+\_\+seed}(s)~\textbf{ genrand\+\_\+seed}(s);
\begin{DoxyCompactList}\small\item\em Macros to simplify calling of random generator function. \end{DoxyCompactList}\item 
\#define \textbf{ s3\+\_\+rand\+\_\+int31}()~\textbf{ genrand\+\_\+int31}()
\item 
\#define \textbf{ s3\+\_\+rand\+\_\+real}()~\textbf{ genrand\+\_\+real3}()
\item 
\#define \textbf{ s3\+\_\+rand\+\_\+res53}()~\textbf{ genrand\+\_\+res53}()
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
SPHINXBASE\+\_\+\+EXPORT void \textbf{ genrand\+\_\+seed} (unsigned long s)
\begin{DoxyCompactList}\small\item\em Initialize the seed of the random generator. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT long \textbf{ genrand\+\_\+int31} (void)
\begin{DoxyCompactList}\small\item\em generates a random number on [0,0x7fffffff]-\/interval \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT double \textbf{ genrand\+\_\+real3} (void)
\begin{DoxyCompactList}\small\item\em generates a random number on (0,1)-\/real-\/interval \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT double \textbf{ genrand\+\_\+res53} (void)
\begin{DoxyCompactList}\small\item\em generates a random number on [0,1) with 53-\/bit resolution \end{DoxyCompactList}\end{DoxyCompactItemize}


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

~\newline


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 (FIXME! Need to search for the web site.) {\texttt{ http\+://www}}. 

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



\doxysubsection{Macro Definition Documentation}
\label{genrand_8h_a3dcc058023a95c0a0ca1f12d1fdec9b9} 
\index{genrand.h@{genrand.h}!s3\_rand\_int31@{s3\_rand\_int31}}
\index{s3\_rand\_int31@{s3\_rand\_int31}!genrand.h@{genrand.h}}
\doxysubsubsection{s3\_rand\_int31}
{\footnotesize\ttfamily \#define s3\+\_\+rand\+\_\+int31(\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})~\textbf{ genrand\+\_\+int31}()}



Definition at line \textbf{ 145} of file \textbf{ genrand.\+h}.

\label{genrand_8h_a29d6253e4a57e7c4d56cf7f6155b4007} 
\index{genrand.h@{genrand.h}!S3\_RAND\_MAX\_INT32@{S3\_RAND\_MAX\_INT32}}
\index{S3\_RAND\_MAX\_INT32@{S3\_RAND\_MAX\_INT32}!genrand.h@{genrand.h}}
\doxysubsubsection{S3\_RAND\_MAX\_INT32}
{\footnotesize\ttfamily \#define S3\+\_\+\+RAND\+\_\+\+MAX\+\_\+\+INT32~0x7fffffff}



Definition at line \textbf{ 117} of file \textbf{ genrand.\+h}.

\label{genrand_8h_a85a5844eace98dcbb4742d408a75d5e7} 
\index{genrand.h@{genrand.h}!s3\_rand\_real@{s3\_rand\_real}}
\index{s3\_rand\_real@{s3\_rand\_real}!genrand.h@{genrand.h}}
\doxysubsubsection{s3\_rand\_real}
{\footnotesize\ttfamily \#define s3\+\_\+rand\+\_\+real(\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})~\textbf{ genrand\+\_\+real3}()}



Definition at line \textbf{ 146} of file \textbf{ genrand.\+h}.

\label{genrand_8h_a226b9a1deec002aeb1f1775b830a3062} 
\index{genrand.h@{genrand.h}!s3\_rand\_res53@{s3\_rand\_res53}}
\index{s3\_rand\_res53@{s3\_rand\_res53}!genrand.h@{genrand.h}}
\doxysubsubsection{s3\_rand\_res53}
{\footnotesize\ttfamily \#define s3\+\_\+rand\+\_\+res53(\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})~\textbf{ genrand\+\_\+res53}()}



Definition at line \textbf{ 147} of file \textbf{ genrand.\+h}.

\label{genrand_8h_a88ed88daecb88e115d8559c1b0a09bb7} 
\index{genrand.h@{genrand.h}!s3\_rand\_seed@{s3\_rand\_seed}}
\index{s3\_rand\_seed@{s3\_rand\_seed}!genrand.h@{genrand.h}}
\doxysubsubsection{s3\_rand\_seed}
{\footnotesize\ttfamily \#define s3\+\_\+rand\+\_\+seed(\begin{DoxyParamCaption}\item[{}]{s }\end{DoxyParamCaption})~\textbf{ genrand\+\_\+seed}(s);}



Macros to simplify calling of random generator function. 



Definition at line \textbf{ 144} of file \textbf{ genrand.\+h}.



\doxysubsection{Function Documentation}
\label{genrand_8h_a10263695978c84103fb3526fdae21d4c} 
\index{genrand.h@{genrand.h}!genrand\_int31@{genrand\_int31}}
\index{genrand\_int31@{genrand\_int31}!genrand.h@{genrand.h}}
\doxysubsubsection{genrand\_int31()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT long genrand\+\_\+int31 (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



generates a random number on [0,0x7fffffff]-\/interval 



Definition at line \textbf{ 197} of file \textbf{ genrand.\+c}.



References \textbf{ genrand\+\_\+int31()}.



Referenced by \textbf{ genrand\+\_\+int31()}.

\label{genrand_8h_ad5fbfda1cb738d2beff277444bc71b1a} 
\index{genrand.h@{genrand.h}!genrand\_real3@{genrand\_real3}}
\index{genrand\_real3@{genrand\_real3}!genrand.h@{genrand.h}}
\doxysubsubsection{genrand\_real3()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT double genrand\+\_\+real3 (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



generates a random number on (0,1)-\/real-\/interval 



Definition at line \textbf{ 220} of file \textbf{ genrand.\+c}.



References \textbf{ genrand\+\_\+real3()}.



Referenced by \textbf{ genrand\+\_\+real3()}.

\label{genrand_8h_a2fca03c5dad1835f55e09c6e66d3b960} 
\index{genrand.h@{genrand.h}!genrand\_res53@{genrand\_res53}}
\index{genrand\_res53@{genrand\_res53}!genrand.h@{genrand.h}}
\doxysubsubsection{genrand\_res53()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT double genrand\+\_\+res53 (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



generates a random number on [0,1) with 53-\/bit resolution 



Definition at line \textbf{ 228} of file \textbf{ genrand.\+c}.



References \textbf{ genrand\+\_\+res53()}.



Referenced by \textbf{ genrand\+\_\+res53()}.

\label{genrand_8h_a2881c7b606d9a2b2852e5946d71d32b7} 
\index{genrand.h@{genrand.h}!genrand\_seed@{genrand\_seed}}
\index{genrand\_seed@{genrand\_seed}!genrand.h@{genrand.h}}
\doxysubsubsection{genrand\_seed()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT void genrand\+\_\+seed (\begin{DoxyParamCaption}\item[{unsigned long}]{s }\end{DoxyParamCaption})}



Initialize the seed of the random generator. 



Definition at line \textbf{ 130} of file \textbf{ genrand.\+c}.



References \textbf{ genrand\+\_\+seed()}.



Referenced by \textbf{ genrand\+\_\+seed()}.

