public class UnweightedGroundArithmeticRule extends AbstractGroundArithmeticRule implements UnweightedGroundRule
AbstractGroundArithmeticRule
that is unweighted, i.e., it is a hard
constraint that must always hold.atoms, coefficients, comparator, constant, rule
Modifier | Constructor and Description |
---|---|
protected |
UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule,
float[] coefficients,
GroundAtom[] atoms,
FunctionComparator comparator,
float constant) |
protected |
UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule,
List<Float> coefficients,
List<GroundAtom> atoms,
FunctionComparator comparator,
float constant) |
Modifier and Type | Method and Description |
---|---|
ConstraintTerm |
getConstraintDefinition() |
double |
getInfeasibility()
Returns the infeasibility of the truth values of this GroundRule's
GroundAtoms . |
UnweightedRule |
getRule() |
String |
toString() |
baseToString, getAtoms, getCoefficients, getComparator, getConstant, getOrderedAtoms, negate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
baseToString, getAtoms, negate
protected UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule, List<Float> coefficients, List<GroundAtom> atoms, FunctionComparator comparator, float constant)
protected UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule, float[] coefficients, GroundAtom[] atoms, FunctionComparator comparator, float constant)
public UnweightedRule getRule()
getRule
in interface GroundRule
getRule
in interface UnweightedGroundRule
getRule
in class AbstractGroundArithmeticRule
Rule
public double getInfeasibility()
UnweightedGroundRule
GroundAtoms
.
Specifically, returns the distance between the value of the constraint's functional definition and that function's nearest feasible value.
Infeasibility is always non-negative.
getInfeasibility
in interface UnweightedGroundRule
public ConstraintTerm getConstraintDefinition()
getConstraintDefinition
in interface UnweightedGroundRule
public String toString()
toString
in class AbstractGroundArithmeticRule
Copyright © 2020 University of California, Santa Cruz. All rights reserved.