-
Notifications
You must be signed in to change notification settings - Fork 6
/
dlite.h
58 lines (47 loc) · 1.33 KB
/
dlite.h
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
56
57
58
#ifndef DLITE_H
#define DLITE_H
#include "localmap.h"
#include "openlist.h"
#include "searchresult.h"
#include "heuristics.h"
#include "environmentoptions.h"
#include <unordered_map>
#include <set>
#include <chrono>
class Dlite
{
public:
Dlite();
Dlite(double rad, double HW);
~Dlite(void);
SearchResult FindThePath(LocalMap &map, const Map& const_map, EnvironmentOptions options);
void MakePrimaryPath(Node* curNode);
void makeSecondaryPath();
private:
Node *start;
Node *goal;
Node *last;
int number_of_steps;
double Km;
double radius;
EnvironmentOptions opt;
std::list<Node> curpath;
std::list<Node> path;
std::list<Node> hpath;
double linecost;
double hweight;
Cell start_point;
SearchResult current_result;
OpenList OPEN;
std::unordered_map<int, Node> NODES;
void Initialize(LocalMap &map);
void UpdateVertex(Node* u);
bool ComputeShortestPath(LocalMap &map);
double GetCost(Cell from, Cell to, LocalMap &map) const;
Key CalculateKey(const Node &vertex);
std::vector<Node *> GetSuccessors(Node *curr, LocalMap &map);
std::list<Node *> GetSurroundings(Node *current, LocalMap &map);
Node GetMinPredecessor(Node* curr, LocalMap &map);
std::list<Node> FindNeighbors(Node* curr, LocalMap &map) const;
};
#endif // DLITE_H