DiSMEC++
|
A unique identifier for a HashVector. More...
#include <hash_vector.h>
Public Member Functions | |
VectorHash () | |
Default constructor. Initializes the VectorHash to special marker. More... | |
bool | operator== (const VectorHash &other) const |
Checks that two hashes are equal. More... | |
bool | operator!= (const VectorHash &other) const |
negation of the equality check More... | |
Private Member Functions | |
VectorHash (std::size_t id) | |
Creates a VectorHash for the given ID. More... | |
Private Attributes | |
std::size_t | m_UniqueID |
Friends | |
class | HashVector |
A unique identifier for a HashVector.
This is the type that is returned by HashVector::hash(). It can be used to verify whether two given vectors are guaranteed to have the same content. In particular, it makes it possible to implement caching of calculated values without having to store and compare a vector valued argument, see the code example in HashVector.
Definition at line 118 of file hash_vector.h.
VectorHash::VectorHash | ( | ) |
Default constructor. Initializes the VectorHash
to special marker.
The default-constructed VectorHash contains a special marker value as the id. This value never compares equal to any hash of a real HashVector
.
Definition at line 49 of file hash_vector.cpp.
|
inlineprivate |
Creates a VectorHash
for the given ID.
This function is private and will only be called from HashVector::hash()
Definition at line 144 of file hash_vector.h.
|
inline |
negation of the equality check
Definition at line 136 of file hash_vector.h.
|
inline |
Checks that two hashes are equal.
other | The other VectorHash to compare to. |
Definition at line 132 of file hash_vector.h.
References m_UniqueID.
|
friend |
Definition at line 147 of file hash_vector.h.
|
private |
Definition at line 145 of file hash_vector.h.
Referenced by operator==().