public abstract class Function extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
protected int |
numArguments |
| 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()
Get the set of characters which are allowed for use in Function names.
|
String |
getName()
Get the name of the Function
|
int |
getNumArguments()
Get the number of arguments for this function
|
protected final String name
protected final 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 abstract double apply(double... args)
args - the set of arguments used for calculating the functionpublic static char[] getAllowedFunctionCharacters()
Copyright © 2014. All rights reserved.