Class BoundedConstraint

    • Constructor Detail

      • BoundedConstraint

        protected BoundedConstraint​(RealVector lower,
                                    RealVector upper)
        Simple constructor.

        At least one of the bounds must be non-null.

        Parameters:
        lower - lower bound (null if no lower bound)
        upper - upper bound (null if no upper bound)
    • Method Detail

      • dimY

        public int dimY()
        Returns the dimensionality of the function eval.
        Specified by:
        dimY in interface VectorDifferentiableFunction
        Returns:
        the expected dimension of the function's eval
      • overshoot

        public double overshoot​(RealVector y)
        Check how much a point overshoots the constraint.

        The overshoots is zero if the point fulfills the constraint, and positive if the value of the constraint is on the wrong side of lower or upper boundaries.

        Specified by:
        overshoot in interface Constraint
        Parameters:
        y - constraint value (y = value(x))
        Returns:
        L¹-norm of constraint overshoot