\doxysubsection{rabinkarp.\+h File Reference}
\label{rabinkarp_8h}\index{rabinkarp.h@{rabinkarp.h}}


The rabinkarp class implementation of the Rabin\+Karp rollsum.  


Include dependency graph for rabinkarp.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=172pt]{rabinkarp_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=350pt]{rabinkarp_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structrabinkarp}{rabinkarp}}
\begin{DoxyCompactList}\small\item\em The rabinkarp\+\_\+t state type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{rabinkarp_8h_aeb3613c7d8a6e3b59e17c8fd0d495036}{RABINKARP\+\_\+\+SEED}}~1
\begin{DoxyCompactList}\small\item\em The Rabin\+Karp seed value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{rabinkarp_8h_a71f1b5d2756896746bbafd36fbe268dc}{RABINKARP\+\_\+\+MULT}}~0x08104225U
\begin{DoxyCompactList}\small\item\em The Rabin\+Karp multiplier. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{rabinkarp_8h_a62d5da149dcceb6a443488e6f56d5505}{RABINKARP\+\_\+\+INVM}}~0x98f009adU
\begin{DoxyCompactList}\small\item\em The Rabin\+Karp inverse multiplier. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{rabinkarp_8h_aa3522ff8243355ca2e611f6300cfe5de}{RABINKARP\+\_\+\+ADJ}}~0x08104224U
\begin{DoxyCompactList}\small\item\em The Rabin\+Karp seed adjustment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{structrabinkarp}{rabinkarp}} \mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}}
\begin{DoxyCompactList}\small\item\em The rabinkarp\+\_\+t state type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \mbox{\hyperlink{rabinkarp_8h_a73353305aec623f320019c85c0b2c02b}{rabinkarp\+\_\+init}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum)
\item 
void \mbox{\hyperlink{rabinkarp_8h_ad116fb983ae176c6b9cc81f38b6656b4}{rabinkarp\+\_\+update}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum, const unsigned char $\ast$buf, size\+\_\+t len)
\item 
static void \mbox{\hyperlink{rabinkarp_8h_a871ed876cec8ab01e0685ddebe68b0b5}{rabinkarp\+\_\+rotate}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum, unsigned char out, unsigned char in)
\item 
static void \mbox{\hyperlink{rabinkarp_8h_a54f3a72839c2a53829cdffa9d721edcc}{rabinkarp\+\_\+rollin}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum, unsigned char in)
\item 
static void \mbox{\hyperlink{rabinkarp_8h_ac5884a40fb13831822a8b1f87bfd3c96}{rabinkarp\+\_\+rollout}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum, unsigned char out)
\item 
static uint32\+\_\+t \mbox{\hyperlink{rabinkarp_8h_af3e1c4b515b4ffde7329990b760eb1e6}{rabinkarp\+\_\+digest}} (\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$sum)
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
The rabinkarp class implementation of the Rabin\+Karp rollsum. 



Definition in file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.



\doxysubsubsection{Macro Definition Documentation}
\mbox{\label{rabinkarp_8h_aeb3613c7d8a6e3b59e17c8fd0d495036}} 
\index{rabinkarp.h@{rabinkarp.h}!RABINKARP\_SEED@{RABINKARP\_SEED}}
\index{RABINKARP\_SEED@{RABINKARP\_SEED}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{RABINKARP\_SEED}{RABINKARP\_SEED}}
{\footnotesize\ttfamily \#define RABINKARP\+\_\+\+SEED~1}



The Rabin\+Karp seed value. 

The seed ensures different length zero blocks have different hashes. It effectively encodes the length into the hash. 

Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00034}{34}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_a71f1b5d2756896746bbafd36fbe268dc}} 
\index{rabinkarp.h@{rabinkarp.h}!RABINKARP\_MULT@{RABINKARP\_MULT}}
\index{RABINKARP\_MULT@{RABINKARP\_MULT}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{RABINKARP\_MULT}{RABINKARP\_MULT}}
{\footnotesize\ttfamily \#define RABINKARP\+\_\+\+MULT~0x08104225U}



The Rabin\+Karp multiplier. 

This multiplier has a bit pattern of 1\textquotesingle{}s getting sparser with significance, is the product of 2 large primes, and matches the characterstics for a good LCG multiplier. 

Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00041}{41}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_a62d5da149dcceb6a443488e6f56d5505}} 
\index{rabinkarp.h@{rabinkarp.h}!RABINKARP\_INVM@{RABINKARP\_INVM}}
\index{RABINKARP\_INVM@{RABINKARP\_INVM}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{RABINKARP\_INVM}{RABINKARP\_INVM}}
{\footnotesize\ttfamily \#define RABINKARP\+\_\+\+INVM~0x98f009adU}



The Rabin\+Karp inverse multiplier. 

This is the inverse of RABINKARP\+\_\+\+MULT modular 2$^\wedge$32. Multiplying by this is equivalent to dividing by RABINKARP\+\_\+\+MULT. 

Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00047}{47}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_aa3522ff8243355ca2e611f6300cfe5de}} 
\index{rabinkarp.h@{rabinkarp.h}!RABINKARP\_ADJ@{RABINKARP\_ADJ}}
\index{RABINKARP\_ADJ@{RABINKARP\_ADJ}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{RABINKARP\_ADJ}{RABINKARP\_ADJ}}
{\footnotesize\ttfamily \#define RABINKARP\+\_\+\+ADJ~0x08104224U}



The Rabin\+Karp seed adjustment. 

This is a factor used to adjust for the seed when rolling out values. It\textquotesingle{}s equal to; (RABINKARP\+\_\+\+MULT -\/ 1) $\ast$ RABINKARP\+\_\+\+SEED 

Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00053}{53}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.



