Package oracle.spatial.network.lod
Class BidirectionalBfs
- java.lang.Object
-
- oracle.spatial.network.lod.BidirectionalBfs
-
- All Implemented Interfaces:
ShortestPath
- Direct Known Subclasses:
BidirectionalDijkstra
public class BidirectionalBfs extends java.lang.Object implements ShortestPath
- Since:
- release specific (what release of product did this appear in)
-
-
Field Summary
Fields Modifier and Type Field Description protected doublebestCostprotected LogicalSubPathbestPathprotected BreadthFirstSearchbsprotected BreadthFirstSearchfs
-
Constructor Summary
Constructors Modifier Constructor Description protectedBidirectionalBfs()BidirectionalBfs(BreadthFirstSearch forwardBfs, BreadthFirstSearch backwardBfs)BidirectionalBfs(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, LinkLevelSelector forwardLinkLevelSelector, LinkLevelSelector backwardLinkLevelSelector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShortestPathclone()LinkCostCalculator[]getLinkCostCalculators()Returns the link cost calculators.LinkLevelSelectorgetLinkLevelSelector()Returns the link level selector.NodeCostCalculator[]getNodeCostCalculators()Returns the node cost calculators.voidsetInitialAnalysisInfo(LODAnalysisInfo analysisInfo)Sets the initial analysis info.voidsetLinkCostCalculators(LinkCostCalculator[] lccs)Sets the link cost calculators.voidsetLinkLevelSelector(LinkLevelSelector lls)Sets the link level selector.voidsetNetworkAnalyst(NetworkAnalyst analyst)This method allows caller to pass the network analyst object to this shortest path 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.voidsetNodeCostCalculators(NodeCostCalculator[] nccs)Sets the node cost calculators.LogicalSubPathshortestPath(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, int direction)Returns the shortest path between a set of candidate start points and a set of end points.
-
-
-
Field Detail
-
fs
protected BreadthFirstSearch fs
-
bs
protected BreadthFirstSearch bs
-
bestPath
protected LogicalSubPath bestPath
-
bestCost
protected double bestCost
-
-
Constructor Detail
-
BidirectionalBfs
protected BidirectionalBfs()
-
BidirectionalBfs
public BidirectionalBfs(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, LinkLevelSelector forwardLinkLevelSelector, LinkLevelSelector backwardLinkLevelSelector)
-
BidirectionalBfs
public BidirectionalBfs(BreadthFirstSearch forwardBfs, BreadthFirstSearch backwardBfs)
-
-
Method Detail
-
shortestPath
public LogicalSubPath shortestPath(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, int direction) throws LODNetworkException
Description copied from interface:ShortestPathReturns the shortest path between a set of candidate start points and a set of end points.- Specified by:
shortestPathin interfaceShortestPath- Parameters:
startPoints- start candidatesendPoints- end candidatesconstraint- network constraintdirection- NetworkExplorer.DIRECTION_FORWARD or NetworkExplorer.DIRECTION_BACKWARD- Returns:
- Throws:
LODNetworkException
-
setInitialAnalysisInfo
public void setInitialAnalysisInfo(LODAnalysisInfo analysisInfo)
Description copied from interface:ShortestPathSets the initial analysis info. This method allows analysis info to be passed to subsequent analysis.- Specified by:
setInitialAnalysisInfoin interfaceShortestPath- Parameters:
analysisInfo- analysis information
-
getLinkLevelSelector
public LinkLevelSelector getLinkLevelSelector()
Description copied from interface:ShortestPathReturns the link level selector.- Specified by:
getLinkLevelSelectorin interfaceShortestPath- Returns:
-
setLinkLevelSelector
public void setLinkLevelSelector(LinkLevelSelector lls)
Description copied from interface:ShortestPathSets the link level selector.- Specified by:
setLinkLevelSelectorin interfaceShortestPath- Parameters:
lls- link level selector
-
getLinkCostCalculators
public LinkCostCalculator[] getLinkCostCalculators()
Description copied from interface:ShortestPathReturns the link cost calculators.- Specified by:
getLinkCostCalculatorsin interfaceShortestPath- Returns:
-
setLinkCostCalculators
public void setLinkCostCalculators(LinkCostCalculator[] lccs)
Description copied from interface:ShortestPathSets the link cost calculators.- Specified by:
setLinkCostCalculatorsin interfaceShortestPath
-
getNodeCostCalculators
public NodeCostCalculator[] getNodeCostCalculators()
Description copied from interface:ShortestPathReturns the node cost calculators.- Specified by:
getNodeCostCalculatorsin interfaceShortestPath- Returns:
-
setNodeCostCalculators
public void setNodeCostCalculators(NodeCostCalculator[] nccs)
Description copied from interface:ShortestPathSets the node cost calculators.- Specified by:
setNodeCostCalculatorsin interfaceShortestPath
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:ShortestPathThis method allows caller to pass the network analyst object to this shortest path 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:
setNetworkAnalystin interfaceShortestPath
-
clone
public ShortestPath clone()
- Specified by:
clonein interfaceShortestPath- Overrides:
clonein classjava.lang.Object
-
-