Show / Hide Table of Contents

Interface IGraphSolver<T>

All Generic Graph Solvers implement this interface. This ensures solvers can be used interchangeably depending on need.

Namespace: PathFinder.Solvers.Generic
Assembly: PathFinder.dll
Syntax
public interface IGraphSolver<T>
Type Parameters
Name Description
T

Properties

| Improve this Doc View Source

Closed

A list of nodes which have already been checked.

Declaration
IEnumerable<T> Closed { get; }
Property Value
Type Description
IEnumerable<T>
| Improve this Doc View Source

ClosedCount

Count of closed nodes.

Declaration
int ClosedCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Current

The last node to be checked.

Declaration
T Current { get; }
Property Value
Type Description
T
| Improve this Doc View Source

CurrentBestPath

The current best path to get as close as possible to the Destination.

Declaration
IList<T> CurrentBestPath { get; }
Property Value
Type Description
IList<T>
Remarks

Not guaranteed to be a "good" path, and may vary greatly each tick.

| Improve this Doc View Source

Destination

The destination node to search for.

Declaration
T Destination { get; }
Property Value
Type Description
T
| Improve this Doc View Source

MaxTicks

The maximum number of ticks this solver can perform before giving up.

Declaration
int MaxTicks { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Open

A List of nodes which still need to be checked.

Declaration
IEnumerable<T> Open { get; }
Property Value
Type Description
IEnumerable<T>
| Improve this Doc View Source

OpenCount

Count of open nodes.

Declaration
int OpenCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Origin

The starting node to search from.

Declaration
T Origin { get; }
Property Value
Type Description
T
| Improve this Doc View Source

Path

The path from the Origin to the Destination. Will be null if State is not Success.

Declaration
IList<T> Path { get; }
Property Value
Type Description
IList<T>
| Improve this Doc View Source

PathCost

The cost to get from the Origin to the Destination via the path.

Declaration
double PathCost { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

State

The current SolverState.

Declaration
SolverState State { get; }
Property Value
Type Description
SolverState
| Improve this Doc View Source

Ticks

The number of ticks this solver has performed.

Declaration
int Ticks { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Run(Int32)

Runs the solver until a path is found, the allotted ticks is exhausted, or a path could not be found.

Declaration
SolverState Run(int ticks = null)
Parameters
Type Name Description
System.Int32 ticks

Number of ticks to run. Any number less than zero means run until MaxTicks

Returns
Type Description
SolverState

The SolverState the solver is in after the run.

| Improve this Doc View Source

Stop()

Stop the current solver.

Declaration
void Stop()
  • Improve this Doc
  • View Source
☀
☾
Back to top Generated by DocFX