public class ArithFunctionTerm extends Structure implements NumberTerm
Modifier and Type | Field and Description |
---|---|
protected NumberTerm |
value |
emptyTermArray, emptyTermList
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Constructor and Description |
---|
ArithFunctionTerm(ArithFunction function) |
ArithFunctionTerm(ArithFunctionTerm af) |
ArithFunctionTerm(java.lang.String functor,
int arity) |
Modifier and Type | Method and Description |
---|---|
Term |
capply(Unifier u)
computes the value for this arithmetic function (as defined in the NumberTerm interface)
|
boolean |
checkArity(int a) |
NumberTerm |
clone()
make a deep copy of the terms
|
int |
compareTo(Term o) |
boolean |
equals(java.lang.Object t) |
Agent |
getAgent() |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML
|
java.lang.String |
getErrorMsg() |
boolean |
isArithExpr() |
boolean |
isAtom() |
boolean |
isLiteral() |
boolean |
isNumeric() |
boolean |
isStructure() |
java.util.Iterator<Unifier> |
logicalConsequence(Agent ag,
Unifier un)
logicalConsequence checks whether one particular predicate
is a logical consequence of the belief base.
|
void |
setAgent(Agent ag) |
double |
solve()
returns the numeric value of the term
|
addTerm, addTerms, addTerms, calcHashCode, countVars, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isGround, isUnary, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, toString, varToReplace
getFunctor
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated
getCyclicVar, getSrcInfo, hashCode, isCyclicTerm, isInternalAction, isList, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
countVars, getCyclicVar, getSrcInfo, hasVar, isCyclicTerm, isGround, isInternalAction, isList, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, setSrcInfo, subsumes
protected NumberTerm value
public ArithFunctionTerm(ArithFunction function)
public ArithFunctionTerm(ArithFunctionTerm af)
public ArithFunctionTerm(java.lang.String functor, int arity)
public boolean isNumeric()
isNumeric
in interface Term
isNumeric
in class DefaultTerm
public boolean isAtom()
public boolean isStructure()
isStructure
in interface Term
isStructure
in class Structure
public boolean isLiteral()
public boolean isArithExpr()
isArithExpr
in interface Term
isArithExpr
in class DefaultTerm
public void setAgent(Agent ag)
public Agent getAgent()
public Term capply(Unifier u)
public double solve() throws NoValueException
NumberTerm
solve
in interface NumberTerm
NoValueException
public boolean checkArity(int a)
public java.util.Iterator<Unifier> logicalConsequence(Agent ag, Unifier un)
Literal
logicalConsequence
in interface LogicalFormula
logicalConsequence
in class Literal
public boolean equals(java.lang.Object t)
public int compareTo(Term o)
public java.lang.String getErrorMsg()
getErrorMsg
in class DefaultTerm
public NumberTerm clone()
Structure