Jetpack documentation 1.0.0
Loading...
Searching...
No Matches
PositionHash.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** jetpack
4** File description:
5** The PositionHash.hpp
6*/
13#ifndef POSITIONHASH_HPP_
14 #define POSITIONHASH_HPP_
15
16 #include "utils/Logs.hpp"
17
18namespace Jetpack {
24 {
25 public:
31 std::size_t operator()(const std::array<std::size_t, 2> &pos) const noexcept;
32
33
34
35 private:
41 template<typename T>
42 static void hash_combine(std::size_t &seed, const T &value) noexcept;
43 };
44}
45
46#endif /* POSITIONHASH_HPP_ */
The Logs.hpp.
A class that represents a hash function for positions.
Definition PositionHash.hpp:24
std::size_t operator()(const std::array< std::size_t, 2 > &pos) const noexcept
Hash function for a 2D position.
Definition PositionHash.cpp:21
static void hash_combine(std::size_t &seed, const T &value) noexcept
Hash combine function.
Definition PositionHash.cpp:34