Graphite
Loading...
Searching...
No Matches
block.hpp
Go to the documentation of this file.
1
2#pragma once
3#include <graphite/utils.hpp>
4
5namespace graphite {
7public:
8 size_t row;
9 size_t col;
10
11 bool operator==(const BlockCoordinates &other) const {
12 return (row == other.row) && (col == other.col);
13 }
14};
15
17} // namespace graphite
18
19namespace std {
20template <> struct hash<graphite::BlockCoordinates> {
21 size_t operator()(const graphite::BlockCoordinates &bc) const {
22 size_t seed = 0;
23 graphite::hash_combine(seed, bc.row);
24 graphite::hash_combine(seed, bc.col);
25 return seed;
26 }
27};
28} // namespace std
Definition block.hpp:6