public static class APSP.APSPInfo extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_NAME |
double |
maxLength
Maximum number of hops to attain another node in the graph from the
"from" node.
|
double |
minLength
Minimum number of hops to attain another node in the graph from the
"from" node.
|
Node |
source
The start node name.
|
HashMap<String,APSP.TargetPath> |
targets
Shortest paths toward all other accessible nodes.
|
Constructor and Description |
---|
APSPInfo(Node node,
String weightAttributeName,
boolean directed)
Create the new information and put in it all the paths between this
node and all its direct neighbours.
|
Modifier and Type | Method and Description |
---|---|
protected int |
expandPath(int pos,
APSP.APSPInfo source,
APSP.TargetPath path,
ArrayList<Node> nodePath) |
double |
getLengthTo(String other)
Minimum distance between this node and another.
|
double |
getMaximumLength()
The maximum distance between this node and another.
|
double |
getMinimumLength()
The minimum distance between this node and another.
|
String |
getNodeId()
The node represented by this APSP information.
|
Path |
getShortestPathTo(String other) |
void |
setLengthTo(APSP.APSPInfo other,
double length,
APSP.APSPInfo passBy)
Add or change the length between this node and another and update the
minimum and maximum lengths seen so far.
|
public static final String ATTRIBUTE_NAME
public double maxLength
public double minLength
public HashMap<String,APSP.TargetPath> targets
public APSPInfo(Node node, String weightAttributeName, boolean directed)
node
- The node to start from.weightAttributeName
- The key used to retrieve the weight attributes of edges.
This attribute but store a value that inherit Number.directed
- If false, the edge orientation is not taken into account.public String getNodeId()
public double getLengthTo(String other)
other
- The other node identifier.public double getMinimumLength()
public double getMaximumLength()
public void setLengthTo(APSP.APSPInfo other, double length, APSP.APSPInfo passBy)
other
- The other node APSP info.length
- The new minimum path lengths between these nodes.public Path getShortestPathTo(String other)
protected int expandPath(int pos, APSP.APSPInfo source, APSP.TargetPath path, ArrayList<Node> nodePath)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses