Class ZeroPenalty

    • Constructor Detail

      • ZeroPenalty

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