\hypertarget{kdbopmphm_8h}{}\doxysection{kdbopmphm.\+h File Reference}
\label{kdbopmphm_8h}\index{kdbopmphm.h@{kdbopmphm.h}}


Defines for the Order Preserving Minimal Perfect Hash Map.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$kdbtypes.\+h$>$}\newline
Include dependency graph for kdbopmphm.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=293pt]{kdbopmphm_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=167pt]{kdbopmphm_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structOpmphmEdge}{Opmphm\+Edge}}
\begin{DoxyCompactList}\small\item\em Order Preserving Minimal Perfect Hash Map. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structOpmphm}{Opmphm}}
\begin{DoxyCompactList}\small\item\em The opmphm. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{kdbopmphm_8h_a68a6a4cea9cd724457115e974bd02499}\label{kdbopmphm_8h_a68a6a4cea9cd724457115e974bd02499}} 
\#define \mbox{\hyperlink{kdbopmphm_8h_a68a6a4cea9cd724457115e974bd02499}{OPMPHM\+\_\+\+HASHFUNCTION\+\_\+\+ROT}}(x,  k)~(((x) $<$$<$ (k)) $\vert$ ((x) $>$$>$ (32 -\/ (k))))
\begin{DoxyCompactList}\small\item\em Hash function By Bob Jenkins, May 2006 \href{http://burtleburtle.net/bob/c/lookup3.c}{\texttt{ http\+://burtleburtle.\+net/bob/c/lookup3.\+c}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{kdbopmphm_8h_a4fb55d34258d3f1cff2b379eabec3267}\label{kdbopmphm_8h_a4fb55d34258d3f1cff2b379eabec3267}} 
typedef const char $\ast$($\ast$ \mbox{\hyperlink{kdbopmphm_8h_a4fb55d34258d3f1cff2b379eabec3267}{opmphm\+Get\+Name}}) (void $\ast$)
\begin{DoxyCompactList}\small\item\em Only needed for Initialisation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eef}{opmphmflag\+\_\+t}} \{ \mbox{\hyperlink{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa4bd87254a74b08c3d75dff1786a57bab}{OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT}} = 1
, \mbox{\hyperlink{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa065b9d57065addb6fe0ddd3bcdfb5b47}{OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+HASHFUNCTIONSEEDS}} = 1 $<$$<$ 2
, \mbox{\hyperlink{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa84eafb10d8ebb8392ea76c4e10ba18eb}{OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+GRAPH}} = 1 $<$$<$ 3
 \}
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{structOpmphm}{Opmphm}} Flags. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
double \mbox{\hyperlink{kdbopmphm_8h_a3fe9fd938725ec5f678b8e06e8b35ba2}{opmphm\+MinC}} (uint8\+\_\+t r)
\begin{DoxyCompactList}\small\item\em Functions providing {\ttfamily r} and {\ttfamily c} \end{DoxyCompactList}\item 
uint8\+\_\+t \mbox{\hyperlink{kdbopmphm_8h_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 \mbox{\hyperlink{kdbopmphm_8h_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$ \mbox{\hyperlink{kdbopmphm_8h_ac1f88dc9773998222812ccd9e5d3c36f}{opmphm\+Graph\+New}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm, uint8\+\_\+t r, size\+\_\+t n, double c)
\begin{DoxyCompactList}\small\item\em Graph functions. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbopmphm_8h_a8db32bc61cd04ac24d45e25b6168adf6}{opmphm\+Graph\+Clear}} (const \mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm, Opmphm\+Graph $\ast$graph)
\begin{DoxyCompactList}\small\item\em Clears the Opmphm\+Graph. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbopmphm_8h_a8028ab6baf6d67246685cc341548df0d}{opmphm\+Graph\+Del}} (Opmphm\+Graph $\ast$graph)
\begin{DoxyCompactList}\small\item\em Deletes the Opmphm\+Graph. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbopmphm_8h_aac350c6406d4fdf71e6832900e47a79b}{opmphm\+Mapping}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm, Opmphm\+Graph $\ast$graph, Opmphm\+Init $\ast$init, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Build functions. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbopmphm_8h_add187b2f5ceecdeecb57c8dd4a445edf}{opmphm\+Assignment}} (\mbox{\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 
size\+\_\+t \mbox{\hyperlink{kdbopmphm_8h_a3d7f18b45ebfe5c0330b57ee9a10d605}{opmphm\+Lookup}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm, size\+\_\+t n, const void $\ast$name)
\begin{DoxyCompactList}\small\item\em Lookup functions. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$ \mbox{\hyperlink{kdbopmphm_8h_a9cd39724926a210dd21d7fcc351e5300}{opmphm\+New}} (void)
\begin{DoxyCompactList}\small\item\em Basic functions. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbopmphm_8h_a62b8f6cae587a7c8cd12709899e5bade}{opmphm\+Del}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em Deletes the OPMPHM. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbopmphm_8h_a71755ec91a4f97c88d89950a5a3f6a77}{opmphm\+Is\+Build}} (const \mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em OPMPHM is build. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbopmphm_8h_a8a649255943a9d30fe0702fd76f2cf62}{opmphm\+Copy}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$dest, const \mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$source)
\begin{DoxyCompactList}\small\item\em Copies OPMPHM from source to destination. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbopmphm_8h_a9f5fb16dfe4472e9b44597653cc80a8c}{opmphm\+Clear}} (\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$opmphm)
\begin{DoxyCompactList}\small\item\em Clears the OPMPHM. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbopmphm_8h_a6225cedb78ca850b9494b950ff3e24f4}\label{kdbopmphm_8h_a6225cedb78ca850b9494b950ff3e24f4}} 
uint32\+\_\+t \mbox{\hyperlink{kdbopmphm_8h_a6225cedb78ca850b9494b950ff3e24f4}{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}{\texttt{ http\+://burtleburtle.\+net/bob/c/lookup3.\+c}} Original name\+: hashlitte. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Defines for the Order Preserving Minimal Perfect Hash Map. 

\begin{DoxyCopyright}{Copyright}
BSD License (see doc/\+COPYING or \href{https://www.libelektra.org}{\texttt{ https\+://www.\+libelektra.\+org}}) 
\end{DoxyCopyright}


\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eef}\label{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eef}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmflag\_t@{opmphmflag\_t}}
\index{opmphmflag\_t@{opmphmflag\_t}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmflag\_t}{opmphmflag\_t}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eef}{opmphmflag\+\_\+t}}}



