\doxysubsection{Std\+Rng\texorpdfstring{$<$}{<} POINT\+\_\+\+TYPE, DIST\+\_\+\+TYPE, RNG\+\_\+\+TYPE \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classfunc_1_1StdRng}{}\label{classfunc_1_1StdRng}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}


An implementation of \doxylink{classfunc_1_1RngInterface}{Rng\+Interface}, intended to be used with the generators/ distributions defined in std\+::random. Only \doxylink{classfunc_1_1LookupTableComparator}{Lookup\+Table\+Comparator} uses this class, and it\textquotesingle{}s for sampling random arguments.  




{\ttfamily \#include $<$Std\+Rng.\+hpp$>$}

Inheritance diagram for Std\+Rng\texorpdfstring{$<$}{<} POINT\+\_\+\+TYPE, DIST\+\_\+\+TYPE, RNG\+\_\+\+TYPE \texorpdfstring{$>$}{>}\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classfunc_1_1StdRng}
\end{center}
\end{figure}
\doxysubsubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classfunc_1_1StdRng_a28dc50828b94946d0d1af110c3b29cf1}{Std\+Rng}} (std\+::unique\+\_\+ptr$<$ DIST\+\_\+\+TYPE $>$ dist)
\item 
{\footnotesize template$<$typename ... DIST\+\_\+\+TYPE\+\_\+\+ARGS$>$ }\\\mbox{\hyperlink{classfunc_1_1StdRng_ac259083ed1a293c4863ffea1a130e199}{Std\+Rng}} (DIST\+\_\+\+TYPE\+\_\+\+ARGS ... args)
\item 
void \mbox{\hyperlink{classfunc_1_1StdRng_a08b613e46298f7b90fac7698cfe60d36}{init}} (unsigned int \mbox{\hyperlink{classfunc_1_1StdRng_a38dd7ac12fd0a21d3e5e940c193c62fa}{seed}})
\item 
unsigned int \mbox{\hyperlink{classfunc_1_1StdRng_a38dd7ac12fd0a21d3e5e940c193c62fa}{seed}} ()
\item 
POINT\+\_\+\+TYPE \mbox{\hyperlink{classfunc_1_1StdRng_a2e7c6314b1cd348bc981d362e1f3660c}{get\+\_\+point}} ()
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
\subsubsection*{template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$\newline
class func\+::\+Std\+Rng$<$ POINT\+\_\+\+TYPE, DIST\+\_\+\+TYPE, RNG\+\_\+\+TYPE $>$}
An implementation of \doxylink{classfunc_1_1RngInterface}{Rng\+Interface}, intended to be used with the generators/ distributions defined in std\+::random. Only \doxylink{classfunc_1_1LookupTableComparator}{Lookup\+Table\+Comparator} uses this class, and it\textquotesingle{}s for sampling random arguments. 

\begin{DoxyNote}{Note}
Will take ownership if given a probability distribution 

Will build its own probability distribution corresponding to DIST\+\_\+\+TYPE if given the correct constructor args. 

