All Implemented Interfaces:
Function<Vector,Double>, RealScalarFunction

public class AbsoluteErrorPenalty extends MultiplierPenalty
This penalty function sums up the absolute error penalties. It applies to equality constrained problems.
  • Constructor Details

    • AbsoluteErrorPenalty

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

      public AbsoluteErrorPenalty(EqualityConstraints constraints, double weight)
      Construct an absolute error penalty function from a collection of equality constraints. This assigns the same weight to all constraints.
      Parameters:
      constraints - a collection of equality constraints
      weight - the same weight assigned to all constraints
    • AbsoluteErrorPenalty

      public AbsoluteErrorPenalty(EqualityConstraints constraints)
      Construct an absolute error 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 Details

    • 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)