Class Inequality
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.DeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality
-
- All Implemented Interfaces:
PConstraint,PTraceable
public class Inequality extends VariableDeferredPConstraint
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
pBody
-
Fields inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint
COMPARE_BY_MONOTONOUS_ID
-
-
Constructor Summary
Constructors Constructor Description Inequality(PBody pBody, PVariable who, PVariable withWhom)Inequality(PBody pBody, PVariable who, PVariable withWhom, boolean weak)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoReplaceVariable(PVariable obsolete, PVariable replacement)voideliminateWeak()Eliminates a weak inequality constraint if it can be ignored when who is the same as withWhom, or if any if them is undeducible.java.util.Set<PVariable>getDeducedVariables()The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).java.util.Set<PVariable>getDeferringVariables()PVariablegetWho()PVariablegetWithWhom()booleanisEliminable()A weak inequality constraint is eliminable if who is the same as withWhom, or if any if them is undeducible.booleanisWeak()The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is undeducible.protected java.lang.StringtoStringRest()-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
isReadyAt
-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
checkSanity, delete, getAffectedVariables, getBody, getFunctionalDependencies, getMonotonousID, getPSystem, replaceVariable, toString
-
-
-
-
Method Detail
-
getDeferringVariables
public java.util.Set<PVariable> getDeferringVariables()
- Specified by:
getDeferringVariablesin classVariableDeferredPConstraint
-
toStringRest
protected java.lang.String toStringRest()
- Specified by:
toStringRestin classBasePConstraint
-
doReplaceVariable
public void doReplaceVariable(PVariable obsolete, PVariable replacement)
- Specified by:
doReplaceVariablein classBasePConstraint
-
getDeducedVariables
public java.util.Set<PVariable> getDeducedVariables()
Description copied from interface:PConstraintThe set of variables whose potential values can be enumerated (once all non-deduced variables have known values).
-
isWeak
public boolean isWeak()
The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is undeducible.- Returns:
- the weak
-
isEliminable
public boolean isEliminable()
A weak inequality constraint is eliminable if who is the same as withWhom, or if any if them is undeducible.
-
eliminateWeak
public void eliminateWeak()
Eliminates a weak inequality constraint if it can be ignored when who is the same as withWhom, or if any if them is undeducible.
-
getWho
public PVariable getWho()
-
getWithWhom
public PVariable getWithWhom()
-
-