Builds its own number generator when init(seed) is called
\end{DoxyNote}
Usage example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ uniform\_real\_distribution<double>\ generated\ from\ std::mt19937\ }}
\DoxyCodeLine{\textcolor{comment}{//\ within\ the\ range\ 0.0\ to\ 1.0}}
\DoxyCodeLine{\mbox{\hyperlink{classfunc_1_1StdRng_a28dc50828b94946d0d1af110c3b29cf1}{StdRng<double>}}\ rng(0.0,1.0);\ \textcolor{comment}{//\ build\ a\ std::uniform\_real\_distribution<double>}}
\DoxyCodeLine{rng.init(2020);\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ build\ a\ std::mt19937}}
\DoxyCodeLine{rng.get\_point();\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ return\ a\ random\ number}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ or\ if\ you\ want\ to\ get\ fancy\ and\ use\ a\ faster\ generator,\ here's}}
\DoxyCodeLine{\textcolor{comment}{//\ a\ normal\ distribution\ with\ mean\ 0.0\ and\ standard\ deviation\ 1.0,}}
\DoxyCodeLine{\textcolor{comment}{//\ using\ points\ generated\ from\ minstd\_rand0}}
\DoxyCodeLine{\mbox{\hyperlink{classfunc_1_1StdRng_a28dc50828b94946d0d1af110c3b29cf1}{StdRng<float,std::normal\_distribution<float>}},minstd\_rand0>\ rng2(0.0,1.0));}

\end{DoxyCode}
 

\label{doc-constructors}
\Hypertarget{classfunc_1_1StdRng_doc-constructors}
\doxysubsubsection{Constructor \& Destructor Documentation}
\Hypertarget{classfunc_1_1StdRng_a28dc50828b94946d0d1af110c3b29cf1}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}!StdRng@{StdRng}}
\index{StdRng@{StdRng}!StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}
\doxyparagraph{\texorpdfstring{StdRng()}{StdRng()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classfunc_1_1StdRng_a28dc50828b94946d0d1af110c3b29cf1} 
template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$ \\
\mbox{\hyperlink{classfunc_1_1StdRng}{Std\+Rng}} (\begin{DoxyParamCaption}\item[{std\+::unique\+\_\+ptr$<$ DIST\+\_\+\+TYPE $>$}]{dist}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Take ownership of the pointer to probability distribution passed in \Hypertarget{classfunc_1_1StdRng_ac259083ed1a293c4863ffea1a130e199}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}!StdRng@{StdRng}}
\index{StdRng@{StdRng}!StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}
\doxyparagraph{\texorpdfstring{StdRng()}{StdRng()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classfunc_1_1StdRng_ac259083ed1a293c4863ffea1a130e199} 
template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$ \\
template$<$typename ... DIST\+\_\+\+TYPE\+\_\+\+ARGS$>$ \\
\mbox{\hyperlink{classfunc_1_1StdRng}{Std\+Rng}} (\begin{DoxyParamCaption}\item[{DIST\+\_\+\+TYPE\+\_\+\+ARGS ...}]{args}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Create a new \doxylink{classfunc_1_1StdRng}{Std\+Rng} based on the template type and its parameters 

\label{doc-func-members}
\Hypertarget{classfunc_1_1StdRng_doc-func-members}
\doxysubsubsection{Member Function Documentation}
\Hypertarget{classfunc_1_1StdRng_a2e7c6314b1cd348bc981d362e1f3660c}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}!get\_point@{get\_point}}
\index{get\_point@{get\_point}!StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}
\doxyparagraph{\texorpdfstring{get\_point()}{get\_point()}}
{\footnotesize\ttfamily \label{classfunc_1_1StdRng_a2e7c6314b1cd348bc981d362e1f3660c} 
template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$ \\
POINT\+\_\+\+TYPE get\+\_\+point (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Get a random point from the given distribution 

Implements \mbox{\hyperlink{classfunc_1_1RngInterface_ab03da580d34a447cbde57bc3f2e2778a}{Rng\+Interface$<$ POINT\+\_\+\+TYPE $>$}}.

\Hypertarget{classfunc_1_1StdRng_a08b613e46298f7b90fac7698cfe60d36}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}!init@{init}}
\index{init@{init}!StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}
\doxyparagraph{\texorpdfstring{init()}{init()}}
{\footnotesize\ttfamily \label{classfunc_1_1StdRng_a08b613e46298f7b90fac7698cfe60d36} 
template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$ \\
void init (\begin{DoxyParamCaption}\item[{unsigned int}]{seed}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Set the seed and generator of the distribution 

Implements \mbox{\hyperlink{classfunc_1_1RngInterface_a1380a0b861c426cb90ebd671177ef3c7}{Rng\+Interface$<$ POINT\+\_\+\+TYPE $>$}}.

\Hypertarget{classfunc_1_1StdRng_a38dd7ac12fd0a21d3e5e940c193c62fa}\index{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}!seed@{seed}}
\index{seed@{seed}!StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$@{StdRng$<$ POINT\_TYPE, DIST\_TYPE, RNG\_TYPE $>$}}
\doxyparagraph{\texorpdfstring{seed()}{seed()}}
{\footnotesize\ttfamily \label{classfunc_1_1StdRng_a38dd7ac12fd0a21d3e5e940c193c62fa} 
template$<$typename POINT\+\_\+\+TYPE, class DIST\+\_\+\+TYPE = std\+::uniform\+\_\+real\+\_\+distribution$<$double$>$, class RNG\+\_\+\+TYPE = std\+::mt19937$>$ \\
unsigned int seed (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Return the seed 

Implements \mbox{\hyperlink{classfunc_1_1RngInterface_a39b0afd9cc6cf93e0aedf5938c5d869e}{Rng\+Interface$<$ POINT\+\_\+\+TYPE $>$}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Std\+Rng.\+hpp\end{DoxyCompactItemize}
