Package de.labathome.trustconstr.records
Class FiniteDifferenceBounds
java.lang.Object
de.labathome.trustconstr.records.FiniteDifferenceBounds
- Direct Known Subclasses:
StrictBounds
Box bounds
lb ≤ x ≤ ub used by
NumDiff.approxDerivative(java.util.function.DoubleUnaryOperator, double, de.labathome.trustconstr.records.FiniteDifferenceOptions) to clamp
finite-difference perturbations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlb()ub()static FiniteDifferenceBoundsunbounded(long nVars) Convenience factory for the bound-free case:-inf ≤ x ≤ +inf.
-
Constructor Details
-
FiniteDifferenceBounds
- Parameters:
lb- per-variable lower bound (n × 1)ub- per-variable upper bound (n × 1)keepFeasible- iftrue, every FD perturbation must stay strictly inside the box
-
-
Method Details
-
unbounded
Convenience factory for the bound-free case:-inf ≤ x ≤ +inf.- Parameters:
nVars- number of decision variables- Returns:
- an unbounded
FiniteDifferenceBoundsof the requested size
-
lb
- Returns:
- defensive copy of the lower bounds (
n × 1)
-
ub
- Returns:
- defensive copy of the upper bounds (
n × 1)
-
keepFeasible
public boolean keepFeasible()- Returns:
- whether perturbations must stay strictly inside the box
-