#ifndef FRIGIONI_H_ #define FRIGIONI_H_ #include "algorithm/roditty_zwick.h" #include "algorithm/tarjan.h" #include "tree/breadth_first_tree.h" #include using namespace graph; using namespace tree; namespace algo { template class Frigioni : public RodittyZwick { public: Frigioni(Digraph G) : G(G) {} void init(); bool query(const T& u, const T& v); void remove(const T& u, const T& v); private: Digraph G; // Connect each vertex with its representative SCC std::map> TC; // Reachability trees std::map, std::set>> RT; // Incoming / Outgoing / Internal edges struct Edges { std::forward_list Ein; std::forward_list Eout; std::forward_list Eint; }; std::map, Edges> E; }; template void Frigioni::init() { } template bool Frigioni::query(const T& u, const T& v) { return TC[u] == TC[v]; } template void Frigioni::remove(const T& u, const T& v) { } } // namespace algo #endif