Package de.labathome.trustconstr.records
Class Bounds
java.lang.Object
de.labathome.trustconstr.records.Bounds
Box bounds
lb ≤ x ≤ ub on the optimisation variable, plus
a global keepFeasible flag controlling whether the algorithm is
allowed to step outside the box during line-searches and trial steps.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Bounds
- Parameters:
lb- per-variable lower bound (n x 1); useDouble.NEGATIVE_INFINITYto disable a boundub- per-variable upper bound (n x 1); useDouble.POSITIVE_INFINITYto disable a boundkeepFeasible- iftrue, every trial iterate must stay within the bounds
-
-
Method Details
-
lb
- Returns:
- defensive copy of the lower bound (
n x 1)
-
ub
- Returns:
- defensive copy of the upper bound (
n x 1)
-
keepFeasible
public boolean keepFeasible()- Returns:
- whether trial iterates must stay strictly inside the box
-
residual
Lower and upper residuals atx:sl = x - lb(positive iff lower bound satisfied),sb = ub - x(positive iff upper bound satisfied). Mirrors scipy'sBounds.residual(x).- Parameters:
x- current iterate (n x 1)- Returns:
(sl, sb)as aResidual
-