API Documentation
Hasher.h
1 // Hasher.h
3 //
5 
6 namespace nkMaths
7 {
11  class Hasher final
12  {
13  public :
14 
15  // Basic hashing function
24  template <typename T>
25  static unsigned long long hash (const T& element) ;
32  template <>
33  static unsigned long long hash (const nkMemory::String& element) ;
40  template <>
41  static unsigned long long hash (const nkMemory::StringView& element) ;
42 
43  // Combination
51  static unsigned long long combineHashes (unsigned long long hash0, unsigned long long hash1) ;
52 
60  template <typename T, typename U>
61  static unsigned long long hashAndCombine (const T& element0, const U& element1) ;
62 
70  template <typename T>
71  static unsigned long long combineIntoHash (unsigned long long hash0, const T& element1) ;
72  } ;
73 }
nkMaths::Hasher::hash
static unsigned long long hash(const T &element)
nkMaths
Encompasses all API of component NilkinsMaths.
Definition: IntVector.h:7
nkMaths::Hasher::combineIntoHash
static unsigned long long combineIntoHash(unsigned long long hash0, const T &element1)
nkMaths::Hasher
Provides hashing capabilities.
Definition: Hasher.h:12
nkMaths::Hasher::hashAndCombine
static unsigned long long hashAndCombine(const T &element0, const U &element1)
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkMaths::Hasher::combineHashes
static unsigned long long combineHashes(unsigned long long hash0, unsigned long long hash1)
nkMaths::Hasher::hash
static unsigned long long hash(const nkMemory::String &element)
nkMaths::Hasher::hash
static unsigned long long hash(const nkMemory::StringView &element)