Package net.sf.tweety.action.grounding
Class VarsNeqRequirement
- java.lang.Object
-
- net.sf.tweety.action.grounding.VarsNeqRequirement
-
- All Implemented Interfaces:
GroundingRequirement
public class VarsNeqRequirement extends Object implements GroundingRequirement
This class represents a single grounding requirement stating that two variables are not allowed to be substituted by the same constant.- Author:
- Sebastian Homann
-
-
Constructor Summary
Constructors Constructor Description VarsNeqRequirement(net.sf.tweety.logics.commons.syntax.Variable first, net.sf.tweety.logics.commons.syntax.Variable second)Creates a new grounding requirement for the two given variables that are not allowed to be set to the same constant in one ground instance.
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)inthashCode()booleanisValid(Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.Constant> assignment)This method checks, if an assignment of constants to variables satisfies a given grounding condition.StringtoString()
-
-
-
Constructor Detail
-
VarsNeqRequirement
public VarsNeqRequirement(net.sf.tweety.logics.commons.syntax.Variable first, net.sf.tweety.logics.commons.syntax.Variable second)Creates a new grounding requirement for the two given variables that are not allowed to be set to the same constant in one ground instance.- Parameters:
first- a variable.second- another variable.
-
-
Method Detail
-
isValid
public boolean isValid(Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.Constant> assignment)
Description copied from interface:GroundingRequirementThis method checks, if an assignment of constants to variables satisfies a given grounding condition.- Specified by:
isValidin interfaceGroundingRequirement- Parameters:
assignment- the assignment to be validated.- Returns:
- true, if the assignment satisfies this requirement.
-
-