#ifndef SCC_H_ #define SCC_H_ #include "digraph.h" #include namespace graph { template class SCC : public Digraph { public: SCC() = default; SCC(std::map> scc) : Digraph::Digraph(scc) { proxy = scc.begin()->first; } // T representative() { return proxy; }; bool operator==(const SCC& o) const; private: // Each SCC has a representative vertex that helps // answer strong connectivity queries in O(1) time T proxy; }; template bool SCC::operator==(const SCC& o) const{ return proxy == o.proxy; } }; // namespace graph #endif