| Package | com.lookbackon.ds.aStar |
| Class | public class AStar |
| Inheritance | AStar AbstractProcess Object |
See also
| Property | Defined By | ||
|---|---|---|---|
| grid : AStarNodeBoard | AStar | ||
| heuristic : Function | AStar | ||
![]() | isSelfManaging : Boolean | AbstractProcess | |
| path : Array [read-only] | AStar | ||
| percentage : Number [override] [read-only]
inheritDoc
| AStar | ||
| processDone : Boolean | AStar | ||
| visited : Array [read-only] | AStar | ||
| Method | Defined By | ||
|---|---|---|---|
AStar(isSelfManaging:Boolean = false) | AStar | ||
The standard heuristic for a square grid is the Diagonal distance. | AStar | ||
The standard heuristic for a square grid is the Euclidean distance. | AStar | ||
The standard heuristic for a square grid is the Manhattan distance. | AStar | ||
run():void [override]
Like all informed search algorithms, it first searches the routes that appear to be most likely to lead towards the goal. | AStar | ||
![]() | runAndManage(allocation:int):void | AbstractProcess | |
![]() | terminate():void | AbstractProcess | |
![]() | yield():void | AbstractProcess | |
| grid | property |
grid:AStarNodeBoard
public function get grid():AStarNodeBoard public function set grid(value:AStarNodeBoard):void| heuristic | property |
heuristic:Function public function get heuristic():Function public function set heuristic(value:Function):void| path | property |
path:Array [read-only] public function get path():Array| percentage | property |
percentage:Number [read-only] [override] inheritDoc
public function get percentage():Number| processDone | property |
processDone:Boolean public function get processDone():Boolean public function set processDone(value:Boolean):void| visited | property |
visited:Array [read-only] public function get visited():Array| AStar | () | Constructor |
public function AStar(isSelfManaging:Boolean = false)isSelfManaging:Boolean (default = false) |
| diagonal | () | method |
public function diagonal(node:AStarNode):NumberThe standard heuristic for a square grid is the Diagonal distance. On a square grid that allows 8 directions of movement, use Diagonal distance (L∞).
Parameters
node:AStarNode — AStarNode carried some node info.
|
Number — Diagonal distance
|
See also
| euclidian | () | method |
public function euclidian(node:AStarNode):NumberThe standard heuristic for a square grid is the Euclidean distance. On a square grid that allows any direction of movement, you might or might not want Euclidean distance (L2). If Ais finding paths on the grid but you are allowing movement not on the grid, you may want to consider other representations of the map.
Parameters
node:AStarNode — AStarNode carried some node info.
|
Number — Euclidean distance
|
See also
| manhattan | () | method |
public function manhattan(node:AStarNode):NumberThe standard heuristic for a square grid is the Manhattan distance. On a square grid that allows 4 directions of movement, use Manhattan distance (L1).
Parameters
node:AStarNode — AStarNode carried some node info.
|
Number — Manhattan distance
|
See also
| run | () | method |
override public function run():voidLike all informed search algorithms, it first searches the routes that appear to be most likely to lead towards the goal.