/
forthang
/
path_delivery-forthang
Обзор
Документация
Войти
/
forthang
/
path_delivery-forthang
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
include/graph.hpp
19 строк
557 B
OOP Nust MISIS
Initial commit
27 фев 2025, 22:52
27 фев 2025, 22:52
5063a01
Код
Авторство
О чём код?
#pragma once #include <string> #include <unordered_map> #include <vector> #include <queue> #include <cstdint> namespace template_library { /// Sample Graph structure for implementing class Graph { struct Edge { std::string to; uint16_t weight; }; std::unordered_map<std::string, std::vector<Edge>> adj; public: virtual void add_edge(const std::string& from, const std::string& to, uint16_t weight); virtual std::vector<std::string> find_shortest_path(const std::string& start, const std::string& end); }; }