#ifndef SCC_H_ #define SCC_H_ #include "graph.h" #include namespace graph { template class SCC : public Graph { public: SCC() = default; SCC(std::map> scc); // T representative() { return proxy; }; private: // Each SCC has a representative vertex that helps // answer strong connectivity queries in O(1) time T proxy; }; 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