com.panayotis.gnuplot.dataset
Class ArrayDataSet

java.lang.Object
  extended by com.panayotis.gnuplot.dataset.ArrayDataSet
All Implemented Interfaces:
DataSet, java.io.Serializable

public class ArrayDataSet
extends java.lang.Object
implements DataSet, java.io.Serializable

Store data sets in a static primitive 2D array

See Also:
Serialized Form

Constructor Summary
ArrayDataSet(double[][] values)
          Creates a new instance of ArrayDataSet from a double precision 2D array
ArrayDataSet(float[][] values)
          Creates a new instance of ArrayDataSet from a float precision 2D array
ArrayDataSet(int[][] values)
          Creates a new instance of ArrayDataSet from a int precision 2D array
ArrayDataSet(long[][] values)
          Creates a new instance of ArrayDataSet from a long precision 2D array
ArrayDataSet(java.lang.String[][] values)
          Deprecated.  
 
Method Summary
 int getDimensions()
          Retrieve how many dimensions this dataset refers to.
 java.lang.String getPointValue(int point, int dimension)
          Retrieve data information from a point.
 int size()
          Retrieve how many points this data set has.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayDataSet

public ArrayDataSet(double[][] values)
Creates a new instance of ArrayDataSet from a double precision 2D array

Parameters:
values - the 2D array in double precision to retrieve data from

ArrayDataSet

public ArrayDataSet(float[][] values)
Creates a new instance of ArrayDataSet from a float precision 2D array

Parameters:
values - the 2D array in float precision to retrieve data from

ArrayDataSet

public ArrayDataSet(int[][] values)
Creates a new instance of ArrayDataSet from a int precision 2D array

Parameters:
values - the 2D array in int precision to retrieve data from

ArrayDataSet

public ArrayDataSet(long[][] values)
Creates a new instance of ArrayDataSet from a long precision 2D array

Parameters:
values - the 2D array in long precision to retrieve data from

ArrayDataSet

public ArrayDataSet(java.lang.String[][] values)
Deprecated. 

Creates a new instance of ArrayDataSet from a String 2D array. No check on the data format is performed, can store any kind of value. Do not use this method.

Parameters:
values - the 2D array in String format to retrieve data from
Method Detail

size

public int size()
Retrieve how many points this data set has.

Specified by:
size in interface DataSet
Returns:
the number of points

getDimensions

public int getDimensions()
Retrieve how many dimensions this dataset refers to.

Specified by:
getDimensions in interface DataSet
Returns:
the number of dimensions
See Also:
DataSet.getDimensions()

getPointValue

public java.lang.String getPointValue(int point,
                                      int dimension)
Retrieve data information from a point.

Specified by:
getPointValue in interface DataSet
Parameters:
point - The point number
dimension - The point dimension (or "column") to request data from
Returns:
the point data for this dimension
See Also:
DataSet.getPointValue(int,int)