public abstract class AbstractArithmeticRule extends AbstractRule
Modifier and Type | Field and Description |
---|---|
protected ArithmeticRuleExpression |
expression |
protected Map<SummationVariable,Formula> |
filters |
name
Constructor and Description |
---|
AbstractArithmeticRule(ArithmeticRuleExpression expression,
Map<SummationVariable,Formula> filterClauses,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Set<Predicate> |
getBodyPredicates()
Get all the predicates used in the body of this rule (no filters).
|
ArithmeticRuleExpression |
getExpression() |
RawQuery |
getGroundingQuery(AtomManager atomManager)
Get the formual that we can use for grounding.
|
Formula |
getRewritableGroundingFormula(AtomManager atomManager)
Get a grounding formual that can be rewritten.
|
void |
ground(Constant[] constants,
Map<Variable,Integer> variableMap,
AtomManager atomManager,
List<GroundRule> results)
Get the formual that we can use for grounding.
|
int |
groundAll(AtomManager atomManager,
GroundRuleStore groundRuleStore)
Adds all GroundRules to a GroundRuleStore using the AtomManager
to instantiate ground atoms.
|
int |
hashCode() |
boolean |
hasSummation() |
protected abstract AbstractGroundArithmeticRule |
makeGroundRule(float[] coefficients,
GroundAtom[] atoms,
FunctionComparator comparator,
float constant) |
protected abstract AbstractGroundArithmeticRule |
makeGroundRule(List<Float> coefficients,
List<GroundAtom> atoms,
FunctionComparator comparator,
float constant) |
boolean |
requiresSplit()
Check if this rule needs to be broken up into multiple rules.
|
List<Rule> |
split()
Split this rule into multiple rules.
|
boolean |
supportsGroundingQueryRewriting()
Does this rule support rewriting the grounding formual.
|
boolean |
supportsIndividualGrounding()
Does this rule support grounding out single instances at a time.
|
getName
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isWeighted
protected final ArithmeticRuleExpression expression
protected final Map<SummationVariable,Formula> filters
public AbstractArithmeticRule(ArithmeticRuleExpression expression, Map<SummationVariable,Formula> filterClauses, String name)
public boolean hasSummation()
public ArithmeticRuleExpression getExpression()
public boolean requiresSplit()
Rule
requiresSplit
in interface Rule
requiresSplit
in class AbstractRule
public List<Rule> split()
Rule
split
in interface Rule
split
in class AbstractRule
public Set<Predicate> getBodyPredicates()
protected abstract AbstractGroundArithmeticRule makeGroundRule(float[] coefficients, GroundAtom[] atoms, FunctionComparator comparator, float constant)
protected abstract AbstractGroundArithmeticRule makeGroundRule(List<Float> coefficients, List<GroundAtom> atoms, FunctionComparator comparator, float constant)
public boolean supportsGroundingQueryRewriting()
Rule
public Formula getRewritableGroundingFormula(AtomManager atomManager)
Rule
public boolean supportsIndividualGrounding()
Rule
public RawQuery getGroundingQuery(AtomManager atomManager)
Rule
public void ground(Constant[] constants, Map<Variable,Integer> variableMap, AtomManager atomManager, List<GroundRule> results)
Rule
public int groundAll(AtomManager atomManager, GroundRuleStore groundRuleStore)
Rule
atomManager
- AtomManager on which to base the groundinggroundRuleStore
- store for new GroundRulesCopyright © 2020 University of California, Santa Cruz. All rights reserved.