jason.asSemantics
Interface ArithFunction

Package class diagram package ArithFunction
All Known Implementing Classes:
Abs, Average, ceil, Count, DefaultArithFunction, e, floor, Length, log, Max, Min, pi, Random, Round, RuleToFunction, Sqrt, StdDev, Sum, time

public interface ArithFunction

Common interface for all arithmetic functions


Method Summary
 boolean allowUngroundTerms()
          returns true if the arguments of the function can be unground (as in .count)
 boolean checkArity(int a)
          returns true if a is a good number of arguments for the function
 double evaluate(TransitionSystem ts, Term[] args)
          evaluates/computes the function based on the args
 java.lang.String getName()
          returns the name of the function
 

Method Detail

getName

java.lang.String getName()
returns the name of the function


evaluate

double evaluate(TransitionSystem ts,
                Term[] args)
                throws java.lang.Exception
evaluates/computes the function based on the args

Throws:
java.lang.Exception

checkArity

boolean checkArity(int a)
returns true if a is a good number of arguments for the function


allowUngroundTerms

boolean allowUngroundTerms()
returns true if the arguments of the function can be unground (as in .count)