CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CluE::CarterWegman< U, H > Class Template Reference

Universal hashing. More...

#include <carterwegman.h>

Inheritance diagram for CluE::CarterWegman< U, H >:
Inheritance graph
Collaboration diagram for CluE::CarterWegman< U, H >:
Collaboration graph

Public Member Functions

 CarterWegman (U universeSize, H hashingSpaceSize=std::numeric_limits< H >::max())
 
virtual H operator() (U const &element) const
 
void setOffset (H offset)
 Sets the hash value offset (default is 0) More...
 
getOffset () const
 Gets the hash value offset (default is 0) More...
 

Private Attributes

unsigned long lValue
 
unsigned long mValue
 
unsigned long nValue
 
unsigned long long pPrime
 
hashingSpaceSize
 
offset
 

Detailed Description

template<typename U, typename H>
class CluE::CarterWegman< U, H >

Universal hashing.

Definition at line 16 of file carterwegman.h.

Constructor & Destructor Documentation

template<typename U, typename H>
CluE::CarterWegman< U, H >::CarterWegman ( universeSize,
hashingSpaceSize = std::numeric_limits<H>::max() 
)

Definition at line 42 of file carterwegman.h.

Member Function Documentation

template<typename U, typename H >
H CluE::CarterWegman< U, H >::operator() ( U const &  element) const
virtual

Implements CluE::HashFunction< U, H >.

Definition at line 56 of file carterwegman.h.

template<typename U , typename H>
void CluE::CarterWegman< U, H >::setOffset ( offset)

Sets the hash value offset (default is 0)

Definition at line 61 of file carterwegman.h.

template<typename U , typename H >
H CluE::CarterWegman< U, H >::getOffset ( ) const

Gets the hash value offset (default is 0)

Definition at line 66 of file carterwegman.h.

Member Data Documentation

template<typename U, typename H>
unsigned long CluE::CarterWegman< U, H >::lValue
private

Definition at line 34 of file carterwegman.h.

template<typename U, typename H>
unsigned long CluE::CarterWegman< U, H >::mValue
private

Definition at line 35 of file carterwegman.h.

template<typename U, typename H>
unsigned long CluE::CarterWegman< U, H >::nValue
private

Definition at line 36 of file carterwegman.h.

template<typename U, typename H>
unsigned long long CluE::CarterWegman< U, H >::pPrime
private

Definition at line 37 of file carterwegman.h.

template<typename U, typename H>
H CluE::CarterWegman< U, H >::hashingSpaceSize
private

Definition at line 38 of file carterwegman.h.

template<typename U, typename H>
H CluE::CarterWegman< U, H >::offset
private

Definition at line 39 of file carterwegman.h.


The documentation for this class was generated from the following file: