Package org.ddolib.examples.mks
Class MKSState
java.lang.Object
org.ddolib.examples.mks.MKSState
Represents the state of a multi-dimensional Knapsack problem (MKS) in terms of
the remaining capacities of each knapsack dimension.
This class encapsulates the capacities as a double array and provides standard methods for cloning, equality checking, and string representation.
-
Constructor Summary
ConstructorsConstructorDescriptionMKSState(double[] capacities) Constructs a new MKSState with the given capacities. -
Method Summary
-
Constructor Details
-
MKSState
public MKSState(double[] capacities) Constructs a new MKSState with the given capacities.- Parameters:
capacities- an array representing the remaining capacities of each knapsack dimension
-
-
Method Details
-
clone
Creates a deep copy of this state. -
toString
Returns a string representation of this state. -
hashCode
public int hashCode()Computes the hash code based on the capacities array. -
equals
Compares this state to another object for equality.
-