Lolly 1.4.28
|
A concrete implementation of a hash function for a given type. More...
#include <hashfunc.hpp>
Public Member Functions | |
hashfunc_rep (U(*func2)(T), U init) | |
Constructor for hashfunc_rep. | |
U | apply (T x) |
Applies the hash function to the given input. | |
Public Member Functions inherited from concrete_struct | |
concrete_struct () | |
Default constructor for the concrete object. Increments the reference count. | |
virtual | ~concrete_struct () |
Virtual destructor for the concrete object. Decrements the reference count. | |
Private Attributes | |
U(* | func )(T) |
hashmap< T, U > | remember |
Additional Inherited Members | |
Public Attributes inherited from concrete_struct | |
int | ref_count |
The reference count for the concrete object. | |
A concrete implementation of a hash function for a given type.
T | The input type of the hash function. |
U | The output type of the hash function. |
Definition at line 18 of file hashfunc.hpp.
|
inline |
Constructor for hashfunc_rep.
func2 | A pointer to the hash function to be used. |
init | The initial value for the hash map. |
Definition at line 27 of file hashfunc.hpp.
U hashfunc_rep< T, U >::apply | ( | T | x | ) |
Applies the hash function to the given input.
x | The input value to be hashed. |
Definition at line 18 of file hashfunc.ipp.
|
private |
A pointer to the hash function.
Definition at line 19 of file hashfunc.hpp.
|
private |
A hash map to store remembered values.
Definition at line 20 of file hashfunc.hpp.