public class YenDeviation extends java.lang.Object implements KShortestPaths, XMLConfigurable
Constructor and Description |
---|
YenDeviation()
Default constructor.
|
YenDeviation(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getXMLSchema()
Returns the XML schema for the input parameter.
|
void |
init(org.w3c.dom.Element parameter)
Initializes the XML configurable object with the input parameter.
|
LogicalSubPath[] |
kShortestPaths(PointOnNet[] startPoints, PointOnNet[] endPoints, int k, LODNetworkConstraint constraint, int direction)
Returns the k shortest paths from the start point to the end point.
|
void |
setLinkLevelSelector(LinkLevelSelector lls)
Sets link level selector.
|
void |
setNetworkAnalyst(NetworkAnalyst analyst)
This method allows caller to pass the network analyst object to this k shortest paths algorithm implementation, so that the algorithm can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.
|
public YenDeviation()
public YenDeviation(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
public void setLinkLevelSelector(LinkLevelSelector lls)
KShortestPaths
setLinkLevelSelector
in interface KShortestPaths
lls
- link level selectorpublic LogicalSubPath[] kShortestPaths(PointOnNet[] startPoints, PointOnNet[] endPoints, int k, LODNetworkConstraint constraint, int direction) throws LODNetworkException
KShortestPaths
kShortestPaths
in interface KShortestPaths
startPoints
- candidate start pointsendPoints
- candidate end pointsk
- max number of paths to be returnedconstraint
- network constraintdirection
- NetworkExplorer.DIRECTION_FORWARD or NetworkExplorer.DIRECTION_BACKWARDLODNetworkException
public void setNetworkAnalyst(NetworkAnalyst analyst)
KShortestPaths
setNetworkAnalyst
in interface KShortestPaths
public void init(org.w3c.dom.Element parameter)
XMLConfigurable
init
in interface XMLConfigurable
parameter
- an XML element containing the necessary information to initialize the object.public java.lang.String getXMLSchema()
XMLConfigurable
getXMLSchema
in interface XMLConfigurable