AStarResult<T> class

A* with path cost calculation

Returns both the path and the total cost

Example:

final result = aStarWithCost(graph, 'A', 'G', heuristic);
print('Path: ${result.path}'); // ['A', 'B', 'D', 'G']
print('Cost: ${result.cost}'); // 8.0

Constructors

AStarResult({required List<T> path, required num cost})
const

Properties

cost num
final
hashCode int
The hash code for this object.
no setterinherited
path List<T>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited