Class APSP.TargetPath

java.lang.Object
org.graphstream.algorithm.APSP.TargetPath
Enclosing class:
APSP

public static class APSP.TargetPath
extends Object
Description of a path to a target node.

This class is made to be used by the APSPInfo class, which references a source node. This class describes a target node, the length of the shortest path to it and, if the path is made of more than only one edge, an intermediary node (pass-by), used to reconstruct recursively the shortest path.

This representation avoids to store each node of each shortest path, since this would consume a too large memory area. This way, a shortest path is stored at constant size (this is possible since we computed all the shortest paths and, knowing that a path of more than one edge is always made of the sum of two shortest paths, and knowing only one "pass-by" node in the shortest path, it is possible to rebuild it).

  • Field Details

    • target

      public org.graphstream.graph.Node target
      A distant other node.
    • distance

      public double distance
      The distance to this other node.
    • passBy

      public APSP.APSPInfo passBy
      An intermediary other node on the minimum path to the other node. Used to reconstruct the path between two nodes.
  • Constructor Details