Package mpi

Class GraphParms

java.lang.Object
mpi.GraphParms

public final class GraphParms extends Object
Graph topology information associated with a communicator.
  • 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 node i.

      getIndex(0) returns the degree of the node 0, and getIndex(i)-getIndex(i-1) is the degree of the node i.

      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 edge i.

      The list of neighbors of node zero is stored in getEdge(j), for 0jgetIndex(0)-1 and the list of neighbors of node i, i > 0, is stored in getEdge(j), getIndex(i-1)jgetIndex(i)-1.

      Parameters:
      i - index of the edge.
      Returns:
      the edge.