Clingo
Loading...
Searching...
No Matches
CppClingo::Util::Graph Class Reference

Graph class to compute strongly connected components. More...

#include <graph.hh>

Public Types

using IdVec = std::vector< size_t >
 A vector of node ids.
 
using SCCVec = std::vector< IdVec >
 A vector of vector of nodes forming a strongly connected component.
 

Public Member Functions

template<class Callback >
void tarjan (Callback cb)
 Compute the strongly connected components of the graph.
 
void ensure_size (size_t n)
 Ensure that the graph holds at least n nodes.
 
void add_edge (size_t u, size_t v)
 Add an edge to the graph.
 
auto has_loop (size_t u) const -> bool
 Check if the given vertex has a loop.
 
void clear ()
 Clear the graph.
 

Detailed Description

Graph class to compute strongly connected components.


The documentation for this class was generated from the following file: