-
Notifications
You must be signed in to change notification settings - Fork 0
/
case.hh
55 lines (32 loc) · 1012 Bytes
/
case.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include <cstdint>
namespace Djikstra
{
class Case
{
public :
constexpr Case(int x = 0, int y = 0);
/*getter and setter */
public :
void weight_set(int) noexcept;
void is_listed_set(bool) noexcept;
void father_set(Case* const) noexcept;
void cood_set(int, int) noexcept;
bool is_listed() const noexcept;
int weight_get() const noexcept;
int x_get() const noexcept;
int y_get() const noexcept;
constexpr operator int () const;
private :
/*mean that we have already visited this node*/
bool is_listed_ = false;
/* weight of the node */
uint32_t weight_ = 0;
/* father is the node from wich we compute this
new cas_s */
Case* father_ = nullptr;
int x_;
int y_;
};
}
#include "case.hxx"