|
| virtual uint64_t | Hash (std::string_view data) const noexcept=0 |
| | Computes an unsigned 64-bit value of an arbitrary string of bytes. More...
|
| |
| virtual size_t | CalcBucket (uint64_t hash, size_t bucketCount) const noexcept=0 |
| | Calculates the bucket index from a given hash and bucket count. More...
|
| |
| virtual size_t | CalcBucketsForItemCount (size_t count) const noexcept=0 |
| | Computes the preferred number of buckets the implementation wants for a given number of entries that will be inserted. More...
|
| |
◆ CalcBucket()
| virtual size_t AssetMap::IHasher::CalcBucket |
( |
uint64_t |
hash, |
|
|
size_t |
bucketCount |
|
) |
| const |
|
pure virtualnoexcept |
Calculates the bucket index from a given hash and bucket count.
- Parameters
-
| hash | a hash previously computed with Hash() |
| bucketCount | The total number of buckets that exist. |
- Returns
- The bucket that this entry should be found/placed in.
Implemented in AssetMap::CityHash.
◆ CalcBucketsForItemCount()
| virtual size_t AssetMap::IHasher::CalcBucketsForItemCount |
( |
size_t |
count | ) |
const |
|
pure virtualnoexcept |
Computes the preferred number of buckets the implementation wants for a given number of entries that will be inserted.
- Parameters
-
| count | The total number of items that will be stored. |
- Returns
- The number of buckets that are preferred for
count input items.
Implemented in AssetMap::CityHash.
◆ Hash()
| virtual uint64_t AssetMap::IHasher::Hash |
( |
std::string_view |
data | ) |
const |
|
pure virtualnoexcept |
Computes an unsigned 64-bit value of an arbitrary string of bytes.
- Precondition
- It is implementation defined whether
data can be empty.
- Parameters
-
| data | a sequence of bytes to hash. |
- Returns
- a 64-bit hash of
data
Implemented in AssetMap::CityHash.
The documentation for this class was generated from the following file: