Package org.xcsp.parser.entries
Class XVariables.XVarInteger
- java.lang.Object
-
- org.xcsp.parser.entries.ParsingEntry
-
- org.xcsp.parser.entries.ParsingEntry.VEntry
-
- org.xcsp.parser.entries.XVariables.XVar
-
- org.xcsp.parser.entries.XVariables.XVarInteger
-
- Enclosing class:
- XVariables
public static final class XVariables.XVarInteger extends XVariables.XVar implements IVar.Var
The following classes are introduced, only for being able to have types for variables in the parser interface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xcsp.parser.entries.ParsingEntry
ParsingEntry.CEntry, ParsingEntry.OEntry, ParsingEntry.VEntry
-
Nested classes/interfaces inherited from interface org.xcsp.common.IVar
IVar.Var, IVar.VarSymbolic
-
-
Field Summary
-
Fields inherited from class org.xcsp.parser.entries.XVariables.XVar
degree, dom
-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry.VEntry
type
-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry
attributes, classes, flags, id, note
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XVarInteger(String id, Types.TypeVar type, Domains.IDom dom)
Builds an integer variable with the specified id, type and domain.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
allValues()
static long
domainCartesianProductSize(XVariables.XVarInteger[] scp)
Returns the size of the Cartesian product for the domains of the specified variables.long
firstValue()
boolean
isZeroOne()
long
lastValue()
XParser.TypePrimitive
whichPrimitive()
-
Methods inherited from class org.xcsp.parser.entries.XVariables.XVar
build, build, id, toString
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry.VEntry
getType
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry
copyAttributesOf, getAttributeValue, getAttributeValue, getAttributeValue
-
-
-
-
Constructor Detail
-
XVarInteger
protected XVarInteger(String id, Types.TypeVar type, Domains.IDom dom)
Builds an integer variable with the specified id, type and domain.
-
-
Method Detail
-
domainCartesianProductSize
public static long domainCartesianProductSize(XVariables.XVarInteger[] scp)
Returns the size of the Cartesian product for the domains of the specified variables. Importantly, if this value does not fit within along
, -1 is returned.
-
whichPrimitive
public XParser.TypePrimitive whichPrimitive()
-
firstValue
public long firstValue()
-
lastValue
public long lastValue()
-
isZeroOne
public boolean isZeroOne()
-
-