DFAStar class

A*算法类

Constructors

DFAStar()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addNeighborNodeInOpen(DFMap mapInfo, DFMapNode current) → void
添加所有邻结点到open表
addNeighborNodeInOpenXy(DFMap mapInfo, DFMapNode current, int x, int y, int value) → void
添加一个邻结点到open表
calcH(DFMapPosition end, DFMapPosition coord) int
计算H的估值:“曼哈顿”法,坐标分别取差值相加
canAddNodeToOpen(DFMap mapInfo, int x, int y) bool
判断结点能否放入Open列表
drawPath(List<List<int>>? maps, DFMapNode? end) → void
在二维数组中绘制路径
findNodeInOpen(DFMapPosition? position) DFMapNode?
从Open列表中查找结点
isCoordInCloseXy(int x, int y) bool
判断坐标是否在close表中
isEndNode(DFMapPosition end, DFMapPosition? position) bool
判断结点是否是最终结点
isPositionInClose(DFMapPosition? position) bool
判断坐标是否在close表中
moveNodes(DFMap map) → void
移动当前结点
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start(List<List<int>> blockMap, DFMapNode startNode, DFMapNode endNode) Future<List<DFMapPosition>>
开始算法
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

BAR → const int
DIRECT_VALUE → const int
OBLIQUE_VALUE → const int
PATH → const int