public static class APSP.APSPInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.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.
|
org.graphstream.graph.Node |
source
The start node name.
|
java.util.HashMap<java.lang.String,APSP.TargetPath> |
targets
Shortest paths toward all other accessible nodes.
|
Constructor and Description |
---|
APSPInfo(org.graphstream.graph.Node node,
java.lang.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 |
---|---|
double |
getLengthTo(java.lang.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.
|
java.lang.String |
getNodeId()
The node represented by this APSP information.
|
org.graphstream.graph.Path |
getShortestPathTo(java.lang.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 java.lang.String ATTRIBUTE_NAME
public org.graphstream.graph.Node source
public double maxLength
public double minLength
public java.util.HashMap<java.lang.String,APSP.TargetPath> targets
public APSPInfo(org.graphstream.graph.Node node, java.lang.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 java.lang.String getNodeId()
public double getLengthTo(java.lang.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 org.graphstream.graph.Path getShortestPathTo(java.lang.String other)