org.das2.dataset
Class DefaultTableDataSet

java.lang.Object
  extended by org.das2.dataset.AbstractDataSet
      extended by org.das2.dataset.AbstractTableDataSet
          extended by org.das2.dataset.DefaultTableDataSet
All Implemented Interfaces:
DataSet, TableDataSet

public final class DefaultTableDataSet
extends AbstractTableDataSet


Nested Class Summary
 
Nested classes/interfaces inherited from class org.das2.dataset.AbstractTableDataSet
AbstractTableDataSet.XSliceDataSet, AbstractTableDataSet.YSliceDataSet
 
Nested classes/interfaces inherited from class org.das2.dataset.AbstractDataSet
AbstractDataSet.ViewDataSet
 
Field Summary
 
Fields inherited from class org.das2.dataset.AbstractTableDataSet
tableProperties
 
Fields inherited from interface org.das2.dataset.DataSet
PROPERTY_CACHE_TAG, PROPERTY_FORMATTER, PROPERTY_PLANE_PEAKS, PROPERTY_PLANE_WEIGHTS, PROPERTY_RENDERER, PROPERTY_SIZE_BYTES, PROPERTY_X_LABEL, PROPERTY_X_MONOTONIC, PROPERTY_X_RANGE, PROPERTY_X_TAG_WIDTH, PROPERTY_Y_LABEL, PROPERTY_Y_RANGE, PROPERTY_Y_SCALETYPE, PROPERTY_Y_TAG_WIDTH, PROPERTY_Z_LABEL, PROPERTY_Z_RANGE, PROPERTY_Z_SCALETYPE
 
Constructor Summary
DefaultTableDataSet(double[] xTags, Units xUnits, double[][] yTags, Units yUnits, double[][][] zValues, Units zUnits, java.util.Map zValuesMap, java.util.Map zUnitsMap, java.util.Map properties)
          Creates a new instance of DefaultTableDataSet for tables where the table geometry changes, and the DataSet contains multiple planes.
DefaultTableDataSet(double[] xTags, Units xUnits, double[] yTags, Units yUnits, double[][] zValues, Units zUnits, java.util.Map properties)
          Creates a DefaultTableDataSet when the table geometry changes.
 
