Module org.maxicp

Interface GraphUtil.Graph

Enclosing class:
GraphUtil

public static interface GraphUtil.Graph
Directed graph API
  • Method Summary

    Modifier and Type
    Method
    Description
    in(int id)
    Returns the incoming node indexes in the specified node
    int
    n()
    Returns the number of nodes in this graph.
    out(int id)
    Returns the outgoing node indexes from the specified node
  • Method Details

    • n

      int n()
      Returns the number of nodes in this graph.
      Returns:
      the number of nodes in this graph. Nodes are identified from 0 to n()-1.
    • in

      Iterable<Integer> in(int id)
      Returns the incoming node indexes in the specified node
      Parameters:
      id - the identifier of the specified node
      Returns:
      the identifiers of the nodes pointing to the specified node
    • out

      Iterable<Integer> out(int id)
      Returns the outgoing node indexes from the specified node
      Parameters:
      id - the identifier of the specified node
      Returns:
      the identifiers of the nodes originating from the specified node