Show / Hide Table of Contents

Class AStar

Convenience methods for the AStar<T> graph solver.

Inheritance
System.Object
AStar
Namespace: PathFinder.Solvers.Generic
Assembly: PathFinder.dll
Syntax
public static class AStar : object

Methods

| Improve this Doc View Source

Solve<T>(T, T, out IList<T>, INodeTraverser<T>)

Finds a path between the origin and destination node using the AStar method.

Declaration
public static SolverState Solve<T>(T origin, T destination, out IList<T> path, INodeTraverser<T> traverser = null)
    where T : IEquatable<T>
Parameters
Type Name Description
T origin

Origin

T destination

Destination

IList<T> path

The resulting path if Success, otherwise null

INodeTraverser<T> traverser

The INodeTraverser<T> implementation to use when traversing the graph

-or-

null to use the ITraversableNode<T> implementation on each node.

Returns
Type Description
SolverState

The SolverState of the solver after running.

Type Parameters
Name Description
T

The type of nodes to traverse. Must extend ITraversableNode<T> if traverser is null.

| Improve this Doc View Source

Solve<T>(T, T, Double, out IList<T>, INodeTraverser<T>)

Finds a path between the origin and destination node using the AStar method.

Declaration
public static SolverState Solve<T>(T origin, T destination, double greedFactor, out IList<T> path, INodeTraverser<T> traverser = null)
    where T : IEquatable<T>
Parameters
Type Name Description
T origin

Origin

T destination

Destination

System.Double greedFactor

GreedFactor

IList<T> path

The resulting path if Success, otherwise null

INodeTraverser<T> traverser

The INodeTraverser<T> implementation to use when traversing the graph

-or-

null to use the ITraversableNode<T> implementation on each node.

Returns
Type Description
SolverState

The SolverState of the solver after running.

Type Parameters
Name Description
T

The type of nodes to traverse. Must extend ITraversableNode<T> if traverser is null.

  • Improve this Doc
  • View Source
☀
☾
Back to top Generated by DocFX