Class expression.Function
All Packages Class Hierarchy This Package Previous Next Index
Class expression.Function
java.lang.Object
|
+----expression.Function
- public class Function
- extends Object
Abstract class type for functions.
Each function needs to specify the number of arguments in its variable
list. The Function prototype can take at most two arguments. Functions
with more arguments can be represented by multiple function pairs.
-
numArgs
- Number of arguments the function can take
-
Function()
-
-
apply(double)
- Apply function to a single argument.
-
apply(double, double)
- Apply function to two arguments.
-
toString()
- Return the string representation of the function.
numArgs
public int numArgs
- Number of arguments the function can take
Function
public Function()
apply
public abstract double apply(double a)
- Apply function to a single argument.
apply
public abstract double apply(double a,
double b)
- Apply function to two arguments.
toString
public abstract String toString()
- Return the string representation of the function.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index