Package jason.functions
Class floor
java.lang.Object
jason.asSemantics.DefaultArithFunction
jason.functions.floor
- All Implemented Interfaces:
ArithFunction
,Serializable
Function: math.floor(N)
: encapsulates java Math.floor(N),
returns the largest double value that is not greater than the argument and is
equal to a mathematical integer.
Examples:
-
math.floor(3.1)
: returns 3. -
math.floor(3.9)
: returns 3.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkArity
(int a) returns true if a is a good number of arguments for the functiondouble
evaluate
(TransitionSystem ts, Term[] args) evaluates/computes the function based on the argsgetName()
returns the name of the functionMethods inherited from class jason.asSemantics.DefaultArithFunction
allowUngroundTerms, toString
-
Constructor Details
-
floor
public floor()
-
-
Method Details
-
getName
Description copied from interface:ArithFunction
returns the name of the function- Specified by:
getName
in interfaceArithFunction
- Overrides:
getName
in classDefaultArithFunction
-
evaluate
Description copied from interface:ArithFunction
evaluates/computes the function based on the args- Specified by:
evaluate
in interfaceArithFunction
- Overrides:
evaluate
in classDefaultArithFunction
- Throws:
Exception
-
checkArity
public boolean checkArity(int a) Description copied from interface:ArithFunction
returns true if a is a good number of arguments for the function- Specified by:
checkArity
in interfaceArithFunction
- Overrides:
checkArity
in classDefaultArithFunction
-