mathlib-commitlog Mailing List for JMathLib - Octave, Matlab clone in java (Page 9)
Status: Beta
Brought to you by:
st_mueller
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(4) |
Aug
(150) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(233) |
Feb
(86) |
Mar
(32) |
Apr
(26) |
May
(73) |
Jun
(45) |
Jul
(23) |
Aug
(23) |
Sep
(5) |
Oct
(80) |
Nov
(11) |
Dec
(11) |
| 2008 |
Jan
|
Feb
|
Mar
(13) |
Apr
(3) |
May
(7) |
Jun
(30) |
Jul
(12) |
Aug
(12) |
Sep
|
Oct
|
Nov
(78) |
Dec
(78) |
| 2009 |
Jan
(214) |
Feb
(79) |
Mar
(20) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <st_...@us...> - 2009-01-21 19:30:36
|
Revision: 710
http://mathlib.svn.sourceforge.net/mathlib/?rev=710&view=rev
Author: st_mueller
Date: 2009-01-21 19:30:34 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/adjoint.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/all.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/and.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/any.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/chol.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumprod.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumsum.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/adjoint.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/adjoint.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/adjoint.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -6,13 +6,14 @@
import jmathlib.core.tokens.FunctionToken;
import jmathlib.core.functions.Function;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for determining the determinant of a matrix*/
public class adjoint extends ExternalFunction
{
/**Check that the parameter is a square matrix then claculate
it's determinant*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
@@ -28,7 +29,7 @@
{
int size = matrix.getSizeX();
- result = new DoubleNumberToken(calcAdjoint(matrix.getReValues(), size));
+ result = new DoubleNumberToken(calcAdjoint(matrix.getReValues(), size, globals));
}
else
{
@@ -43,7 +44,7 @@
values = array of values
size = the size of the matrix
result = the adjoint as a size * size array of double*/
- private double[][] calcAdjoint(double[][] values, int size)
+ private double[][] calcAdjoint(double[][] values, int size, GlobalValues globals)
{
FunctionToken token = null;
Function function = null;
@@ -51,7 +52,7 @@
try
{
token = new FunctionToken("Determinant");
- function = getFunctionManager().findFunction(token);
+ function = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
@@ -67,7 +68,7 @@
operands[0] = subMatrix;
- double minor = ((DoubleNumberToken)function.evaluate(operands)).getValueRe();
+ double minor = ((DoubleNumberToken)function.evaluate(operands, globals)).getValueRe();
int modifier = -1;
if((rowNumber + colNumber) % 2 == 0)
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/all.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/all.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/all.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are nonzero */
public class all extends ExternalFunction
@@ -12,7 +13,7 @@
/**
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/and.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/and.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/and.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing AND of two matrices */
public class and extends ExternalFunction
@@ -13,7 +14,7 @@
* @param operands[0] = matrix
* @param operands[1] = matrix
* @return matrix function AND of each element of the first and second argument */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. and(A,B) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/any.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/any.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/any.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is any element of the argument is nonzero */
public class any extends ExternalFunction
@@ -12,7 +13,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if any element of the argument is nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/chol.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/chol.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/chol.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -3,6 +3,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.jmathlib.matrix._private.Jama.CholeskyDecomposition;
@@ -12,7 +13,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. chol(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumprod.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumprod.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumprod.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class cumprod extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if ((getNArgIn(operands) < 1) ||
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumsum.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumsum.java 2009-01-21 19:29:30 UTC (rev 709)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/cumsum.java 2009-01-21 19:30:34 UTC (rev 710)
@@ -3,11 +3,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing a mesh of a matrix */
public class cumsum extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if ((getNArgIn(operands) < 1) ||
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-21 19:29:33
|
Revision: 709
http://mathlib.svn.sourceforge.net/mathlib/?rev=709&view=rev
Author: st_mueller
Date: 2009-01-21 19:29:30 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/mesh.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshc.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshgrid.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshz.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/patch.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/pie3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/plot3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/quiver3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/rotate.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/scatter3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/sphere.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/stem3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamline.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamribbon.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamslice.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamtube.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfc.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfl.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/waterfall.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/mesh.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/mesh.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/mesh.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class mesh extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("mesh: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshc.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshc.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshc.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class meshc extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("meshc: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshgrid.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshgrid.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshgrid.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,6 +2,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
/*
@@ -16,7 +17,7 @@
* @param operands[0] = x values (e.g. [-2:0.2:2])
* @param operands[1] = y values (e.g. [-2:0.2:2])
* @return [X,Y] as matrices */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. [x,y]=meshgrid([-2:0.2:2],[-2:0.2:2]) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshz.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshz.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/meshz.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class meshz extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("meshz: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/patch.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/patch.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/patch.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class patch extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("patch: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/pie3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/pie3.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/pie3.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class pie3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("pie3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/plot3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/plot3.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/plot3.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -5,13 +5,14 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.graphics.*;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.graphics.axes.*;
/**An external function for 3 dimensional plots*/
public class plot3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
ErrorLogger.debugLine("plot3 evaluate. no of args: "+getNArgIn(operands));
@@ -125,9 +126,9 @@
}
// add Lines to current axes
- getGraphicsManager().getCurrentFigure().getCurrentAxes();
- getGraphicsManager().getCurrentFigure().convertCurrentAxesTo3DAxes();
- AxesObject axesOb = getGraphicsManager().getCurrentFigure().getCurrentAxes();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes();
+ globals.getGraphicsManager().getCurrentFigure().convertCurrentAxesTo3DAxes();
+ AxesObject axesOb = globals.getGraphicsManager().getCurrentFigure().getCurrentAxes();
if (axesOb instanceof Axes3DObject)
((Axes3DObject)axesOb).add3DLines(x,
y,
@@ -139,7 +140,7 @@
ErrorLogger.debugLine("plot3: eval: something wrong");
// call repaint to initiate drawing of plot lineStyleC);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return new DoubleNumberToken(1);
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/quiver3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/quiver3.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/quiver3.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class quiver3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("quiver3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/rotate.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/rotate.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/rotate.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -5,13 +5,14 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.graphics.*;
import jmathlib.core.graphics.axes.*;
+import jmathlib.core.interpreter.GlobalValues;
/** rotate*/
public class rotate extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
double phiX = 0;
@@ -36,9 +37,9 @@
}
// rotate axes
- ((Axes3DObject)getGraphicsManager().getCurrentFigure().getCurrentAxes()).rotate(phiX,phiY,phiZ);
+ ((Axes3DObject)globals.getGraphicsManager().getCurrentFigure().getCurrentAxes()).rotate(phiX,phiY,phiZ);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/scatter3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/scatter3.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/scatter3.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class scatter3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("scatter3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/sphere.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/sphere.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/sphere.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class sphere extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("sphere: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/stem3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/stem3.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/stem3.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class stem3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("stem3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamline.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamline.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamline.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class streamline extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("streamline: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamribbon.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamribbon.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamribbon.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class streamribbon extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("streamribbon: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamslice.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamslice.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamslice.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class streamslice extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("streamslice: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamtube.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamtube.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/streamtube.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class streamtube extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("streamtube: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surf.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surf.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -6,12 +6,13 @@
import jmathlib.core.graphics.*;
import jmathlib.core.graphics.axes.*;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for 3 dimensional surface plots*/
public class surf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
double[][] x = {{0.0}};
double[][] y = {{0.0}};
@@ -90,16 +91,16 @@
// add surface to current axes
- getGraphicsManager().getCurrentFigure().getCurrentAxes();
- getGraphicsManager().getCurrentFigure().convertCurrentAxesTo3DAxes();
- AxesObject axesOb = getGraphicsManager().getCurrentFigure().getCurrentAxes();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes();
+ globals.getGraphicsManager().getCurrentFigure().convertCurrentAxesTo3DAxes();
+ AxesObject axesOb = globals.getGraphicsManager().getCurrentFigure().getCurrentAxes();
if (axesOb instanceof Axes3DObject)
((Axes3DObject)axesOb).addSurface(x, y, z);
else
ErrorLogger.debugLine("surf: eval: something wrong");
// call repaint to initiate drawing of plot lineStyleC);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfc.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfc.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfc.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class surfc extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("surfc: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfl.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfl.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/surfl.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class surfl extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("surfl: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/waterfall.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/waterfall.java 2009-01-21 19:28:12 UTC (rev 708)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/waterfall.java 2009-01-21 19:29:30 UTC (rev 709)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class waterfall extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("waterfall: not implemented yet");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-21 19:28:27
|
Revision: 708
http://mathlib.svn.sourceforge.net/mathlib/?rev=708&view=rev
Author: st_mueller
Date: 2009-01-21 19:28:12 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3h.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/comet3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/coneplot.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contour3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contourslice.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/cylinder.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ellipsoid.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezmesh.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezplot3.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurfc.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/fill3.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class bar3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("bar3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3h.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3h.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/bar3h.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class bar3h extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("bar3h: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/comet3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/comet3.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/comet3.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class comet3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("comet3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/coneplot.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/coneplot.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/coneplot.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class coneplot extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("coneplot: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contour3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contour3.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contour3.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class contour3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("contour3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contourslice.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contourslice.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/contourslice.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class contourslice extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("contour3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/cylinder.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/cylinder.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/cylinder.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class cylinder extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("cylinder: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ellipsoid.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ellipsoid.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ellipsoid.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ellipsoid extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ellipsoid: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezmesh.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezmesh.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezmesh.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezmesh extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezmesh: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezplot3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezplot3.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezplot3.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezplot3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezplot3: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurf.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurf.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezsurf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezsurf: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurfc.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurfc.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/ezsurfc.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezsurfc extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezsurfc: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/fill3.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/fill3.java 2009-01-21 19:26:49 UTC (rev 707)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph3d/fill3.java 2009-01-21 19:28:12 UTC (rev 708)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class fill3 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("fill3: not implemented yet");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-21 19:26:54
|
Revision: 707
http://mathlib.svn.sourceforge.net/mathlib/?rev=707&view=rev
Author: st_mueller
Date: 2009-01-21 19:26:49 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/get.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ginput.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/print.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/propertyeditor.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/set.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/subplot.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/get.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/get.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/get.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -4,12 +4,14 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.graphics.*;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.awt.Color;
public class get extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
@@ -43,8 +45,8 @@
if (getNArgIn(operands) == 1)
{
// e.g. get(1234)
- getInterpreter().displayText("");
- ho.show(getInterpreter());
+ globals.getInterpreter().displayText("");
+ ho.show(globals.getInterpreter());
return null;
}
else if (getNArgIn(operands) == 2)
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ginput.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ginput.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ginput.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -4,12 +4,14 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.graphics.*;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.awt.Color;
public class ginput extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/print.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/print.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/print.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -2,6 +2,8 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.awt.print.*;
/**An external function for printing plots*/
@@ -9,7 +11,7 @@
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
debugLine("print evaluate");
@@ -38,7 +40,7 @@
PrinterJob pjob = PrinterJob.getPrinterJob();
PageFormat defaultPF = pjob.defaultPage();
PageFormat pageformat = pjob.pageDialog(defaultPF);
- pjob.setPrintable(getGraphicsManager().getCurrentFigure(), pageformat);
+ pjob.setPrintable(globals.getGraphicsManager().getCurrentFigure(), pageformat);
// somebody hit cancel
if (pageformat != defaultPF)
@@ -61,7 +63,7 @@
catch (PrinterException e)
{
debugLine("print: Printer Exception");
- getInterpreter().displayText("print: Printer Exception");
+ globals.getInterpreter().displayText("print: Printer Exception");
}
//getGraphicsManager().getCurrentFigure().print();
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/propertyeditor.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/propertyeditor.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/propertyeditor.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -5,6 +5,7 @@
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.graphics.HandleObject;
import jmathlib.core.graphics.properties.Property;
+import jmathlib.core.interpreter.GlobalValues;
import java.awt.*;
import java.awt.event.*;
@@ -15,7 +16,7 @@
public class propertyeditor extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//if (getNArgIn(operands) != 0)
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/set.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/set.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/set.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -4,11 +4,12 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.graphics.*;
+import jmathlib.core.interpreter.GlobalValues;
public class set extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 3)
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/subplot.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/subplot.java 2009-01-20 22:30:47 UTC (rev 706)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/subplot.java 2009-01-21 19:26:49 UTC (rev 707)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for 2 dimensional plots*/
public class subplot extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("subplot evaluate");
@@ -25,8 +26,8 @@
int gridX = (int)(((DoubleNumberToken)operands[1]).getReValues()[0][0]);
int currentAxes = (int)(((DoubleNumberToken)operands[2]).getReValues()[0][0]);
- getGraphicsManager().getCurrentFigure().setSubPlot(gridY, gridX, currentAxes);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().setSubPlot(gridY, gridX, currentAxes);
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 22:30:55
|
Revision: 706
http://mathlib.svn.sourceforge.net/mathlib/?rev=706&view=rev
Author: st_mueller
Date: 2009-01-20 22:30:47 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/determinant.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/diag.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eig.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/elementat.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/find.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/fliplr.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/flipud.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inversematrix.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isempty.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isfinite.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isimaginary.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isinf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isnan.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isreal.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/determinant.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/determinant.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/determinant.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -3,13 +3,14 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for determining the determinant of a matrix*/
public class determinant extends ExternalFunction
{
/**Check that the parameter is a square matrix then claculate
it's determinant*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/diag.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/diag.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/diag.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -3,11 +3,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing a mesh of a matrix */
public class diag extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if ((getNArgIn(operands) < 1) ||
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eig.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eig.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eig.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -3,6 +3,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.jmathlib.matrix._private.Jama.EigenvalueDecomposition;
/**An external function for computing eigenvalues and eigenvectors of an array */
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. eig(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/elementat.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/elementat.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/elementat.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -6,6 +6,7 @@
import jmathlib.core.tokens.MatrixToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.interpreter.Errors;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function to return the element at a certain point of a matrix*/
public class elementat extends ExternalFunction
@@ -14,7 +15,7 @@
@param operands[0] = the matrix to sum
@param operands[1] = the row no
@param operands[2] = toe column no*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for creating matrices that consist of zeros *
* everywhere except in the diagonal. The diagonal consists of ones. *
@@ -14,7 +15,7 @@
/**return a matrix
@param operands[0] = number of rows
@param operands[1] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int columns;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/find.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/find.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/find.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for finding nonzero elements of a matrix */
public class find extends ExternalFunction
@@ -14,7 +15,7 @@
(e.g. find([1,2,3;0,0,4]) returns [1,3,5,6]')
* @param operands[0] = matrix
* @return position of nonzero elements */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// Check number of arguments
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/fliplr.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/fliplr.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/fliplr.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,13 +4,14 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for flipping matrices from left to right */
public class fliplr extends ExternalFunction
{
/**return a matrix
@param operands[0] = matrix to flip from left to right */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operands (e.g. fliplr(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/flipud.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/flipud.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/flipud.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,13 +4,14 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for flipping matrices from up to down */
public class flipud extends ExternalFunction
{
/**return a matrix
@param operands[0] = matrix to flip from up to down */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operands (e.g. flipud(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inf.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inf.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,13 +4,14 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class inf extends ExternalFunction
{
/**return matrix of infinity
@param operands[0] = number of rows
@param operands[1] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int columns;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inversematrix.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inversematrix.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/inversematrix.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -6,6 +6,7 @@
import jmathlib.core.tokens.MatrixToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.interpreter.Errors;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.FunctionToken;
import jmathlib.core.functions.Function;
@@ -16,7 +17,7 @@
it's inverse
It uses the Determinant and Adjoint classes to calculate the
determinant and the adjoint*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1)
throwMathLibException("InverseMatrix: number of arguments != 1");
@@ -39,7 +40,7 @@
try
{
token = new FunctionToken("Determinant");
- determinant = getFunctionManager().findFunction(token);
+ determinant = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
@@ -47,16 +48,16 @@
try
{
token = new FunctionToken("Adjoint");
- adjoint = getFunctionManager().findFunction(token);
+ adjoint = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
- double matrixDeterminant = ((DoubleNumberToken)determinant.evaluate(operands)).getValueRe();
+ double matrixDeterminant = ((DoubleNumberToken)determinant.evaluate(operands, globals)).getValueRe();
if(matrixDeterminant != 0)
{
- DoubleNumberToken matrixAdjoint = ((DoubleNumberToken)adjoint.evaluate(operands));
+ DoubleNumberToken matrixAdjoint = ((DoubleNumberToken)adjoint.evaluate(operands, globals));
double[][] values = matrixAdjoint.getReValues();
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isempty.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isempty.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isempty.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -1,9 +1,9 @@
package jmathlib.toolbox.jmathlib.matrix;
import jmathlib.core.tokens.*;
-import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for checking if a matrix is empty (no number or string) */
public class isempty extends ExternalFunction
@@ -11,7 +11,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return position of nonzero elements */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1)
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isfinite.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isfinite.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isfinite.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are nonzero */
public class isfinite extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isimaginary.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isimaginary.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isimaginary.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is real elements of the argument are zero */
public class isimaginary extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isinf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isinf.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isinf.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are nonzero */
public class isinf extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isnan.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isnan.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isnan.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are nonzero */
public class isnan extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isreal.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isreal.java 2009-01-20 22:29:35 UTC (rev 705)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/isreal.java 2009-01-20 22:30:47 UTC (rev 706)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are non imaginary */
public class isreal extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return 1.0 if all elements of the argument are nonzero */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 22:29:50
|
Revision: 704
http://mathlib.svn.sourceforge.net/mathlib/?rev=704&view=rev
Author: st_mueller
Date: 2009-01-20 22:20:08 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lowertriangle.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lu.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/magic.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/max.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/min.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nan.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nnz.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/not.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/numel.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/ones.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/or.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/pow2.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/prod.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/qr.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/repmat.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/reshape.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/simultaneouseq.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sort.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lowertriangle.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lowertriangle.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lowertriangle.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,12 +4,13 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for converting a matrix into lower
triangular form*/
public class lowertriangle extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Token operand = operands[0];
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lu.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lu.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/lu.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.MatrixToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.jmathlib.matrix._private.Jama.LUDecomposition;
@@ -32,7 +33,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. eig(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/magic.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/magic.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/magic.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for calculating a magic matrix */
/* The function has been taken from the JAMA-examples */
@@ -11,7 +12,7 @@
{
/**return a matrix
@param operands[0] = dimension of magic matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operands (e.g. magic(n) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/max.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/max.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/max.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -2,15 +2,15 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.tokens.*;
-import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class max extends ExternalFunction
{
/**return a matrix
* @param operands[0] = matrix
* @return maximum of all elements */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if ((getNArgIn(operands) < 1 ) ||
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/min.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/min.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/min.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -2,8 +2,8 @@
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.tokens.*;
-import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function that return 1.0 is all elements of the argument are nonzero */
public class min extends ExternalFunction
@@ -11,7 +11,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return minimum of all elements */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if ((getNArgIn(operands) < 1 ) ||
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nan.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nan.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nan.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,13 +4,14 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class nan extends ExternalFunction
{
/**return matrix of NaN
@param operands[0] = number of rows
@param operands[1] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int columns;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nnz.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nnz.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/nnz.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.interpreter.Errors;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for determining number of non zero elements in a matrix*/
public class nnz extends ExternalFunction
@@ -12,7 +13,7 @@
/**Calculate number of non zero elements
@param operands[0] = the matrix
@return the number of non zero elements*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int count = 0;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/not.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/not.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/not.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing NOT a matrix */
public class not extends ExternalFunction
@@ -12,7 +13,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix function NOT of each element */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/numel.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/numel.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/numel.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,12 +5,13 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.DataToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**number of elements */
public class numel extends ExternalFunction
{
/** */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. not(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/ones.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/ones.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/ones.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for creating matrices that consist of ones */
/* (e.g.: ones(2) will return a 2-by-2 matrix [1,2;1,1], *
@@ -13,7 +14,7 @@
/**return a matrix
@param operands[0] = number of rows
@param operands[1] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// at least one operand
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/or.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/or.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/or.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.LogicalToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing Or of two matrices */
public class or extends ExternalFunction
@@ -13,7 +14,7 @@
* @param operands[0] = matrix
* @param operands[1] = matrix
* @return matrix function OR of each element of the first and second argument */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. or(A,B) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/pow2.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/pow2.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/pow2.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing 2 raised to the power of each *
* element of an array */
@@ -12,7 +13,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. pow2(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/prod.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/prod.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/prod.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing the product of array ellements */
public class prod extends ExternalFunction
@@ -11,7 +12,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return scalar or vector */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. prod(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/qr.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/qr.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/qr.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.MatrixToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.jmathlib.matrix._private.Jama.QRDecomposition;
/** QR Decomposition.
@@ -26,7 +27,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. qr(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/repmat.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/repmat.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/repmat.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for replicating and tiling matrices *
* (e.g. remat(a, m, n) creates a large matrix that consists of *
@@ -15,7 +16,7 @@
* @param operands[1] = number of rows
* @param operands[2] = number of columns
* @return big matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. reshape(A,[n,m]) ) or
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/reshape.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/reshape.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/reshape.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for reshaping matrices *
* (e.g. reshape([1,2;3,4;5,6],2,3) return [1,5,4;3,2,6]) *
@@ -15,7 +16,7 @@
@param operands[0] = matrix to reshape
@param operands[1] = number of rows
@param operands[2] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// three operands (e.g. reshape(A,n,m) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/simultaneouseq.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/simultaneouseq.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/simultaneouseq.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -2,6 +2,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for determining the determinant of a matrix*/
public class simultaneouseq extends ExternalFunction
@@ -11,15 +12,15 @@
operands[0] = m*m matrix of co-efficients
operands[1] = m*1 matrix of sums
result = m*1 matrix of solutions*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
inversematrix inverse = new inversematrix();
- OperandToken inv = inverse.evaluate(new Token[] {operands[0]});
+ OperandToken inv = inverse.evaluate(new Token[] {operands[0]}, globals);
Expression exp = new Expression(new MulDivOperatorToken('*'), ((OperandToken)operands[1]), inv);
- return exp.evaluate(null);
+ return exp.evaluate(null, globals);
}
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sort.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sort.java 2009-01-20 20:22:19 UTC (rev 703)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sort.java 2009-01-20 22:20:08 UTC (rev 704)
@@ -5,12 +5,13 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for sorting arrays */
public class sort extends ExternalFunction
{
/** sorting vectors and arrays */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// Check number of arguments
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 22:29:47
|
Revision: 705
http://mathlib.svn.sourceforge.net/mathlib/?rev=705&view=rev
Author: st_mueller
Date: 2009-01-20 22:29:35 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sum.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/svd.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/uppertriangle.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/xor.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/zeros.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sum.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sum.java 2009-01-20 22:20:08 UTC (rev 704)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/sum.java 2009-01-20 22:29:35 UTC (rev 705)
@@ -5,6 +5,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.interpreter.Variable;
import java.util.*;
@@ -15,7 +16,7 @@
{
/**Calculate the sum of the values within a matrix or structure
@param operands[0] = the matrix or structure to sum*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/svd.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/svd.java 2009-01-20 22:20:08 UTC (rev 704)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/svd.java 2009-01-20 22:29:35 UTC (rev 705)
@@ -3,6 +3,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.jmathlib.matrix._private.Jama.SingularValueDecomposition;
/** Singular Value Decomposition.
@@ -28,7 +29,7 @@
/**return a matrix
* @param operands[0] = matrix
* @return matrix */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. eig(A) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/uppertriangle.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/uppertriangle.java 2009-01-20 22:20:08 UTC (rev 704)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/uppertriangle.java 2009-01-20 22:29:35 UTC (rev 705)
@@ -4,12 +4,13 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for converting a matrix into upper
triangular form*/
public class uppertriangle extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Token operand = operands[0];
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/xor.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/xor.java 2009-01-20 22:20:08 UTC (rev 704)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/xor.java 2009-01-20 22:29:35 UTC (rev 705)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing XOr of two matrices */
public class xor extends ExternalFunction
@@ -12,7 +13,7 @@
* @param operands[0] = matrix
* @param operands[1] = matrix
* @return matrix XOr of each element of the first and second argument */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// two operands (e.g. xor(A,B) )
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/zeros.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/zeros.java 2009-01-20 22:20:08 UTC (rev 704)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/zeros.java 2009-01-20 22:29:35 UTC (rev 705)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for creating matrices that consist of zeros *
* (e.g.: zeros(2) will return a 2-by-2 matrix [0,0;0,0], *
@@ -13,7 +14,7 @@
/**return matrix of zeros
@param operands[0] = number of rows
@param operands[1] = number of columns */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// at least one operands (e.g. zeros(n) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:22:23
|
Revision: 703
http://mathlib.svn.sourceforge.net/mathlib/?rev=703&view=rev
Author: st_mueller
Date: 2009-01-20 20:22:19 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/string/strcat.java
JMathLib/trunk/src/jmathlib/toolbox/string/strcmp.java
JMathLib/trunk/src/jmathlib/toolbox/string/strcmpi.java
JMathLib/trunk/src/jmathlib/toolbox/string/strfind.java
JMathLib/trunk/src/jmathlib/toolbox/string/strlength.java
JMathLib/trunk/src/jmathlib/toolbox/string/strncmp.java
JMathLib/trunk/src/jmathlib/toolbox/string/strncmpi.java
JMathLib/trunk/src/jmathlib/toolbox/string/strvcat.java
JMathLib/trunk/src/jmathlib/toolbox/string/substring.java
JMathLib/trunk/src/jmathlib/toolbox/string/upper.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strcat.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strcat.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strcat.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
/**An external function for concatenating strings*/
public class strcat extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
String result = "";
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strcmp.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strcmp.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strcmp.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
/**An external function for comparing two strings*/
@@ -12,7 +13,7 @@
/**compares two strings
@param operands[0] = first string
@param operands[1] = second string*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int result = 0;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strcmpi.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strcmpi.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strcmpi.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
/**An external function for comparing two strings*/
@@ -12,7 +13,7 @@
/**compares two strings
@param operands[0] = first string
@param operands[1] = second string*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int result = 0;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strfind.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strfind.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strfind.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -13,7 +13,7 @@
/**finds shorter string within a longer one
@param operands[0] = first string
@param operands[1] = second string*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strlength.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strlength.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strlength.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -13,7 +13,7 @@
{
/**Calculate the length of the string
@param operands[0] the string to get the length for*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strncmp.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strncmp.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strncmp.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -13,7 +13,7 @@
/**compares two strings
@param operands[0] = first string
@param operands[1] = second string*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int result = 0;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strncmpi.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strncmpi.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strncmpi.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -13,7 +13,7 @@
/**compares two strings
@param operands[0] = first string
@param operands[1] = second string*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int result = 0;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/strvcat.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/strvcat.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/strvcat.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -3,6 +3,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
import jmathlib.core.tokens.MatrixToken;
@@ -12,7 +13,7 @@
{
/**Concatenates strings into a vertical vector
@param operands[n] = the strings to concatenate*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken[][] values = new OperandToken[operands.length][1];
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/substring.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/substring.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/substring.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
/**An external function for returning the length of a string*/
@@ -11,7 +12,7 @@
{
/**Calculate the length of the string
@param operands[0] the string to get the length for*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/string/upper.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/string/upper.java 2009-01-20 20:21:24 UTC (rev 702)
+++ JMathLib/trunk/src/jmathlib/toolbox/string/upper.java 2009-01-20 20:22:19 UTC (rev 703)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.CharToken;
/**An external function for creating random numbers*/
public class upper extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:21:33
|
Revision: 702
http://mathlib.svn.sourceforge.net/mathlib/?rev=702&view=rev
Author: st_mueller
Date: 2009-01-20 20:21:24 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/specfun/gammaln.java
JMathLib/trunk/src/jmathlib/toolbox/statistics/average.java
JMathLib/trunk/src/jmathlib/toolbox/statistics/variation.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/specfun/gammaln.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/specfun/gammaln.java 2009-01-20 20:20:27 UTC (rev 701)
+++ JMathLib/trunk/src/jmathlib/toolbox/specfun/gammaln.java 2009-01-20 20:21:24 UTC (rev 702)
@@ -3,11 +3,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.toolbox.specfun._private.*;
public class gammaln extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1)
Modified: JMathLib/trunk/src/jmathlib/toolbox/statistics/average.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/statistics/average.java 2009-01-20 20:20:27 UTC (rev 701)
+++ JMathLib/trunk/src/jmathlib/toolbox/statistics/average.java 2009-01-20 20:21:24 UTC (rev 702)
@@ -1,6 +1,7 @@
package jmathlib.toolbox.statistics;
import jmathlib.core.functions.*;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
@@ -12,7 +13,7 @@
public class average extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
int i;
OperandToken ot = (OperandToken) operands[0];
Modified: JMathLib/trunk/src/jmathlib/toolbox/statistics/variation.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/statistics/variation.java 2009-01-20 20:20:27 UTC (rev 701)
+++ JMathLib/trunk/src/jmathlib/toolbox/statistics/variation.java 2009-01-20 20:21:24 UTC (rev 702)
@@ -1,6 +1,7 @@
package jmathlib.toolbox.statistics;
import jmathlib.core.functions.*;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
@@ -12,7 +13,7 @@
public class variation extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// Check if there's only one or zero parameters
if (operands.length < 2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:20:30
|
Revision: 701
http://mathlib.svn.sourceforge.net/mathlib/?rev=701&view=rev
Author: st_mueller
Date: 2009-01-20 20:20:27 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/fill.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/hist.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/image.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/loglog.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pareto.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pcolor.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pie.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plot.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotfunction.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotmatrix.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotyy.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/polar.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/quiver.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/rose.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/scatter.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogx.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogy.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/spy.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stairs.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stem.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/fill.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/fill.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/fill.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class fill extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("fill: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/hist.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/hist.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/hist.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class hist extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("hist: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/image.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/image.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/image.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class image extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("image: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/loglog.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/loglog.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/loglog.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class loglog extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("loglog: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pareto.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pareto.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pareto.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class pareto extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("pareto: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pcolor.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pcolor.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pcolor.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class pcolor extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("pcolor: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pie.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pie.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/pie.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class pie extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("pie: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plot.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plot.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plot.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -4,12 +4,13 @@
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for 2 dimensional plots*/
public class plot extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
ErrorLogger.debugLine("plot evaluate");
@@ -120,11 +121,11 @@
ErrorLogger.debugLine("plot: types: "+colorC+" "+markerC+" "+lineStyleC);
- getGraphicsManager().getCurrentFigure().getCurrentAxes().addLines(x[0],y,
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().addLines(x[0],y,
new Character(colorC).toString(),
new Character(markerC).toString(),
new Character(lineStyleC).toString());
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
}
else
{
@@ -133,11 +134,11 @@
for(int i=0; i<x[0].length; i++) xx[0][i]=(double)(i+1);
// changed order
- getGraphicsManager().getCurrentFigure().getCurrentAxes().addLines(xx[0],x,
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().addLines(xx[0],x,
new Character(colorC).toString(),
new Character(markerC).toString(),
new Character(lineStyleC).toString());
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotfunction.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotfunction.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotfunction.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -4,13 +4,14 @@
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
import jmathlib.core.functions.Function;
/**An external function for 2 dimensional plots of a function
uses the classes linspace, PerformFunction and plot*/
public class plotfunction extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
FunctionToken token = null;
Function function = null;
@@ -44,13 +45,13 @@
try
{
token = new FunctionToken("linspace");
- function = getFunctionManager().findFunction(token);
+ function = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
//then create the list of y values
- OperandToken vector = function.evaluate(parameters);
+ OperandToken vector = function.evaluate(parameters, globals);
OperandToken modVector = ((OperandToken)vector.clone());
parameters[0] = operands[0];
@@ -59,12 +60,12 @@
try
{
token = new FunctionToken("PerformFunction");
- function = getFunctionManager().findFunction(token);
+ function = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
- modVector = function.evaluate(parameters);
+ modVector = function.evaluate(parameters, globals);
//then draw the graph
parameters[0] = vector;
@@ -78,12 +79,12 @@
try
{
token = new FunctionToken("plot");
- function = getFunctionManager().findFunction(token);
+ function = globals.getFunctionManager().findFunction(token);
}
catch(java.lang.Exception e)
{}
- function.evaluate(parameters);
+ function.evaluate(parameters, globals);
return null; //function.evaluate(parameters);
}
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotmatrix.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotmatrix.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotmatrix.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class plotmatrix extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("plotmatrix: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotyy.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotyy.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/plotyy.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class plotyy extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("plotyy: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/polar.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/polar.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/polar.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -4,12 +4,13 @@
import jmathlib.core.functions.ExternalFunction;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for 2 dimensional plots*/
public class polar extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
ErrorLogger.debugLine("polar evaluate");
@@ -120,11 +121,11 @@
ErrorLogger.debugLine("polar: types: "+colorC+" "+markerC+" "+lineStyleC);
- getGraphicsManager().getCurrentFigure().getCurrentPolarAxes().addLines(x[0],y,
+ globals.getGraphicsManager().getCurrentFigure().getCurrentPolarAxes().addLines(x[0],y,
new Character(colorC).toString(),
new Character(markerC).toString(),
new Character(lineStyleC).toString());
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
}
else
{
@@ -133,11 +134,11 @@
for(int i=0; i<x[0].length; i++) xx[0][i]=(double)(i+1);
// changed order
- getGraphicsManager().getCurrentFigure().getCurrentPolarAxes().addLines(xx[0],x,
+ globals.getGraphicsManager().getCurrentFigure().getCurrentPolarAxes().addLines(xx[0],x,
new Character(colorC).toString(),
new Character(markerC).toString(),
new Character(lineStyleC).toString());
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/quiver.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/quiver.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/quiver.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class quiver extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("quiver: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/rose.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/rose.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/rose.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class rose extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("rose: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/scatter.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/scatter.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/scatter.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class scatter extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("scatter: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogx.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogx.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogx.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class semilogx extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("semilogx: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogy.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogy.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/semilogy.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class semilogy extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("semilogy: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/spy.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/spy.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/spy.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class spy extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("spy: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stairs.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stairs.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stairs.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class stairs extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("stairs: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stem.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stem.java 2009-01-20 20:19:48 UTC (rev 700)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/stem.java 2009-01-20 20:20:27 UTC (rev 701)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class stem extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("stem: not implemented yet");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:19:52
|
Revision: 700
http://mathlib.svn.sourceforge.net/mathlib/?rev=700&view=rev
Author: st_mueller
Date: 2009-01-20 20:19:48 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/area.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/bar.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/barh.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/comet.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/compass.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contour.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contourf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/errorbar.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontour.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontourf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezplot.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezpolar.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/feather.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/area.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/area.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/area.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class area extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("area: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/bar.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/bar.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/bar.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class bar extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("bar: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/barh.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/barh.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/barh.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class barh extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("barh: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/comet.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/comet.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/comet.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class comet extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("comet: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/compass.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/compass.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/compass.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class compass extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("compass: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contour.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contour.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contour.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class contour extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("contour: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contourf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contourf.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/contourf.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class contourf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("contourf: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/errorbar.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/errorbar.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/errorbar.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class errorbar extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("errorbar: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontour.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontour.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontour.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezcontour extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezcontour: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontourf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontourf.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezcontourf.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezcontourf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezcontourf: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezplot.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezplot.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezplot.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezplot extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezplot: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezpolar.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezpolar.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/ezpolar.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class ezpolar extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("ezpolar: not implemented yet");
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/feather.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/feather.java 2009-01-20 20:18:47 UTC (rev 699)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/graph2d/feather.java 2009-01-20 20:19:48 UTC (rev 700)
@@ -2,11 +2,12 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class feather extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
throwMathLibException("feather: not implemented yet");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:18:51
|
Revision: 699
http://mathlib.svn.sourceforge.net/mathlib/?rev=699&view=rev
Author: st_mueller
Date: 2009-01-20 20:18:47 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/close.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/figure.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/grid.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/hold.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,30 +3,31 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class cla extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) >1)
throwMathLibException("cla: number of arguments <=1");
// get figure number
- double n = getGraphicsManager().getCurrentFigureNumber();
+ double n = globals.getGraphicsManager().getCurrentFigureNumber();
// in case n>1 there is no current figure, -> create one
if (n<1)
{
// create figure
- getGraphicsManager().createNewFigure();
+ globals.getGraphicsManager().createNewFigure();
// get figure number again (should be at least "1")
- n = getGraphicsManager().getCurrentFigureNumber();
+ n = globals.getGraphicsManager().getCurrentFigureNumber();
}
- getGraphicsManager().getCurrentFigure().getCurrentAxes().clearAxes();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().clearAxes();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -1,32 +1,32 @@
package jmathlib.toolbox.jmathlib.graphics;
import jmathlib.core.tokens.*;
-import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class clf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) >1)
throwMathLibException("clf: number of arguments <=1");
// get figure number
- double n = getGraphicsManager().getCurrentFigureNumber();
+ double n = globals.getGraphicsManager().getCurrentFigureNumber();
// in case n>1 there is no current figure, -> create one
if (n<1)
{
// create figure
- getGraphicsManager().createNewFigure();
+ globals.getGraphicsManager().createNewFigure();
// get figure number again (should be at least "1")
- n = getGraphicsManager().getCurrentFigureNumber();
+ n = globals.getGraphicsManager().getCurrentFigureNumber();
}
- getGraphicsManager().getCurrentFigure().clearFigure();
+ globals.getGraphicsManager().getCurrentFigure().clearFigure();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/close.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/close.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/close.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for closing figures*/
public class close extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("figure evaluate");
@@ -16,8 +17,8 @@
if (operands==null)
{
- int i = getGraphicsManager().getCurrentFigureNumber();
- getGraphicsManager().removeFigure(i);
+ int i = globals.getGraphicsManager().getCurrentFigureNumber();
+ globals.getGraphicsManager().removeFigure(i);
}
else
@@ -30,10 +31,10 @@
int i = (int)(((DoubleNumberToken)operands[0]).getReValues()[0][0]);
- getGraphicsManager().removeFigure(i);
+ globals.getGraphicsManager().removeFigure(i);
}
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/figure.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/figure.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/figure.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for 2 dimensional plots*/
public class figure extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("figure evaluate");
@@ -16,14 +17,14 @@
if (operands==null)
{
// figure called with no arguments
- getGraphicsManager().createNewFigure();
+ globals.getGraphicsManager().createNewFigure();
}
else
{
if (getNArgIn(operands) == 0)
- getGraphicsManager().createNewFigure();
+ globals.getGraphicsManager().createNewFigure();
if (getNArgIn(operands) != 1)
throwMathLibException("figure: number of arguments != 1");
@@ -33,10 +34,10 @@
int figureNumber = (int)(((DoubleNumberToken)operands[0]).getReValues()[0][0]);
- getGraphicsManager().createNewFigure(figureNumber);
+ globals.getGraphicsManager().createNewFigure(figureNumber);
}
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,18 +3,19 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class gca extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 0)
throwMathLibException("gca: number of arguments != 0");
// get handle to axes
- double n = getGraphicsManager().getCurrentFigure().getCurrentAxes().getHandle();
+ double n = globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().getHandle();
return new DoubleNumberToken(n);
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,18 +3,19 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class gcf extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 0)
throwMathLibException("gcf: number of arguments != 0");
// get figure number
- double n = getGraphicsManager().getCurrentFigure().getHandle();
+ double n = globals.getGraphicsManager().getCurrentFigure().getHandle();
return new DoubleNumberToken(n);
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/grid.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/grid.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/grid.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,12 +3,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Add a grid to the current axes*/
public class grid extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("grid evaluate");
@@ -41,11 +42,11 @@
}
// switch grid on/off
- getGraphicsManager().getCurrentFigure().getCurrentAxes().set("XGrid",new Boolean(value));
- getGraphicsManager().getCurrentFigure().getCurrentAxes().set("YGrid",new Boolean(value));
- getGraphicsManager().getCurrentFigure().getCurrentAxes().set("ZGrid",new Boolean(value));
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().set("XGrid",new Boolean(value));
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().set("YGrid",new Boolean(value));
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().set("ZGrid",new Boolean(value));
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/hold.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/hold.java 2009-01-20 20:17:23 UTC (rev 698)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/hold.java 2009-01-20 20:18:47 UTC (rev 699)
@@ -3,13 +3,14 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Holds the current axes. All subsequent uses of plot will accumulate in
this axes */
public class hold extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("hold evaluate");
@@ -42,9 +43,9 @@
// switch hold on/off
if (value)
- getGraphicsManager().getCurrentFigure().getCurrentAxes().set("NextPlot","add");
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().set("NextPlot","add");
else
- getGraphicsManager().getCurrentFigure().getCurrentAxes().set("NextPlot","replace");
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().set("NextPlot","replace");
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:17:25
|
Revision: 698
http://mathlib.svn.sourceforge.net/mathlib/?rev=698&view=rev
Author: st_mueller
Date: 2009-01-20 20:17:23 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/title.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/xlabel.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ylabel.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/zlabel.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/title.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/title.java 2009-01-20 20:12:50 UTC (rev 697)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/title.java 2009-01-20 20:17:23 UTC (rev 698)
@@ -2,12 +2,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Add text to the title of the current axes*/
public class title extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("title: evaluate");
@@ -20,8 +21,8 @@
String title = ((CharToken)operands[0]).toString();
- getGraphicsManager().getCurrentFigure().getCurrentAxes().setTitle(title);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().setTitle(title);
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/xlabel.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/xlabel.java 2009-01-20 20:12:50 UTC (rev 697)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/xlabel.java 2009-01-20 20:17:23 UTC (rev 698)
@@ -2,12 +2,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Add text to the x-axis of the current axes*/
public class xlabel extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("xlabel evaluate");
@@ -20,8 +21,8 @@
String xLabel = ((CharToken)operands[0]).toString();
- getGraphicsManager().getCurrentFigure().getCurrentAxes().setXLabel(xLabel);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().setXLabel(xLabel);
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ylabel.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ylabel.java 2009-01-20 20:12:50 UTC (rev 697)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/ylabel.java 2009-01-20 20:17:23 UTC (rev 698)
@@ -2,12 +2,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Add text to the y-axis of the current axes*/
public class ylabel extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("ylabel evaluate");
@@ -20,8 +21,8 @@
String yLabel = ((CharToken)operands[0]).toString();
- getGraphicsManager().getCurrentFigure().getCurrentAxes().setYLabel(yLabel);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().setYLabel(yLabel);
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/zlabel.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/zlabel.java 2009-01-20 20:12:50 UTC (rev 697)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/zlabel.java 2009-01-20 20:17:23 UTC (rev 698)
@@ -2,12 +2,13 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**Add text to the z-axis of the current axes*/
public class zlabel extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
//ErrorLogger.debugLine("zlabel evaluate");
@@ -20,8 +21,8 @@
String zLabel = ((CharToken)operands[0]).toString();
- getGraphicsManager().getCurrentFigure().getCurrentAxes().setZLabel(zLabel);
- getGraphicsManager().getCurrentFigure().repaint();
+ globals.getGraphicsManager().getCurrentFigure().getCurrentAxes().setZLabel(zLabel);
+ globals.getGraphicsManager().getCurrentFigure().repaint();
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:12:53
|
Revision: 697
http://mathlib.svn.sourceforge.net/mathlib/?rev=697&view=rev
Author: st_mueller
Date: 2009-01-20 20:12:50 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/time/date.java
JMathLib/trunk/src/jmathlib/toolbox/time/pause.java
JMathLib/trunk/src/jmathlib/toolbox/time/tic.java
JMathLib/trunk/src/jmathlib/toolbox/time/time.java
JMathLib/trunk/src/jmathlib/toolbox/time/toc.java
JMathLib/trunk/src/jmathlib/toolbox/toolbox_skeleton/template.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/time/date.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/time/date.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/time/date.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -1,14 +1,14 @@
package jmathlib.toolbox.time;
-/* This file is part or MATHLIB */
+/* This file is part or JMATHLIB */
import jmathlib.core.tokens.*;
import java.util.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/*
-
-Author: Stefan Mueller (st...@he...) 2002
+author: Stefan Mueller (st...@he...) 2002
*/
@@ -17,7 +17,7 @@
{
/**returns a string
* @return the current date as a string */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Calendar date = Calendar.getInstance();
Modified: JMathLib/trunk/src/jmathlib/toolbox/time/pause.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/time/pause.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/time/pause.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -5,16 +5,17 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/*
-Author: Stefan Mueller (st...@he...) 2003
+author: Stefan Mueller (st...@he...) 2003
*/
/**wait for a specified period of time*/
public class pause extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1)
Modified: JMathLib/trunk/src/jmathlib/toolbox/time/tic.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/time/tic.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/time/tic.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -1,30 +1,29 @@
package jmathlib.toolbox.time;
-/* This file is part or MATHLIB */
+/* This file is part or JMathLib *
+author: Stefan Mueller (st...@he...) 2002
+*/
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.interpreter.*;
import jmathlib.core.functions.ExternalFunction;
-import jmathlib.toolbox.general.global;
import java.util.*;
-/*
-Author: Stefan Mueller (st...@he...) 2002
-*/
+
/**An external function for starting the internal stop watch */
public class tic extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Date d = new Date();
double start = (double)d.getTime();
- Variable ticVar = getGlobalVariables().createVariable("_tic");
+ Variable ticVar = globals.getGlobalVariables().createVariable("_tic");
ticVar.assign(new DoubleNumberToken(start));
return null; //DoubleNumberToken.one;
Modified: JMathLib/trunk/src/jmathlib/toolbox/time/time.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/time/time.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/time/time.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -1,23 +1,21 @@
package jmathlib.toolbox.time;
-/* This file is part or MATHLIB */
+/* This file is part or JMathLib
+author: Stefan Mueller (st...@he...) 2002
+*/
+
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.util.*;
-
-/*
-
-Author: Stefan Mueller (st...@he...) 2002
-*/
-
-
/**An external function for computing a mesh of a matrix */
public class time extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Date d = new Date();
Modified: JMathLib/trunk/src/jmathlib/toolbox/time/toc.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/time/toc.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/time/toc.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -1,34 +1,34 @@
package jmathlib.toolbox.time;
-/* This file is part or MATHLIB */
+/* This file is part or JMathLib
+author: Stefan Mueller (st...@he...) 2002
+*/
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.util.*;
-/*
-Author: Stefan Mueller (st...@he...) 2002
-*/
-
/**An external function for computing the time difference between a
call to tic() and toc() (internal stop watch) */
public class toc extends ExternalFunction
{
/**returns a time difference
* @return the time difference in seconds as a double number */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Date d = new Date();
double stop = (double)d.getTime();
- if (!getGlobalVariables().isVariable("_tic"))
+ if (!globals.getGlobalVariables().isVariable("_tic"))
throwMathLibException("toc: you must call tic before toc");
- OperandToken ticTok = getGlobalVariables().getVariable("_tic").getData();
+ OperandToken ticTok = globals.getGlobalVariables().getVariable("_tic").getData();
if (ticTok instanceof DoubleNumberToken)
{
Modified: JMathLib/trunk/src/jmathlib/toolbox/toolbox_skeleton/template.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/toolbox_skeleton/template.java 2009-01-20 20:08:20 UTC (rev 696)
+++ JMathLib/trunk/src/jmathlib/toolbox/toolbox_skeleton/template.java 2009-01-20 20:12:50 UTC (rev 697)
@@ -1,12 +1,13 @@
package jmathlib.toolbox.toolbox_skeleton;
/* This file is part or JMathLib
- * author: stefan 2009
+ * author: stefan (st...@he...) 2009
* */
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing a mesh of a matrix */
@@ -16,7 +17,7 @@
* @param operands[0] = x values (e.g. [-2:0.2:2])
* @param operands[1] = y values (e.g. [-2:0.2:2])
* @return [X,Y] as matrices */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand (e.g. [x,y]=template([-2:0.2:2],[-2:0.2:2]) )
@@ -72,10 +73,11 @@
Returns the sign of value.
@EXAMPLES
<programlisting>
-SIGN(-10)=-1
-SIGN(10)=1
+sign(-10)=-1
+sign(10)=1
</programlisting>
@NOTES
+This functions is used as a template for developing toolbox functions.
@SEE
template
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:08:25
|
Revision: 696
http://mathlib.svn.sourceforge.net/mathlib/?rev=696&view=rev
Author: st_mueller
Date: 2009-01-20 20:08:20 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/polynomial/binomial.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/polynomial/binomial.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/polynomial/binomial.java 2009-01-20 20:07:40 UTC (rev 695)
+++ JMathLib/trunk/src/jmathlib/toolbox/polynomial/binomial.java 2009-01-20 20:08:20 UTC (rev 696)
@@ -4,6 +4,7 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**External function to calculate the set of binomial
coefficents for the equation (x+y)^r*/
@@ -13,7 +14,7 @@
@param operand[0] = the order of the equation
@return the coefficients as a vector
*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
OperandToken result = new DoubleNumberToken(0);
if(operands.length >= 1 && operands[0] instanceof DoubleNumberToken)
@@ -59,7 +60,7 @@
@GROUP
polynomial
@SYNTAX
-Answer=binomial(value)
+answer = binomial(value)
@DOC
Calculates the binomial coefficients of (x+y)^value.
@NOTES
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-20 20:07:43
|
Revision: 695
http://mathlib.svn.sourceforge.net/mathlib/?rev=695&view=rev
Author: st_mueller
Date: 2009-01-20 20:07:40 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/net/urlread.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/net/urlread.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/net/urlread.java 2009-01-19 20:36:10 UTC (rev 694)
+++ JMathLib/trunk/src/jmathlib/toolbox/net/urlread.java 2009-01-20 20:07:40 UTC (rev 695)
@@ -2,13 +2,15 @@
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.net.*;
import java.io.*;
/**An external function for reading files over the network*/
public class urlread extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
String s = "";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-19 20:36:14
|
Revision: 694
http://mathlib.svn.sourceforge.net/mathlib/?rev=694&view=rev
Author: st_mueller
Date: 2009-01-19 20:36:10 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/ui/questdlg.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/ui/questdlg.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/ui/questdlg.java 2009-01-19 20:34:52 UTC (rev 693)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/ui/questdlg.java 2009-01-19 20:36:10 UTC (rev 694)
@@ -4,13 +4,15 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.awt.*;
import java.awt.event.*;
public class questdlg extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// exactly one operand
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-19 20:35:00
|
Revision: 693
http://mathlib.svn.sourceforge.net/mathlib/?rev=693&view=rev
Author: st_mueller
Date: 2009-01-19 20:34:52 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/general/int16.java
JMathLib/trunk/src/jmathlib/toolbox/general/int32.java
JMathLib/trunk/src/jmathlib/toolbox/general/int64.java
JMathLib/trunk/src/jmathlib/toolbox/general/int8.java
JMathLib/trunk/src/jmathlib/toolbox/general/uint16.java
JMathLib/trunk/src/jmathlib/toolbox/general/uint32.java
JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/int16.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/int16.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/int16.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class int16 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/int32.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/int32.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/int32.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class int32 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/int64.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/int64.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/int64.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class int64 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/int8.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/int8.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/int8.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class int8 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/uint16.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/uint16.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/uint16.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class uint16 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/uint32.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/uint32.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/uint32.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class uint32 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java 2009-01-19 20:34:14 UTC (rev 692)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java 2009-01-19 20:34:52 UTC (rev 693)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class uint8 extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-19 20:34:21
|
Revision: 692
http://mathlib.svn.sourceforge.net/mathlib/?rev=692&view=rev
Author: st_mueller
Date: 2009-01-19 20:34:14 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/general/_class.java
JMathLib/trunk/src/jmathlib/toolbox/general/angle.java
JMathLib/trunk/src/jmathlib/toolbox/general/beep.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/_class.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/_class.java 2009-01-19 20:33:26 UTC (rev 691)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/_class.java 2009-01-19 20:34:14 UTC (rev 692)
@@ -5,10 +5,11 @@
import jmathlib.core.tokens.DataToken;
import jmathlib.core.tokens.CharToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class _class extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1)
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/angle.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/angle.java 2009-01-19 20:33:26 UTC (rev 691)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/angle.java 2009-01-19 20:34:14 UTC (rev 692)
@@ -3,10 +3,11 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.*;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
public class angle extends ExternalFunction
{
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (getNArgIn(operands) != 1 )
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/beep.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/beep.java 2009-01-19 20:33:26 UTC (rev 691)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/beep.java 2009-01-19 20:34:14 UTC (rev 692)
@@ -3,13 +3,15 @@
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
+
import java.awt.Toolkit;
/**An external function for emitting a beep sound*/
public class beep extends ExternalFunction
{
/**Emits a beeping sound*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
Toolkit.getDefaultToolkit().beep();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-19 20:33:36
|
Revision: 691
http://mathlib.svn.sourceforge.net/mathlib/?rev=691&view=rev
Author: st_mueller
Date: 2009-01-19 20:33:26 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/crypto/aes.java
JMathLib/trunk/src/jmathlib/toolbox/demos/example01.java
JMathLib/trunk/src/jmathlib/toolbox/demos/example04.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/crypto/aes.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/crypto/aes.java 2009-01-17 19:23:42 UTC (rev 690)
+++ JMathLib/trunk/src/jmathlib/toolbox/crypto/aes.java 2009-01-19 20:33:26 UTC (rev 691)
@@ -6,6 +6,7 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.functions.ExternalFunction;
+import jmathlib.core.interpreter.GlobalValues;
/**An external function for computing a mesh of a matrix */
@@ -16,7 +17,7 @@
* @param operands[1] = y values (e.g. [-2:0.2:2])
* @param operands[2] = y values (e.g. [-2:0.2:2])
* @return [X,Y] as matrices */
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
// one operand
Modified: JMathLib/trunk/src/jmathlib/toolbox/demos/example01.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/demos/example01.java 2009-01-17 19:23:42 UTC (rev 690)
+++ JMathLib/trunk/src/jmathlib/toolbox/demos/example01.java 2009-01-19 20:33:26 UTC (rev 691)
@@ -10,7 +10,7 @@
{
/**Execute the function returning the first parameter
operands - array of parameters*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if (operands[0] instanceof DoubleNumberToken)
{
Modified: JMathLib/trunk/src/jmathlib/toolbox/demos/example04.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/demos/example04.java 2009-01-17 19:23:42 UTC (rev 690)
+++ JMathLib/trunk/src/jmathlib/toolbox/demos/example04.java 2009-01-19 20:33:26 UTC (rev 691)
@@ -10,7 +10,7 @@
{
/**Execute the function returning the first parameter
operands - array of parameters*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
ErrorLogger.debugLine("example04 right-hand arguments= "+operands.length);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-17 19:23:51
|
Revision: 690
http://mathlib.svn.sourceforge.net/mathlib/?rev=690&view=rev
Author: st_mueller
Date: 2009-01-17 19:23:42 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
added more tests
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/core/interpreter/AllTests.java
Added Paths:
-----------
JMathLib/trunk/src/jmathlibtests/core/interpreter/testContext.java
Modified: JMathLib/trunk/src/jmathlibtests/core/interpreter/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/interpreter/AllTests.java 2009-01-17 18:16:01 UTC (rev 689)
+++ JMathLib/trunk/src/jmathlibtests/core/interpreter/AllTests.java 2009-01-17 19:23:42 UTC (rev 690)
@@ -18,6 +18,7 @@
/* none */
/* include tests in this directory here */
+ suite.addTest(jmathlibtests.core.interpreter.testContext.suite());
suite.addTest(jmathlibtests.core.interpreter.testInterpreter.suite());
suite.addTest(jmathlibtests.core.interpreter.testLexicalAnalyser.suite());
suite.addTest(jmathlibtests.core.interpreter.testParser.suite());
Added: JMathLib/trunk/src/jmathlibtests/core/interpreter/testContext.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/interpreter/testContext.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/core/interpreter/testContext.java 2009-01-17 19:23:42 UTC (rev 690)
@@ -0,0 +1,48 @@
+package jmathlibtests.core.interpreter;
+
+import jmathlib.tools.junit.framework.*;
+import jmathlib.core.interpreter.*;
+import jmathlibtests.*;
+
+public class testContext extends TestCase {
+ protected Interpreter ml1;
+ protected Interpreter ml2;
+
+ public testContext(String name) {
+ super(name);
+ }
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ protected void setUp() {
+ ml1 = new Interpreter(true);
+ ml2 = new Interpreter(true);
+ }
+
+ protected void tearDown() {
+ ml1 = null;
+ ml2 = null;
+ }
+
+ public static Test suite() {
+ return new TestSuite(testContext.class);
+ }
+
+ /************* access methods ********************************************/
+ public void testAccessMethods01() {
+ // first instance
+ ml1.executeExpression("a=1+1;");
+ assertTrue(2 == ml1.getScalarValueRe("a"));
+
+ // second instance
+ ml2.executeExpression("a=55;");
+ assertTrue(55 == ml2.getScalarValueRe("a"));
+
+ // first instance: check if "a" has the still the same value
+ assertTrue(2 == ml1.getScalarValueRe("a"));
+
+ }
+
+
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-17 18:16:03
|
Revision: 689
http://mathlib.svn.sourceforge.net/mathlib/?rev=689&view=rev
Author: st_mueller
Date: 2009-01-17 18:16:01 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
added more directories
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/AllTests.java
Added Paths:
-----------
JMathLib/trunk/src/jmathlibtests/plugins/
JMathLib/trunk/src/jmathlibtests/plugins/AllTests.java
JMathLib/trunk/src/jmathlibtests/resourcebundles/
JMathLib/trunk/src/jmathlibtests/resourcebundles/AllTests.java
JMathLib/trunk/src/jmathlibtests/ui/
JMathLib/trunk/src/jmathlibtests/ui/AllTests.java
Modified: JMathLib/trunk/src/jmathlibtests/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/AllTests.java 2009-01-17 18:13:29 UTC (rev 688)
+++ JMathLib/trunk/src/jmathlibtests/AllTests.java 2009-01-17 18:16:01 UTC (rev 689)
@@ -17,8 +17,10 @@
/* include subdirectories here */
suite.addTest(jmathlibtests.scripts.AllTests.suite());
suite.addTest(jmathlibtests.core.AllTests.suite());
+ suite.addTest(jmathlibtests.plugins.AllTests.suite());
+ suite.addTest(jmathlibtests.resourcebundles.AllTests.suite());
suite.addTest(jmathlibtests.toolbox.AllTests.suite());
-
+ suite.addTest(jmathlibtests.ui.AllTests.suite());
/* include tests in this directory here */
//suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
Added: JMathLib/trunk/src/jmathlibtests/plugins/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/plugins/AllTests.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/plugins/AllTests.java 2009-01-17 18:16:01 UTC (rev 689)
@@ -0,0 +1,27 @@
+package jmathlibtests.plugins;
+
+import jmathlib.tools.junit.framework.*;
+
+/**
+ * TestSuite that runs all the tests
+ *
+ */
+public class AllTests {
+
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ public static Test suite ( ) {
+ TestSuite suite= new TestSuite("plugins");
+
+ /* include subdirectories here */
+ //suite.addTest(jmathlibtests.core.functions.AllTests.suite());
+
+
+ /* include tests in this directory here */
+ //suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
+
+ return suite;
+ }
+}
+
Added: JMathLib/trunk/src/jmathlibtests/resourcebundles/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/resourcebundles/AllTests.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/resourcebundles/AllTests.java 2009-01-17 18:16:01 UTC (rev 689)
@@ -0,0 +1,27 @@
+package jmathlibtests.resourcebundles;
+
+import jmathlib.tools.junit.framework.*;
+
+/**
+ * TestSuite that runs all the tests
+ *
+ */
+public class AllTests {
+
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ public static Test suite ( ) {
+ TestSuite suite= new TestSuite("resourcebundles");
+
+ /* include subdirectories here */
+ //suite.addTest(jmathlibtests.core.functions.AllTests.suite());
+
+
+ /* include tests in this directory here */
+ //suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
+
+ return suite;
+ }
+}
+
Added: JMathLib/trunk/src/jmathlibtests/ui/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/ui/AllTests.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/ui/AllTests.java 2009-01-17 18:16:01 UTC (rev 689)
@@ -0,0 +1,27 @@
+package jmathlibtests.ui;
+
+import jmathlib.tools.junit.framework.*;
+
+/**
+ * TestSuite that runs all the tests
+ *
+ */
+public class AllTests {
+
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ public static Test suite ( ) {
+ TestSuite suite= new TestSuite("ui");
+
+ /* include subdirectories here */
+ //suite.addTest(jmathlibtests.core.functions.AllTests.suite());
+
+
+ /* include tests in this directory here */
+ //suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
+
+ return suite;
+ }
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-17 18:13:34
|
Revision: 688
http://mathlib.svn.sourceforge.net/mathlib/?rev=688&view=rev
Author: st_mueller
Date: 2009-01-17 18:13:29 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
added more directories
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/core/AllTests.java
Added Paths:
-----------
JMathLib/trunk/src/jmathlibtests/core/functions/
JMathLib/trunk/src/jmathlibtests/core/functions/AllTests.java
JMathLib/trunk/src/jmathlibtests/core/interfaces/
JMathLib/trunk/src/jmathlibtests/core/interfaces/AllTests.java
Modified: JMathLib/trunk/src/jmathlibtests/core/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/AllTests.java 2009-01-14 20:37:21 UTC (rev 687)
+++ JMathLib/trunk/src/jmathlibtests/core/AllTests.java 2009-01-17 18:13:29 UTC (rev 688)
@@ -15,8 +15,10 @@
TestSuite suite= new TestSuite("core");
/* include subdirectories here */
+ suite.addTest(jmathlibtests.core.functions.AllTests.suite());
suite.addTest(jmathlibtests.core.graphics.AllTests.suite());
- suite.addTest(jmathlibtests.core.interpreter.AllTests.suite());
+ suite.addTest(jmathlibtests.core.interfaces.AllTests.suite());
+ suite.addTest(jmathlibtests.core.interpreter.AllTests.suite());
suite.addTest(jmathlibtests.core.tokens.AllTests.suite());
Added: JMathLib/trunk/src/jmathlibtests/core/functions/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/functions/AllTests.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/core/functions/AllTests.java 2009-01-17 18:13:29 UTC (rev 688)
@@ -0,0 +1,27 @@
+package jmathlibtests.core.functions;
+
+import jmathlib.tools.junit.framework.*;
+
+/**
+ * TestSuite that runs all the tests
+ *
+ */
+public class AllTests {
+
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ public static Test suite ( ) {
+ TestSuite suite= new TestSuite("functions");
+
+ /* include subdirectories here */
+ //suite.addTest(jmathlibtests.core.graphics.AllTests.suite());
+
+
+ /* include tests in this directory here */
+ //suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
+
+ return suite;
+ }
+}
+
Added: JMathLib/trunk/src/jmathlibtests/core/interfaces/AllTests.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/interfaces/AllTests.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/core/interfaces/AllTests.java 2009-01-17 18:13:29 UTC (rev 688)
@@ -0,0 +1,27 @@
+package jmathlibtests.core.interfaces;
+
+import jmathlib.tools.junit.framework.*;
+
+/**
+ * TestSuite that runs all the tests
+ *
+ */
+public class AllTests {
+
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run (suite());
+ }
+ public static Test suite ( ) {
+ TestSuite suite= new TestSuite("interfaces");
+
+ /* include subdirectories here */
+ //suite.addTest(jmathlibtests.core.graphics.AllTests.suite());
+
+
+ /* include tests in this directory here */
+ //suite.addTest(MathLib.Tools.TestSuite.Interpreter.testParser.suite());
+
+ return suite;
+ }
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-14 20:37:29
|
Revision: 687
http://mathlib.svn.sourceforge.net/mathlib/?rev=687&view=rev
Author: st_mueller
Date: 2009-01-14 20:37:21 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
code clean up. new JMathLibTestCase.java
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_bitor.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int16.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int32.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int64.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int8.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_sign.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint16.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint32.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint8.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_e.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_i.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_j.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_minusminus.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_pi.java
JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_plusplus.java
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_bitor.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_bitor.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_bitor.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_bitor extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_bitor extends JMathLibTestCase {
public test_jmathlib_toolbox_general_bitor(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_bitor.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int16.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int16.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int16.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_int16 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_int16 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_int16(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_int16.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int32.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int32.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int32.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_int32 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_int32 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_int32(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_int32.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int64.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int64.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int64.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_int64 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_int64 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_int64(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_int64.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int8.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int8.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_int8.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_int8 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_int8 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_int8(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_int8.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_sign.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_sign.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_sign.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_sign extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_sign extends JMathLibTestCase {
public test_jmathlib_toolbox_general_sign(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_sign.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint16.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint16.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint16.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_uint16 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_uint16 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_uint16(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_uint16.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint32.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint32.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint32.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_uint32 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_uint32 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_uint32(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_uint32.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint8.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint8.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_general_uint8.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_general_uint8 extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_general_uint8 extends JMathLibTestCase {
public test_jmathlib_toolbox_general_uint8(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_general_uint8.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_e.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_e.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_e.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_e extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_e extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_e(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_e.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_i.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_i.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_i.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_i extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_i extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_i(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_i.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_j.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_j.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_j.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_j extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_j extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_j(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_j.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_minusminus.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_minusminus.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_minusminus.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_minusminus extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_minusminus extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_minusminus(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_minusminus.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_pi.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_pi.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_pi.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_pi extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_pi extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_pi(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_pi.class);
Modified: JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_plusplus.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_plusplus.java 2009-01-14 20:35:47 UTC (rev 686)
+++ JMathLib/trunk/src/jmathlibtests/scripts/test_jmathlib_toolbox_jmathlib_internal_plusplus.java 2009-01-14 20:37:21 UTC (rev 687)
@@ -4,8 +4,7 @@
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;
-public class test_jmathlib_toolbox_jmathlib_internal_plusplus extends TestCase {
- protected Interpreter ml;
+public class test_jmathlib_toolbox_jmathlib_internal_plusplus extends JMathLibTestCase {
public test_jmathlib_toolbox_jmathlib_internal_plusplus(String name) {
super(name);
@@ -13,12 +12,6 @@
public static void main (String[] args) {
jmathlib.tools.junit.textui.TestRunner.run (suite());
}
- protected void setUp() {
- ml = new Interpreter(true);
- }
- protected void tearDown() {
- ml = null;
- }
public static Test suite() {
return new TestSuite(test_jmathlib_toolbox_jmathlib_internal_plusplus.class);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-14 20:35:52
|
Revision: 686
http://mathlib.svn.sourceforge.net/mathlib/?rev=686&view=rev
Author: st_mueller
Date: 2009-01-14 20:35:47 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
code clean up
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/tools/testcasegenerator/testcasegenerator.java
Modified: JMathLib/trunk/src/jmathlib/tools/testcasegenerator/testcasegenerator.java
===================================================================
--- JMathLib/trunk/src/jmathlib/tools/testcasegenerator/testcasegenerator.java 2009-01-14 20:27:34 UTC (rev 685)
+++ JMathLib/trunk/src/jmathlib/tools/testcasegenerator/testcasegenerator.java 2009-01-14 20:35:47 UTC (rev 686)
@@ -5,7 +5,7 @@
import jmathlib.core.interpreter.ErrorLogger;
-/**An external function for getting a directory listing */
+/**An external function for getting a directory listing */
public class testcasegenerator
{
@@ -13,7 +13,7 @@
Stack testStack = new Stack();
/**
- *
+ * Main method of the test case generator
* @param args
*/
public static void main(String[] args) {
@@ -54,14 +54,18 @@
else
{
//System.out.println(baseS+"/"+files[i]);
- if ( !files[i].endsWith(".gif") &&
+ if ( !files[i].endsWith(".gif") &&
+ !files[i].endsWith(".p") &&
+ !files[i].endsWith(".html") &&
+ !files[i].endsWith(".txt") &&
+ !files[i].endsWith(".jpg") &&
!files[i].endsWith(".properties") )
processFile(baseS+"/"+files[i]);
}
- }
+ } // end for
- }
+ } // end processDir
/**
*
@@ -120,7 +124,7 @@
}
- }
+ } // end while
inReader.close();
}
catch (Exception e)
@@ -164,8 +168,7 @@
s+="import jmathlib.tools.junit.framework.*; \n";
s+="import jmathlibtests.Compare; \n";
s+="\n";
- s+="public class "+ fileS +" extends TestCase { \n";
- s+=" protected Interpreter ml; \n";
+ s+="public class "+ fileS +" extends JMathLibTestCase { \n";
s+=" \n";
s+=" public "+ fileS +"(String name) { \n";
s+=" super(name); \n";
@@ -173,12 +176,6 @@
s+=" public static void main (String[] args) { \n";
s+=" jmathlib.tools.junit.textui.TestRunner.run (suite()); \n";
s+=" } \n";
- s+=" protected void setUp() { \n";
- s+=" ml = new Interpreter(true); \n";
- s+=" } \n";
- s+=" protected void tearDown() { \n";
- s+=" ml = null; \n";
- s+=" } \n";
s+=" \n";
s+=" public static Test suite() { \n";
s+=" return new TestSuite("+ fileS +".class); \n";
@@ -221,28 +218,31 @@
}
- }
+ } // end createTestCase
+ /**
+ *
+ */
public void createAllTestsFile()
{
String s="";
- s+=" package jmathlibtests.scripts; \n";
- s+=" \n";
- s+=" import jmathlib.tools.junit.framework.*; \n";
- s+=" \n";
- s+=" public class AllTests { \n";
- s+=" \n";
- s+=" public static void main (String[] args) { \n";
+ s+=" package jmathlibtests.scripts; \n";
+ s+=" \n";
+ s+=" import jmathlib.tools.junit.framework.*; \n";
+ s+=" \n";
+ s+=" public class AllTests { \n";
+ s+=" \n";
+ s+=" public static void main (String[] args) { \n";
s+=" jmathlib.tools.junit.textui.TestRunner.run (suite()); \n";
- s+=" } \n";
- s+=" public static Test suite ( ) { \n";
+ s+=" } \n";
+ s+=" public static Test suite ( ) { \n";
s+=" TestSuite suite= new TestSuite(\"script functions\"); \n";
- s+=" \n";
- s+=" /* include subdirectories here */ \n";
- s+=" // none \n";
- s+=" \n";
- s+=" /* include tests in this directory here */ \n";
+ s+=" \n";
+ s+=" /* include subdirectories here */ \n";
+ s+=" // none \n";
+ s+=" \n";
+ s+=" /* include tests in this directory here */ \n";
s+=" suite.addTest(jmathlibtests.toolbox.net.testUrlread.suite());\n";
@@ -253,10 +253,10 @@
s+=" suite.addTest(jmathlibtests.scripts."+ fileS +".suite());\n";
}
- s+=" \n";
- s+=" return suite; \n";
- s+=" } \n";
- s+=" } \n";
+ s+=" \n";
+ s+=" return suite; \n";
+ s+=" } \n";
+ s+=" } \n";
try
@@ -273,7 +273,7 @@
}
- }
+ } // createAllTestsFile
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|