Package mpi

# Class DistGraphNeighbors

java.lang.Object
mpi.DistGraphNeighbors

public final class DistGraphNeighbors extends Object
Adjacency information for a distributed graph topology.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`DistGraphNeighbors(int[] sources, int[] sourceWeights, int[] destinations, int[] destWeights, boolean weighted)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getDestination(int i)`
Gets a process for which the calling process is a source
`int`
`getDestinationWeight(int i)`
Gets the weight of an edge out of the calling process.
`int`
`getInDegree()`
Gets the number of edges into this process.
`int`
`getOutDegree()`
Gets the number of edges out of this process.
`int`
`getSource(int i)`
Gets a process for which the calling processs is a destination.
`int`
`getSourceWeight(int i)`
Gets the weight of an edge into the calling process.
`boolean`
`isWeighted()`
Returns false if `MPI_UNWEIGHTED` was supplied during creation.

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

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

## Constructor Details

### DistGraphNeighbors

protected DistGraphNeighbors(int[] sources, int[] sourceWeights, int[] destinations, int[] destWeights, boolean weighted)

## Method Details

### getInDegree

public int getInDegree()
Gets the number of edges into this process.

Returns:
  number of edges into this process

### getOutDegree

public int getOutDegree()
Gets the number of edges out of this process.

Returns:
  number of edges out of this process

### isWeighted

public boolean isWeighted()
Returns false if `MPI_UNWEIGHTED` was supplied during creation.

Returns:
  false if `MPI_UNWEIGHTED` was supplied, true otherwise

### getSource

public int getSource(int i)
Gets a process for which the calling processs is a destination.

Parameters:
  `i` - source index
Returns:
  process for which the calling processs is a destination

### getSourceWeight

public int getSourceWeight(int i)
Gets the weight of an edge into the calling process.

Parameters:
  `i` - source index
Returns:
  weight of the edge into the calling process

### getDestination

public int getDestination(int i)
Gets a process for which the calling process is a source

Parameters:
  `i` - destination index
Returns:
  process for which the calling process is a source

### getDestinationWeight

public int getDestinationWeight(int i)
Gets the weight of an edge out of the calling process.

Parameters:
  `i` - destination index
Returns:
  weight of an edge out of the calling process