java.lang.Object
dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
dev.nm.solver.multivariate.constrained.general.penaltymethod.ZeroPenalty
All Implemented Interfaces:
Function<Vector,Double>, RealScalarFunction

public class ZeroPenalty extends PenaltyFunction
This is a dummy zero cost (no cost) penalty function.
  • Constructor Details

    • ZeroPenalty

      public ZeroPenalty(int dimension)
      Construct a no-cost penalty function.
      Parameters:
      dimension - the problem dimension
  • 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)
    • dimensionOfDomain

      public int dimensionOfDomain()
      Description copied from interface: Function
      Get the number of variables the function has. For example, for a univariate function, the domain dimension is 1; for a bivariate function, the domain dimension is 2.
      Returns:
      the number of variables