Shields.Graphs/Graph.cs
/// <summary>
/// Gets the minimum-weight path to a goal using the A* algorithm.
/// </summary>
/// <typeparam name="TNode">The type of a node.</typeparam>
/// <typeparam name="TKey">The type of a node key.</typeparam>
/// <param name="sources">The set of nodes from which to start the search, weighted by their initial cost.</param>
/// <param name="descriptor">The object describing how to navigate the weighted graph.</param>
/// <param name="goal">The goal predicate.</param>
/// <param name="heuristic">The heuristic function.</param>
/// <returns>The minimum-weight path, or null if none exists.</returns>
Gets the minimum-weight path to a goal using the A* algorithm.
Gets the minimum - weight path to a goal using the A * algorithm .
public static IWeighted<IEnumerable<TNode>> AStar<TNode, TKey>(
            this IEnumerable<IWeighted<TNode>> sources,
            IWeightedGraphDescriptor<TNode, TKey> descriptor,
            Func<TNode, bool> goal,
            IHeuristic<TNode> heuristic)
        {
            return AStar(sources, descriptor.Key, descriptor.Next, goal, heuristic);
        }
public static IWeighted < IEnumerable < TNode > > AStar < TNode , TKey > ( this IEnumerable < IWeighted < TNode > > sources , IWeightedGraphDescriptor < TNode , TKey > descriptor , Func < TNode , bool > goal , IHeuristic < TNode > heuristic ) { return AStar ( sources , descriptor . Key , descriptor . Next , goal , heuristic ) ; }
Gets the minimum-weight path to a goal using the A* algorithm.
Gets the minimum - weight path to a goal using the A * algorithm .
The minimum-weight path, or null if none exists.
The minimum - weight path or null if none exists .
IEnumerable<IWeighted<TNode>>
this
descriptor
IWeightedGraphDescriptor<TNode, TKey>
The object describing how to navigate the weighted graph.
The object describing how to navigate the weighted graph .
goal
Func<TNode, bool>
The goal predicate.
The goal predicate .
heuristic
IHeuristic<TNode>
The heuristic function.
The heuristic function .
sources
The set of nodes from which to start the search, weighted by their initial cost.
The set of nodes from which to start the search weighted by their initial cost .
typeparam
The type of a node.
The type of a node .
typeparam
The type of a node key.
The type of a node key .