compareTo method
排序比较
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;
}
排序比较
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;
}