Package oracle.spatial.network.lod
Class YenDeviation
- java.lang.Object
-
- oracle.spatial.network.lod.YenDeviation
-
- All Implemented Interfaces:
KShortestPaths
,XMLConfigurable
public class YenDeviation extends java.lang.Object implements KShortestPaths, XMLConfigurable
This class implements Yen's Deviation Algorithm for finding the k shortest loopless paths. Reference: J.Y.Yen. Finding the k shortest loopless paths in a network. Management Science 17:712-716, 1971.- Since:
- 11gR2
-
-
Constructor Summary
Constructors Constructor Description YenDeviation()
Default constructor.YenDeviation(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int[]
getUserDataCategories(LODNetworkConstraint constraint)
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, PathFilter pathFilter, 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.
-
-
-
Constructor Detail
-
YenDeviation
public YenDeviation()
Default constructor. After this object is created using this default constructor, method init(Element) should be called to initialize it.
-
YenDeviation
public YenDeviation(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
-
-
Method Detail
-
setLinkLevelSelector
public void setLinkLevelSelector(LinkLevelSelector lls)
Description copied from interface:KShortestPaths
Sets link level selector.- Specified by:
setLinkLevelSelector
in interfaceKShortestPaths
- Parameters:
lls
- link level selector
-
getUserDataCategories
protected int[] getUserDataCategories(LODNetworkConstraint constraint)
-
kShortestPaths
public LogicalSubPath[] kShortestPaths(PointOnNet[] startPoints, PointOnNet[] endPoints, int k, LODNetworkConstraint constraint, PathFilter pathFilter, int direction) throws LODNetworkException
Description copied from interface:KShortestPaths
Returns the k shortest paths from the start point to the end point.- Specified by:
kShortestPaths
in interfaceKShortestPaths
- Parameters:
startPoints
- candidate start pointsendPoints
- candidate end pointsk
- max number of paths to be returnedconstraint
- network constraintdirection
- NetworkExplorer.DIRECTION_FORWARD or NetworkExplorer.DIRECTION_BACKWARD- Returns:
- Throws:
LODNetworkException
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:KShortestPaths
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. If network analyst is not needed by the shortest path algorithm, the algorithm can choose to do nothing with this method.- Specified by:
setNetworkAnalyst
in interfaceKShortestPaths
-
init
public void init(org.w3c.dom.Element parameter)
Description copied from interface:XMLConfigurable
Initializes the XML configurable object with the input parameter.- Specified by:
init
in interfaceXMLConfigurable
- Parameters:
parameter
- an XML element containing the necessary information to initialize the object.
-
getXMLSchema
public java.lang.String getXMLSchema()
Description copied from interface:XMLConfigurable
Returns the XML schema for the input parameter.- Specified by:
getXMLSchema
in interfaceXMLConfigurable
- Returns:
-
-