forked from PathPlanning/3D-AStar-ThetaStar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
isearch.h
51 lines (41 loc) · 1.84 KB
/
isearch.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
#ifndef ISEARCH_H
#define ISEARCH_H
#include "list.h"
#include "map.h"
#include "ilogger.h"
#include "searchresult.h"
#include "environmentoptions.h"
#include "node.h"
#include <unordered_set>
#include <unordered_map>
class ISearch {
public:
ISearch();
virtual ~ISearch(void);
SearchResult startSearch(ILogger *Logger, const Map &Map, const EnvironmentOptions &options);
protected:
Node findMin(int size);
void deleteMin(Node minNode, uint_least32_t key);
virtual void addOpen(Node newNode, uint_least32_t key);
double MoveCost(int start_i, int start_j, int start_h, int fin_i, int fin_j, int fin_h, const EnvironmentOptions &options);
virtual double computeHFromCellToCell(int start_i, int start_j, int start_h, int fin_i, int fin_j, int fin_h,
const EnvironmentOptions &options) = 0;
// Method which searches the expanded node successor, which satisfies search conditions
virtual std::list<Node> findSuccessors(Node curNode, const Map &map, const EnvironmentOptions &options);
virtual void makePrimaryPath(Node curNode);
virtual void makeSecondaryPath(const Map &map,
Node curNode);
// Tries to changed node's parent on better one
virtual Node resetParent(Node current, Node parent, const Map &map,
const EnvironmentOptions &options) { return current; }
virtual bool stopCriterion();
SearchResult sresult;
NodeList lppath, hppath; // Found point by point and section paths
std::unordered_map<uint_least32_t, Node> close;
std::unordered_map<uint_least32_t, Node> *open;
std::vector<int_least64_t> openMinimums;
int openSize;
float hweight; // Heuristic weight coefficient
int breakingties; // ID of criterion which used for choosing between node with the same f-value
};
#endif