\hypertarget{opmphm_8c}{}\section{opmphm.\+c File Reference}
\label{opmphm_8c}\index{opmphm.\+c@{opmphm.\+c}}


The Order Preserving Minimal Perfect Hash Map.  


{\ttfamily \#include $<$kdbassert.\+h$>$}\newline
{\ttfamily \#include $<$kdbconfig.\+h$>$}\newline
{\ttfamily \#include $<$kdbhelper.\+h$>$}\newline
{\ttfamily \#include $<$kdblogger.\+h$>$}\newline
{\ttfamily \#include $<$kdbmacros.\+h$>$}\newline
{\ttfamily \#include $<$kdbopmphm.\+h$>$}\newline
{\ttfamily \#include $<$kdbprivate.\+h$>$}\newline
{\ttfamily \#include $<$kdbrand.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
Include dependency graph for opmphm.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{opmphm_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
size\+\_\+t \hyperlink{opmphm_8c_a3d7f18b45ebfe5c0330b57ee9a10d605}{opmphm\+Lookup} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm, size\+\_\+t n, const void $\ast$name)
\begin{DoxyCompactList}\small\item\em Looks up a element in the O\+P\+M\+P\+HM. \end{DoxyCompactList}\item 
int \hyperlink{opmphm_8c_add187b2f5ceecdeecb57c8dd4a445edf}{opmphm\+Assignment} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm, Opmphm\+Graph $\ast$graph, size\+\_\+t n, int default\+Order)
\begin{DoxyCompactList}\small\item\em Assigns the vertices of the r-\/uniform r-\/partite hypergraph. \end{DoxyCompactList}\item 
int \hyperlink{opmphm_8c_aac350c6406d4fdf71e6832900e47a79b}{opmphm\+Mapping} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm, Opmphm\+Graph $\ast$graph, Opmphm\+Init $\ast$init, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Maps the elements to edges in the r-\/uniform r-\/partite hypergraph. \end{DoxyCompactList}\item 
double \hyperlink{opmphm_8c_a3fe9fd938725ec5f678b8e06e8b35ba2}{opmphm\+MinC} (uint8\+\_\+t r)
\begin{DoxyCompactList}\small\item\em Provides the minimal {\ttfamily c} value for a given {\ttfamily r} \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{opmphm_8c_aeaeadb8769feb2e36ff92ec8f4165c63}{opmphm\+OptR} (size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Provides the optimal {\ttfamily r} value for a given {\ttfamily n} \end{DoxyCompactList}\item 
double \hyperlink{opmphm_8c_a2ff51026b4c1d5a17cf3b41949b9558a}{opmphm\+OptC} (size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Provides the optimal {\ttfamily c} value for a given {\ttfamily n} \end{DoxyCompactList}\item 
Opmphm\+Graph $\ast$ \hyperlink{opmphm_8c_ac1f88dc9773998222812ccd9e5d3c36f}{opmphm\+Graph\+New} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm, uint8\+\_\+t r, size\+\_\+t n, double c)
\begin{DoxyCompactList}\small\item\em Allocates and initializes the Opmphm\+Graph. \end{DoxyCompactList}\item 
void \hyperlink{opmphm_8c_a8db32bc61cd04ac24d45e25b6168adf6}{opmphm\+Graph\+Clear} (const \hyperlink{structOpmphm}{Opmphm} $\ast$opmphm, Opmphm\+Graph $\ast$graph)
\begin{DoxyCompactList}\small\item\em Clears the Opmphm\+Graph. \end{DoxyCompactList}\item 
void \hyperlink{opmphm_8c_a8028ab6baf6d67246685cc341548df0d}{opmphm\+Graph\+Del} (Opmphm\+Graph $\ast$graph)
\begin{DoxyCompactList}\small\item\em Deletes the Opmphm\+Graph. \end{DoxyCompactList}\item 
\hyperlink{structOpmphm}{Opmphm} $\ast$ \hyperlink{opmphm_8c_a9cd39724926a210dd21d7fcc351e5300}{opmphm\+New} (void)
\begin{DoxyCompactList}\small\item\em Allocates and initializes the O\+P\+M\+P\+HM. \end{DoxyCompactList}\item 
int \hyperlink{opmphm_8c_a8a649255943a9d30fe0702fd76f2cf62}{opmphm\+Copy} (\hyperlink{structOpmphm}{Opmphm} $\ast$dest, const \hyperlink{structOpmphm}{Opmphm} $\ast$source)
\begin{DoxyCompactList}\small\item\em Copies O\+P\+M\+P\+HM from source to destination. \end{DoxyCompactList}\item 
int \hyperlink{opmphm_8c_a71755ec91a4f97c88d89950a5a3f6a77}{opmphm\+Is\+Build} (const \hyperlink{structOpmphm}{Opmphm} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em O\+P\+M\+P\+HM is build. \end{DoxyCompactList}\item 
void \hyperlink{opmphm_8c_a62b8f6cae587a7c8cd12709899e5bade}{opmphm\+Del} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em Deletes the O\+P\+M\+P\+HM. \end{DoxyCompactList}\item 
void \hyperlink{opmphm_8c_a9f5fb16dfe4472e9b44597653cc80a8c}{opmphm\+Clear} (\hyperlink{structOpmphm}{Opmphm} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em Clears the O\+P\+M\+P\+HM. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{opmphm_8c_af85d020d81f867f7fef4d928d0179096}\label{opmphm_8c_af85d020d81f867f7fef4d928d0179096}} 
E\+L\+E\+K\+T\+R\+A\+\_\+\+N\+O\+\_\+\+S\+A\+N\+I\+T\+I\+Z\+E\+\_\+\+U\+N\+D\+E\+F\+I\+N\+ED E\+L\+E\+K\+T\+R\+A\+\_\+\+N\+O\+\_\+\+S\+A\+N\+I\+T\+I\+Z\+E\+\_\+\+I\+N\+T\+E\+G\+ER E\+L\+E\+K\+T\+R\+A\+\_\+\+N\+O\+\_\+\+S\+A\+N\+I\+T\+I\+Z\+E\+\_\+\+A\+D\+D\+R\+E\+SS uint32\+\_\+t \hyperlink{opmphm_8c_af85d020d81f867f7fef4d928d0179096}{opmphm\+Hashfunction} (const void $\ast$key, size\+\_\+t length, uint32\+\_\+t initval)
\begin{DoxyCompactList}\small\item\em Hash function By Bob Jenkins, May 2006 \href{http://burtleburtle.net/bob/c/lookup3.c}{\tt http\+://burtleburtle.\+net/bob/c/lookup3.\+c} Original name\+: hashlitte. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The Order Preserving Minimal Perfect Hash Map. 

\begin{DoxyCopyright}{Copyright}
B\+SD License (see L\+I\+C\+E\+N\+S\+E.\+md or \href{https://www.libelektra.org}{\tt https\+://www.\+libelektra.\+org}) 
\end{DoxyCopyright}


\subsection{Function Documentation}
\mbox{\Hypertarget{opmphm_8c_add187b2f5ceecdeecb57c8dd4a445edf}\label{opmphm_8c_add187b2f5ceecdeecb57c8dd4a445edf}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Assignment@{opmphm\+Assignment}}
\index{opmphm\+Assignment@{opmphm\+Assignment}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Assignment()}{opmphmAssignment()}}
{\footnotesize\ttfamily int opmphm\+Assignment (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm,  }\item[{Opmphm\+Graph $\ast$}]{graph,  }\item[{size\+\_\+t}]{n,  }\item[{int}]{default\+Order }\end{DoxyParamCaption})}



Assigns the vertices of the r-\/uniform r-\/partite hypergraph. 

Allocs the memory for the final O\+P\+M\+P\+HM {\ttfamily Opmphm-\/$>$graph}. Uses the remove sequence {\ttfamily Opmphm\+Graph-\/$>$remove\+Sequence}, generated during cycle check, to assign each vertex. Either with {\ttfamily Opmphm\+Edge-\/$>$order} or the default order, default is the order of {\ttfamily Opmphm\+Init-\/$>$data}.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
{\em graph} & the Opmphm\+Graph \\
\hline
{\em n} & the number of elements \\
\hline
{\em default\+Order} & boolean flag\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success \\
\hline
{\em -\/1} & on memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a9f5fb16dfe4472e9b44597653cc80a8c}\label{opmphm_8c_a9f5fb16dfe4472e9b44597653cc80a8c}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Clear@{opmphm\+Clear}}
\index{opmphm\+Clear@{opmphm\+Clear}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Clear()}{opmphmClear()}}
{\footnotesize\ttfamily void opmphm\+Clear (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm }\end{DoxyParamCaption})}



Clears the O\+P\+M\+P\+HM. 

The O\+P\+M\+P\+HM must be successfully created with {\ttfamily opmphm\+New ()}. Clears and frees all internal memory of \hyperlink{structOpmphm}{Opmphm}, but not {\ttfamily Opmphm-\/$>$hash\+Function\+Seeds} and the \hyperlink{structOpmphm}{Opmphm} instance.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{opmphm_8c_a8a649255943a9d30fe0702fd76f2cf62}\label{opmphm_8c_a8a649255943a9d30fe0702fd76f2cf62}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Copy@{opmphm\+Copy}}
\index{opmphm\+Copy@{opmphm\+Copy}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Copy()}{opmphmCopy()}}
{\footnotesize\ttfamily int opmphm\+Copy (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{dest,  }\item[{const \hyperlink{structOpmphm}{Opmphm} $\ast$}]{source }\end{DoxyParamCaption})}



Copies O\+P\+M\+P\+HM from source to destination. 

Clears the dest and copies memory and values from source.


\begin{DoxyParams}{Parameters}
{\em dest} & the O\+P\+M\+P\+HM destination \\
\hline
{\em source} & the O\+P\+M\+P\+HM source\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success \\
\hline
{\em -\/1} & on memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a62b8f6cae587a7c8cd12709899e5bade}\label{opmphm_8c_a62b8f6cae587a7c8cd12709899e5bade}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Del@{opmphm\+Del}}
\index{opmphm\+Del@{opmphm\+Del}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Del()}{opmphmDel()}}
{\footnotesize\ttfamily void opmphm\+Del (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm }\end{DoxyParamCaption})}



