Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

pearson< HASH_LENGTH > Class Template Reference

pearson< HASH_LENGTH > Class Template Reference
[Pearson hash calculation]

Calculates a Pearson hash. More...

#include <pearson.h>

Public Member Functions

 pearson ()
 Default constructor.
template<typename TIterator >
 pearson (TIterator begin, const TIterator end)
 Constructor from range.
void reset ()
 Resets the hash to the initial state.
template<typename TIterator >
void add (TIterator begin, const TIterator end)
 Adds a range.
void add (uint8_t value_)
value_type value () const
 Gets the hash value.
 operator value_type () const
 Conversion operator to value_type.

Detailed Description

template<const size_t HASH_LENGTH>
class etl::pearson< HASH_LENGTH >

Calculates a Pearson hash.

Template Parameters:
HASH_LENGTHThe number of elements in the hash.

Definition at line 66 of file pearson.h.


Constructor & Destructor Documentation

pearson (  )

Default constructor.

Definition at line 75 of file pearson.h.

pearson ( TIterator  begin,
const TIterator  end 
)

Constructor from range.

Parameters:
beginStart of the range.
endEnd of the range.

Definition at line 87 of file pearson.h.


Member Function Documentation

void add ( TIterator  begin,
const TIterator  end 
)

Adds a range.

Parameters:
begin
end

Definition at line 110 of file pearson.h.

void add ( uint8_t  value_ )
Parameters:
valueThe char to add to the hash.

Definition at line 123 of file pearson.h.

operator value_type (  ) const

Conversion operator to value_type.

Definition at line 154 of file pearson.h.

void reset (  )

Resets the hash to the initial state.

Definition at line 99 of file pearson.h.

value_type value (  ) const

Gets the hash value.

Definition at line 146 of file pearson.h.