KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lsmp > djep > djep > DVariableFactory


1 /* @author rich
2  * Created on 19-Dec-2003
3  *
4  * This code is covered by a Creative Commons
5  * Attribution, Non Commercial, Share Alike license
6  * <a HREF="http://creativecommons.org/licenses/by-nc-sa/1.0">License</a>
7  */

8 package org.lsmp.djep.djep;
9
10 import org.nfunk.jep.Variable;
11 import org.nfunk.jep.*;
12 import org.lsmp.djep.xjep.*;
13 /**
14  * A VariableFactory which can work with PartialDerivatives.
15  * @author Rich Morris
16  * Created on 19-Dec-2003
17  */

18 public class DVariableFactory extends XVariableFactory {
19
20     /** Creates a partial derivative of a given variable. */
21     public PartialDerivative createDerivative(DVariable var, String JavaDoc[] dnames,Node eqn) {
22         return new PartialDerivative(var,dnames,eqn);
23     }
24
25     public Variable createVariable(String JavaDoc name, Object JavaDoc value) {
26         return new DVariable(name,value);
27     }
28
29     public Variable createVariable(String JavaDoc name) {
30         return new DVariable(name);
31     }
32
33 }
34
Popular Tags