Deletes the O\+P\+M\+P\+HM. 

Clears and frees all memory in \hyperlink{structOpmphm}{Opmphm}.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{opmphm_8c_a8db32bc61cd04ac24d45e25b6168adf6}\label{opmphm_8c_a8db32bc61cd04ac24d45e25b6168adf6}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Graph\+Clear@{opmphm\+Graph\+Clear}}
\index{opmphm\+Graph\+Clear@{opmphm\+Graph\+Clear}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Graph\+Clear()}{opmphmGraphClear()}}
{\footnotesize\ttfamily void opmphm\+Graph\+Clear (\begin{DoxyParamCaption}\item[{const \hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm,  }\item[{Opmphm\+Graph $\ast$}]{graph }\end{DoxyParamCaption})}



Clears the Opmphm\+Graph. 

Sets all vertices to 0.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
{\em graph} & the Opmphm\+Graph \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{opmphm_8c_a8028ab6baf6d67246685cc341548df0d}\label{opmphm_8c_a8028ab6baf6d67246685cc341548df0d}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Graph\+Del@{opmphm\+Graph\+Del}}
\index{opmphm\+Graph\+Del@{opmphm\+Graph\+Del}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Graph\+Del()}{opmphmGraphDel()}}
{\footnotesize\ttfamily void opmphm\+Graph\+Del (\begin{DoxyParamCaption}\item[{Opmphm\+Graph $\ast$}]{graph }\end{DoxyParamCaption})}



