Package com.artelys.kalis
Class KGeneralizedArcConsistencyConstraint
- java.lang.Object
-
- com.artelys.kalis.KConstraint
-
- com.artelys.kalis.KGeneralizedArcConsistencyConstraint
-
public class KGeneralizedArcConsistencyConstraint extends KConstraint
This class implements a generic class for propagation of any nary constraint by forward checking/arc consistency or generalized arc consistency
- Since:
- 2016.1
- See Also:
KConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KGeneralizedArcConsistencyConstraint.acAlgorithms
Possible propagation algorithms
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KConstraint
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
KGeneralizedArcConsistencyConstraint(long cPtr, boolean cMemoryOwn)
KGeneralizedArcConsistencyConstraint(KGeneralizedArcConsistencyConstraint toCopy)
Copy ConstructorKGeneralizedArcConsistencyConstraint(KIntVarArray vars)
This constructor takes threee arguments
KGeneralizedArcConsistencyConstraint(KIntVarArray vars, int acAlgorithm)
This constructor takes threee arguments
KGeneralizedArcConsistencyConstraint(KIntVarArray vars, int acAlgorithm, java.lang.String name)
This constructor takes threee arguments
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
protected void
finalize()
protected static long
getCPtr(KGeneralizedArcConsistencyConstraint obj)
KConstraint
getInstance(long pb)
void
print()
void
print(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
Pretty printing of the constraintvoid
print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
protected void
swigDirectorDisconnect()
void
swigReleaseOwnership()
void
swigTakeOwnership()
boolean
testIfSatisfied(com.artelys.kalis.SWIGTYPE_p_std__vectorT_int_t tuple)
Abstract Interface for generic propagation of any binary constraint.
-
Methods inherited from class com.artelys.kalis.KConstraint
askIfEntailed, getArity, getCopyPtr, getCPtr, getInstanceCopyPtr, getLinearRelaxation, getLinearRelaxation, getName, getPriority, getProblem, getTag, getTypeInfo, isGetLinearRelaxationImplemented, setName, setPriority, setTag
-
-
-
-
Constructor Detail
-
KGeneralizedArcConsistencyConstraint
protected KGeneralizedArcConsistencyConstraint(long cPtr, boolean cMemoryOwn)
-
KGeneralizedArcConsistencyConstraint
public KGeneralizedArcConsistencyConstraint(KIntVarArray vars, int acAlgorithm, java.lang.String name)
This constructor takes threee arguments
- Parameters:
vars
- an array of variablesacAlgorithm
- GENERALIZED_ARC_CONSISTENCY (default value) for propagation by the generalized arc consistency algorithm, ARC_CONSISTENCY for propagation by the AC algorithm, FORWARD_CHECKING for propagatino by the forward checking algorithmname
- label for pretty printing of the constraint
-
KGeneralizedArcConsistencyConstraint
public KGeneralizedArcConsistencyConstraint(KIntVarArray vars, int acAlgorithm)
This constructor takes threee arguments
- Parameters:
vars
- an array of variablesacAlgorithm
- GENERALIZED_ARC_CONSISTENCY (default value) for propagation by the generalized arc consistency algorithm, ARC_CONSISTENCY for propagation by the AC algorithm, FORWARD_CHECKING for propagatino by the forward checking algorithm
-
KGeneralizedArcConsistencyConstraint
public KGeneralizedArcConsistencyConstraint(KIntVarArray vars)
This constructor takes threee arguments
- Parameters:
vars
- an array of variables
-
KGeneralizedArcConsistencyConstraint
public KGeneralizedArcConsistencyConstraint(KGeneralizedArcConsistencyConstraint toCopy)
Copy Constructor
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KGeneralizedArcConsistencyConstraint obj)
-
finalize
protected void finalize()
- Overrides:
finalize
in classKConstraint
-
delete
public void delete()
- Overrides:
delete
in classKConstraint
-
swigDirectorDisconnect
protected void swigDirectorDisconnect()
-
swigReleaseOwnership
public void swigReleaseOwnership()
-
swigTakeOwnership
public void swigTakeOwnership()
-
getInstance
public KConstraint getInstance(long pb)
- Overrides:
getInstance
in classKConstraint
-
testIfSatisfied
public boolean testIfSatisfied(com.artelys.kalis.SWIGTYPE_p_std__vectorT_int_t tuple)
Abstract Interface for generic propagation of any binary constraint.
- Returns:
- true if and only if the constraint is satisfied when v1 == val1 & v2 == val2
-
print
public void print(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
Pretty printing of the constraint
-
print
public void print()
- Overrides:
print
in classKConstraint
-
print
public void print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
- Overrides:
print
in classKConstraint
-
-