Fix includes and add some comments
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
#ifndef DECREMENTAL_TC_H_
|
||||
#define DECREMENTAL_TC_H_
|
||||
|
||||
#include "graph/digraph.h"
|
||||
#include "graph/scc.h"
|
||||
#include "algorithm/tarjan.h"
|
||||
#include "algorithm/bfs.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 {
|
||||
|
||||
@@ -14,14 +17,21 @@ 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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user