Package com.artelys.kalis
Class KOccurTerm
- java.lang.Object
-
- com.artelys.kalis.KTerm
-
- com.artelys.kalis.KOccurTerm
-
public class KOccurTerm extends KTerm
This class represent an expression of type occur(target,lvars) where target
is the value for wich we want to restrict the number of occurence(s) in the
lVars array of variables.
Example :
KProblem p(...); KIntVar countVar(...); KIntVarArray X(...); KOccurTerm occurTerm(3,X); // posting the constraint "the number of occurences of the value 3 in the // X variable array must be less than the value of countVar p.post(occurTerm <= countVar); // or p.post(occurTerm <= 5);
- Since:
- 2016.1
- See Also:
KOccurrence
-
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KTerm
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description KOccurTerm()
Default constructorKOccurTerm(int target, KIntVarArray lvars)
Main constructorprotected
KOccurTerm(long cPtr, boolean cMemoryOwn)
KOccurTerm(KOccurTerm toCopy, int pb)
Copy constructor for a specific instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
protected void
finalize()
protected static long
getCPtr(KOccurTerm obj)
KIntVarArray
getLvars()
return the array of variables in wich we want to restrict the number of occurences of the target valueint
getTarget()
return the target value
-
-
-
Constructor Detail
-
KOccurTerm
protected KOccurTerm(long cPtr, boolean cMemoryOwn)
-
KOccurTerm
public KOccurTerm()
Default constructor
-
KOccurTerm
public KOccurTerm(int target, KIntVarArray lvars)
Main constructor
-
KOccurTerm
public KOccurTerm(KOccurTerm toCopy, int pb)
Copy constructor for a specific instance
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KOccurTerm obj)
-
getTarget
public int getTarget()
return the target value
-
getLvars
public KIntVarArray getLvars()
return the array of variables in wich we want to restrict the number of occurences of the target value
-
-