Class Bounds

java.lang.Object
de.labathome.trustconstr.records.Bounds

public final class Bounds extends Object
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 Details

    • Bounds

      public Bounds(Matrix lb, Matrix ub, boolean keepFeasible)
      Parameters:
      lb - per-variable lower bound (n x 1); use Double.NEGATIVE_INFINITY to disable a bound
      ub - per-variable upper bound (n x 1); use Double.POSITIVE_INFINITY to disable a bound
      keepFeasible - if true, every trial iterate must stay within the bounds
  • Method Details

    • lb

      public Matrix lb()
      Returns:
      defensive copy of the lower bound (n x 1)
    • ub

      public Matrix 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

      public Residual residual(Matrix x)
      Lower and upper residuals at x: sl = x - lb (positive iff lower bound satisfied), sb = ub - x (positive iff upper bound satisfied). Mirrors scipy's Bounds.residual(x).
      Parameters:
      x - current iterate (n x 1)
      Returns:
      (sl, sb) as a Residual