public static int getNetworkConnectionCount(GXLGraph cArch) { int count = 0; for (int y = 0; y < cArch.getGraphElementCount(); ++y) { if (cArch.getGraphElementAt(y) instanceof GXLEdge) ++count; } return count; }
// This this needs this loop, because the network edges are attached // to the cArch rather than the mArch public static int getMachinesCount(GXLGraph cArch) { int count = 0; for (int y = 0; y < cArch.getGraphElementCount(); ++y) { if (cArch.getGraphElementAt(y) instanceof GXLNode) ++count; } return count; }
public static GXLEdge getLogicalProcessorConnectionAt(GXLGraph e, int y) { int all = e.getGraphElementCount(); int lcount = 0; for (int r = 0; r < all; ++r) { if (e.getGraphElementAt(r) instanceof GXLNode) ++lcount; } return (GXLEdge) e.getGraphElementAt(lcount + y); }
public static int getLogicalProcessorCount(GXLGraph e) { int all = e.getGraphElementCount(); int lcount = 0; for (int r = 0; r < all; ++r) { if (e.getGraphElementAt(r) instanceof GXLNode) ++lcount; } return lcount; }
public static int getClusterCount(GXLGraph graph) { return graph.getGraphElementCount(); }