\doxysubsection{weaksum Struct Reference}
\label{structweaksum}\index{weaksum@{weaksum}}


Abstract wrapper around weaksum implementations.  




{\ttfamily \#include $<$checksum.\+h$>$}



Collaboration diagram for weaksum\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=182pt]{structweaksum__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{checksum_8h_a523b170a7d10ae0b00117c2761abaf8d}{weaksum\+\_\+kind\+\_\+t}} \mbox{\hyperlink{structweaksum_a50a18bf7f11b86bf53d2a295bda3efec}{kind}}
\item 
\mbox{\label{structweaksum_ab64270290ec720f66a6ec63bca202ab0}} 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
union \{\\
\>\mbox{\hyperlink{structRollsum}{Rollsum}} \mbox{\hyperlink{structweaksum_a94b4541d6668e8992273c8a39377701c}{rs}}\\
\>\mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\_t}} \mbox{\hyperlink{structweaksum_a1a2347562ded09fe25a611259ac2aa5f}{rk}}\\
\} {\bfseries sum}\\

\end{tabbing}\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
Abstract wrapper around weaksum implementations. 

This is a polymorphic interface to the different rollsum implementations.

Historically rollsum methods were implemented as static inline functions because they were small and needed to be fast. Now that we need to call different methods for different rollsum implementations, they are getting more complicated. Is it better to delegate calls to the right implementation using static inline switch statements, or stop inlining them and use virtual method pointers? Tests suggest inlined switch statements is faster. 

Definition at line \mbox{\hyperlink{checksum_8h_source_l00056}{56}} of file \mbox{\hyperlink{checksum_8h_source}{checksum.\+h}}.



\doxysubsubsection{Field Documentation}
\mbox{\label{structweaksum_a50a18bf7f11b86bf53d2a295bda3efec}} 
\index{weaksum@{weaksum}!kind@{kind}}
\index{kind@{kind}!weaksum@{weaksum}}
\doxyparagraph{\texorpdfstring{kind}{kind}}
{\footnotesize\ttfamily \mbox{\hyperlink{checksum_8h_a523b170a7d10ae0b00117c2761abaf8d}{weaksum\+\_\+kind\+\_\+t}} weaksum\+::kind}



Definition at line \mbox{\hyperlink{checksum_8h_source_l00057}{57}} of file \mbox{\hyperlink{checksum_8h_source}{checksum.\+h}}.

\mbox{\label{structweaksum_a94b4541d6668e8992273c8a39377701c}} 
\index{weaksum@{weaksum}!rs@{rs}}
\index{rs@{rs}!weaksum@{weaksum}}
\doxyparagraph{\texorpdfstring{rs}{rs}}
{\footnotesize\ttfamily \mbox{\hyperlink{structRollsum}{Rollsum}} weaksum\+::rs}



Definition at line \mbox{\hyperlink{checksum_8h_source_l00059}{59}} of file \mbox{\hyperlink{checksum_8h_source}{checksum.\+h}}.

\mbox{\label{structweaksum_a1a2347562ded09fe25a611259ac2aa5f}} 
\index{weaksum@{weaksum}!rk@{rk}}
\index{rk@{rk}!weaksum@{weaksum}}
\doxyparagraph{\texorpdfstring{rk}{rk}}
{\footnotesize\ttfamily \mbox{\hyperlink{rabinkarp_8h_a21dfec982dd0024ba4877afb5c7968c5}{rabinkarp\+\_\+t}} weaksum\+::rk}



Definition at line \mbox{\hyperlink{checksum_8h_source_l00060}{60}} of file \mbox{\hyperlink{checksum_8h_source}{checksum.\+h}}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{checksum_8h}{checksum.\+h}}\end{DoxyCompactItemize}
