Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __ASTAR_H__
- #define __ASTAR_H__
- #include <vector>
- #include <functional>
- #include <set>
- #include "AStarMPICommunication.h"
- #include "Coordinate.h"
- #include "Node.h"
- #include "NodeSet.h"
- #include "HeuristicFunction.h"
- #include "CoordinateList.h"
- class AStar
- {
- private:
- HeuristicFunction heuristic;
- CoordinateList direction, walls;
- Coordinate worldSize;
- Coordinate start;
- Coordinate end;
- int directions;
- char** map;
- char wallSymbol;
- char pathSymbol;
- char freeSymbol;
- char startSymbol;
- char endSymbol;
- bool detectCollision(Coordinate coordinates_);
- Node* findNodeOnList(NodeSet& nodes_, Coordinate coordinates_);
- void releaseNodes(NodeSet& nodes_);
- public:
- AStar();
- void setMapSize(Coordinate worldSize_);
- void setDiagonalMovement(bool enable_);
- void setHeuristic(HeuristicFunction heuristic_);
- CoordinateList findPath(Coordinate source_, Coordinate target_);
- CoordinateList findPathMPI(Coordinate source_, Coordinate target_, AStarMPICommunication communication, int rank);
- void addCollision(Coordinate coordinates_);
- void removeCollision(Coordinate coordinates_);
- void clearCollisions();
- void showMap();
- void updateMap();
- void updateMap(CoordinateList path);
- };
- #endif // __ASTAR_H__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement