jmathlib
Class Curve
java.lang.Object
|
+--jmathlib.Curve
- public class Curve
- extends java.lang.Object
A class that stores a N-dimensional function of time (i.e. R -> R^N) as an array of doubles, each element
being of the form (t,x_1,...,x_N).
Constructor Summary |
Curve(Curve c)
Creates a new Curve from the given curve |
Curve(int dimension)
Creates a new Curve of the given dimension |
Curve(int dimension,
java.awt.Color curveColor)
Creates a new Curve of the given dimension and the given color |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
protected java.util.Vector data
curveColor
protected java.awt.Color curveColor
curveTitle
protected java.lang.String curveTitle
dimension
protected int dimension
Curve
public Curve(int dimension)
- Creates a new Curve of the given dimension
- Parameters:
dimension
- the dimension (i.e. the number of rows minus one)
Curve
public Curve(int dimension,
java.awt.Color curveColor)
- Creates a new Curve of the given dimension and the given color
- Parameters:
dimension
- the dimension (i.e. the number of rows minus one)curveColor
- the curve color
Curve
public Curve(Curve c)
- Creates a new Curve from the given curve
addColumn
public void addColumn(double[] element)
- add a new element of type (t,x_1,...,x_N) to this curve
- Parameters:
element
- must be a (N+1)-dimension array of double, where N is the dimension of this curve
addColumns
public void addColumns(double[][] elements)
join
public void join(Curve c)
getData
public java.util.Vector getData()
toArray
public double[][] toArray()
row
public double[] row(int index)
clear
public void clear()
size
public int size()
elements
public java.util.Enumeration elements()
firstColumn
public double[] firstColumn()
lastColumn
public double[] lastColumn()
column
public double[] column(int index)
getDimension
public int getDimension()
getColor
public java.awt.Color getColor()
setColor
public void setColor(java.awt.Color curveColor)
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- a text-formatted representation of this curve
jmathlib/ABMOdeSolver.java