public class GroundLinearConstraint extends Object implements UnweightedGroundRule
GroundAtoms
Constructor and Description |
---|
GroundLinearConstraint(GroundAtom[] atoms,
float[] coeffs,
FunctionComparator comp,
float value) |
Modifier and Type | Method and Description |
---|---|
String |
baseToString()
Get a to string for the base of the rule without weight or square.
|
Set<GroundAtom> |
getAtoms() |
ConstraintTerm |
getConstraintDefinition() |
double |
getInfeasibility()
Returns the infeasibility of the truth values of this GroundRule's
GroundAtoms . |
UnweightedRule |
getRule() |
List<GroundRule> |
negate()
Negate this ground rule and get the corresponding ground rule(s).
|
public GroundLinearConstraint(GroundAtom[] atoms, float[] coeffs, FunctionComparator comp, float value)
public Set<GroundAtom> getAtoms()
getAtoms
in interface GroundRule
GroundAtoms
which determine this
GroundRule's incompatibility or infeasibilitypublic UnweightedRule getRule()
getRule
in interface GroundRule
getRule
in interface UnweightedGroundRule
Rule
public ConstraintTerm getConstraintDefinition()
getConstraintDefinition
in interface UnweightedGroundRule
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 List<GroundRule> negate()
GroundRule
negate
in interface GroundRule
public String baseToString()
GroundRule
baseToString
in interface GroundRule
Copyright © 2020 University of California, Santa Cruz. All rights reserved.