public abstract class Function extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
numArguments |
| 构造器和说明 |
|---|
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
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract double |
apply(double... args)
Method that does the actual calculation of the function value given the arguments
|
static char[] |
getAllowedFunctionCharacters()
已过时。
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) |
void |
setNumArguments(int numArguments) |
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 void setNumArguments(int numArguments)
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)
Copyright © 2025. All rights reserved.