[Mathlib-commitlog] SF.net SVN: mathlib:[701] JMathLib/trunk/src/jmathlib/toolbox/jmathlib/ graphic
Status: Beta
Brought to you by:
st_mueller
|
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.
|