Module org.arakhne.afc.gis.gisroad
Class RoadAStar.VirtualCandidate
- java.lang.Object
-
- org.arakhne.afc.gis.road.path.astar.RoadAStar.VirtualCandidate
-
- All Implemented Interfaces:
AStarNode<RoadSegment,RoadConnection>
- Enclosing class:
- RoadAStar
class RoadAStar.VirtualCandidate extends Object implements AStarNode<RoadSegment,RoadConnection>
This is a graph point connected to aRoadAStar.VirtualPointthat is a valid candidate for the A* algorithm.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:55
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisroad
-
-
Constructor Summary
Constructors Constructor Description VirtualCandidate(RoadAStar.VirtualSegment segment, AStarNode<RoadSegment,RoadConnection> node)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)RoadSegmentgetArrivalConnection()Replies the connection to reach the node.doublegetCost()Replies the cost to reach the node.doublegetEstimatedCost()Replies the cost from the node to the target point.RoadConnectiongetGraphPoint()Replies the graph point associated to this AStarNode.Iterable<RoadSegment>getGraphSegments()Replies the segments which are traversable from this node.doublegetPathCost()Replies the cost of the overall path.AStarNode<RoadSegment,RoadConnection>getVirtualizedCandidate()Replies the virtualized candidate.inthashCode()RoadSegmentsetArrivalConnection(RoadSegment connection)Set the connection to reach the node.doublesetCost(double cost)Set the cost to reach the node.doublesetEstimatedCost(double cost)Set the cost from the node to the target point.
-
-
-
Constructor Detail
-
VirtualCandidate
VirtualCandidate(RoadAStar.VirtualSegment segment, AStarNode<RoadSegment,RoadConnection> node)
Constructor.- Parameters:
segment- a segment.node- a A* node.
-
-
Method Detail
-
getVirtualizedCandidate
public AStarNode<RoadSegment,RoadConnection> getVirtualizedCandidate()
Replies the virtualized candidate.- Returns:
- the virtualized candidate.
-
getGraphPoint
public RoadConnection getGraphPoint()
Description copied from interface:AStarNodeReplies the graph point associated to this AStarNode.- Specified by:
getGraphPointin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the graph point associated to this AStarNode.
-
getGraphSegments
public Iterable<RoadSegment> getGraphSegments()
Description copied from interface:AStarNodeReplies the segments which are traversable from this node.- Specified by:
getGraphSegmentsin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the traversable segments.
-
setArrivalConnection
public RoadSegment setArrivalConnection(RoadSegment connection)
Description copied from interface:AStarNodeSet the connection to reach the node.- Specified by:
setArrivalConnectionin interfaceAStarNode<RoadSegment,RoadConnection>- Parameters:
connection- is the new arrival connection.- Returns:
- the connection to reach the node, or
nullif none.
-
getArrivalConnection
public RoadSegment getArrivalConnection()
Description copied from interface:AStarNodeReplies the connection to reach the node.- Specified by:
getArrivalConnectionin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the connection to reach the node, or
nullif none.
-
getCost
public double getCost()
Description copied from interface:AStarNodeReplies the cost to reach the node.- Specified by:
getCostin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the cost to reach the node.
-
setCost
public double setCost(double cost)
Description copied from interface:AStarNodeSet the cost to reach the node.- Specified by:
setCostin interfaceAStarNode<RoadSegment,RoadConnection>- Parameters:
cost- is the new cost.- Returns:
- the cost to reach the node.
-
getEstimatedCost
public double getEstimatedCost()
Description copied from interface:AStarNodeReplies the cost from the node to the target point.- Specified by:
getEstimatedCostin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the cost from the node to the target point.
-
setEstimatedCost
public double setEstimatedCost(double cost)
Description copied from interface:AStarNodeSet the cost from the node to the target point.- Specified by:
setEstimatedCostin interfaceAStarNode<RoadSegment,RoadConnection>- Parameters:
cost- is the new estimated cost.- Returns:
- the cost from the node to the target point.
-
getPathCost
public double getPathCost()
Description copied from interface:AStarNodeReplies the cost of the overall path. It is the sum ofAStarNode.getCost()andAStarNode.getEstimatedCost().- Specified by:
getPathCostin interfaceAStarNode<RoadSegment,RoadConnection>- Returns:
- the cost of the path.
-
-