KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lsmp > djep > matrixJep > MatrixVariableFactory


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.matrixJep;
9
10 import org.lsmp.djep.djep.*;
11 import org.nfunk.jep.Node;
12 import org.nfunk.jep.Variable;
13
14 /**
15  * Allows creation of matrix aware variables.
16  *
17  * @author Rich Morris
18  * Created on 19-Dec-2003
19  */

20 public class MatrixVariableFactory extends DVariableFactory {
21
22     /** create a derivative */
23     public PartialDerivative createDerivative(DVariable var,String JavaDoc[] dnames,Node eqn) {
24         return null;
25     }
26
27     /** Create a variable with a given value. */
28     public Variable createVariable(String JavaDoc name, Object JavaDoc value) {
29         return new MatrixVariable(name,value);
30     }
31
32     /** Create a variable with a given value. */
33     public Variable createVariable(String JavaDoc name) {
34         return new MatrixVariable(name);
35     }
36
37 }
38
Popular Tags