Package com.artelys.kalis
Class KEltTerm2D
- java.lang.Object
-
- com.artelys.kalis.KTerm
-
- com.artelys.kalis.KEltTerm2D
-
public class KEltTerm2D extends KTerm
This class represent an expression of type Tab[I+a][J+b] where Tab is an array of integer value; I,J are the indexing variable and a and b indexing offsets
Example :
KProblem p(...); KIntVar X(...); KIntVar I(...); KIntVar J(...); KIntArray valuesArray(...); KEltTerm2D eltTerm(valuesArray,I,J); // 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
-
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KTerm
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description KEltTerm2D()
Default Constructorprotected
KEltTerm2D(long cPtr, boolean cMemoryOwn)
KEltTerm2D(KIntMatrix lValues, KIntVar indexVar1, KIntVar indexVar2)
Main constructor : implements the expression lValues[indexVar1][indexVar2]KEltTerm2D(KIntMatrix lValues, KUnTerm index1UnTerm, KUnTerm index2UnTerm)
implements the expression lValues[I+c][J+d]
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
protected void
finalize()
protected static long
getCPtr(KEltTerm2D obj)
int
getCste2()
KIntVar
getFirstIndexVar()
return the index variable in dimension oneKIntMatrix
getLValues()
return the array of values indexed by the index variableKIntVar
getSecondIndexVar()
return the index variable in dimension two
-
-
-
Constructor Detail
-
KEltTerm2D
protected KEltTerm2D(long cPtr, boolean cMemoryOwn)
-
KEltTerm2D
public KEltTerm2D()
Default Constructor
-
KEltTerm2D
public KEltTerm2D(KIntMatrix lValues, KIntVar indexVar1, KIntVar indexVar2)
Main constructor : implements the expression lValues[indexVar1][indexVar2]
-
KEltTerm2D
public KEltTerm2D(KIntMatrix lValues, KUnTerm index1UnTerm, KUnTerm index2UnTerm)
implements the expression lValues[I+c][J+d]
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KEltTerm2D obj)
-
getLValues
public KIntMatrix getLValues()
return the array of values indexed by the index variable
-
getFirstIndexVar
public KIntVar getFirstIndexVar()
return the index variable in dimension one
-
getSecondIndexVar
public KIntVar getSecondIndexVar()
return the index variable in dimension two
-
getCste2
public int getCste2()
-
-