Jetpack documentation 1.0.0
Loading...
Searching...
No Matches
PositionHash Class Reference

A class that represents a hash function for positions. More...

#include <PositionHash.hpp>

Public Member Functions

std::size_t operator() (const std::array< std::size_t, 2 > &pos) const noexcept
 Hash function for a 2D position.
 

Static Private Member Functions

template<typename T >
static void hash_combine (std::size_t &seed, const T &value) noexcept
 Hash combine function.
 

Detailed Description

A class that represents a hash function for positions.

Member Function Documentation

◆ hash_combine()

template<typename T >
void hash_combine ( std::size_t & seed,
const T & value )
staticprivatenoexcept

Hash combine function.

Parameters
seedThe seed value
valueThe value to hash

◆ operator()()

std::size_t operator() ( const std::array< std::size_t, 2 > & pos) const
noexcept

Hash function for a 2D position.

Parameters
posThe position to hash
Returns
The hash value of the position

The documentation for this class was generated from the following files: