#ifndef DECREMENTAL_MAINTENANCE_H_ #define DECREMENTAL_MAINTENANCE_H_ #include "graph/digraph.h" #include "graph/scc.h" #include "algorithm/tarjan.h" #include "algorithm/bfs.h" #include "algorithm/roditty_zwick.h" using namespace graph; namespace algo { template class DecrementalMaintenance : public RodittyZwick { public: DecrementalMaintenance(Digraph G) : G(G) {} // void init(); // void query(); // void remove(); private: Digraph G; }; template void DecrementalMaintenance::init() { std::map A; Tarjan tarjan(G); auto sccs = tarjan.run(); for (auto& scc : sccs) { const auto& root = scc.representative(); BFS bfs(scc); auto spt = bfs.run(root); for (const auto& vertex : scc.vertices) { A[vertex] = root; } } } template inline void DecrementalMaintenance::query() { } template inline void DecrementalMaintenance::remove() { } }; // namespace algo #endif