jhplot.math.exp4j.function
Class Function
- java.lang.Object
- 
- jhplot.math.exp4j.function.Function
 
- 
 
 public abstract class Function extends java.lang.ObjectA class representing a Function which can be used in an expression
- 
- 
Constructor SummaryConstructors Constructor and Description Function(java.lang.String name)Create a new Function with a given name that takes a single argumentFunction(java.lang.String name, int numArguments)Create a new Function with a given name and number of arguments
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description abstract doubleapply(double... args)Method that does the actual calculation of the function value given the argumentsstatic 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.java.lang.StringgetName()Get the name of the FunctionintgetNumArguments()Get the number of arguments for this functionstatic booleanisValidFunctionName(java.lang.String name)
 
- 
- 
- 
Constructor Detail- 
Functionpublic Function(java.lang.String name, int numArguments)Create a new Function with a given name and number of arguments- Parameters:
- name- the name of the Function
- numArguments- the number of arguments the function takes
 
 - 
Functionpublic Function(java.lang.String name) Create a new Function with a given name that takes a single argument- Parameters:
- name- the name of the Function
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the name of the Function- Returns:
- the name
 
 - 
getNumArgumentspublic int getNumArguments() Get the number of arguments for this function- Returns:
- the number of arguments
 
 - 
applypublic abstract double apply(double... args) Method that does the actual calculation of the function value given the arguments- Parameters:
- args- the set of arguments used for calculating the function
- Returns:
- the result of the function evaluation
 
 - 
getAllowedFunctionCharacterspublic 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.Get the set of characters which are allowed for use in Function names.- Returns:
- the set of characters allowed
 
 - 
isValidFunctionNamepublic static boolean isValidFunctionName(java.lang.String name) 
 
- 
 
- 
DMelt 3.0 © DataMelt by jWork.ORG