38 lines
634 B
C++
38 lines
634 B
C++
#ifndef DYNAMIC_REACHABILITY_
|
|
#define DYNAMIC_REACHABILITY_
|
|
|
|
#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<typename T>
|
|
class DynamicReachability : public RodittyZwick {
|
|
~DynamicReachability();
|
|
|
|
//
|
|
virtual void init() =0;
|
|
|
|
//
|
|
virtual bool query(const T& u, const T& v) =0;
|
|
|
|
//
|
|
virtual void remove(const T& u, const T& v) =0;
|
|
|
|
//
|
|
virtual void insert() =0;
|
|
};
|
|
|
|
template<typename T>
|
|
inline DynamicReachability<T>::~DynamicReachability() {
|
|
|
|
}
|
|
|
|
} // namespace algo
|
|
|
|
#endif |