 | AStarFindPathT Method |
Computes the most efficient path in the specified graph between the
specified pathfinding nodes using the A* algorithm.
Namespace: Slash.AI.PathfindingAssembly: Slash.AI.Pathfinding (in Slash.AI.Pathfinding.dll) Version: 1.0.6018.40189
Syntaxpublic static List<T> FindPath<T>(
IWeightedGraph<T> graph,
T start,
T finish
)
where T : class, IAStarNode
Public Shared Function FindPath(Of T As {Class, IAStarNode}) (
graph As IWeightedGraph(Of T),
start As T,
finish As T
) As List(Of T)
public:
generic<typename T>
where T : ref class, IAStarNode
static List<T>^ FindPath(
IWeightedGraph<T>^ graph,
T start,
T finish
)
static member FindPath :
graph : IWeightedGraph<'T> *
start : 'T *
finish : 'T -> List<'T> when 'T : not struct and IAStarNode
Parameters
- graph
- Type: Slash.Collections.GraphsIWeightedGraphT
Pathfinding graph to look at. - start
- Type: T
Starting node. - finish
- Type: T
Finish node.
Type Parameters
- T
- Type of the pathfinding nodes.
Return Value
Type:
ListT
List of pathfinding nodes representing the shortest path, if there is one,
and null otherwise.
Exceptions
See Also