GraphApplet does not present the function string to the eval method in Eval.class from the Lundin Symbolic Math package but to one of the methods of user.class.
This class is primarily meant for those that have access to a JAVA compiler to compile their own functions with. The speed gain is obtained by not using a general string evaluator but only precompiled functions.
People that do not have access to a JAVA compiler may profit from the functions compiled into the user.class that is part of this distribution.
Only one function of this type can be present. In the version of user.class in this distribution it is the function y=sin(x)+cos(x)
<PARAM name=function2 value="user">
Everything after user: is presented as functie to the method double f(String functie,double x) in user.class.
<PARAM name=function2 value="user:text">
<PARAM name=function2 value="user:2">will draw the cosine function.
Note 1: Adding new functions is straightforward: look at the syntax in the method double f(String functie,double x) and you can add other functions and compile user.class again
Note 2: You can also invent a new scheme that uses names instead of numbers. That's up to the one that compiles user.class. The only thing that may not be altered is the heading of the method.
First of all GraphApplet calculates the possible combinations of the parameters in the parameterlist. All combinations are then one after another stored in something called a hashtable. The part text part between user: and the paramterlist together with the hashtable is then presented to to the method double f(String functie,double x, Hashtable h) in user.class.
<PARAM name=function2 value="user:text";a=1,2;b=1,3,4>
|part||the parabola: y=a(x-b)2+c|
<PARAM name=function1 value="user:line;a=2,3;b=1,5">will draw the lines y=2x+1, y=2x+5, y=3x+1 and y=3x+5
Note 1: As you can see the only parameters allowed in this version of user.class are a, b and c. Between different functions these parameters are not cleared. Omitting them in a function call that needs them may give rise to unpredictable results.
Note 2: Looking at the syntax of this method you can add new functions as you wish and compile user.class again. Should you wish to use more or different parameters you can use the provided method double getvar(String var,Hashtable h) that is also part of user.class
Note 3: When you do not use the built in string evaluator but only functions described by the user prefix you can better use uGraphApplet instead of GraphApplet. uGraphApplet does not mention Eval.class from the Lundin Symbolic Mathpackage. The subdirectory lundin needs not to be present when using uGraphApplet instead of GraphApplet. This decreases download time when viewed over the web.