13#ifndef MCRL2_PG_SCC_IMPL_H
14#define MCRL2_PG_SCC_IMPL_H
34template<
class Callback>
57 assert(
stack.empty());
60 if (res != 0)
return res;
63 assert(
stack.empty());
75 stack.push_back(std::make_pair(v, 0));
86 while (res == 0 && !
stack.empty())
106 info[v].second = std::min(
info[v].second,
info[w].first);
118 int u =
stack.back().first;
119 info[u].second = std::min(
info[u].second,
info[v].second);
123 if (
info[v].first ==
info[v].second)
126 std::vector<verti>::iterator it =
component.end();
153 std::vector<std::pair<verti, verti> >
info;
165 std::vector< std::pair< verti, verti > >
stack;
std::size_t verti
type used to number vertices
verti next_index
Index of next vertex to be labelled by inorder traversal.
const StaticGraph & graph_
SCC(const StaticGraph &graph, Callback &callback)
std::vector< std::pair< verti, verti > > info
Inorder index and lowest link index of each vertex.
std::vector< verti > component
Vertex indices of the current component.
std::vector< std::pair< verti, verti > > stack
const_iterator succ_end(verti v) const
const_iterator succ_begin(verti v) const
const verti * const_iterator