#ifndef DECREMENTAL_REACHABILITY_H_ #define DECREMENTAL_REACHABILITY_H_ #include "graph/digraph.h" namespace algo { template class DecrementalReachability { public: virtual ~DecrementalReachability() = default; // This method is implemented and executed by all roditty and zwick // algorithms, it constructs the data structures used in other operations virtual void init() =0; // Answer if vertex v is reachable from vertex u virtual bool query(const T& u, const T& v) =0; // Remove edge e(u,v) and maintain the transitive closure matrix virtual void remove(const std::vector>& edges) =0; protected: Digraph G; }; }; // namespace algo #endif