Interface IHeuristicProvider<TNode>
Implement this interface to create your own custom heuristic provider for a given node type.
Namespace: AnyPath.Native
Assembly: AnyPath.dll
Syntax
public interface IHeuristicProvider<TNode> where TNode : unmanaged, IEquatable<TNode>
Type Parameters
| Name | Description |
|---|---|
| TNode | The type of nodes to provide a heuristic for |
Methods
Heuristic(TNode)
Return a cost estimate from this node to the goal that was set by SetGoal
Declaration
float Heuristic(TNode x)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | x |
Returns
| Type | Description |
|---|---|
| float |
SetGoal(TNode)
Gets called by A* before the algorithm begins, keep track of the goal internally.
Declaration
void SetGoal(TNode goal)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | goal |