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.VirtualPoint
that 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 boolean
equals(Object obj)
RoadSegment
getArrivalConnection()
Replies the connection to reach the node.double
getCost()
Replies the cost to reach the node.double
getEstimatedCost()
Replies the cost from the node to the target point.RoadConnection
getGraphPoint()
Replies the graph point associated to this AStarNode.Iterable<RoadSegment>
getGraphSegments()
Replies the segments which are traversable from this node.double
getPathCost()
Replies the cost of the overall path.AStarNode<RoadSegment,RoadConnection>
getVirtualizedCandidate()
Replies the virtualized candidate.int
hashCode()
RoadSegment
setArrivalConnection(RoadSegment connection)
Set the connection to reach the node.double
setCost(double cost)
Set the cost to reach the node.double
setEstimatedCost(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:AStarNode
Replies the graph point associated to this AStarNode.- Specified by:
getGraphPoint
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the graph point associated to this AStarNode.
-
getGraphSegments
public Iterable<RoadSegment> getGraphSegments()
Description copied from interface:AStarNode
Replies the segments which are traversable from this node.- Specified by:
getGraphSegments
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the traversable segments.
-
setArrivalConnection
public RoadSegment setArrivalConnection(RoadSegment connection)
Description copied from interface:AStarNode
Set the connection to reach the node.- Specified by:
setArrivalConnection
in interfaceAStarNode<RoadSegment,RoadConnection>
- Parameters:
connection
- is the new arrival connection.- Returns:
- the connection to reach the node, or
null
if none.
-
getArrivalConnection
public RoadSegment getArrivalConnection()
Description copied from interface:AStarNode
Replies the connection to reach the node.- Specified by:
getArrivalConnection
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the connection to reach the node, or
null
if none.
-
getCost
public double getCost()
Description copied from interface:AStarNode
Replies the cost to reach the node.- Specified by:
getCost
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the cost to reach the node.
-
setCost
public double setCost(double cost)
Description copied from interface:AStarNode
Set the cost to reach the node.- Specified by:
setCost
in interfaceAStarNode<RoadSegment,RoadConnection>
- Parameters:
cost
- is the new cost.- Returns:
- the cost to reach the node.
-
getEstimatedCost
public double getEstimatedCost()
Description copied from interface:AStarNode
Replies the cost from the node to the target point.- Specified by:
getEstimatedCost
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the cost from the node to the target point.
-
setEstimatedCost
public double setEstimatedCost(double cost)
Description copied from interface:AStarNode
Set the cost from the node to the target point.- Specified by:
setEstimatedCost
in 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:AStarNode
Replies the cost of the overall path. It is the sum ofAStarNode.getCost()
andAStarNode.getEstimatedCost()
.- Specified by:
getPathCost
in interfaceAStarNode<RoadSegment,RoadConnection>
- Returns:
- the cost of the path.
-
-