Class KEltTerm


  • public class KEltTerm
    extends KTerm
    This class represent an expression of type Tab[I] where Tab is an array of integer value and I is the indexing variable

    Example :
    
    KProblem p(...);
    KIntVar X(...);
    KIntVar I(...);
    KIntArray valuesArray(...);
    
    KEltTerm eltTerm(valuesArray, I);
    
    // posting the constraint X can take its values indexed by the I variable in the valuesArray
    p.post(X == eltTerm);
    // equivalent to
    p.post(X == valuesArray[I]);
    

    Since:
    2016.1
    See Also:
    KElement
    • Constructor Detail

      • KEltTerm

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

        public KEltTerm()
        Default Constructor
      • KEltTerm

        public KEltTerm​(KIntArray lValues,
                        KIntVar indexVar)
        Main constructor : implements the expression lValues[indexVar]
      • KEltTerm

        public KEltTerm​(KIntArray lValues,
                        KUnTerm indexUnTerm)
        implements the expression lValues[I+c]
      • KEltTerm

        public KEltTerm​(com.artelys.kalis.SWIGTYPE_p_void ptr,
                        KIntVar indexVar)
        Main constructor : implements the expression lValues[indexVar]
      • KEltTerm

        public KEltTerm​(com.artelys.kalis.SWIGTYPE_p_void ptr,
                        KUnTerm indexUnTerm)
        implements the expression lValues[I+c]
      • KEltTerm

        public KEltTerm​(KEltTerm toCopy,
                        int pb)
        Copy constructor for a specific instance
    • Method Detail

      • getCPtr

        protected static long getCPtr​(KEltTerm obj)
      • finalize

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

        public void delete()
        Overrides:
        delete in class KTerm
      • getLValues

        public KIntArray getLValues()
        return the array of values indexed by the index variable
      • getIndexVar

        public KIntVar getIndexVar()
        return the index variable
      • getUserPointer

        public com.artelys.kalis.SWIGTYPE_p_void getUserPointer()
        return the user pointer