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 double
bestCost
protected LogicalSubPath
bestPath
protected BreadthFirstSearch
bs
protected BreadthFirstSearch
fs
-
Constructor Summary
Constructors Modifier Constructor Description protected
BidirectionalBfs()
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 ShortestPath
clone()
LinkCostCalculator[]
getLinkCostCalculators()
Returns the link cost calculators.LinkLevelSelector
getLinkLevelSelector()
Returns the link level selector.NodeCostCalculator[]
getNodeCostCalculators()
Returns the node cost calculators.void
setInitialAnalysisInfo(LODAnalysisInfo analysisInfo)
Sets the initial analysis info.void
setLinkCostCalculators(LinkCostCalculator[] lccs)
Sets the link cost calculators.void
setLinkLevelSelector(LinkLevelSelector lls)
Sets the link level selector.void
setNetworkAnalyst(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.void
setNodeCostCalculators(NodeCostCalculator[] nccs)
Sets the node cost calculators.LogicalSubPath
shortestPath(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:ShortestPath
Returns the shortest path between a set of candidate start points and a set of end points.- Specified by:
shortestPath
in 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:ShortestPath
Sets the initial analysis info. This method allows analysis info to be passed to subsequent analysis.- Specified by:
setInitialAnalysisInfo
in interfaceShortestPath
- Parameters:
analysisInfo
- analysis information
-
getLinkLevelSelector
public LinkLevelSelector getLinkLevelSelector()
Description copied from interface:ShortestPath
Returns the link level selector.- Specified by:
getLinkLevelSelector
in interfaceShortestPath
- Returns:
-
setLinkLevelSelector
public void setLinkLevelSelector(LinkLevelSelector lls)
Description copied from interface:ShortestPath
Sets the link level selector.- Specified by:
setLinkLevelSelector
in interfaceShortestPath
- Parameters:
lls
- link level selector
-
getLinkCostCalculators
public LinkCostCalculator[] getLinkCostCalculators()
Description copied from interface:ShortestPath
Returns the link cost calculators.- Specified by:
getLinkCostCalculators
in interfaceShortestPath
- Returns:
-
setLinkCostCalculators
public void setLinkCostCalculators(LinkCostCalculator[] lccs)
Description copied from interface:ShortestPath
Sets the link cost calculators.- Specified by:
setLinkCostCalculators
in interfaceShortestPath
-
getNodeCostCalculators
public NodeCostCalculator[] getNodeCostCalculators()
Description copied from interface:ShortestPath
Returns the node cost calculators.- Specified by:
getNodeCostCalculators
in interfaceShortestPath
- Returns:
-
setNodeCostCalculators
public void setNodeCostCalculators(NodeCostCalculator[] nccs)
Description copied from interface:ShortestPath
Sets the node cost calculators.- Specified by:
setNodeCostCalculators
in interfaceShortestPath
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:ShortestPath
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. 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 interfaceShortestPath
-
clone
public ShortestPath clone()
- Specified by:
clone
in interfaceShortestPath
- Overrides:
clone
in classjava.lang.Object
-
-