Check-in [1c5fa6584e]
Not logged in
Overview
SHA1 Hash:1c5fa6584ef0f616feaea43d49a3cc32c9b49f83
Date: 2015-11-27 12:35:23
User: kinaba
Comment:scc potential bug fix.
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified lib/graph/scc.cpp from [b0ca04383cc7283f] to [e473bfcfb4e00b16].

42 if( max(s,t) >= G.size() ) G.resize(max(s,t)+1); 42 if( max(s,t) >= G.size() ) G.resize(max(s,t)+1); 43 G[s].push_back(t); 43 G[s].push_back(t); 44 } 44 } 45 45 46 void scc() 46 void scc() 47 { 47 { 48 int N = G.size(); 48 int N = G.size(); > 49 no = 0; // whatever small enough 49 dfs_no.assign(N, 0); 50 dfs_no.assign(N, 0); 50 dfs_lo.assign(N, 0); 51 dfs_lo.assign(N, 0); 51 pending = stack<int>(); 52 pending = stack<int>(); 52 scc_id.assign(N, -1); 53 scc_id.assign(N, -1); 53 scc_list.clear(); 54 scc_list.clear(); 54 scc_children.clear(); 55 scc_children.clear(); 55 for(int v=0; v<N; ++v) 56 for(int v=0; v<N; ++v)