Package jason.functions
Class cos
java.lang.Object
jason.asSemantics.DefaultArithFunction
jason.functions.cos
- All Implemented Interfaces:
ArithFunction
,java.io.Serializable
public class cos extends DefaultArithFunction
Function: math.cos(N)
: encapsulates java Math.cos(N),
returns the trigonometric cosine of an angle.
- Author:
- Jomi
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description cos()
-
Method Summary
Modifier and Type Method Description boolean
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 argsjava.lang.String
getName()
returns the name of the functionMethods inherited from class jason.asSemantics.DefaultArithFunction
allowUngroundTerms, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
cos
public cos()
-
-
Method Details
-
getName
public java.lang.String 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:
java.lang.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
-