Package mpi

## Class GraphComm

- java.lang.Object
- - mpi.Comm
  - - mpi.Intracomm
    - - mpi.GraphComm

- All Implemented Interfaces:
    `java.lang.Cloneable`, `Freeable`

      public final class GraphComm
      extends Intracomm

  Communicator with graph structure.

- - ### Field Summary

    - ### Fields inherited from class mpi.Comm

      `handle, SELF, TYPE_SHARED, WORLD`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `GraphComm​(long handle)` |
    `protected` | `GraphComm​(long[] commRequest)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `GraphComm` | `clone()` | Duplicates this communicator.
    `GraphComm` | `dup()` | Duplicates this communicator.
    `GraphComm` | `dupWithInfo​(Info info)` | Duplicates this communicator with the info object used in the call.
    `GraphParms` | `getDims()` | Returns graph topology information.
    `DistGraphNeighbors` | `getDistGraphNeighbors()` | Gets the adjacency information for a distributed graph topology.
    `int[]` | `getNeighbors​(int rank)` | Provides adjacency information for general graph topology.
    `GraphComm` | `iDup()` | Duplicates this communicator.
    `int` | `map​(int[] index, int[] edges)` | Compute an optimal placement.

    - ### Methods inherited from class mpi.Intracomm

      `accept, accept, closePort, connect, connect, create, createCart, createDistGraph, createDistGraph, createDistGraphAdjacent, createDistGraphAdjacent, createGraph, createGroup, exScan, exScan, iExScan, iExScan, iScan, iScan, lookupName, lookupName, openPort, openPort, publishName, publishName, scan, scan, spawn, spawnMultiple, split, splitType, unpublishName, unpublishName`

    - ### Methods inherited from class mpi.Comm

      `abort, allGather, allGather, allGatherv, allGatherv, allReduce, allReduce, allToAll, allToAllv, allToAllw, barrier, bcast, bSend, bSendInit, callErrhandler, compare, createIntercomm, createKeyval, deleteAttr, disconnect, dup, dupWithInfo, free, freeKeyval, gather, gather, gatherv, gatherv, gatherv, getAttr, getErrhandler, getGroup, getInfo, getName, getRank, getRequest, getSize, getTopology, iAllGather, iAllGather, iAllGatherv, iAllGatherv, iAllReduce, iAllReduce, iAllToAll, iAllToAllv, iAllToAllw, iBarrier, iBcast, ibSend, iDup, iGather, iGather, iGatherv, iGatherv, iGatherv, iNeighborAllGather, iNeighborAllGatherv, iNeighborAllToAll, iNeighborAllToAllv, iProbe, iRecv, iReduce, iReduce, iReduceScatter, iReduceScatter, iReduceScatterBlock, iReduceScatterBlock, irSend, iScatter, iScatter, iScatterv, iScatterv, iScatterv, iSend, isInter, isNull, isSend, neighborAllGather, neighborAllGatherv, neighborAllToAll, neighborAllToAllv, pack, packSize, probe, recv, recvInit, reduce, reduce, reduceLocal, reduceScatter, reduceScatter, reduceScatterBlock, reduceScatterBlock, rSend, rSendInit, scatter, scatter, scatterv, scatterv, scatterv, send, sendInit, sendRecv, sendRecvReplace, setAttr, setErrhandler, setInfo, setName, setType, sSend, sSendInit, unpack`

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

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

- - ### Constructor Detail

    - #### GraphComm

          protected GraphComm​(long handle)
                       throws MPIException

      Throws:
        `MPIException`

    - #### GraphComm

          protected GraphComm​(long[] commRequest)

  - ### Method Detail

    - #### clone

          public GraphComm clone()

      Duplicates this communicator.

      Java binding of `MPI_COMM_DUP`.

      It is recommended to use `dup()` instead of `clone()` because the last can't throw an `MPIException`.

      Overrides:
        `clone` in class `Intracomm`
      Returns:
        copy of this communicator

    - #### dup

          public GraphComm dup()
                        throws MPIException

      Duplicates this communicator.

      Java binding of `MPI_COMM_DUP`.

      Overrides:
        `dup` in class `Intracomm`
      Returns:
        copy of this communicator
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### iDup

          public GraphComm iDup()
                         throws MPIException

      Duplicates this communicator.

      The new communicator can't be used before the operation completes. The request object must be obtained calling `Comm.getRequest()`.

      Java binding of `MPI_COMM_IDUP`.

      Overrides:
        `iDup` in class `Intracomm`
      Returns:
        copy of this communicator
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### dupWithInfo

          public GraphComm dupWithInfo​(Info info)
                                throws MPIException

      Duplicates this communicator with the info object used in the call.

      Java binding of `MPI_COMM_DUP_WITH_INFO`.

      Overrides:
        `dupWithInfo` in class `Intracomm`
      Parameters:
        `info` - info object to associate with the new communicator
      Returns:
        copy of this communicator
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### getDims

          public GraphParms getDims()
                             throws MPIException

      Returns graph topology information.

      Java binding of the MPI operations `MPI_GRAPHDIMS_GET` and `MPI_GRAPH_GET`.

      The number of nodes and number of edges can be extracted from the sizes of the `index` and `edges` fields of the returned object.

      Returns:
        object defining node degress and edges of graph
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### getNeighbors

          public int[] getNeighbors​(int rank)
                             throws MPIException

      Provides adjacency information for general graph topology.

      Java binding of the MPI operations `MPI_GRAPH_NEIGHBORS_COUNT` and `MPI_GRAPH_NEIGHBORS`.

      The number of neighbors can be extracted from the size of the result.

      Parameters:
        `rank` - rank of a process in the group of this communicator
      Returns:
        array of ranks of neighbouring processes to one specified
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### getDistGraphNeighbors

          public DistGraphNeighbors getDistGraphNeighbors()
                                                   throws MPIException

      Gets the adjacency information for a distributed graph topology.
      Returns:
        adjacency information for a distributed graph topology
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.

    - #### map

          public int map​(int[] index,
                         int[] edges)
                  throws MPIException

      Compute an optimal placement.

      Java binding of the MPI operation `MPI_GRAPH_MAP`.

      The number of nodes is taken to be size of the `index` argument.

      Parameters:
        `index` - node degrees
        `edges` - graph edges
      Returns:
        reordered rank of calling process
      Throws:
        `MPIException` - Signals that an MPI exception of some sort has occurred.