Class MultiplierPenalty

    • Field Detail

      • weights

        protected final double[] weights
        the weights for the constraints
      • constraints

        protected final Constraints constraints
        the constraint/cost functions
    • Constructor Detail

      • MultiplierPenalty

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

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

        public MultiplierPenalty​(Constraints constraints)
        Construct a multiplier penalty function from a collection of constraints. We assign the same default weight, 1.0, to all constraints.
        Parameters:
        constraints - a collection of constraints
    • Method Detail

      • 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