public abstract class AbstractGroundLogicalRule extends Object implements GroundRule
Modifier and Type | Field and Description |
---|---|
protected GeneralFunction |
function |
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,
int rvaCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Set<GroundAtom> |
getAtoms() |
protected GeneralFunction |
getFunction() |
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 function
protected AbstractGroundLogicalRule(AbstractLogicalRule rule, List<GroundAtom> posLiterals, List<GroundAtom> negLiterals, int rvaCount)
rvaCount
- the number of RandomVariableAtoms (non-constants) in the literals.protected GeneralFunction getFunction()
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)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.