Package mpi
Class GraphParms
java.lang.Object
mpi.GraphParms
Graph topology information associated with a communicator.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GraphParms
(int[] index, int[] edges) Constructs a graph topology information object. -
Method Summary
-
Constructor Details
-
GraphParms
protected GraphParms(int[] index, int[] edges) Constructs a graph topology information object.- Parameters:
index
- node degrees.edges
- graph edges.
-
-
Method Details
-
getIndexCount
public int getIndexCount()Returns the number of nodes.- Returns:
- number of nodes.
-
getIndex
public int getIndex(int i) Returns the index of the nodei
.getIndex(0)
returns the degree of the node0
, andgetIndex(i)-getIndex(i-1)
is the degree of the nodei
.- Parameters:
i
- position of the node.- Returns:
- the index.
-
getEdgeCount
public int getEdgeCount()Returns the number of edges.- Returns:
- number of edges.
-
getEdge
public int getEdge(int i) Returns the edgei
.The list of neighbors of node zero is stored in
getEdge(j)
, for0
≤j
≤getIndex(0)-1
and the list of neighbors of nodei
,i
>0
, is stored ingetEdge(j)
,getIndex(i-1)
≤j
≤getIndex(i)-1
.- Parameters:
i
- index of the edge.- Returns:
- the edge.
-