Class MispRanking

java.lang.Object
org.ddolib.examples.misp.MispRanking
All Implemented Interfaces:
Comparator<BitSet>, StateRanking<BitSet>

public class MispRanking extends Object implements StateRanking<BitSet>
Implements a ranking strategy for states in the Maximum Independent Set Problem (MISP).

The ranking is based on the number of remaining nodes in the state: a state with more remaining nodes is considered more promising for exploration in a decision diagram.

This ranking can be used by solvers to prioritize which states to expand first when building or traversing the search space.

  • Constructor Details

    • MispRanking

      public MispRanking()
  • Method Details

    • compare

      public int compare(BitSet o1, BitSet o2)
      Compares two states based on the number of remaining nodes.
      Specified by:
      compare in interface Comparator<BitSet>
      Parameters:
      o1 - the first state to compare
      o2 - the second state to compare
      Returns:
      a negative integer, zero, or a positive integer as the first state has fewer, equal, or more remaining nodes than the second state