Class Outside

All Implemented Interfaces:
Serializable, Comparable<Constraint>, Constraint, Copyable<Constraint>, Defined, Named

public class Outside extends BoundedConstraint
The outside constraint, or <value> < <lower> || <upper> < <value>.
See Also:
  • Constructor Details

    • Outside

      public Outside(double lower, double upper)
      Constructs a new outside constraint.
      Parameters:
      lower - the lower threshold
      upper - the upper threshold
    • Outside

      public Outside(double lower, double upper, double epsilon)
      Constructs a new outside constraint.
      Parameters:
      lower - the lower threshold
      upper - the upper threshold
      epsilon - the epsilon value
    • Outside

      public Outside(String name, double lower, double upper)
      Constructs a new outside constraint.
      Parameters:
      name - the name
      lower - the lower threshold
      upper - the upper threshold
    • Outside

      public Outside(String name, double lower, double upper, double epsilon)
      Constructs a new outside constraint.
      Parameters:
      name - the name
      lower - the lower threshold
      upper - the upper threshold
      epsilon - the epsilon value
    • Outside

      public Outside(Outside copy)
      Constructs a copy of an outside constraint.
      Parameters:
      copy - the constraint to copy
  • Method Details

    • getMagnitudeOfViolation

      public double getMagnitudeOfViolation()
      Description copied from interface: Constraint
      Returns the magnitude of constraint violation as a non-negative number, with 0.0 representing satisfied or feasible constraints. When comparing two constraints, smaller magnitudes are considered better.
      Returns:
      the magnitude of constraint violation
    • copy

      public Outside copy()
      Description copied from interface: Copyable
      Creates and returns a copy of this object. It is required that x.copy() is completely independent from x. This means any method invoked on x.copy() in no way alters the state of x and vice versa. It is typically the case that x.copy().getClass() == x.getClass() and x.copy().equals(x).
      Returns:
      the copy
    • values

      public static Outside values(double lower, double upper)
      Constructs a new outside constraint.
      Parameters:
      lower - the lower threshold
      upper - the upper threshold
      Returns:
      the constraint
    • values

      public static Outside values(double lower, double upper, double epsilon)
      Constructs a new outside constraint.
      Parameters:
      lower - the lower threshold
      upper - the upper threshold
      epsilon - the epsilon value
      Returns:
      the constraint
    • values

      public static Outside values(String name, double lower, double upper)
      Constructs a new outside constraint.
      Parameters:
      name - the name
      lower - the lower threshold
      upper - the upper threshold
      Returns:
      the constraint
    • values

      public static Outside values(String name, double lower, double upper, double epsilon)
      Constructs a new outside constraint.
      Parameters:
      name - the name
      lower - the lower threshold
      upper - the upper threshold
      epsilon - the epsilon value
      Returns:
      the constraint