Package org.xcsp.parser.entries
Class XConstraints.XSlide
- java.lang.Object
-
- org.xcsp.parser.entries.ParsingEntry
-
- org.xcsp.parser.entries.ParsingEntry.CEntry
-
- org.xcsp.parser.entries.XConstraints.CEntryReifiable
-
- org.xcsp.parser.entries.XConstraints.XSlide
-
- Enclosing class:
- XConstraints
public static final class XConstraints.XSlide extends XConstraints.CEntryReifiable
The class for representing the meta-constraint.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xcsp.parser.entries.ParsingEntry
ParsingEntry.CEntry, ParsingEntry.OEntry, ParsingEntry.VEntry
-
-
Field Summary
Fields Modifier and Type Field Description int[]
collects
The values of the attributes offset and collect for each list.XConstraints.CChild[]
lists
The sequence of child elements- .
int[]
offsets
The values of the attributes offset and collect for each list.XVariables.XVar[][]
scopes
A two-dimensional array representing the scopes of the slided constraints.XConstraints.CEntryReifiable
template
The constraint template for the group or meta-constraint slide.-
Fields inherited from class org.xcsp.parser.entries.XConstraints.CEntryReifiable
reification, softening
-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry
attributes, classes, flags, id, note
-
-
Constructor Summary
Constructors Constructor Description XSlide(XConstraints.CChild[] lists, int[] offsets, int[] collects, XConstraints.XCtr template, XVariables.XVar[][] scopes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XVariables.XVar[][]
buildScopes(XVariables.XVar[][] varsOfLists, int[] offset, int[] collect, boolean circular)
Builds the scopes of the constraints involved in the meta-constraint.LinkedHashSet<XVariables.XVar>
collectVars(LinkedHashSet<XVariables.XVar> set)
Collect the set of variables involved in this element, and add them to the specified set.boolean
subjectToAbstraction()
Returns true iff this element is subject to abstraction, i.e., contains parameters (tokens of the form %i or %...).String
toString()
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry.CEntry
vars
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry
copyAttributesOf, getAttributeValue, getAttributeValue, getAttributeValue
-
-
-
-
Field Detail
-
lists
public final XConstraints.CChild[] lists
The sequence of child elements- . Usually, only one such child.
-
offsets
public final int[] offsets
The values of the attributes offset and collect for each list.
-
collects
public final int[] collects
The values of the attributes offset and collect for each list.
-
template
public final XConstraints.CEntryReifiable template
The constraint template for the group or meta-constraint slide. It is either a stand-alone constraint template or an elementcontaining a stand-alone constraint template.
-
scopes
public final XVariables.XVar[][] scopes
A two-dimensional array representing the scopes of the slided constraints.
-
-
Constructor Detail
-
XSlide
public XSlide(XConstraints.CChild[] lists, int[] offsets, int[] collects, XConstraints.XCtr template, XVariables.XVar[][] scopes)
-
-
Method Detail
-
buildScopes
public static XVariables.XVar[][] buildScopes(XVariables.XVar[][] varsOfLists, int[] offset, int[] collect, boolean circular)
Builds the scopes of the constraints involved in the meta-constraint.
-
collectVars
public LinkedHashSet<XVariables.XVar> collectVars(LinkedHashSet<XVariables.XVar> set)
Description copied from class:ParsingEntry.CEntry
Collect the set of variables involved in this element, and add them to the specified set.- Overrides:
collectVars
in classXConstraints.CEntryReifiable
-
subjectToAbstraction
public boolean subjectToAbstraction()
Description copied from class:ParsingEntry.CEntry
Returns true iff this element is subject to abstraction, i.e., contains parameters (tokens of the form %i or %...).- Specified by:
subjectToAbstraction
in classParsingEntry.CEntry
-
toString
public String toString()
- Overrides:
toString
in classXConstraints.CEntryReifiable
-
-