Interface IFunctions<T>
Defines graph-node functions used by search algorithms.
Namespace: Rebus.Server.Functions
Assembly: Rebus.Server.dll
Syntax
public interface IFunctions<T>
Type Parameters
Name | Description |
---|---|
T | The type of each node in the graph. |
Methods
Cost(T, T)
Performs the cost function.
Declaration
int Cost(T value, T neighbor)
Parameters
Type | Name | Description |
---|---|---|
T | value | The source node. |
T | neighbor | The neighbor. |
Returns
Type | Description |
---|---|
Int32 | The cost of traveling from the specified |
Heuristic(T, T)
Performs the heuristic function.
Declaration
int Heuristic(T source, T destination)
Parameters
Type | Name | Description |
---|---|---|
T | source | The source node. |
T | destination | The destination node. |
Returns
Type | Description |
---|---|
Int32 | The estimated distance from the |
Neighbors(T)
Gets the neighbors of a node.
Declaration
IEnumerable<T> Neighbors(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The source node. |
Returns
Type | Description |
---|---|
IEnumerable<T> | The neighbors of the specified |