Embedded Template Library 1.0
Loading...
Searching...
No Matches
Pearson hash calculation

Classes

class  etl::pearson< HASH_LENGTH >
 

Detailed Description


Class Documentation

◆ etl::pearson

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

Calculates a Pearson hash

Template Parameters
HASH_LENGTHThe number of elements in the hash.

Public Types

typedef etl::array< uint8_t, HASH_LENGTHvalue_type
 

Public Member Functions

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

Constructor & Destructor Documentation

◆ pearson()

template<size_t HASH_LENGTH>
template<typename TIterator >
etl::pearson< HASH_LENGTH >::pearson ( TIterator  begin,
const TIterator  end 
)
inline

Constructor from range.

Parameters
beginStart of the range.
endEnd of the range.

Member Function Documentation

◆ add() [1/2]

template<size_t HASH_LENGTH>
template<typename TIterator >
void etl::pearson< HASH_LENGTH >::add ( TIterator  begin,
const TIterator  end 
)
inline

Adds a range.

Parameters
begin
end

◆ add() [2/2]

template<size_t HASH_LENGTH>
void etl::pearson< HASH_LENGTH >::add ( uint8_t  value_)
inline
Parameters
valueThe char to add to the hash.