\mbox{\hyperlink{structOpmphm}{Opmphm}} Flags. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OPMPHM\_FLAG\_MMAP\_STRUCT@{OPMPHM\_FLAG\_MMAP\_STRUCT}!kdbopmphm.h@{kdbopmphm.h}}\index{kdbopmphm.h@{kdbopmphm.h}!OPMPHM\_FLAG\_MMAP\_STRUCT@{OPMPHM\_FLAG\_MMAP\_STRUCT}}}\mbox{\Hypertarget{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa4bd87254a74b08c3d75dff1786a57bab}\label{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa4bd87254a74b08c3d75dff1786a57bab}} 
OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT&\mbox{\hyperlink{structOpmphm}{Opmphm}} struct lies inside a mmap region. This flag is set for \mbox{\hyperlink{structOpmphm}{Opmphm}} structs inside a mapped region. It prevents erroneous free() calls on these \mbox{\hyperlink{structOpmphm}{Opmphm}} structs. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OPMPHM\_FLAG\_MMAP\_HASHFUNCTIONSEEDS@{OPMPHM\_FLAG\_MMAP\_HASHFUNCTIONSEEDS}!kdbopmphm.h@{kdbopmphm.h}}\index{kdbopmphm.h@{kdbopmphm.h}!OPMPHM\_FLAG\_MMAP\_HASHFUNCTIONSEEDS@{OPMPHM\_FLAG\_MMAP\_HASHFUNCTIONSEEDS}}}\mbox{\Hypertarget{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa065b9d57065addb6fe0ddd3bcdfb5b47}\label{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa065b9d57065addb6fe0ddd3bcdfb5b47}} 
OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+HASHFUNCTIONSEEDS&\mbox{\hyperlink{structOpmphm}{Opmphm}} hash\+Function\+Seeds lies inside a mmap region. This flag is set for \mbox{\hyperlink{structOpmphm}{Opmphm}} hash\+Function\+Seeds inside a mapped region. It prevents erroneous free() calls on these hash\+Function\+Seeds. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OPMPHM\_FLAG\_MMAP\_GRAPH@{OPMPHM\_FLAG\_MMAP\_GRAPH}!kdbopmphm.h@{kdbopmphm.h}}\index{kdbopmphm.h@{kdbopmphm.h}!OPMPHM\_FLAG\_MMAP\_GRAPH@{OPMPHM\_FLAG\_MMAP\_GRAPH}}}\mbox{\Hypertarget{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa84eafb10d8ebb8392ea76c4e10ba18eb}\label{kdbopmphm_8h_a2485eafcb5c3e235f15e91d98ec39eefa84eafb10d8ebb8392ea76c4e10ba18eb}} 
OPMPHM\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+GRAPH&\mbox{\hyperlink{structOpmphm}{Opmphm}} graph lies inside a mmap region. This flag is set for \mbox{\hyperlink{structOpmphm}{Opmphm}} graphs inside a mapped region. It prevents erroneous free() calls on these graphs. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{kdbopmphm_8h_add187b2f5ceecdeecb57c8dd4a445edf}\label{kdbopmphm_8h_add187b2f5ceecdeecb57c8dd4a445edf}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmAssignment@{opmphmAssignment}}
\index{opmphmAssignment@{opmphmAssignment}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmAssignment()}{opmphmAssignment()}}
{\footnotesize\ttfamily int opmphm\+Assignment (\begin{DoxyParamCaption}\item[{\mbox{\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 OPMPHM {\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 OPMPHM \\
\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{kdbopmphm_8h_a9f5fb16dfe4472e9b44597653cc80a8c}\label{kdbopmphm_8h_a9f5fb16dfe4472e9b44597653cc80a8c}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmClear@{opmphmClear}}
\index{opmphmClear@{opmphmClear}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmClear()}{opmphmClear()}}
{\footnotesize\ttfamily void opmphm\+Clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{opmphm }\end{DoxyParamCaption})}



Clears the OPMPHM. 

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


\begin{DoxyParams}{Parameters}
{\em opmphm} & the OPMPHM \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{kdbopmphm_8h_a8a649255943a9d30fe0702fd76f2cf62}\label{kdbopmphm_8h_a8a649255943a9d30fe0702fd76f2cf62}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmCopy@{opmphmCopy}}
\index{opmphmCopy@{opmphmCopy}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmCopy()}{opmphmCopy()}}
{\footnotesize\ttfamily int opmphm\+Copy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{dest,  }\item[{const \mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{source }\end{DoxyParamCaption})}



Copies OPMPHM from source to destination. 

Clears the dest and copies memory and values from source.


\begin{DoxyParams}{Parameters}
{\em dest} & the OPMPHM destination \\
\hline
{\em source} & the OPMPHM source\\
\hline
\end{DoxyParams}

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



Deletes the OPMPHM. 

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


\begin{DoxyParams}{Parameters}
{\em opmphm} & the OPMPHM \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{kdbopmphm_8h_a8db32bc61cd04ac24d45e25b6168adf6}\label{kdbopmphm_8h_a8db32bc61cd04ac24d45e25b6168adf6}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmGraphClear@{opmphmGraphClear}}
\index{opmphmGraphClear@{opmphmGraphClear}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmGraphClear()}{opmphmGraphClear()}}
{\footnotesize\ttfamily void opmphm\+Graph\+Clear (\begin{DoxyParamCaption}\item[{const \mbox{\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 OPMPHM \\
\hline
{\em graph} & the Opmphm\+Graph \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{kdbopmphm_8h_a8028ab6baf6d67246685cc341548df0d}\label{kdbopmphm_8h_a8028ab6baf6d67246685cc341548df0d}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmGraphDel@{opmphmGraphDel}}
\index{opmphmGraphDel@{opmphmGraphDel}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmGraphDel()}{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{kdbopmphm_8h_ac1f88dc9773998222812ccd9e5d3c36f}\label{kdbopmphm_8h_ac1f88dc9773998222812ccd9e5d3c36f}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmGraphNew@{opmphmGraphNew}}
\index{opmphmGraphNew@{opmphmGraphNew}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmGraphNew()}{opmphmGraphNew()}}
{\footnotesize\ttfamily Opmphm\+Graph$\ast$ opmphm\+Graph\+New (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{opmphm,  }\item[{uint8\+\_\+t}]{r,  }\item[{size\+\_\+t}]{n,  }\item[{double}]{c }\end{DoxyParamCaption})}



Graph functions. 

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 OPMPHM \\
\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 NULL} & memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbopmphm_8h_a71755ec91a4f97c88d89950a5a3f6a77}\label{kdbopmphm_8h_a71755ec91a4f97c88d89950a5a3f6a77}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmIsBuild@{opmphmIsBuild}}
\index{opmphmIsBuild@{opmphmIsBuild}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmIsBuild()}{opmphmIsBuild()}}
{\footnotesize\ttfamily int opmphm\+Is\+Build (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{opmphm }\end{DoxyParamCaption})}



