1 #ifndef _OVERSEER_GRAPH_H_ 2 #define _OVERSEER_GRAPH_H_ 5 #include "ChokePoint.h" 13 typedef std::vector<ChokePoint> CPPath;
14 typedef std::tuple<size_t, size_t, size_t> ChokePointId;
29 ChokePointId choke_point_id;
72 std::vector<ChokePoint> getChokePoints(
size_t region_id_a,
size_t region_id_b)
const;
79 std::vector<ChokePoint> getChokePoints()
const;
87 ChokePoint getChokePoint(ChokePointId cp_id)
const;
101 void createChokePoints();
113 void setMap(
Map *map);
118 std::vector<std::vector<std::vector<ChokePoint>>> m_ChokePointsMatrix;
119 std::map<ChokePointId, std::map<ChokePointId, float>> m_ChokePointDistanceMap;
120 std::map<ChokePointId, std::vector<ChokePoint>> m_ChokePointNeighbors;
121 std::map<size_t, std::vector<ChokePoint>> m_RegionChokePoints;
122 std::map<ChokePointId, std::map<ChokePointId, CPPath>> m_ChokePointPaths;
125 bool validId(
size_t id_arg)
const;
127 std::vector<std::deque<TilePosition>>* createClustersFromFrontiers(std::pair<std::pair<size_t,size_t>, std::vector<TilePosition>> frontierByRegionPair);
129 void initializeChokePointDistanceMap();
131 void setChokePointDistance(ChokePointId cp_a, ChokePointId cp_b,
float d);
141 CPPath reconstructPath(std::map<ChokePointId, ChokePointId> came_from,
ChokePoint current);
143 std::vector<ChokePointId> extractKeys(std::map<ChokePointId, ChokePointId>
const& input_map);
comparator for priority queue lowest fscore at the top.
Definition: Graph.h:42
Definition: ChokePoint.cpp:3
AstarNode(ChokePointId cp_id, float f)
constructor sets chokepoint id and fscore.
Definition: Graph.cpp:10
is the overseer map that holds the most "important" functionality for a outside user.
Definition: Map.h:22
Class that is used as a chokepoint container with size and positioning on the map.
Definition: ChokePoint.h:17
bool operator==(const AstarNode &rhs) const
comparator for A* node is equal if chokepoint ids are equal
Definition: Graph.cpp:15
Is a mathematical "graphmap" for analysing.
Definition: Graph.h:50