Class ConstraintsUtils


  • public final class ConstraintsUtils
    extends Object
    These are the utility functions for manipulating Constraints.
    • Constructor Detail

      • ConstraintsUtils

        public ConstraintsUtils()
    • Method Detail

      • isSatisfied

        public static boolean isSatisfied​(Constraints constraints,
                                          Vector x,
                                          double epsilon)
        Checks if the constraints are satisfied.
        Parameters:
        constraints - the constraints
        x - the value to evaluate the constraints at
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
        Returns:
        true if the constraints are satisfied
      • isSatisfied

        public static boolean isSatisfied​(Constraints constraints,
                                          Vector x)
        Checks if the constraints are satisfied.
        Parameters:
        constraints - the constraints
        x - the value to evaluate the constraints at
        Returns:
        true if the constraints are satisfied
      • evaluate

        public static Vector evaluate​(Constraints constraints,
                                      Vector x)
        Evaluates the constraints.
        Parameters:
        constraints - the constraints
        x - the value to evaluate the constraints at
        Returns:
        the constraint values