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