Package mpi

# Class GraphParms

java.lang.Object
mpi.GraphParms

public final class GraphParms extends 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

Modifier and Type
Method
Description
`int`
`getEdge(int i)`
Returns the edge `i`.
`int`
`getEdgeCount()`
Returns the number of edges.
`int`
`getIndex(int i)`
Returns the index of the node `i`.
`int`
`getIndexCount()`
Returns the number of nodes.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 `0` ≤ `j` ≤ `getIndex(0)-1` and the list of neighbors of node `i`, `i` > `0`, is stored in `getEdge(j)`, `getIndex(i-1)` ≤ `j` ≤ `getIndex(i)-1`.

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