79 const Adapter &ia,
const Teuchos::Comm<int> &comm) :
80 nComponent(0), maxComponentSize(0), minComponentSize(0),
84 std::bitset<NUM_MODEL_FLAGS> graphFlags;
89 Teuchos::RCP<const Teuchos::Comm<int> > tcomm = rcp(&comm,
false);
90 Teuchos::RCP<const Zoltan2::Environment> env =
93 typedef typename Adapter::base_adapter_t base_adapter_t;
94 Teuchos::RCP<const base_adapter_t> ria = rcp(&ia,
false);
99 ArrayView<const gno_t> adj;
100 ArrayView<const offset_t> offset;
101 ArrayView<StridedData<lno_t, scalar_t> > wgts;
106 size_t nUnmarkedVtx = nVtx;
107 bool *mark =
new bool[nUnmarkedVtx];
108 for (
size_t i = 0; i < nUnmarkedVtx; i++) mark[i] =
false;
114 while (nUnmarkedVtx > 0) {
121 while (mark[startVtx]) startVtx++;
122 markAndEnqueue(q, mark, nUnmarkedVtx, cSize, startVtx);
125 gno_t vtx = q.front();
129 for (
offset_t j = offset[vtx]; j < offset[vtx+1]; j++) {
131 markAndEnqueue(q, mark, nUnmarkedVtx, cSize, adj[j]);
137 if (nComponent == 1) {
138 maxComponentSize = cSize;
139 minComponentSize = cSize;
142 if (cSize > maxComponentSize) maxComponentSize = cSize;
143 if (cSize < minComponentSize) minComponentSize = cSize;
148 if (nComponent) avgComponentSize = double(nVtx) / double(nComponent);
size_t getEdgeList(ArrayView< const gno_t > &edgeIds, ArrayView< const offset_t > &offsets, ArrayView< input_t > &wgts) const
Sets pointers to this process' edge (neighbor) global Ids, including off-process edges.