Add single vertex contains method and replace vertices field with adjMatrix' keys

This commit is contained in:
stefiosif
2022-07-20 23:43:15 +03:00
parent 31567f9e57
commit fe3bb68c18
5 changed files with 21 additions and 19 deletions

View File

@@ -22,8 +22,6 @@ public:
template<typename T>
Digraph<T>::Digraph(std::map<T, std::set<T>> digraph) {
Graph<T>::adjMatrix = digraph;
auto kv = std::views::keys(Graph<T>::adjMatrix);
Graph<T>::vertices = std::set<T>{ kv.begin(), kv.end() };
}
template<typename T>