\doxysubsubsection{Typedef Documentation}
\mbox{\label{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_t@{rabinkarp\_t}}
\index{rabinkarp\_t@{rabinkarp\_t}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_t}{rabinkarp\_t}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structrabinkarp}{rabinkarp}} \mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}}}



The rabinkarp\+\_\+t state type. 



\doxysubsubsection{Function Documentation}
\mbox{\label{rabinkarp_8h_a73353305aec623f320019c85c0b2c02b}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_init@{rabinkarp\_init}}
\index{rabinkarp\_init@{rabinkarp\_init}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_init()}{rabinkarp\_init()}}
{\footnotesize\ttfamily static void rabinkarp\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00062}{62}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_ad116fb983ae176c6b9cc81f38b6656b4}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_update@{rabinkarp\_update}}
\index{rabinkarp\_update@{rabinkarp\_update}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_update()}{rabinkarp\_update()}}
{\footnotesize\ttfamily void rabinkarp\+\_\+update (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum,  }\item[{const unsigned char $\ast$}]{buf,  }\item[{size\+\_\+t}]{len }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{rabinkarp_8c_source_l00088}{88}} of file \mbox{\hyperlink{rabinkarp_8c_source}{rabinkarp.\+c}}.

\mbox{\label{rabinkarp_8h_a871ed876cec8ab01e0685ddebe68b0b5}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_rotate@{rabinkarp\_rotate}}
\index{rabinkarp\_rotate@{rabinkarp\_rotate}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_rotate()}{rabinkarp\_rotate()}}
{\footnotesize\ttfamily static void rabinkarp\+\_\+rotate (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum,  }\item[{unsigned char}]{out,  }\item[{unsigned char}]{in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00071}{71}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_a54f3a72839c2a53829cdffa9d721edcc}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_rollin@{rabinkarp\_rollin}}
\index{rabinkarp\_rollin@{rabinkarp\_rollin}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_rollin()}{rabinkarp\_rollin()}}
{\footnotesize\ttfamily static void rabinkarp\+\_\+rollin (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum,  }\item[{unsigned char}]{in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00078}{78}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_ac5884a40fb13831822a8b1f87bfd3c96}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_rollout@{rabinkarp\_rollout}}
\index{rabinkarp\_rollout@{rabinkarp\_rollout}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_rollout()}{rabinkarp\_rollout()}}
{\footnotesize\ttfamily static void rabinkarp\+\_\+rollout (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum,  }\item[{unsigned char}]{out }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00085}{85}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

\mbox{\label{rabinkarp_8h_af3e1c4b515b4ffde7329990b760eb1e6}} 
\index{rabinkarp.h@{rabinkarp.h}!rabinkarp\_digest@{rabinkarp\_digest}}
\index{rabinkarp\_digest@{rabinkarp\_digest}!rabinkarp.h@{rabinkarp.h}}
\doxyparagraph{\texorpdfstring{rabinkarp\_digest()}{rabinkarp\_digest()}}
{\footnotesize\ttfamily static uint32\+\_\+t rabinkarp\+\_\+digest (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} $\ast$}]{sum }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line \mbox{\hyperlink{rabinkarp_8h_source_l00092}{92}} of file \mbox{\hyperlink{rabinkarp_8h_source}{rabinkarp.\+h}}.

