Class CourantPenalty

    • Constructor Detail

      • CourantPenalty

        public CourantPenalty​(EqualityConstraints constraints,
                              double[] weights)
        Construct a CourantPenalty penalty function from a collection of equality constraints.
        Parameters:
        constraints - a collection of equality constraints
        weights - the weights assigned to the constraints
      • CourantPenalty

        public CourantPenalty​(EqualityConstraints constraints,
                              double weight)
        Construct a CourantPenalty penalty function from a collection of equality constraints. We assign the same weight to all constraints.
        Parameters:
        constraints - a collection of equality constraints
        weight - the same weight assigned to the constraints
      • CourantPenalty

        public CourantPenalty​(EqualityConstraints constraints)
        Construct a CourantPenalty penalty function from a collection of equality constraints. We assign the same default weight to all constraints.
        Parameters:
        constraints - a collection of equality constraints
    • Method Detail

      • evaluate

        public Double evaluate​(Vector x)
        Description copied from interface: Function
        Evaluate the function f at x, where x is from the domain.
        Parameters:
        x - x
        Returns:
        f(x)