|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FunctionParser
Interface for a function parser. That is a class that parses a string of
the form "function[double1,double2,...]" and return a numerical function
of it. MathsParse
implements some common functions used in phylogenetics
and is a useful example of how to implement this class.
Method Summary | |
---|---|
double |
evaluate(java.lang.String function,
java.lang.Double[] variables)
A function that evaluates all the functions implemented |
java.util.List<java.lang.String> |
implemented()
Returns a list of function names that this class can calculate |
Method Detail |
---|
double evaluate(java.lang.String function, java.lang.Double[] variables) throws WrongNumberOfVariables, NoSuchFunction
function
- The function namevariables
- An array of inputs in the order they appear in the function
call
WrongNumberOfVariables
- Thrown when the incorrect number of imputs
to that function is passed.
NoSuchFunction
- Thrown when the class can't parse a function of
that namejava.util.List<java.lang.String> implemented()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |