public abstract class Function extends Object
Constructor and Description |
---|
Function(String name)
Create a new Function with a given name that takes a single argument
|
Function(String name,
int numArguments)
Create a new Function with a given name and number of arguments
|
Modifier and Type | Method and Description |
---|---|
abstract double |
apply(double... args)
Method that does the actual calculation of the function value given the arguments
|
static char[] |
getAllowedFunctionCharacters()
Deprecated.
since 0.4.5 All unicode letters are allowed to be used in function names since 0.4.3. This API
Function can be safely ignored. Checks for function name validity can be done using Character.isLetter() et al.
|
String |
getName()
Get the name of the Function
|
int |
getNumArguments()
Get the number of arguments for this function
|
static boolean |
isValidFunctionName(String name) |
public Function(String name, int numArguments)
name
- the name of the FunctionnumArguments
- the number of arguments the function takespublic Function(String name)
name
- the name of the Functionpublic String getName()
public int getNumArguments()
public abstract double apply(double... args)
args
- the set of arguments used for calculating the functionpublic static char[] getAllowedFunctionCharacters()
public static boolean isValidFunctionName(String name)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics