Class Graphs.FrozenGraph<V,E extends DefaultEdge>

java.lang.Object
org.apache.calcite.util.graph.Graphs.FrozenGraph<V,E>
Type Parameters:
V - Vertex type
E - Edge type
Enclosing class:
Graphs

public static class Graphs.FrozenGraph<V,E extends DefaultEdge> extends Object
Immutable grap.
  • Method Details

    • getPaths

      public List<List<V>> getPaths(V from, V to)
      Returns an iterator of all paths between two nodes, in non-decreasing order of path lengths.

      The current implementation is not optimal.

    • getShortestDistance

      public int getShortestDistance(V from, V to)
      Returns the shortest distance between two points, -1, if there is no path.
      Parameters:
      from - From
      to - To
      Returns:
      The shortest distance, -1, if there is no path.