public class AggregateAtom extends ASPBodyElement
| Constructor and Description |
|---|
AggregateAtom()
Empty default constructor.
|
AggregateAtom(AggregateAtom other)
Copy-Constructor
|
AggregateAtom(ASPOperator.AggregateFunction func,
List<AggregateElement> elements)
Creates a new Aggregate with the given aggregate function and the given
aggregate elements.
|
AggregateAtom(ASPOperator.AggregateFunction func,
List<AggregateElement> elements,
ASPOperator.BinaryOperator relation,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
Creates a new Aggregate with the given aggregate function, the given
aggregate elements, and the given aggregate relation.
|
AggregateAtom(ASPOperator.AggregateFunction func,
List<AggregateElement> elements,
ASPOperator.BinaryOperator relation,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t,
ASPOperator.BinaryOperator relation2,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t2)
Creates a new Aggregate with the given aggregate function, the given
aggregate elements, and the given left and right aggregate relations.
|
| Modifier and Type | Method and Description |
|---|---|
AggregateAtom |
clone() |
List<AggregateElement> |
getAggregateElements() |
Set<ASPAtom> |
getAtoms() |
ASPOperator.AggregateFunction |
getFunction()
Returns the aggregate function.
|
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> |
getLeftGuard()
Get the left relation term (right guard).
|
ASPOperator.BinaryOperator |
getLeftOperator()
Returns the operator of the left aggregate relation.
|
SortedSet<ASPLiteral> |
getLiterals()
Returns all literals in this element in form of a SortedSet.
|
Set<net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicates() |
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> |
getRightGuard()
Returns the right relation term (right guard).
|
ASPOperator.BinaryOperator |
getRightOperator()
Returns the operator of the right aggregate relation.
|
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms(Class<C> cls) |
boolean |
hasLeftRelation()
Returns true if the aggregate has a left
aggregate relation (meaning a term
that the aggregate's resulting value will
be compared to using a comparative operator).
|
boolean |
hasRightRelation()
Returns true if the aggregate has a right
aggregate relation (meaning a term
that the aggregate's resulting value will
be compared to using a comparative operator).
|
boolean |
isLiteral() |
void |
setFunction(ASPOperator.AggregateFunction function)
Sets the aggregate function.
|
void |
setLeftGuard(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> relationTerm)
Set the left relation term (right guard).
|
void |
setLeftOperator(ASPOperator.BinaryOperator op)
Sets the operator of the left aggregate relation.
|
void |
setRightGuard(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> relationTerm)
Set the right relation term (right guard).
|
void |
setRightOperator(ASPOperator.BinaryOperator op)
Sets the operator of the right aggregate relation.
|
AggregateAtom |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v) |
String |
toString() |
containsTermsOfType, exchange, getPredicateCls, isGround, isWellFormed, substitutepublic AggregateAtom()
public AggregateAtom(ASPOperator.AggregateFunction func, List<AggregateElement> elements)
func - an aggregate functionelements - list of aggregate elementspublic AggregateAtom(ASPOperator.AggregateFunction func, List<AggregateElement> elements, ASPOperator.BinaryOperator relation, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
func - an aggregate functionelements - list of aggregate elementspublic AggregateAtom(ASPOperator.AggregateFunction func, List<AggregateElement> elements, ASPOperator.BinaryOperator relation, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t, ASPOperator.BinaryOperator relation2, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t2)
func - an aggregate functionelements - list of aggregate elementspublic AggregateAtom(AggregateAtom other)
other - public SortedSet<ASPLiteral> getLiterals()
ASPBodyElementgetLiterals in class ASPBodyElementpublic Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetPredicates in class ASPElementpublic Set<ASPAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in class ASPElementpublic AggregateAtom substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v)
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in class ASPBodyElementpublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in class ASPElementpublic AggregateAtom clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in class ASPElementpublic boolean isLiteral()
public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
public List<AggregateElement> getAggregateElements()
public boolean hasLeftRelation()
public boolean hasRightRelation()
public ASPOperator.AggregateFunction getFunction()
public void setFunction(ASPOperator.AggregateFunction function)
an - aggregate functionpublic ASPOperator.BinaryOperator getRightOperator()
public void setRightOperator(ASPOperator.BinaryOperator op)
comparative - operatorpublic net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getRightGuard()
public void setRightGuard(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> relationTerm)
Term - public ASPOperator.BinaryOperator getLeftOperator()
public void setLeftOperator(ASPOperator.BinaryOperator op)
comparative - operatorpublic net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getLeftGuard()
public void setLeftGuard(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> relationTerm)
Term - Copyright © 2019. All rights reserved.