Class KAbs


public class KAbs extends KConstraint
This class creates a X = abs(Y) constraint

Example :

KIntVar X(...);
KIntVar Y(...);
...
problem.post(KAbs("X=|Y|",X,Y));
...


Since:
2016.1
See Also:
KConstraint

  • Constructor Details

    • KAbs

      protected KAbs(long cPtr, boolean cMemoryOwn)
    • KAbs

      public KAbs(String name, KIntVar X, KIntVar Y)
      This constructor takes threee arguments

      Parameters:
      name - label for pretty printing of the constraint
      X - the 'X' variable of the constraint
      Y - the 'Y" variable of the constraint
    • KAbs

      public KAbs(String name, KNumVar X, KNumVar Y)
      Constructor.
      This constructor takes threee arguments

      Parameters:
      name - label for pretty printing of the constraint
      X - the 'X' variable of the constraint
      Y - the 'Y" variable of the constraint
    • KAbs

      public KAbs(KAbs toCopy)
      Copy Constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KAbs obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class KConstraint
    • delete

      public void delete()
      Overrides:
      delete in class KConstraint