Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
grid_index.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <functional>
4
11
struct
GridIndex
{
12
int
x
;
13
int
y
;
14
15
bool
operator==
(
const
GridIndex
& other)
const
{
return
x
== other.
x
&&
y
== other.
y
; }
16
};
17
21
namespace
std
{
22
template
<>
23
struct
hash<
GridIndex
> {
24
std::size_t
operator()
(
const
GridIndex
& k)
const
noexcept
{
25
return
std::hash<int>()(k.x) ^ (std::hash<int>()(k.y) << 1);
26
}
27
};
28
}
// namespace std
std
Hash function for cones.
Definition
cone.hpp:36
GridIndex
Structure to represent a grid index with x and y coordinates, needed for grid mapping.
Definition
grid_index.hpp:11
GridIndex::operator==
bool operator==(const GridIndex &other) const
Definition
grid_index.hpp:15
GridIndex::y
int y
Definition
grid_index.hpp:13
GridIndex::x
int x
Definition
grid_index.hpp:12
std::hash< GridIndex >::operator()
std::size_t operator()(const GridIndex &k) const noexcept
Definition
grid_index.hpp:24
src
perception
include
utils
grid_index.hpp
Generated by
1.9.8