Package org.ddolib.examples.tsp
Class TSPRanking
java.lang.Object
org.ddolib.examples.tsp.TSPRanking
- All Implemented Interfaces:
Comparator<TSPState>,StateRanking<TSPState>
Class that defines a ranking between two
TSPState instances.
This class implements the StateRanking interface for TSP states.
It is intended to provide a comparison method between states, which can be used
to prioritize or order states in search algorithms such as DDO or A*.
Currently, the compare(TSPState, TSPState) method returns 0 for all states,
indicating that all states are considered equal in terms of ranking.
This can be customized to implement a meaningful heuristic-based ranking.
- 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
-
TSPRanking
public TSPRanking()
-
-
Method Details
-
compare
Compares two TSP states.- Specified by:
comparein interfaceComparator<TSPState>- Parameters:
o1- the first stateo2- the second state- Returns:
- 0 as a placeholder, indicating that the two states are equal in ranking
-