Record Class SMICDominanceKey

java.lang.Object
java.lang.Record
org.ddolib.examples.layered.smic.SMICDominanceKey
Record Components:
remainingJobs - a BitSet representing the set of jobs that still need to be processed

public record SMICDominanceKey(BitSet remainingJobs) extends Record
A record that represents a dominance key for grouping states in the Single Machine with Inventory Constraint (SMIC) problem.

This key is used to group comparable states that share the same set of remaining jobs. States with the same dominance key can be compared to determine dominance relations, which allows efficient pruning of suboptimal search nodes.

See Also:
  • Constructor Details

    • SMICDominanceKey

      public SMICDominanceKey(BitSet remainingJobs)
      Creates an instance of a SMICDominanceKey record class.
      Parameters:
      remainingJobs - the value for the remainingJobs record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this dominance key.
      Specified by:
      toString in class Record
      Returns:
      a string describing the remaining jobs in this key
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • remainingJobs

      public BitSet remainingJobs()
      Returns the value of the remainingJobs record component.
      Returns:
      the value of the remainingJobs record component