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).


Field Summary
protected  java.awt.Color curveColor
           
protected  java.lang.String curveTitle
           
protected  java.util.Vector data
           
protected  int dimension
           
 
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
 
Method Summary
 void addColumn(double[] element)
          add a new element of type (t,x_1,...
 void addColumns(double[][] elements)
           
 void clear()
           
 double[] column(int index)
           
 java.util.Enumeration elements()
           
 double[] firstColumn()
           
 java.awt.Color getColor()
           
 java.util.Vector getData()
           
 int getDimension()
           
 java.lang.String getTitle()
           
 void join(Curve c)
           
 double[] lastColumn()
           
 double[] row(int index)
           
 void setColor(java.awt.Color curveColor)
           
 void setTitle(java.lang.String title)
           
 int size()
           
 double[][] toArray()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

protected java.util.Vector data

curveColor

protected java.awt.Color curveColor

curveTitle

protected java.lang.String curveTitle

dimension

protected int dimension
Constructor Detail

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
Method Detail

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