public class UnweightedGroundArithmeticRule extends AbstractGroundArithmeticRule implements UnweightedGroundRule
AbstractGroundArithmeticRule
that is unweighted, i.e., it is a hard
constraint that must always hold.atoms, coeffs, comparator, constant, rule
Modifier | Constructor and Description |
---|---|
protected |
UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule,
double[] coeffs,
GroundAtom[] atoms,
FunctionComparator comparator,
double constant) |
protected |
UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule,
List<Double> coeffs,
List<GroundAtom> atoms,
FunctionComparator comparator,
double 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() |
getAtoms, getCoefficients, getComparator, getConstant, getOrderedAtoms, negate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAtoms, negate
protected UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule, List<Double> coeffs, List<GroundAtom> atoms, FunctionComparator comparator, double constant)
protected UnweightedGroundArithmeticRule(UnweightedArithmeticRule rule, double[] coeffs, GroundAtom[] atoms, FunctionComparator comparator, double 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 © 2018 University of California, Santa Cruz. All rights reserved.