Package org.xcsp.common
Interface Condition
-
- All Known Implementing Classes:
Condition.ConditionIntset,Condition.ConditionIntvl,Condition.ConditionPar,Condition.ConditionPar1,Condition.ConditionPar2,Condition.ConditionRel,Condition.ConditionSet,Condition.ConditionVal,Condition.ConditionVar
public interface ConditionThe root interface for denoting a condition, i.e., a pair (operator,operand) used in many XCSP3 constraints.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCondition.ConditionIntsetRepresents a condition composed of a set operator and an array of values (int) as (right) operand.static classCondition.ConditionIntvlRepresents a condition composed of a set operator and an interval (defined by its two inclusive bounds) as (right) operand.static classCondition.ConditionParstatic classCondition.ConditionPar1static classCondition.ConditionPar2static classCondition.ConditionRelRepresents a condition based on a relational operator.static classCondition.ConditionSetRepresents a condition based on a set operator.static classCondition.ConditionValRepresents a condition composed of a relational operator and a value (long integer) as (right) operand.static classCondition.ConditionVarRepresents a condition composed of a relational operator and a variable as operand.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ConditionbuildFrom(Object operator, Object limit)Returns an object instance of a class implementingCondition, built from the specified arguments.default int[]filtering(int[] values)default IVarinvolvedVar()Returns the variable involved in the condition, if one is present,nullotherwise.Types.TypeExproperatorTypeExpr()ObjectrightTerm()static XNodeParent<IVar>toNode(IVar x, Condition condition)
-
-
-
Method Detail
-
buildFrom
static Condition buildFrom(Object operator, Object limit)
Returns an object instance of a class implementingCondition, built from the specified arguments.- Parameters:
operator- a relational operatorTypeConditionOperatorRel, a set operatorTypeConditionOperatorSetor a more general objectTypeConditionOperatorlimit- an integer (objectNumber), a variable (objectIVar), a range (objectRange) or a 1-dimensional array ofint- Returns:
- an object instance of a class implementing
Condition, built from the specified arguments
-
toNode
static XNodeParent<IVar> toNode(IVar x, Condition condition)
-
involvedVar
default IVar involvedVar()
Returns the variable involved in the condition, if one is present,nullotherwise.- Returns:
- the variable involved in the condition, if one is present,
nullotherwise
-
operatorTypeExpr
Types.TypeExpr operatorTypeExpr()
-
rightTerm
Object rightTerm()
-
filtering
default int[] filtering(int[] values)
-
-