public abstract class AbstractGroundLogicalRule extends Object implements GroundRule
Modifier and Type | Field and Description |
---|---|
protected GeneralFunction |
dissatisfaction |
protected List<GroundAtom> |
negLiterals |
protected List<GroundAtom> |
posLiterals |
protected AbstractLogicalRule |
rule |
Modifier | Constructor and Description |
---|---|
protected |
AbstractGroundLogicalRule(AbstractLogicalRule rule,
List<GroundAtom> posLiterals,
List<GroundAtom> negLiterals) |
Modifier and Type | Method and Description |
---|---|
String |
baseToString()
Get a to string for the base of the rule without weight or square.
|
boolean |
equals(Object other) |
Set<GroundAtom> |
getAtoms() |
protected GeneralFunction |
getFunction(boolean mergeConstants)
Construct function definition representing the ground rule's dissatisfaction.
|
List<GroundAtom> |
getNegativeAtoms() |
List<GroundAtom> |
getPositiveAtoms() |
int |
hashCode() |
protected abstract GroundRule |
instantiateNegatedGroundRule(Formula disjunction,
List<GroundAtom> positiveAtoms,
List<GroundAtom> negativeAtoms,
String name) |
List<GroundRule> |
negate()
Negating logical rules (a disjunction) will generate multiple other rules.
|
int |
size() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getRule
protected final AbstractLogicalRule rule
protected final List<GroundAtom> posLiterals
protected final List<GroundAtom> negLiterals
protected final GeneralFunction dissatisfaction
protected AbstractGroundLogicalRule(AbstractLogicalRule rule, List<GroundAtom> posLiterals, List<GroundAtom> negLiterals)
posLiterals
- the positive literals (ground atoms) in the negated DNF.negLiterals
- the negative literals (ground atoms) in the negated DNF.protected GeneralFunction getFunction(boolean mergeConstants)
public Set<GroundAtom> getAtoms()
getAtoms
in interface GroundRule
GroundAtoms
which determine this
GroundRule's incompatibility or infeasibilitypublic List<GroundAtom> getPositiveAtoms()
public List<GroundAtom> getNegativeAtoms()
public int size()
public List<GroundRule> negate()
negate
in interface GroundRule
protected abstract GroundRule instantiateNegatedGroundRule(Formula disjunction, List<GroundAtom> positiveAtoms, List<GroundAtom> negativeAtoms, String name)
public String baseToString()
GroundRule
baseToString
in interface GroundRule
Copyright © 2022 University of California, Santa Cruz. All rights reserved.