Rodin::IndexArrayHash struct

Functor for computing a hash value for an index array.

This functor computes a hash value for an index array using boost::hash_combine. Special cases are handled for arrays of sizes 1 to 5 for efficiency, while larger arrays are processed using a generic loop.

Public functions

auto operator()(const IndexArray& arr) const -> size_t
Computes the hash value for the given index array.

Function documentation

size_t Rodin::IndexArrayHash::operator()(const IndexArray& arr) const

Computes the hash value for the given index array.

Parameters
arr The index array for which to compute the hash.
Returns A size_t hash value representing the index array.