public class Round extends DefaultArithFunction
Function: math.round(N)
: encapsulates java Math.round(N);
returns the closest integer to the argument.
Examples:
math.round(1.1)
: returns 1.math.round(1.9)
: returns 2.Constructor and Description |
---|
Round() |
Modifier and Type | Method and Description |
---|---|
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
|
allowUngroundTerms, toString
public java.lang.String getName()
ArithFunction
getName
in interface ArithFunction
getName
in class DefaultArithFunction
public double evaluate(TransitionSystem ts, Term[] args) throws java.lang.Exception
ArithFunction
evaluate
in interface ArithFunction
evaluate
in class DefaultArithFunction
java.lang.Exception
public boolean checkArity(int a)
ArithFunction
checkArity
in interface ArithFunction
checkArity
in class DefaultArithFunction