Fix includes and add some comments

This commit is contained in:
stefiosif
2022-07-12 14:42:29 +03:00
parent e7ad824116
commit 601f80c8d4
7 changed files with 31 additions and 64 deletions

View File

@@ -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;
};