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 Detail

      • KAbs

        protected KAbs​(long cPtr,
                       boolean cMemoryOwn)
      • KAbs

        public KAbs​(java.lang.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​(java.lang.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 Detail

      • getCPtr

        protected static long getCPtr​(KAbs obj)