Package org.arakhne.afc.math.graph.astar
Interface AStarNode<ST extends GraphSegment<ST,PT>,PT extends GraphPoint<PT,ST>>
-
- Type Parameters:
ST
- is the type of the graph segment associated to this A* node.PT
- is the type of the graph point associated to this A* node.
- All Known Implementing Classes:
AStar.Candidate
,RoadAStar.VirtualCandidate
public interface AStarNode<ST extends GraphSegment<ST,PT>,PT extends GraphPoint<PT,ST>>
This interface provides services for an A* node. This interface may be implemented by theGraphPoint
to have better performances for the A* algorithm.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:42
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgraph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ST
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.PT
getGraphPoint()
Replies the graph point associated to this AStarNode.Iterable<ST>
getGraphSegments()
Replies the segments which are traversable from this node.double
getPathCost()
Replies the cost of the overall path.ST
setArrivalConnection(ST 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.
-
-
-
Method Detail
-
getGraphPoint
@Pure PT getGraphPoint()
Replies the graph point associated to this AStarNode.- Returns:
- the graph point associated to this AStarNode.
-
getGraphSegments
@Pure Iterable<ST> getGraphSegments()
Replies the segments which are traversable from this node.- Returns:
- the traversable segments.
-
getArrivalConnection
@Pure ST getArrivalConnection()
Replies the connection to reach the node.- Returns:
- the connection to reach the node, or
null
if none.
-
setArrivalConnection
ST setArrivalConnection(ST connection)
Set the connection to reach the node.- Parameters:
connection
- is the new arrival connection.- Returns:
- the connection to reach the node, or
null
if none.
-
getCost
@Pure double getCost()
Replies the cost to reach the node.- Returns:
- the cost to reach the node.
-
setCost
double setCost(double cost)
Set the cost to reach the node.- Parameters:
cost
- is the new cost.- Returns:
- the cost to reach the node.
-
getEstimatedCost
@Pure double getEstimatedCost()
Replies the cost from the node to the target point.- Returns:
- the cost from the node to the target point.
-
setEstimatedCost
double setEstimatedCost(double cost)
Set the cost from the node to the target point.- Parameters:
cost
- is the new estimated cost.- Returns:
- the cost from the node to the target point.
-
getPathCost
@Pure double getPathCost()
Replies the cost of the overall path. It is the sum ofgetCost()
andgetEstimatedCost()
.- Returns:
- the cost of the path.
-
-