public class SummationAtom extends Object implements SummationAtomOrAtom
Atom
that can additionally take SummationVariables
as arguments.
SummationAtoms can be used in an ArithmeticRuleExpression
.
Note that SummationAtom is not a subclass of Atom.Modifier and Type | Field and Description |
---|---|
protected SummationVariableOrTerm[] |
args |
protected Predicate |
predicate |
Constructor and Description |
---|
SummationAtom(Predicate predicate,
SummationVariableOrTerm[] args) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkSchema()
Verifies that this atom has valid arguments.
|
boolean |
equals(Object oth) |
SummationVariableOrTerm[] |
getArguments()
Returns the arguments associated with this SummationAtom.
|
int |
getArity()
Returns the number of arguments to the associated Predicate.
|
int |
getNumSummationVariables() |
Predicate |
getPredicate()
Returns the predicate associated with this SummationAtom.
|
QueryAtom |
getQueryAtom() |
int |
hashCode() |
String |
toString() |
protected final Predicate predicate
protected final SummationVariableOrTerm[] args
public SummationAtom(Predicate predicate, SummationVariableOrTerm[] args)
protected void checkSchema()
IllegalArgumentException
- if the number of arguments doesn't match the
number of arguments of the predicateIllegalArgumentException
- if any argument is nullpublic QueryAtom getQueryAtom()
public Predicate getPredicate()
public int getArity()
getArity
in interface SummationAtomOrAtom
public SummationVariableOrTerm[] getArguments()
public int getNumSummationVariables()
Copyright © 2020 University of California, Santa Cruz. All rights reserved.