1 #ifndef GL_TRANSITIVE_CLOSURE_HPP
2 #define GL_TRANSITIVE_CLOSURE_HPP
4 #include "../structures/Graph.hpp"
16 template <
class Graph>
void DFS_recursive(const GRAPH &graph, const typename GRAPH::idx_t node, typename GRAPH::visit_list_t &visited, typename GRAPH::ordered_list_t &out)
Recursive call for DFS.
Definition: DFS.hpp:17
gl::index_type idx_t
Index type.
Definition: Graph.hpp:44
Graph::ordered_list_t transitiveClosure(const Graph &graph, const typename Graph::idx_t node)
Implements an algorithm that finds the (reachability based) transitive closure of a node...
Definition: TransitiveClosure.hpp:17
Stores and implements a Graph.
Definition: Graph.hpp:39
idx_t numNodes() const
Returns the number of nodes currently in the graph.
Definition: Graph.hpp:406
std::list< idx_t > ordered_list_t
Ordered List type.
Definition: Graph.hpp:49
std::vector< bool > visit_list_t
Visited-List type.
Definition: Graph.hpp:50