# mpi4py.MPI.Graphcomm

class mpi4py.MPI.Graphcomm

  Bases: `Topocomm`

  General graph topology intracommunicator.

  static __new__(cls, comm=None)
    Parameters:

      comm (Graphcomm | None)

    Return type:

      Self

  Methods Summary

  `Get_dims`() | Return the number of nodes and edges.
  `Get_neighbors`(rank) | Return list of neighbors of a process.
  `Get_neighbors_count`(rank) | Return number of neighbors of a process.
  `Get_topo`() | Return index and edges.

  Attributes Summary

  `dims` | Number of nodes and edges.
  `edges` | Edges.
  `index` | Index.
  `nedges` | Number of edges.
  `neighbors` | Neighbors.
  `nneighbors` | Number of neighbors.
  `nnodes` | Number of nodes.
  `topo` | Topology information.

  Methods Documentation

  Get_dims()

    Return the number of nodes and edges.

    Return type:

      tuple[int, int]

  Get_neighbors(rank)

    Return list of neighbors of a process.

    Parameters:

      rank (int)

    Return type:

      list[int]

  Get_neighbors_count(rank)

    Return number of neighbors of a process.

    Parameters:

      rank (int)

    Return type:

      int

  Get_topo()

    Return index and edges.

    Return type:

      tuple[list[int], list[int]]

  Attributes Documentation

  dims

    Number of nodes and edges.

  edges

    Edges.

  index

    Index.

  nedges

    Number of edges.

  neighbors

    Neighbors.

  nneighbors

    Number of neighbors.

  nnodes

    Number of nodes.

  topo

    Topology information.