Package mpi
Class GraphParms
- java.lang.Object
-
- mpi.GraphParms
-
public final class GraphParms extends java.lang.Object
Graph topology information associated with a communicator.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GraphParms(int[] index, int[] edges)
Constructs a graph topology information object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEdge(int i)
Returns the edgei
.int
getEdgeCount()
Returns the number of edges.int
getIndex(int i)
Returns the index of the nodei
.int
getIndexCount()
Returns the number of nodes.
-
-
-
Method Detail
-
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.
-
-