pair<intT*,intT> st(edgeArray<intT> G){ intT m = G.nonZeros; intT n = G.numRows; unionFind UF(n); reservation *R = new reservation[n]; intT l = (4*n)/3; unionFindStep<intT> UFStep(G.E, UF, R); speculative_for(UFStep, 0, m, 100); _seq<intT> stIdx = sequence::filter((intT*) R, n, notMax()); cout << "Tree size = " << stIdx.n << endl; UF.del(); delete[] R; return pair<intT*,intT>(stIdx.A, stIdx.n); }
pair<int*,int> st(edgeArray G){ int m = G.nonZeros; int n = G.numRows; unionFind UF(n); int *R = newArray(n, INT_MAX); int l = (4*n)/3; unionFindStep UFStep(G.E, UF, R); speculative_for(UFStep, 0, l, 80 ); speculative_for(UFStep, l, m, 40); _seq<int> stIdx = sequence::filter(R, n, notMax()); cout << "Tree size = " << stIdx.n << endl; UF.del(); delete[] R; return pair<int*,int>(stIdx.A, stIdx.n); }