Move headers into include folder and add single header to include all reachability algorithms

This commit is contained in:
stefiosif
2022-10-14 18:38:01 +03:00
parent dc7fa93a6a
commit 92cf8950c2
14 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
#ifndef DECREMENTAL_REACHABILITY_H_
#define DECREMENTAL_REACHABILITY_H_
#include "graph/digraph.h"
namespace algo {
template<typename T>
class DecrementalReachability {
public:
virtual ~DecrementalReachability() {};
// 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 T& u, const T& v) =0;
protected:
Digraph<T> G;
};
}; // namespace algo
#endif