Class TLcdShortestRouteDistanceTable<N>
java.lang.Object
com.luciad.network.algorithm.routing.TLcdShortestRouteDistanceTable<N>
- All Implemented Interfaces:
ILcdShortestRouteDistanceTable<N>
public class TLcdShortestRouteDistanceTable<N>
extends Object
implements ILcdShortestRouteDistanceTable<N>
Default implementation of
ILcdShortestRouteDistanceTable.- Since:
- 5.1
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new, emptyTLcdShortestRouteDistanceTable. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a node to this distance table.final doublegetDistance(N aStartNode, N aEndNode) Returns the distance of the shortest route between the two given nodes in the direction indicated by their order.getNodes()Returns all nodes contained in this distance table.voidsetDistance(N aStartNode, N aEndNode, double aValue) Sets the distance of the shortest route between the given two nodes in the direction indicated by their order.
-
Constructor Details
-
TLcdShortestRouteDistanceTable
public TLcdShortestRouteDistanceTable()Constructs a new, emptyTLcdShortestRouteDistanceTable.
-
-
Method Details
-
addNode
Adds a node to this distance table.- Parameters:
aNode- the node to be added.- Throws:
IllegalArgumentException- if the node is already part of this distance table.NullPointerException- if the given node isnull.
-
getNodes
Description copied from interface:ILcdShortestRouteDistanceTableReturns all nodes contained in this distance table.- Specified by:
getNodesin interfaceILcdShortestRouteDistanceTable<N>- Returns:
- all nodes contained in this distance table.
-
setDistance
Sets the distance of the shortest route between the given two nodes in the direction indicated by their order.- Parameters:
aStartNode- the first node.aEndNode- the second node.aValue- the value to be associated with the route in that direction.- Throws:
NullPointerException- if one of the nodes isnull.IllegalArgumentException- if one of the nodes is not part of this graph.
-
getDistance
Description copied from interface:ILcdShortestRouteDistanceTableReturns the distance of the shortest route between the two given nodes in the direction indicated by their order. If no distance was set yet,Double.POSITIVE_INFINITYwill be returned.- Specified by:
getDistancein interfaceILcdShortestRouteDistanceTable<N>- Parameters:
aStartNode- the first node.aEndNode- the second node.- Returns:
- the value to be associated with the edge in that direction.
-