public abstract class AbstractArithmeticRule extends AbstractRule
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX
Prefix of property keys used by this class.
|
protected String |
delim |
static String |
DELIM_DEFAULT |
static String |
DELIM_KEY
The delimiter to use when building summation substitutions.
|
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() |
int |
groundAll(AtomManager atomManager,
GroundRuleStore groundRuleStore)
Adds all GroundRules to a GroundRuleStore using the AtomManager
to instantiate ground atoms.
|
int |
groundNonSummationRule(ResultList groundVariables,
AtomManager atomManager,
GroundRuleStore groundRuleStore) |
int |
hashCode() |
boolean |
hasSummation() |
protected abstract AbstractGroundArithmeticRule |
makeGroundRule(double[] coeffs,
GroundAtom[] atoms,
FunctionComparator comparator,
double c) |
protected abstract AbstractGroundArithmeticRule |
makeGroundRule(List<Double> coeffs,
List<GroundAtom> atoms,
FunctionComparator comparator,
double c) |
void |
validateGroundRule(AtomManager atomManager)
Validate the abstract rule in the context of of grounding.
|
getName
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isWeighted
public static final String CONFIG_PREFIX
public static final String DELIM_KEY
public static final String DELIM_DEFAULT
protected final ArithmeticRuleExpression expression
protected final Map<SummationVariable,Formula> filters
protected String delim
public AbstractArithmeticRule(ArithmeticRuleExpression expression, Map<SummationVariable,Formula> filterClauses, String name)
public boolean hasSummation()
public ArithmeticRuleExpression getExpression()
public int groundAll(AtomManager atomManager, GroundRuleStore groundRuleStore)
Rule
atomManager
- AtomManager on which to base the groundinggroundRuleStore
- store for new GroundRulespublic Set<Predicate> getBodyPredicates()
public int groundNonSummationRule(ResultList groundVariables, AtomManager atomManager, GroundRuleStore groundRuleStore)
public void validateGroundRule(AtomManager atomManager)
protected abstract AbstractGroundArithmeticRule makeGroundRule(double[] coeffs, GroundAtom[] atoms, FunctionComparator comparator, double c)
protected abstract AbstractGroundArithmeticRule makeGroundRule(List<Double> coeffs, List<GroundAtom> atoms, FunctionComparator comparator, double c)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.