diff --git a/graph/scc.h b/graph/scc.h index e2b835b..83760e9 100644 --- a/graph/scc.h +++ b/graph/scc.h @@ -17,12 +17,19 @@ public: // 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 \ No newline at end of file