public abstract class ACQ_Constraint extends java.lang.Object implements ACQ_IConstraint
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
Name of this constraint
|
private int[] |
variables
Variables of this constraint
|
Constructor and Description |
---|
ACQ_Constraint(java.lang.String name,
int[] variables)
Constructor of this constraint
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
check(int... value)
Checks if the constraint is violated for a given set of values
|
boolean |
checker(int[] values)
Checks if the constraint is violated for a given set of values
|
int |
getArity()
Returns the number of variables of this constraint
|
java.lang.String |
getName()
Returns the name of this constraint
|
int[] |
getProjection(ACQ_Query query)
Get the numeric values of the example query
|
ACQ_Scope |
getScope()
Returns the scope of this constraint
|
org.chocosolver.solver.variables.IntVar[] |
getVariables(org.chocosolver.solver.variables.IntVar[] fullVarSet)
Returns a sub array of the specified IntVar array,
that only contains the variables involved into this constraint
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNegation, toChoco
private final java.lang.String name
private final int[] variables
public ACQ_Constraint(java.lang.String name, int[] variables)
name
- Name of this constraintvariables
- Variables of this constraintpublic org.chocosolver.solver.variables.IntVar[] getVariables(org.chocosolver.solver.variables.IntVar[] fullVarSet)
getVariables
in interface ACQ_IConstraint
fullVarSet
- All the variables of the solver modelpublic java.lang.String getName()
getName
in interface ACQ_IConstraint
public ACQ_Scope getScope()
getScope
in interface ACQ_IConstraint
public int getArity()
getArity
in interface ACQ_IConstraint
public int[] getProjection(ACQ_Query query)
getProjection
in interface ACQ_IConstraint
query
- Example positive or negativepublic final boolean checker(int[] values)
checker
in interface ACQ_IConstraint
values
- set of values to checkprotected abstract boolean check(int... value)
value
- set of values to checkpublic java.lang.String toString()
toString
in class java.lang.Object