Package org.ddolib.examples.mcp
Class MCPRanking
java.lang.Object
org.ddolib.examples.mcp.MCPRanking
- All Implemented Interfaces:
Comparator<MCPState>,StateRanking<MCPState>
Class used to compare two states for the MCP problem.
When comparing two states, the best is the one that can generate the biggest benefit, independently of the decisions. That's why we sum the absolute value of each benefit to compare the states.
When comparing two states, the best is the one that can generate the biggest benefit, independently of the decisions. That's why we sum the absolute value of each benefit to compare the states.
-
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
-
MCPRanking
public MCPRanking()
-
-
Method Details
-
rank
-
compare
- Specified by:
comparein interfaceComparator<MCPState>
-