Program Listing for File dijkstra.hpp

Return to documentation for file (include/path_planning/dijkstra.hpp)

#ifndef DIJKSTRA_H
#define DIJKSTRA_H

#include <queue>

#include "path_planning/planner.hpp"
#include "utils/utils.hpp"

class Dijkstra : public Planner {
 public:
  explicit Dijkstra(std::vector<std::vector<int>> grid)
      : Planner(std::move(grid)) {}

  std::tuple<bool, std::vector<Node>> Plan(const Node& start,
                                           const Node& goal) override;

 private:
  std::vector<Node> ConvertClosedListToPath(
      std::unordered_set<Node, NodeIdAsHash, compare_coordinates>& closed_list,
      const Node& start, const Node& goal);
};

#endif  // DIJKSTRA_H