diff --git a/graph/scc.h b/graph/scc.h index b7139b8..f3b4e87 100644 --- a/graph/scc.h +++ b/graph/scc.h @@ -1,18 +1,19 @@ #ifndef SCC_H_ #define SCC_H_ -#include "graph.h" +#include "digraph.h" #include namespace graph { template -class SCC : public Graph { +class SCC : public Digraph { public: SCC() = default; - SCC(std::map> scc); + SCC(std::map> scc) + : Digraph::Digraph(scc) { proxy = scc.begin()->first; } // T representative() { return proxy; }; @@ -23,14 +24,6 @@ private: }; -template -SCC::SCC(std::map> scc) { - Graph::adjMatrix = scc; - auto kv = std::views::keys(Graph::adjMatrix); - Graph::vertices = std::set{ kv.begin(), kv.end() }; - proxy = scc.begin()->first; -} - }; // namespace graph #endif \ No newline at end of file