Package org.xcsp.parser.callbacks
Interface XCallbacks
-
- All Known Subinterfaces:
XCallbacks2
- All Known Implementing Classes:
CompetitionValidator
,FeatureDisplayer
,SolutionChecker
public interface XCallbacks
This interface can be implemented to benefit from the parsing process of a Java parser. Many callback functions are automatically called and can then be intercepted.- Author:
- Christophe Lecoutre
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
XCallbacks.Implem
The class that contains all data structures (objects) that are used during the process of loading the XCSP3 instance.static class
XCallbacks.XCallbacksParameters
The constants that can be used to pilot the parser.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
beginAnnotations(Map<String,Object> aEntries)
void
beginArray(XVariables.XArray a)
Method called at the beginning of the process of loading the specified array of variables.void
beginBlock(XConstraints.XBlock b)
Method called at the beginning of the process of loading the specified block.void
beginConstraints(List<ParsingEntry.CEntry> cEntries)
Method called at the beginning of the process of loading the constraints of the XCSP3 instance.void
beginGroup(XConstraints.XGroup g)
Method called at the beginning of the process of loading the specified group of constraints.void
beginInstance(Types.TypeFramework type)
Method called at the very beginning of the process of loading the XCSP3 instance.void
beginLogic(XConstraints.XLogic l)
Method called at the beginning of the process of loading the specified logic-based meta-constraint<and>, <or>, <iff>, <not>, <ifThen> or <ifThenElse>
.void
beginObjectives(List<ParsingEntry.OEntry> oEntries, Types.TypeCombination type)
Method called at the beginning of the process of loading the objectives (if any) of the XCSP3 instance.void
beginSlide(XConstraints.XSlide s)
Method called at the beginning of the process of loading the specified meta-constraint slide.void
beginVariables(List<ParsingEntry.VEntry> vEntries)
Method called at the beginning of the process of loading the variables of the XCSP3 instance.void
buildAnnotationDecision(XVariables.XVarInteger[] list)
Methods to be implemented on Annotationsvoid
buildCtrAllDifferent(String id, XNode<XVariables.XVarInteger>[] trees)
void
buildCtrAllDifferent(String id, XVariables.XVarInteger[] list)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferent(String id, XVariables.XVarSymbolic[] list)
void
buildCtrAllDifferentExcept(String id, XVariables.XVarInteger[] list, int[] except)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllEqual(String id, XVariables.XVarInteger[] list)
Callback method for building a constraintallEqual
.void
buildCtrAmong(String id, XVariables.XVarInteger[] list, int[] values, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAmong(String id, XVariables.XVarInteger[] list, int[] values, XVariables.XVarInteger k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAtLeast(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAtMost(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition condition)
void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition[] conditions, int startIndex)
void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger value)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list1, int startIndex1, XVariables.XVarInteger[] list2, int startIndex2)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, int size)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger size)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrClause(String id, XVariables.XVarInteger[] pos, XVariables.XVarInteger[] neg)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCount(String id, XVariables.XVarInteger[] list, int[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCount(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrElement(String id, int[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
void
buildCtrElement(String id, int[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[] list, Condition condition)
void
buildCtrExactly(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrExactly(String id, XVariables.XVarInteger[] list, int value, XVariables.XVarInteger k)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrExtension(String id, XVariables.XVarInteger[] list, int[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a (non-unary) extensional constraint.void
buildCtrExtension(String id, XVariables.XVarInteger[] list, AbstractTuple[] tuples, boolean positive, Set<Types.TypeFlag> flags)
void
buildCtrExtension(String id, XVariables.XVarInteger x, int[] values, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a unary extensional constraint.void
buildCtrExtension(String id, XVariables.XVarSymbolic[] list, String[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
void
buildCtrExtension(String id, XVariables.XVarSymbolic x, String[] values, boolean positive, Set<Types.TypeFlag> flags)
default void
buildCtrFalse(String id, XVariables.XVar[] list)
Callback method for building in the solver an initially disentailed (i.e., universally unsatisfied) constraint.void
buildCtrInstantiation(String id, XVariables.XVarInteger[] list, int[] values)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrIntension(String id, XVariables.XVarInteger[] scope, XNodeParent<XVariables.XVarInteger> tree)
Callback method for building a constraintintension
from the specified syntactic tree.void
buildCtrIntension(String id, XVariables.XVarSymbolic[] scope, XNodeParent<XVariables.XVarSymbolic> syntaxTreeRoot)
void
buildCtrLex(String id, XVariables.XVarInteger[][] lists, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrLexMatrix(String id, XVariables.XVarInteger[][] matrix, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrLogic(String id, Types.TypeLogicalOperator lop, XVariables.XVarInteger[] vars)
Callback method for building a logic constraint with one of the following forms: * and(x1,x2,...,xr) or(x1,x2,...,xr) xor(x1,x2,...,xr) iff(x1,x2,...,xr) imp(x1,x2) with x1,x2,..., xr being 0/1 variablesvoid
buildCtrLogic(String id, XVariables.XVarInteger x, Types.TypeEqNeOperator op, Types.TypeLogicalOperator lop, XVariables.XVarInteger[] vars)
Callback method for building a logic constraint with one of the following forms: * x = and(x1,x2,...,xr) x = or(x1,x2,...,xr) x = xor(x1,x2,...,xr) x = iff(x1,x2,...,xr) x = imp(x1,x2) x ≠ and(x1,x2,...,xr) x ≠ or(x1,x2,...,xr) x ≠ xor(x1,x2,...,xr) x ≠ iff(x1,x2,...,xr) x ≠ imp(x1,x2) with x1,x2,..., xr being 0/1 variablesvoid
buildCtrLogic(String id, XVariables.XVarInteger x, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, int k)
Callback method for building a "logic" constraint with the following form: x = (y ⊙ k) with x a 0/1 variable, y an integer variable, k a constant (integer) and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrLogic(String id, XVariables.XVarInteger x, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, XVariables.XVarInteger z)
Callback method for building a "logic" constraint with the following form: x = (y ⊙ z) with x a 0/1 variable, y and z two integer variables, and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrMaximum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrMaximum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMaximum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMDD(String id, XVariables.XVarInteger[] list, Transition[] transitions)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMinimum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrMinimum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMinimum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, int[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, XVariables.XVarInteger[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, int[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNotAllEqual(String id, XVariables.XVarInteger[] list)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNValues(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNValuesExcept(String id, XVariables.XVarInteger[] list, int[] except, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, int[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, int p, Types.TypeConditionOperatorRel op, int k)
Callback method for building an unary primitive constraint with one of the following forms: (x + p) ⊙ k (x - p) ⊙ k (x * p) ⊙ k (x / p) ⊙ k (x % p) ⊙ k (x ^ p) ⊙ k |x - p| ⊙ k with x being an integer variable, p and k constants (integers) and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, int p, Types.TypeConditionOperatorRel op, XVariables.XVarInteger y)
Callback method for building a binary primitive constraint with one of the following forms: (x + p) ⊙ y (x - p) ⊙ y (x * p) ⊙ y (x / p) ⊙ y (x % p) ⊙ y (x ^ p) ⊙ y |x - p| ⊙ y with x and y being two integer variables, p a constant (integer) and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, int k)
Callback method for building a binary primitive constraint with one of the following forms: (x + y) ⊙ k (x - y) ⊙ k (x * y) ⊙ k (x / y) ⊙ k (x % y) ⊙ k (x ^ y) ⊙ k |x - y| ⊙ k with x and y being two integer variables, k a constant (integer) and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, XVariables.XVarInteger z)
Callback method for building a ternary primitive constraint with one of the following forms: (x + y) ⊙ z (x - y) ⊙ z (x * y) ⊙ z (x / y) ⊙ z (x % y) ⊙ z (x ^ y) ⊙ z |x - y| ⊙ z with x, y and z being three integer variables, and ⊙ a relational operator in {<,≤,≥,>,=,≠}void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorRel op, int k)
Callback method for building an unary primitive constraint with one of the following forms: x < k x ≤ k x ≥ k x > k x = k x ≠ k with x being an integer variable and k a constant (integer).void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorSet op, int[] t)
Callback method for building an unary primitive constraint with one of the following forms: x ∈ t x ∉ t with x being an integer variable and t a set of constants (integers) represented by an array.void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorSet op, int min, int max)
Callback method for building an unary primitive constraint with one of the following forms: x ∈ min..max x ∉ min..max with x being an integer variable and min and max two constants (integers) denoting the bounds of an integer interval.void
buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeUnaryArithmeticOperator aop, XVariables.XVarInteger y)
Callback method for building a binary primitive constraint with one of the following forms: x = |y| x = -y x = y*y with x, and y being two integer variables.void
buildCtrRegular(String id, XVariables.XVarInteger[] list, Transition[] transitions, String startState, String[] finalStates)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, int[] coeffs, Condition condition)
void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, XVariables.XVarInteger[] coeffs, Condition condition)
void
buildCtrSum(String id, XVariables.XVarInteger[] list, int[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).default void
buildCtrTrue(String id, XVariables.XVar[] list)
Callback method for building in the solver an initially entailed (i.e., universally satisfied) constraint.void
buildObjToMaximize(String id, XNodeParent<XVariables.XVarInteger> tree)
void
buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
void
buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
void
buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
void
buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
void
buildObjToMaximize(String id, XVariables.XVarInteger x)
void
buildObjToMinimize(String id, XNodeParent<XVariables.XVarInteger> tree)
void
buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
void
buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
void
buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
void
buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
void
buildObjToMinimize(String id, XVariables.XVarInteger x)
Methods to be implemented for managing objectivesvoid
buildVarInteger(XVariables.XVarInteger x, int[] values)
Callback method for building in the solver an integer variable whose domain is given by the specified array.void
buildVarInteger(XVariables.XVarInteger x, int minValue, int maxValue)
Callback method for building in the solver an integer variable whose domain contains all integer values between the two specified bounds.void
buildVarSymbolic(XVariables.XVarSymbolic x, String[] values)
Methods to be implemented on symbolic variables/constraintsvoid
endAnnotations()
void
endArray(XVariables.XArray a)
Method called at the end of the process of loading the specified array of variables.void
endBlock(XConstraints.XBlock b)
Method called at the end of the process of loading the specified block.void
endConstraints()
Method called at the end of the process of loading the constraints of the XCSP3 instance.void
endGroup(XConstraints.XGroup g)
Method called at the end of the process of loading the specified group of constraints.void
endInstance()
Method called at the end of the process of loading the XCSP3 instance.void
endLogic(XConstraints.XLogic l)
Method called at the end of the process of loading the specified logic-based meta-constraint<and>, <or>, <iff>, <not>, <ifThen> or <ifThenElse>
.void
endObjectives()
Method called at the end of the process of loading the objectives (if any) of the XCSP3 instance.void
endSlide(XConstraints.XSlide s)
Method called at the end of the process of loading the specified meta-constraint slide.void
endVariables()
Method called at the end of the process of loading the variables of the XCSP3 instance.XCallbacks.Implem
implem()
Returns the object that implements necessary data structures during the loading process.default void
loadAnnotations(XParser parser)
default void
loadArray(XVariables.XArray va)
Loads the specified array of variables.default void
loadBlock(XConstraints.XBlock b)
Loads a block from. default void
loadConstraints(List<ParsingEntry.CEntry> list)
Loads all constraints that can be found in the specified list.default void
loadConstraints(XParser parser)
Loads all elements that are contained in the element <constraints> of the XCSP3 instance, which have been parsed by the specified parser object.default void
loadCtr(XConstraints.XCtr c)
Loads the specified constraint.default void
loadCtrs(XConstraints.XCtr template, Object[][] argss, ParsingEntry.CEntry entry)
Loads all constraints that can be built from the specified template and the specified array of arguments.default Document
loadDocument(String fileName)
Loads the XML document corresponding to the XCSP3 instance whose filename is given.default void
loadGroup(XConstraints.XGroup g)
Loads a group from. default void
loadInstance(String fileName, String... discardedClasses)
Loads and parses the XCSP3 instance whose filename is given.default void
loadInstance(Document document, String... discardedClasses)
Loads and parses the XCSP3 instance represented by the specified document.default void
loadLogic(XConstraints.XLogic l)
Loads a meta-constraint based on a logical form (including control ones).default void
loadObj(XObjectives.XObj o)
Loads the specified objective.default void
loadObjectives(XParser parser)
Loads all elements that are contained in the elementof the XCSP3 instance, which have been parsed by the specified parser object. default void
loadSlide(XConstraints.XSlide s)
Loads a meta-constraint slide.default void
loadVar(XVariables.XVar v)
Loads the specified variable.default void
loadVariables(XParser parser)
Loads all elements that are contained in the element <variables> of the XCSP3 instance, which have been parsed by the specified parser object.default void
repost(String constraintId)
Method that must be called when an intercepted ("recognized") constraint cannot be dealt with, and so the constraint must be resent to the parser so as to be treated classically.default Object
unimplementedCase(Object... objects)
Throws a runtime exception because a piece of code is not implemented.
-
-
-
Method Detail
-
implem
XCallbacks.Implem implem()
Returns the object that implements necessary data structures during the loading process. In your class implementing XCallbacks, you should simply write something like:Implem implem = new Implem(this); @Override public Implem implem() { return implem; }
- Returns:
- the object that implements some data structures used during the loading process
-
repost
default void repost(String constraintId)
Method that must be called when an intercepted ("recognized") constraint cannot be dealt with, and so the constraint must be resent to the parser so as to be treated classically.- Parameters:
constraintId
- the id of a constraint
-
unimplementedCase
default Object unimplementedCase(Object... objects)
Throws a runtime exception because a piece of code is not implemented. The specified objects are simply displayed to give information about the problem to fix.- Parameters:
objects
- objects to be displayed (with toString())- Returns:
- a fake object because the exception will quit first.
-
loadDocument
default Document loadDocument(String fileName) throws Exception
Loads the XML document corresponding to the XCSP3 instance whose filename is given. This method has to be overridden when special tools are required to load the file.- Parameters:
fileName
- the name of an XCSP3 file- Returns:
- the document corresponding to the XCSP3 file whose filename is given
- Throws:
Exception
-
loadInstance
default void loadInstance(Document document, String... discardedClasses) throws Exception
Loads and parses the XCSP3 instance represented by the specified document. The optional specified classes indicate which elements (variables, constraints) must be discarded when parsing; for example, one may wish to ignore all constraints related to "symmetryBreaking". Normally, this method should not be overridden.- Parameters:
document
- the document representing the XCSP3 instancediscardedClasses
- the name of the classes (tags) of elements (variables, constraints) that must be discarded when parsing- Throws:
Exception
-
loadInstance
default void loadInstance(String fileName, String... discardedClasses) throws Exception
Loads and parses the XCSP3 instance whose filename is given. The optional specified classes indicate which elements (variables, constraints) must be discarded when parsing; for example, one may wish to ignore all constraints related to "symmetryBreaking". Normally, this method should not be overridden.- Parameters:
fileName
- the name of an XCSP3 filediscardedClasses
- the name of the classes (tags) of elements (variables, constraints) that must be discarded when parsing- Throws:
Exception
-
loadVariables
default void loadVariables(XParser parser)
Loads all elements that are contained in the element <variables> of the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden.- Parameters:
parser
- the object used to parse the element
-
loadVar
default void loadVar(XVariables.XVar v)
Loads the specified variable. One callback function 'buildVarInteger' or 'buildVarSymbolic' is called when this method is executed. Except for some advanced uses, this method should not be overridden.- Parameters:
v
- the variable to be loaded
-
loadArray
default void loadArray(XVariables.XArray va)
Loads the specified array of variables. All non-null variables of the array are iterated over and loaded. Except for some advanced uses, this method should not be overridden.- Parameters:
va
- the array of variables to be loaded
-
loadConstraints
default void loadConstraints(XParser parser)
Loads all elements that are contained in the element <constraints> of the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden.- Parameters:
parser
- the object used to parse the element
-
loadConstraints
default void loadConstraints(List<ParsingEntry.CEntry> list)
Loads all constraints that can be found in the specified list. This method is recursive, allowing us to deal with blocks and groups. Normally, this method should not be overridden.- Parameters:
list
- a list of elements fromthat must be parsed.
-
loadBlock
default void loadBlock(XConstraints.XBlock b)
Loads a block from. Normally, this method should not be overridden. - Parameters:
b
- the block to be loaded.
-
loadGroup
default void loadGroup(XConstraints.XGroup g)
Loads a group from. Normally, this method should not be overridden. - Parameters:
g
- the group to be loaded.
-
loadSlide
default void loadSlide(XConstraints.XSlide s)
Loads a meta-constraint slide. Normally, this method should not be overridden.- Parameters:
s
- the meta-constraint slide to be loaded.
-
loadLogic
default void loadLogic(XConstraints.XLogic l)
Loads a meta-constraint based on a logical form (including control ones). This corresponds to meta-constraints<and>, <or>, <iff>, <not>, <ifThen> or <ifThenElse>
. Normally, this method should not be overridden.- Parameters:
l
- the logic-based meta-constraint to be loaded.
-
loadCtrs
default void loadCtrs(XConstraints.XCtr template, Object[][] argss, ParsingEntry.CEntry entry)
Loads all constraints that can be built from the specified template and the specified array of arguments. For each value between 0 and argss.length, a constraint is built. Normally, this method should not be overridden.- Parameters:
template
- a constraint templateargss
- an array of argumentsentry
- the object at the origin of the abstraction
-
loadCtr
default void loadCtr(XConstraints.XCtr c)
Loads the specified constraint. One callback function (for example, builCtrIntension or buildCtrAllDifferent) is called when this method is executed. Except for some advanced uses, this method should not be overridden.- Parameters:
c
- the constraint to be loaded
-
loadObjectives
default void loadObjectives(XParser parser)
Loads all elements that are contained in the elementof the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden. - Parameters:
parser
- the object used to parse the element
-
loadObj
default void loadObj(XObjectives.XObj o)
Loads the specified objective. One callback function (for example, builObjToMinimize or buildObjToMaximize) is called when this method is executed. Except for some advanced uses, this method should not be overridden.- Parameters:
o
- the objective to be loaded
-
loadAnnotations
default void loadAnnotations(XParser parser)
-
beginInstance
void beginInstance(Types.TypeFramework type)
Method called at the very beginning of the process of loading the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
type
- the framework of the XCSP3 instance
-
endInstance
void endInstance()
Method called at the end of the process of loading the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).
-
beginVariables
void beginVariables(List<ParsingEntry.VEntry> vEntries)
Method called at the beginning of the process of loading the variables of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
vEntries
- the list of objects found in
-
endVariables
void endVariables()
Method called at the end of the process of loading the variables of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).
-
beginArray
void beginArray(XVariables.XArray a)
Method called at the beginning of the process of loading the specified array of variables. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
a
- an object representing an array of variables
-
endArray
void endArray(XVariables.XArray a)
Method called at the end of the process of loading the specified array of variables. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
a
- an object representing an array of variables
-
beginConstraints
void beginConstraints(List<ParsingEntry.CEntry> cEntries)
Method called at the beginning of the process of loading the constraints of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
cEntries
- the list of objects found in
-
endConstraints
void endConstraints()
Method called at the end of the process of loading the constraints of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).
-
beginBlock
void beginBlock(XConstraints.XBlock b)
Method called at the beginning of the process of loading the specified block. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
b
- a block to be loaded
-
endBlock
void endBlock(XConstraints.XBlock b)
Method called at the end of the process of loading the specified block. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
b
- a block
-
beginGroup
void beginGroup(XConstraints.XGroup g)
Method called at the beginning of the process of loading the specified group of constraints. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
g
- a group to be loaded
-
endGroup
void endGroup(XConstraints.XGroup g)
Method called at the end of the process of loading the specified group of constraints. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
g
- a group
-
beginSlide
void beginSlide(XConstraints.XSlide s)
Method called at the beginning of the process of loading the specified meta-constraint slide. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
s
- a meta-constraint slide to be loaded
-
endSlide
void endSlide(XConstraints.XSlide s)
Method called at the end of the process of loading the specified meta-constraint slide. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
s
- a meta-constraint slide
-
beginLogic
void beginLogic(XConstraints.XLogic l)
Method called at the beginning of the process of loading the specified logic-based meta-constraint<and>, <or>, <iff>, <not>, <ifThen> or <ifThenElse>
. Implement (or redefine) this method (if you implement XCallbacks2).- Parameters:
l
- a logic-based meta-constraint to be loaded
-
endLogic
void endLogic(XConstraints.XLogic l)
Method called at the end of the process of loading the specified logic-based meta-constraint<and>, <or>, <iff>, <not>, <ifThen> or <ifThenElse>
. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
l
- a logic-based meta-constraint
-
beginObjectives
void beginObjectives(List<ParsingEntry.OEntry> oEntries, Types.TypeCombination type)
Method called at the beginning of the process of loading the objectives (if any) of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Parameters:
oEntries
- the list of objects found intype
- the type indicating how to manage multi-optimization; this parameter is irrelevant in case of mono-optimization
-
endObjectives
void endObjectives()
Method called at the end of the process of loading the objectives (if any) of the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).
-
endAnnotations
void endAnnotations()
-
buildVarInteger
void buildVarInteger(XVariables.XVarInteger x, int minValue, int maxValue)
Callback method for building in the solver an integer variable whose domain contains all integer values between the two specified bounds.- Parameters:
x
- an integer variable built by the parserminValue
- the minimum value of the domain of xmaxValue
- the maximum value of the domain of x
-
buildVarInteger
void buildVarInteger(XVariables.XVarInteger x, int[] values)
Callback method for building in the solver an integer variable whose domain is given by the specified array.- Parameters:
x
- an integer variable built by the parservalues
- the values in the domain of x
-
buildCtrTrue
default void buildCtrTrue(String id, XVariables.XVar[] list)
Callback method for building in the solver an initially entailed (i.e., universally satisfied) constraint. By default, this method does nothing. You should redefine it if you need to preserve all constraints (e.g, for MaxCSP).- Parameters:
id
- the id of the constraintlist
- the list of variables of the constraint
-
buildCtrFalse
default void buildCtrFalse(String id, XVariables.XVar[] list)
Callback method for building in the solver an initially disentailed (i.e., universally unsatisfied) constraint. By default, this method throws an exception. You should redefine it if you can deal with such very special constraints.- Parameters:
id
- the id of the constraintlist
- the list of variables of the constraint
-
buildCtrIntension
void buildCtrIntension(String id, XVariables.XVarInteger[] scope, XNodeParent<XVariables.XVarInteger> tree)
Callback method for building a constraintintension
from the specified syntactic tree. Variables of the specified array of variables are exactly those that are present in the tree.- Parameters:
id
- the id of the constraintscope
- the list of integer variables of the constrainttree
- the root of a syntactic tree representing the predicate associated with the constraint
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorRel op, int k)
Callback method for building an unary primitive constraint with one of the following forms:- x < k
- x ≤ k
- x ≥ k
- x > k
- x = k
- x ≠ k
- Parameters:
id
- the id of the constraintx
- an integer variableop
- a relational operatork
- a constant (integer)
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorSet op, int[] t)
Callback method for building an unary primitive constraint with one of the following forms:- x ∈ t
- x ∉ t
- Parameters:
id
- the id of the constraintx
- an integer variableop
- a set operatort
- a set (array) of constants (integers)
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeConditionOperatorSet op, int min, int max)
Callback method for building an unary primitive constraint with one of the following forms:- x ∈ min..max
- x ∉ min..max
- Parameters:
id
- the id of the constraintx
- an integer variableop
- a set operatormin
- the minimum value of the intervalmax
- the maximum value of the interval
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, int p, Types.TypeConditionOperatorRel op, int k)
Callback method for building an unary primitive constraint with one of the following forms:- (x + p) ⊙ k
- (x - p) ⊙ k
- (x * p) ⊙ k
- (x / p) ⊙ k
- (x % p) ⊙ k
- (x ^ p) ⊙ k
- |x - p| ⊙ k
- Parameters:
id
- the id of the constraintx
- an integer variableaop
- an arithmetic operatorp
- a constant (integer)op
- a relational operatork
- a constant (integer)
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeUnaryArithmeticOperator aop, XVariables.XVarInteger y)
Callback method for building a binary primitive constraint with one of the following forms:- x = |y|
- x = -y
- x = y*y
- Parameters:
id
- the id of the constraintx
- an integer variableaop
- a unary arithmetic operatory
- an integer variable
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, int k)
Callback method for building a binary primitive constraint with one of the following forms:- (x + y) ⊙ k
- (x - y) ⊙ k
- (x * y) ⊙ k
- (x / y) ⊙ k
- (x % y) ⊙ k
- (x ^ y) ⊙ k
- |x - y| ⊙ k
- Parameters:
id
- the id of the constraintx
- an integer variableaop
- an arithmetic operatory
- an integer variableop
- a relational operatork
- a constant (integer)
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, int p, Types.TypeConditionOperatorRel op, XVariables.XVarInteger y)
Callback method for building a binary primitive constraint with one of the following forms:- (x + p) ⊙ y
- (x - p) ⊙ y
- (x * p) ⊙ y
- (x / p) ⊙ y
- (x % p) ⊙ y
- (x ^ p) ⊙ y
- |x - p| ⊙ y
- Parameters:
id
- the id of the constraintx
- an integer variableaop
- an arithmetic operatorp
- a constant (integer)op
- a relational operatory
- an integer variable
-
buildCtrPrimitive
void buildCtrPrimitive(String id, XVariables.XVarInteger x, Types.TypeArithmeticOperator aop, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, XVariables.XVarInteger z)
Callback method for building a ternary primitive constraint with one of the following forms:- (x + y) ⊙ z
- (x - y) ⊙ z
- (x * y) ⊙ z
- (x / y) ⊙ z
- (x % y) ⊙ z
- (x ^ y) ⊙ z
- |x - y| ⊙ z
- Parameters:
id
- the id of the constraintx
- an integer variableaop
- an arithmetic operatory
- an integer variableop
- a relational operatorz
- an integer variable
-
buildCtrLogic
void buildCtrLogic(String id, Types.TypeLogicalOperator lop, XVariables.XVarInteger[] vars)
Callback method for building a logic constraint with one of the following forms: *- and(x1,x2,...,xr)
- or(x1,x2,...,xr)
- xor(x1,x2,...,xr)
- iff(x1,x2,...,xr)
- imp(x1,x2)
- Parameters:
id
- the id of the constraintlop
- a logical operatorvars
- a set (array) of 0/1 variables
-
buildCtrLogic
void buildCtrLogic(String id, XVariables.XVarInteger x, Types.TypeEqNeOperator op, Types.TypeLogicalOperator lop, XVariables.XVarInteger[] vars)
Callback method for building a logic constraint with one of the following forms: *- x = and(x1,x2,...,xr)
- x = or(x1,x2,...,xr)
- x = xor(x1,x2,...,xr)
- x = iff(x1,x2,...,xr)
- x = imp(x1,x2)
- x ≠ and(x1,x2,...,xr)
- x ≠ or(x1,x2,...,xr)
- x ≠ xor(x1,x2,...,xr)
- x ≠ iff(x1,x2,...,xr)
- x ≠ imp(x1,x2)
- Parameters:
id
- the id of the constraintx
- a 0/1 variableop
- either the operator EQ or the operator NElop
- a logical operatorvars
- a set (array) of 0/1 variables
-
buildCtrLogic
void buildCtrLogic(String id, XVariables.XVarInteger x, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, int k)
Callback method for building a "logic" constraint with the following form:- x = (y ⊙ k)
- Parameters:
id
- the id of the constraintx
- a 0/1 variabley
- an integer variableop
- a relational operatork
- a constant (integer)
-
buildCtrLogic
void buildCtrLogic(String id, XVariables.XVarInteger x, XVariables.XVarInteger y, Types.TypeConditionOperatorRel op, XVariables.XVarInteger z)
Callback method for building a "logic" constraint with the following form:- x = (y ⊙ z)
- Parameters:
id
- the id of the constraintx
- a 0/1 variabley
- an integer variableop
- a relational operatorz
- an integer variable
-
buildCtrExtension
void buildCtrExtension(String id, XVariables.XVarInteger x, int[] values, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a unary extensional constraint. Values are supports (accepted by the constraint) iff the specified Boolean is true, otherwise they are conflicts (not accepted by the constraint). The flag STARRED_TUPLES cannot appear in the specified set (because this is a unary constraint). The flag UNCLEAN_TUPLES, if present, indicates that all specified values do not necessarily belong to the (initial) domain of the specified variable. More information in the specifications (Chapter 4). Quick information available at XCSP3 website (Tab Specifications).- Parameters:
id
- the id of the constraintx
- an integer variablevalues
- supports or conflictspositive
- values are supports iff this value is trueflags
- set of flags giving information about the values
-
buildCtrExtension
void buildCtrExtension(String id, XVariables.XVarInteger[] list, int[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a (non-unary) extensional constraint. Tuples are supports (accepted by the constraint) iff the specified Boolean is true, otherwise they are conflicts (not accepted by the constraint). The flag STARRED_TUPLES indicates if the symbol * (denoted by Constants.STAR_INT, whose value is Integer.MAX_VALUE - 1) is present in some tuple(s). The flag UNCLEAN_TUPLES, if present, indicates that all specified tuples do not necessarily belong to the (initial) domains of the specified variables. More information in the specifications (Chapter 4). Quick information available at XCSP3 website (Tab Specifications).- Parameters:
id
- the id of the constraintlist
- the scope of the constrainttuples
- supports or conflictspositive
- tuples are supports iff this value is trueflags
- set of flags giving information about the tuples
-
buildCtrExtension
void buildCtrExtension(String id, XVariables.XVarInteger[] list, AbstractTuple[] tuples, boolean positive, Set<Types.TypeFlag> flags)
-
buildCtrRegular
void buildCtrRegular(String id, XVariables.XVarInteger[] list, Transition[] transitions, String startState, String[] finalStates)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMDD
void buildCtrMDD(String id, XVariables.XVarInteger[] list, Transition[] transitions)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAllDifferent
void buildCtrAllDifferent(String id, XVariables.XVarInteger[] list)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAllDifferentExcept
void buildCtrAllDifferentExcept(String id, XVariables.XVarInteger[] list, int[] except)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAllDifferentList
void buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAllDifferentMatrix
void buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAllDifferent
void buildCtrAllDifferent(String id, XNode<XVariables.XVarInteger>[] trees)
-
buildCtrAllEqual
void buildCtrAllEqual(String id, XVariables.XVarInteger[] list)
Callback method for building a constraintallEqual
.- Parameters:
id
- the id of the constraintlist
- the list of variables of the constraint
-
buildCtrOrdered
void buildCtrOrdered(String id, XVariables.XVarInteger[] list, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrOrdered
void buildCtrOrdered(String id, XVariables.XVarInteger[] list, int[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrOrdered
void buildCtrOrdered(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrLex
void buildCtrLex(String id, XVariables.XVarInteger[][] lists, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrLexMatrix
void buildCtrLexMatrix(String id, XVariables.XVarInteger[][] matrix, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrSum
void buildCtrSum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrSum
void buildCtrSum(String id, XVariables.XVarInteger[] list, int[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrSum
void buildCtrSum(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrSum
void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
-
buildCtrSum
void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, int[] coeffs, Condition condition)
-
buildCtrSum
void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, XVariables.XVarInteger[] coeffs, Condition condition)
-
buildCtrCount
void buildCtrCount(String id, XVariables.XVarInteger[] list, int[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCount
void buildCtrCount(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAtLeast
void buildCtrAtLeast(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAtMost
void buildCtrAtMost(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrExactly
void buildCtrExactly(String id, XVariables.XVarInteger[] list, int value, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrExactly
void buildCtrExactly(String id, XVariables.XVarInteger[] list, int value, XVariables.XVarInteger k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAmong
void buildCtrAmong(String id, XVariables.XVarInteger[] list, int[] values, int k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrAmong
void buildCtrAmong(String id, XVariables.XVarInteger[] list, int[] values, XVariables.XVarInteger k)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNValues
void buildCtrNValues(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNValuesExcept
void buildCtrNValuesExcept(String id, XVariables.XVarInteger[] list, int[] except, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNotAllEqual
void buildCtrNotAllEqual(String id, XVariables.XVarInteger[] list)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCardinality
void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMaximum
void buildCtrMaximum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMaximum
void buildCtrMaximum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMaximum
void buildCtrMaximum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
-
buildCtrMinimum
void buildCtrMinimum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMinimum
void buildCtrMinimum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrMinimum
void buildCtrMinimum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
-
buildCtrElement
void buildCtrElement(String id, XVariables.XVarInteger[] list, Condition condition)
-
buildCtrElement
void buildCtrElement(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
-
buildCtrElement
void buildCtrElement(String id, int[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
-
buildCtrElement
void buildCtrElement(String id, int[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
-
buildCtrElement
void buildCtrElement(String id, XVariables.XVarInteger[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
-
buildCtrChannel
void buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrChannel
void buildCtrChannel(String id, XVariables.XVarInteger[] list1, int startIndex1, XVariables.XVarInteger[] list2, int startIndex2)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrChannel
void buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger value)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrStretch
void buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrStretch
void buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNoOverlap
void buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, int[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNoOverlap
void buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNoOverlap
void buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, int[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrNoOverlap
void buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, XVariables.XVarInteger[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCumulative
void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrBinPacking
void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition condition)
-
buildCtrBinPacking
void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition[] conditions, int startIndex)
-
buildCtrInstantiation
void buildCtrInstantiation(String id, XVariables.XVarInteger[] list, int[] values)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrClause
void buildCtrClause(String id, XVariables.XVarInteger[] pos, XVariables.XVarInteger[] neg)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCircuit
void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCircuit
void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, int size)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildCtrCircuit
void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger size)
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.
-
buildObjToMinimize
void buildObjToMinimize(String id, XVariables.XVarInteger x)
Methods to be implemented for managing objectives
-
buildObjToMaximize
void buildObjToMaximize(String id, XVariables.XVarInteger x)
-
buildObjToMinimize
void buildObjToMinimize(String id, XNodeParent<XVariables.XVarInteger> tree)
-
buildObjToMaximize
void buildObjToMaximize(String id, XNodeParent<XVariables.XVarInteger> tree)
-
buildObjToMinimize
void buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
-
buildObjToMaximize
void buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
-
buildObjToMinimize
void buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
-
buildObjToMaximize
void buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
-
buildObjToMinimize
void buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
-
buildObjToMaximize
void buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
-
buildObjToMinimize
void buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
-
buildObjToMaximize
void buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
-
buildVarSymbolic
void buildVarSymbolic(XVariables.XVarSymbolic x, String[] values)
Methods to be implemented on symbolic variables/constraints
-
buildCtrIntension
void buildCtrIntension(String id, XVariables.XVarSymbolic[] scope, XNodeParent<XVariables.XVarSymbolic> syntaxTreeRoot)
-
buildCtrExtension
void buildCtrExtension(String id, XVariables.XVarSymbolic x, String[] values, boolean positive, Set<Types.TypeFlag> flags)
-
buildCtrExtension
void buildCtrExtension(String id, XVariables.XVarSymbolic[] list, String[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
-
buildCtrAllDifferent
void buildCtrAllDifferent(String id, XVariables.XVarSymbolic[] list)
-
buildAnnotationDecision
void buildAnnotationDecision(XVariables.XVarInteger[] list)
Methods to be implemented on Annotations
-
-