Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/util/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class grapht
std::vector<node_indext> &subgraph_nr);

// return value: number of SCCs
std::size_t SCCs(std::vector<node_indext> &subgraph_nr);
std::size_t SCCs(std::vector<node_indext> &subgraph_nr) const;

bool is_dag() const
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -515,7 +515,7 @@ std::size_t grapht<N>::connected_subgraphs(
}

template<class N>
void grapht<N>::tarjan(tarjant &t, node_indext v)
void grapht<N>::tarjan(tarjant &t, node_indext v) const
{
t.scc_stack.push(v);
t.in_scc[v]=true;
Expand Down Expand Up @@ -559,7 +559,7 @@ void grapht<N>::tarjan(tarjant &t, node_indext v)
}

template<class N>
std::size_t grapht<N>::SCCs(std::vector<node_indext> &subgraph_nr)
std::size_t grapht<N>::SCCs(std::vector<node_indext> &subgraph_nr) const
{
tarjant t(nodes.size(), subgraph_nr);

Expand Down