Deletes the Opmphm\+Graph. 


\begin{DoxyParams}{Parameters}
{\em graph} & the Opmphm\+Graph \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{opmphm_8c_ac1f88dc9773998222812ccd9e5d3c36f}\label{opmphm_8c_ac1f88dc9773998222812ccd9e5d3c36f}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Graph\+New@{opmphm\+Graph\+New}}
\index{opmphm\+Graph\+New@{opmphm\+Graph\+New}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Graph\+New()}{opmphmGraphNew()}}
{\footnotesize\ttfamily Opmphm\+Graph$\ast$ opmphm\+Graph\+New (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm,  }\item[{uint8\+\_\+t}]{r,  }\item[{size\+\_\+t}]{n,  }\item[{double}]{c }\end{DoxyParamCaption})}



Allocates and initializes the Opmphm\+Graph. 

Graph functions.

The Opmphm\+Graph represents a r-\/uniform r-\/partite hypergraph. Lazy initializes the {\ttfamily opmphm-\/$>$hash\+Function\+Seeds} with r. Calculates also the size of one partition in the r-\/uniform r-\/partite hypergraph and stores it in {\ttfamily opmphm-\/$>$component\+Size}. Allocates all memory for the Opmphm\+Graph.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
{\em r} & the r\+Uni\+Par \\
\hline
{\em n} & the number of elements \\
\hline
{\em c} & space influencing parameter\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em Opmphm\+Graph} & $\ast$ success \\
\hline
{\em N\+U\+LL} & memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a71755ec91a4f97c88d89950a5a3f6a77}\label{opmphm_8c_a71755ec91a4f97c88d89950a5a3f6a77}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Is\+Build@{opmphm\+Is\+Build}}
\index{opmphm\+Is\+Build@{opmphm\+Is\+Build}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Is\+Build()}{opmphmIsBuild()}}
{\footnotesize\ttfamily int opmphm\+Is\+Build (\begin{DoxyParamCaption}\item[{const \hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm }\end{DoxyParamCaption})}



O\+P\+M\+P\+HM is build. 


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on false \\
\hline
{\em -\/1} & on true or N\+U\+LL \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a3d7f18b45ebfe5c0330b57ee9a10d605}\label{opmphm_8c_a3d7f18b45ebfe5c0330b57ee9a10d605}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Lookup@{opmphm\+Lookup}}
\index{opmphm\+Lookup@{opmphm\+Lookup}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Lookup()}{opmphmLookup()}}
{\footnotesize\ttfamily size\+\_\+t opmphm\+Lookup (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm,  }\item[{size\+\_\+t}]{n,  }\item[{const void $\ast$}]{name }\end{DoxyParamCaption})}



