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 void
doReplaceVariable(PVariable obsolete, PVariable replacement)
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.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()
PVariable
getWho()
PVariable
getWithWhom()
boolean
isEliminable()
A weak inequality constraint is eliminable if who is the same as withWhom, or if any if them is undeducible.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.protected java.lang.String
toStringRest()
-
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:
getDeferringVariables
in classVariableDeferredPConstraint
-
toStringRest
protected java.lang.String toStringRest()
- Specified by:
toStringRest
in classBasePConstraint
-
doReplaceVariable
public void doReplaceVariable(PVariable obsolete, PVariable replacement)
- Specified by:
doReplaceVariable
in classBasePConstraint
-
getDeducedVariables
public java.util.Set<PVariable> getDeducedVariables()
Description copied from interface:PConstraint
The 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()
-
-