diff --git a/algorithm/decremental_tc.h b/algorithm/decremental_tc.h index 5380c26..8de4906 100644 --- a/algorithm/decremental_tc.h +++ b/algorithm/decremental_tc.h @@ -23,31 +23,38 @@ public: void remove(const T& u, const T& v); private: - // Every vertex u has a pointer C(u) to the component containing it - std::map vc; + Digraph G; - // 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 Ein; - std::forward_list Eout; - std::forward_list Eint; + // Every vertex u has a pointer C(u) to the component containing it + std::map> C; + + // The aggregation of edges each component contains + struct LLE { + std::forward_list Ein; + std::forward_list Eout; + std::forward_list Eint; + }; + + std::map, LLE> E; + + // Connect each component with a tree of all reachable components + std::map, std::set>> TC; }; template -inline void DecrementalTC::init() { +void DecrementalTC::init() { } template -inline bool DecrementalTC::query(const T& u, const T& v) { +bool DecrementalTC::query(const T& u, const T& v) { return false; } template -inline void DecrementalTC::remove(const T& u, const T& v) { +void DecrementalTC::remove(const T& u, const T& v) { }