Looks up a element in the O\+P\+M\+P\+HM. 

Lookup functions.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
{\em n} & the number of elements \\
\hline
{\em name} & the name of the element\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em size\+\_\+t} & the order of the element. \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_aac350c6406d4fdf71e6832900e47a79b}\label{opmphm_8c_aac350c6406d4fdf71e6832900e47a79b}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+Mapping@{opmphm\+Mapping}}
\index{opmphm\+Mapping@{opmphm\+Mapping}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Mapping()}{opmphmMapping()}}
{\footnotesize\ttfamily int opmphm\+Mapping (\begin{DoxyParamCaption}\item[{\hyperlink{structOpmphm}{Opmphm} $\ast$}]{opmphm,  }\item[{Opmphm\+Graph $\ast$}]{graph,  }\item[{Opmphm\+Init $\ast$}]{init,  }\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})}



Maps the elements to edges in the r-\/uniform r-\/partite hypergraph. 

Build functions.

Sets the seeds for the opmphm\+Hashfunctions, {\ttfamily Opmphm\+Init-\/$>$init\+Seed} will be changed. Inserts each element as edge in the r-\/uniform r-\/partite hypergraph and checks if the graph contains a cycle. If there are cycles the {\ttfamily graph} will be cleaned


\begin{DoxyParams}{Parameters}
{\em opmphm} & the O\+P\+M\+P\+HM \\
\hline
{\em graph} & the Opmphm\+Graph \\
\hline
{\em init} & the Opmphm\+Init \\
\hline
{\em n} & the number of elements\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success \\
\hline
{\em -\/1} & mapping not possible \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a3fe9fd938725ec5f678b8e06e8b35ba2}\label{opmphm_8c_a3fe9fd938725ec5f678b8e06e8b35ba2}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+MinC@{opmphm\+MinC}}
\index{opmphm\+MinC@{opmphm\+MinC}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Min\+C()}{opmphmMinC()}}
{\footnotesize\ttfamily double opmphm\+MinC (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{r }\end{DoxyParamCaption})}



Provides the minimal {\ttfamily c} value for a given {\ttfamily r} 

Functions providing {\ttfamily r} and {\ttfamily c}

This minimal values come from Fabiano Cupertino Botelho, Near-\/\+Optimal Space Perfect Hashing Algorithms, 2008.


\begin{DoxyParams}{Parameters}
{\em r} & the r\+Uni\+Par\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em c} & the minimal c value \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a9cd39724926a210dd21d7fcc351e5300}\label{opmphm_8c_a9cd39724926a210dd21d7fcc351e5300}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+New@{opmphm\+New}}
\index{opmphm\+New@{opmphm\+New}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+New()}{opmphmNew()}}
{\footnotesize\ttfamily \hyperlink{structOpmphm}{Opmphm}$\ast$ opmphm\+New (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Allocates and initializes the O\+P\+M\+P\+HM. 

Basic functions.


\begin{DoxyRetVals}{Return values}
{\em \hyperlink{structOpmphm}{Opmphm}} & $\ast$ success \\
\hline
{\em N\+U\+LL} & memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_a2ff51026b4c1d5a17cf3b41949b9558a}\label{opmphm_8c_a2ff51026b4c1d5a17cf3b41949b9558a}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+OptC@{opmphm\+OptC}}
\index{opmphm\+OptC@{opmphm\+OptC}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Opt\+C()}{opmphmOptC()}}
{\footnotesize\ttfamily double opmphm\+OptC (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})}



Provides the optimal {\ttfamily c} value for a given {\ttfamily n} 

This is a heuristic, the return values follow from the mapping benchmark.


\begin{DoxyParams}{Parameters}
{\em n} & the number of elements to hash\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em c} & the optimal {\ttfamily c} value \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{opmphm_8c_aeaeadb8769feb2e36ff92ec8f4165c63}\label{opmphm_8c_aeaeadb8769feb2e36ff92ec8f4165c63}} 
\index{opmphm.\+c@{opmphm.\+c}!opmphm\+OptR@{opmphm\+OptR}}
\index{opmphm\+OptR@{opmphm\+OptR}!opmphm.\+c@{opmphm.\+c}}
\subsubsection{\texorpdfstring{opmphm\+Opt\+R()}{opmphmOptR()}}
{\footnotesize\ttfamily uint8\+\_\+t opmphm\+OptR (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})}



Provides the optimal {\ttfamily r} value for a given {\ttfamily n} 

This is a heuristic, the return values follow from the mapping benchmark.


\begin{DoxyParams}{Parameters}
{\em n} & the number of elements to hash\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em r} & the optimal r\+Uni\+Par \\
\hline
\end{DoxyRetVals}
