30 lines
623 B
C++
30 lines
623 B
C++
#ifndef RODITTY_ZWICK_H_
|
|
#define RODITTY_ZWICK_H_
|
|
|
|
namespace algo {
|
|
|
|
template<typename T>
|
|
class RodittyZwick {
|
|
public:
|
|
~RodittyZwick();
|
|
|
|
// 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;
|
|
};
|
|
|
|
template<typename T>
|
|
RodittyZwick<T>::~RodittyZwick() {
|
|
|
|
}
|
|
|
|
}; // namespace algo
|
|
|
|
#endif
|