Class SBFMovePathFinder.MovePathAStarComparator
java.lang.Object
megamek.common.strategicBattleSystems.SBFMovePathFinder.MovePathAStarComparator
- All Implemented Interfaces:
Serializable,Comparator<SBFMovePath>
- Enclosing class:
SBFMovePathFinder
public static class SBFMovePathFinder.MovePathAStarComparator
extends Object
implements Comparator<SBFMovePath>, Serializable
A MovePath comparator that compares movement points spent and distance to destination. If those are equal then
MovePaths with more HexesMoved are Preferred. This should considerably speed A* when multiple shortest paths are
present.
This comparator is used by A* algorithm.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MovePathAStarComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<SBFMovePath>
-