compareTo method

int compareTo(
  1. DFAStarNode other
)

排序比较

Implementation

int compareTo(DFAStarNode other) {
  /// 大于
  if (G + H > other.G + other.H) {
    return 1;
  }

  /// 小于
  else if (G + H < other.G + other.H) {
    return -1;
  }

  /// 等于
  return 0;
}