Method Summary
static DefaultTableDataSet createSimple(double[] xTags, double[] yTags, double[][] zValues)
           
 void dump(java.io.PrintStream out)
           
 Datum getDatum(int i, int j)
          Returns the Z value for the given indices into the x and y tags as a Datum.
 double getDouble(int i, int j, Units units)
          Returns the Z value for the given indices into the x and y tags as a double with the given units.
 double[] getDoubleScan(int i, Units units)
           
 int getInt(int i, int j, Units units)
          Returns the Z value for the given indices into the x and y tags as a int with the given units.
 DataSet getPlanarView(java.lang.String planeID)
          Returns a DataSet with the specified view as the primary view.
 java.lang.String[] getPlaneIds()
          Returns a list of auxillary planes (e.g.
 DatumVector getScan(int i)
           
 int getYLength(int table)
          Returns the number of y tags in the specified table for this data set.
 Datum getYTagDatum(int table, int j)
          Returns the value of the y tag at the given index j as a Datum.
 double getYTagDouble(int table, int j, Units units)
          Returns the value of the y tag at the given index j as a double in the given units.
 int getYTagInt(int table, int j, Units units)
          Returns the value of the y tag at the given index j as an int in the given units.
 DatumVector getYTags(int table)
          Returns the yTags for this data set as a DatumVector
 void printDebugInfo(java.io.PrintStream out)
           
 int tableCount()
          Returns the number of tables in this data set
 int tableEnd(int table)
          Returns the index after the last x tag index of the specified table
 int tableOfIndex(int i)
          Returns the table number that the specified index is in.
 int tableStart(int table)
          Returns the first x tag index of the specified table.
 java.lang.String toString()
           
 
Methods inherited from class org.das2.dataset.AbstractTableDataSet
getProperty, getXSlice, getYSlice, getZUnits
 
Methods inherited from class org.das2.dataset.AbstractDataSet
getProperties, getProperty, getXLength, getXTagDatum, getXTagDouble, getXTagInt, getXUnits, getYUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.das2.dataset.DataSet
getProperties, getProperty, getXLength, getXTagDatum, getXTagDouble, getXTagInt, getXUnits, getYUnits
 

Constructor Detail

DefaultTableDataSet

public DefaultTableDataSet(double[] xTags,
                           Units xUnits,
                           double[][] yTags,
                           Units yUnits,
                           double[][][] zValues,
                           Units zUnits,
                           java.util.Map zValuesMap,
                           java.util.Map zUnitsMap,
                           java.util.Map properties)
Creates a new instance of DefaultTableDataSet for tables where the table geometry changes, and the DataSet contains multiple planes.


DefaultTableDataSet

public DefaultTableDataSet(double[] xTags,
                           Units xUnits,
                           double[] yTags,
                           Units yUnits,
                           double[][] zValues,
                           Units zUnits,
                           java.util.Map properties)
Creates a DefaultTableDataSet when the table geometry changes.

Method Detail

createSimple

public static DefaultTableDataSet createSimple(double[] xTags,
                                               double[] yTags,
                                               double[][] zValues)

getDatum

public Datum getDatum(int i,
                      int j)
Description copied from interface: TableDataSet
Returns the Z value for the given indices into the x and y tags as a Datum.

Parameters:
i - index of the x tag for the requested value.
j - index of the y tag for the requested value.
Returns:
the value at index location (i, j) as a Datum

getScan

public DatumVector getScan(int i)

getDouble

public double getDouble(int i,
                        int j,
                        Units units)
Description copied from interface: TableDataSet
Returns the Z value for the given indices into the x and y tags as a double with the given units.

Parameters:
i - index of the y tag for the requested value.
j - index of the x tag for the requested value.
units - the units the returned value should be coverted to.
Returns:
the value at index location (i, j) as a double.

getDoubleScan

public double[] getDoubleScan(int i,
                              Units units)

getInt

public int getInt(int i,
                  int j,
                  Units units)
Description copied from interface: TableDataSet
Returns the Z value for the given indices into the x and y tags as a int with the given units.

Parameters:
i - index of the x tag for the requested value.
j - index of the y tag for the requested value.
units - the units the returned value should be coverted to.
Returns:
the value at index location (i, j) as a int.

getPlanarView

public DataSet getPlanarView(java.lang.String planeID)
Description copied from interface: DataSet
Returns a DataSet with the specified view as the primary view.

Parameters:
planeID - the String id of the requested plane.
Returns:
the specified view, as a DataSet

getPlaneIds

public java.lang.String[] getPlaneIds()
Description copied from interface: DataSet
Returns a list of auxillary planes (e.g. weights, peaks) for the dataset. Note that the default plane, "" may or may not be returned, based on implementations.


getYLength

public int getYLength(int table)
Description copied from interface: TableDataSet
Returns the number of y tags in the specified table for this data set. YTags must be monotonically increasing with j.

Parameters:
table - index of the table
Returns:
the number of x tags in this data set.

getYTagDatum

public Datum getYTagDatum(int table,
                          int j)
Description copied from interface: TableDataSet
Returns the value of the y tag at the given index j as a Datum.

j - the index of the requested y tag
Returns:
the value of the y tag at the given index j as a Datum.

getYTagDouble

public double getYTagDouble(int table,
                            int j,
                            Units units)
Description copied from interface: TableDataSet
Returns the value of the y tag at the given index j as a double in the given units. YTags must be monotonically increasing with j.

j - the index of the requested y tag
units - the units of the returned value
Returns:
the value of the y tag at the given index j as a double.

getYTagInt

public int getYTagInt(int table,
                      int j,
                      Units units)
Description copied from interface: TableDataSet
Returns the value of the y tag at the given index j as an int in the given units. YTags must be monotonically increasing with j.

j - the index of the requested y tag
units - the units of the returned value
Returns:
the value of the y tag at the given index j as an int.

getYTags

public DatumVector getYTags(int table)
Description copied from interface: TableDataSet
Returns the yTags for this data set as a DatumVector

Returns:
the yTags for this data set as a DatumVector

tableCount

public int tableCount()
Description copied from interface: TableDataSet
Returns the number of tables in this data set

Returns:
the number of tables in this data set

tableEnd

public int tableEnd(int table)
Description copied from interface: TableDataSet
Returns the index after the last x tag index of the specified table

Parameters:
table - the index of the table
Returns:
the index after the last x tag index of the specified table

tableOfIndex

public int tableOfIndex(int i)
Description copied from interface: TableDataSet
Returns the table number that the specified index is in.

Parameters:
i - x tag index
Returns:
the table number that the specified index is in

tableStart

public int tableStart(int table)
Description copied from interface: TableDataSet
Returns the first x tag index of the specified table.

Parameters:
table - the index of the table.
Returns:
the first x tag index of the specified table

dump

public void dump(java.io.PrintStream out)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractTableDataSet

printDebugInfo

public void printDebugInfo(java.io.PrintStream out)