public static class APSP.TargetPath extends Object
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).
Modifier and Type | Field and Description |
---|---|
double |
distance
The distance to this other node.
|
APSP.APSPInfo |
passBy
An intermediary other node on the minimum path to the other node.
|
Node |
target
A distant other node.
|
Constructor and Description |
---|
TargetPath(Node other,
double distance,
APSP.APSPInfo passBy) |
public double distance
public APSP.APSPInfo passBy
public TargetPath(Node other, double distance, APSP.APSPInfo passBy)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses