Files
reachability-algorithms/algorithm/decremental_tc.h
2022-07-12 14:42:29 +03:00

56 lines
1.1 KiB
C++

#ifndef DECREMENTAL_TC_H_
#define DECREMENTAL_TC_H_
#include "algorithm/roditty_zwick.h"
#include "algorithm/tarjan.h"
#include "algorithm/breadth_first_search.h"
#include "tree/breadth_first_tree.h"
#include <forward_list>
using namespace graph;
namespace algo {
template<typename T>
class DecrementalTC : public RodittyZwick<T> {
public:
DecrementalTC(Digraph<T> G) : G(G) {}
void init();
bool query(const T& u, const T& v);
void remove(const T& u, const T& v);
private:
// Every vertex u has a pointer C(u) to the component containing it
std::map<T, T> vc;
// For every component C, the algorithm maintains three linked lists
// Ein(C), Eout(C), and Eint(C) of the incoming, outgoing, and the internal
// edges of the component C
std::forward_list<T> Ein;
std::forward_list<T> Eout;
std::forward_list<T> Eint;
};
template<typename T>
inline void DecrementalTC<T>::init() {
}
template<typename T>
inline bool DecrementalTC<T>::query(const T& u, const T& v) {
return false;
}
template<typename T>
inline void DecrementalTC<T>::remove(const T& u, const T& v) {
}
} // namespace algo
#endif