C# Class HPASharp.Search.AStar

Show file Open project: Rydra/HierarchicalPathfinder Class Usage Examples

Public Methods

Method Description
FindPath ( IMap map, int start, int target ) : Path

Performs an A* search following the Node Array A* implementation

FindPath ( IMap map, int start, int target ) : bool

Private Methods

Method Description
FindPathAstar ( int start ) : void
ProcessNeighbours ( int nodeId, AStarNode node, AStarNode nodeLookup, SimplePriorityQueue openQueue ) : void

Processes every open or unexplored successor of nodeId

ReconstructPath ( int destination, AStarNode nodeLookup ) : Path

Reconstructs the path from the destination node with the aid of the node Lookup that stored the states of all processed nodes TODO: Maybe I should guard this with some kind of safetyGuard to prevent possible infinite loops in case of bugs, but meh...

ReconstructPath ( int destination ) : void

Method Details

FindPath() public method

Performs an A* search following the Node Array A* implementation
public FindPath ( IMap map, int start, int target ) : Path
map IMap
start int
target int
return Path

FindPath() public method

public FindPath ( IMap map, int start, int target ) : bool
map IMap
start int
target int
return bool