Class Max2SatRanking

java.lang.Object
org.ddolib.examples.max2sat.Max2SatRanking
All Implemented Interfaces:
Comparator<Max2SatState>, StateRanking<Max2SatState>

public class Max2SatRanking extends Object implements StateRanking<Max2SatState>
Class used to compare two states for the Max2Sat problem.
A positive value means that we have a bigger benefit by setting xk to T.
A negative value means that we have a bigger benefit by setting xk to F.
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.