From bdaf6dc251d98fc1c93165fa8579378204b395e1 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sat, 17 Sep 2016 18:58:56 -0600 Subject: chill doc --- chill/include/graph.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chill/include/graph.hh') diff --git a/chill/include/graph.hh b/chill/include/graph.hh index f8471df..b67183b 100644 --- a/chill/include/graph.hh +++ b/chill/include/graph.hh @@ -62,7 +62,11 @@ struct Graph { bool hasEdge(int v1, int v2) const; std::vector getEdge(int v1, int v2) const; + //! Topological sort + /*! This topological sort does handle SCC in graph. */ std::vector > topoSort() const; + //! Topological sort + /*! This topological sort does not handle SCC in graph. */ std::vector > packed_topoSort() const; void dump() { @@ -76,7 +80,6 @@ template std::ostream& operator<<(std::ostream &os, const Graph &g) { for (int i = 0; i < g.vertex.size(); i++) for (typename Graph::EdgeList::const_iterator j = g.vertex[i].second.begin(); j != g.vertex[i].second.end(); j++) { - // os << i+1 << "->" << j->first+1 << ":"; os << "s" << i << "->" << "s" << j->first << ":"; for (typename std::vector::const_iterator k = j->second.begin(); k != j->second.end(); k++) os << " " << *k; @@ -175,7 +178,6 @@ std::vector Graph::getEdge(int v1, int v2) const return vertex[v1].second.find(v2)->second; } -// This topological sort does handle SCC in graph. template std::vector > Graph::topoSort() const { const int n = vertex.size(); @@ -250,7 +252,6 @@ std::vector > Graph::topoSort() const { return result; } -// This topological sort does not handle SCC in graph. template std::vector > Graph::packed_topoSort() const { const int n = vertex.size(); -- cgit v1.2.3-70-g09d2