diff --git a/src/util/graph.h b/src/util/graph.h index 607a7e3d8e2..b0b5713b5ee 100644 --- a/src/util/graph.h +++ b/src/util/graph.h @@ -253,7 +253,7 @@ class grapht std::vector &subgraph_nr); // return value: number of SCCs - std::size_t SCCs(std::vector &subgraph_nr); + std::size_t SCCs(std::vector &subgraph_nr) const; bool is_dag() const { @@ -290,7 +290,7 @@ class grapht } }; - void tarjan(class tarjant &t, node_indext v); + void tarjan(class tarjant &t, node_indext v) const; void shortest_path( node_indext src, @@ -515,7 +515,7 @@ std::size_t grapht::connected_subgraphs( } template -void grapht::tarjan(tarjant &t, node_indext v) +void grapht::tarjan(tarjant &t, node_indext v) const { t.scc_stack.push(v); t.in_scc[v]=true; @@ -559,7 +559,7 @@ void grapht::tarjan(tarjant &t, node_indext v) } template -std::size_t grapht::SCCs(std::vector &subgraph_nr) +std::size_t grapht::SCCs(std::vector &subgraph_nr) const { tarjant t(nodes.size(), subgraph_nr);