19 explicit distances(std::shared_ptr<cell> root);
21 int& operator[](
const std::shared_ptr<cell>&
cell)
noexcept {
25 void set(std::shared_ptr<cell>
cell,
int distance)
noexcept;
27 bool contains(
const std::shared_ptr<cell>&
cell)
const noexcept;
29 std::shared_ptr<distances> path_to(std::shared_ptr<cell> goal)
const noexcept;
30 std::pair<std::shared_ptr<cell>,
int> max()
const noexcept;
32 void collect_keys(std::vector<std::shared_ptr<cell>>& cells)
const noexcept;
35 std::shared_ptr<cell> m_root;
36 std::unordered_map<std::shared_ptr<cell>,
int> m_cells;