Package de.labathome.trustconstr.records
Record Class Residual
java.lang.Object
java.lang.Record
de.labathome.trustconstr.records.Residual
- Record Components:
sl- lower residual (f(x) - lb)sb- upper residual (ub - f(x))
Lower and upper residuals for a two-sided constraint
lb ≤ f(x) ≤ ub. Returned by
LinearConstraint.residual(de.labathome.trustconstr.matrix.Matrix)
and Bounds.residual(de.labathome.trustconstr.matrix.Matrix).
Mirrors scipy's tuple return shape from
LinearConstraint.residual(x) and Bounds.residual(x):
sl = f(x) - lb (non-negative iff lower bound is satisfied)
sb = ub - f(x) (non-negative iff upper bound is satisfied)
Both components are non-negative iff every row of the constraint is satisfied. A negative entry indicates the corresponding row is violated.
-
Constructor Summary
ConstructorsConstructorDescriptionResidual(double[] sl, double[] sb) Creates an instance of aResidualrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[]sb()Returns the value of thesbrecord component.double[]sl()Returns the value of theslrecord component.final StringtoString()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 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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
sl
public double[] sl()Returns the value of theslrecord component.- Returns:
- the value of the
slrecord component
-
sb
public double[] sb()Returns the value of thesbrecord component.- Returns:
- the value of the
sbrecord component
-