Package org.ddolib.examples.srflp
Record Class SRFLPState
java.lang.Object
java.lang.Record
org.ddolib.examples.srflp.SRFLPState
- Record Components:
must- The set of departments that must still be placed in all possible completions of the current state. Represented as aBitSet.maybe- The set of departments that must be placed for some of the merged states, but may have already been placed in others. Used primarily in relaxed/merged states.cut- An array containing, for each free department, the sum of all traffic intensities from the fixed departments to that department.depth- The depth of the state in the associated decision diagram or search tree.
Represents a state in a Single Row Facility Layout Problem (SRFLP) instance.
Each state keeps track of which departments must still be placed, which departments are optional (in case of merged nodes), the cumulative cut values, and the depth in the decision diagram or search tree.
-
Constructor Summary
ConstructorsConstructorDescriptionSRFLPState(BitSet must, BitSet maybe, int[] cut, int depth) Creates an instance of aSRFLPStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionint[]cut()Returns the value of thecutrecord component.intdepth()Returns the value of thedepthrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.maybe()Returns the value of themayberecord component.must()Returns the value of themustrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
must
Returns the value of themustrecord component.- Returns:
- the value of the
mustrecord component
-
maybe
Returns the value of themayberecord component.- Returns:
- the value of the
mayberecord component
-
cut
public int[] cut()Returns the value of thecutrecord component.- Returns:
- the value of the
cutrecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-