OPMPHM is build. 


\begin{DoxyParams}{Parameters}
{\em opmphm} & the OPMPHM\\
\hline
\end{DoxyParams}

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



Lookup functions. 

Lookup functions.


\begin{DoxyParams}{Parameters}
{\em opmphm} & the OPMPHM \\
\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{kdbopmphm_8h_aac350c6406d4fdf71e6832900e47a79b}\label{kdbopmphm_8h_aac350c6406d4fdf71e6832900e47a79b}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmMapping@{opmphmMapping}}
\index{opmphmMapping@{opmphmMapping}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmMapping()}{opmphmMapping()}}
{\footnotesize\ttfamily int opmphm\+Mapping (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structOpmphm}{Opmphm}} $\ast$}]{opmphm,  }\item[{Opmphm\+Graph $\ast$}]{graph,  }\item[{Opmphm\+Init $\ast$}]{init,  }\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})}



Build functions. 

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 OPMPHM \\
\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{kdbopmphm_8h_a3fe9fd938725ec5f678b8e06e8b35ba2}\label{kdbopmphm_8h_a3fe9fd938725ec5f678b8e06e8b35ba2}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmMinC@{opmphmMinC}}
\index{opmphmMinC@{opmphmMinC}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmMinC()}{opmphmMinC()}}
{\footnotesize\ttfamily double opmphm\+MinC (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{r }\end{DoxyParamCaption})}



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

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{kdbopmphm_8h_a9cd39724926a210dd21d7fcc351e5300}\label{kdbopmphm_8h_a9cd39724926a210dd21d7fcc351e5300}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmNew@{opmphmNew}}
\index{opmphmNew@{opmphmNew}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmNew()}{opmphmNew()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structOpmphm}{Opmphm}}$\ast$ opmphm\+New (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Basic functions. 

Basic functions.


\begin{DoxyRetVals}{Return values}
{\em \mbox{\hyperlink{structOpmphm}{Opmphm}}} & $\ast$ success \\
\hline
{\em NULL} & memory error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbopmphm_8h_a2ff51026b4c1d5a17cf3b41949b9558a}\label{kdbopmphm_8h_a2ff51026b4c1d5a17cf3b41949b9558a}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmOptC@{opmphmOptC}}
\index{opmphmOptC@{opmphmOptC}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmOptC()}{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{kdbopmphm_8h_aeaeadb8769feb2e36ff92ec8f4165c63}\label{kdbopmphm_8h_aeaeadb8769feb2e36ff92ec8f4165c63}} 
\index{kdbopmphm.h@{kdbopmphm.h}!opmphmOptR@{opmphmOptR}}
\index{opmphmOptR@{opmphmOptR}!kdbopmphm.h@{kdbopmphm.h}}
\doxysubsubsection{\texorpdfstring{opmphmOptR()}{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}
