@graphty/algorithms / index / astarWithDetails
Function: astarWithDetails() ​
astarWithDetails<
T>(graph,start,goal,heuristic):object
Defined in: pathfinding/astar.ts:110
A* pathfinding with path reconstruction details Returns detailed information about the search process
Type Parameters ​
T ​
T
Parameters ​
graph ​
Map<T, Map<T, number>>
The graph represented as an adjacency list
start ​
T
The starting node
goal ​
T
The goal node
heuristic ​
(node, goal) => number
Heuristic function that estimates distance from node to goal
Returns ​
object
Detailed result including path, cost, visited nodes, and score maps
cost ​
cost:
number
fScores ​
fScores:
Map<T,number>
gScores ​
gScores:
Map<T,number>
path ​
path:
T[] |null
visited ​
visited:
Set<T>