A simple multihash implementation. Is able to store multiple elements with the same hash.
More...
#include <simpleMultiHash.h>
|
| SimpleMultiHash (D depth_, const unsigned long firstTableSize=100, const unsigned long secondTableInitSize=300) |
| Construct a new Simple Multi Hash object.
|
|
bool | addPoint (const T &point) |
| Will add the given point to the MultiHash. If the same point already exists it will not be added.
|
|
void | addPoint_Unique (const T &point) |
| Will add the given point to the MultiHash. If the point already exists inside the Hashmap the behaviour is undefined!!!! Do NOT use this method if you are not absolutly sure that the given point does not already exist. Use addPoint() instead.
|
|
|
bool | checkIfItemInHashgroup (const unsigned long index, const T &item, unsigned long &outFoundPos) const |
| Will try to find the given item in the Hashgroup.
|
|
template<typename T, typename D>
class SimpleMultiHash< T, D >
A simple multihash implementation. Is able to store multiple elements with the same hash.
- Template Parameters
-
◆ SimpleMultiHash()
template<typename T , typename D >
Construct a new Simple Multi Hash object.
- Parameters
-
hash | |
firstTableSize | The size of the first Table |
secondTableInitSize | The initially reserved space of the second table. May expand if set to low but will not shrink. |
◆ addPoint()
template<typename T , typename D >
Will add the given point to the MultiHash. If the same point already exists it will not be added.
- Parameters
-
- Returns
- true
-
false
◆ addPoint_Unique()
template<typename T , typename D >
Will add the given point to the MultiHash. If the point already exists inside the Hashmap the behaviour is undefined!!!! Do NOT use this method if you are not absolutly sure that the given point does not already exist. Use addPoint() instead.
- Parameters
-
◆ checkIfItemInHashgroup()
template<typename T , typename D >
bool SimpleMultiHash< T, D >::checkIfItemInHashgroup |
( |
const unsigned long |
index, |
|
|
const T & |
item, |
|
|
unsigned long & |
outFoundPos |
|
) |
| const |
|
inlineprivate |
Will try to find the given item in the Hashgroup.
- Parameters
-
index | |
item | |
outFoundPos | contains the position at which the item was found. If the item was not found returns the last position of the Hashgroup |
- Returns
- true
-
false
The documentation for this class was generated from the following file: