Click or drag to resize

AStarFindPathT Method

Find the shortest path from start to destination.

Namespace:  Kit.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntax
C#
public static Path<T> FindPath<T>(
	T start,
	T destination,
	Func<T, T, int> distance,
	Func<T, int> estimate,
	Func<T, IEnumerable<T>> links
)
Request Example View Source

Parameters

start
Type: T
The initial node.
destination
Type: T
The final node.
distance
Type: SystemFuncT, T, Int32
A function that should return the distance between two nodes.
estimate
Type: SystemFuncT, Int32
A function that should return an estimate between a node and the destination.
links
Type: SystemFuncT, IEnumerableT
A function that should return all the nodes linked with a given one.

Type Parameters

T
The type of a node.

Return Value

Type: PathT
See Also