Differences From Artifact [b0ca04383cc7283f]:
- File
lib/graph/scc.cpp
- 2012-09-08 04:01:47 - part of checkin [109f2a9050] on branch trunk - 555 (user: kinaba) [annotate]
To Artifact [e473bfcfb4e00b16]:
- File
lib/graph/scc.cpp
- 2015-11-27 12:35:23 - part of checkin [1c5fa6584e] on branch trunk - scc potential bug fix. (user: kinaba) [annotate]
42 42 if( max(s,t) >= G.size() ) G.resize(max(s,t)+1);
43 43 G[s].push_back(t);
44 44 }
45 45
46 46 void scc()
47 47 {
48 48 int N = G.size();
49 + no = 0; // whatever small enough
49 50 dfs_no.assign(N, 0);
50 51 dfs_lo.assign(N, 0);
51 52 pending = stack<int>();
52 53 scc_id.assign(N, -1);
53 54 scc_list.clear();
54 55 scc_children.clear();
55 56 for(int v=0; v<N; ++v)