anl.aida.data
Interface DataFrame

All Known Implementing Classes:
AbstractDataFrame, DataFrameBuilder.BuilderDataFrame

public interface DataFrame

Array-based data and metadata for a single variable.

Version:
$Revision$ $Date$

Method Summary
 ucar.ma2.Array getArray()
          Gets the Array that contains the data.
 java.lang.Class<?> getArrayType()
          Gets the element type contained by the data array.
 Axes<DataFrameAxis> getAxes()
          Gets metadata describing this data frame's axes.
 java.util.List<Dataset> getDataset()
          Gets the dataset that produced this DataFrame.
 double getDouble(DataFrameIndex index)
          Gets the item at the specified indices as a double.
 float getFloat(DataFrameIndex index)
          Gets the item at the specified indices as a float.
 DataFrameIndex getIndex()
          Gets a DataFrameIndex used to retrieve data from this DataFrame.
 int getInt(DataFrameIndex index)
          Gets the item at the specified indices as an int.
 long getLong(DataFrameIndex index)
          Gets the item at the specified indices as a long.
 int[] getShape()
          Gets the shape - the array dimensionality - of this DataFrame.
 long getSize()
          Gets the total number of items in the data array.
 Variable getVariable()
          Gets the variable associated with this DataFrame.
 DataFrame slice(Slice slice)
          Creates a new DataFrame that is a slice or subsection of this one.
 

Method Detail

getArray

ucar.ma2.Array getArray()
Gets the Array that contains the data.

Returns:
the Array that contains the result data.

getVariable

Variable getVariable()
Gets the variable associated with this DataFrame.

Returns:
the variable associated with this DataFrame.

getAxes

Axes<DataFrameAxis> getAxes()
Gets metadata describing this data frame's axes.

Returns:
metadata describing this data frame's axes.

getDataset

java.util.List<Dataset> getDataset()
Gets the dataset that produced this DataFrame.

Returns:
the dataset that produced this DataFrame.

getArrayType

java.lang.Class<?> getArrayType()
Gets the element type contained by the data array.

Returns:
the element type contained by the data array.

getSize

long getSize()
Gets the total number of items in the data array.

Returns:
the total number of items in the data array.

getShape

int[] getShape()
Gets the shape - the array dimensionality - of this DataFrame.

Returns:
the shape - the array dimensionality - of this DataFrame.

getIndex

DataFrameIndex getIndex()
Gets a DataFrameIndex used to retrieve data from this DataFrame.

Returns:
a DataFrameIndex used to retrieve data from this DataFrame.

getDouble

double getDouble(DataFrameIndex index)
Gets the item at the specified indices as a double. The appropriate order of the indices can be gotten via the Axes information

Parameters:
index - the index of the data to retrieve.
Returns:
the item at the specified indices as a double.

getFloat

float getFloat(DataFrameIndex index)
Gets the item at the specified indices as a float. The appropriate order of the indices can be gotten via the Axes information

Parameters:
index - the index of the data to retrieve.
Returns:
the item at the specified indices as a float.

getInt

int getInt(DataFrameIndex index)
Gets the item at the specified indices as an int. The appropriate order of the indices can be gotten via the Axes information

Parameters:
index - the index of the data to retrieve.
Returns:
the item at the specified indices as an int.

getLong

long getLong(DataFrameIndex index)
Gets the item at the specified indices as a long. The appropriate order of the indices can be gotten via the Axes information

Parameters:
index - the index of the data to retrieve.
Returns:
the item at the specified indices as a long.

slice

DataFrame slice(Slice slice)
                throws ucar.ma2.InvalidRangeException
Creates a new DataFrame that is a slice or subsection of this one. The two DataFrames will share data, so any change to one will be reflected in the other. The slice ranges should be in terms of the array indices of the data frame which are NOT necessarily the axes origins and extents.

Parameters:
slice - describes the slice of data contained by the new DataFrame.
Returns:
a new DataFrame that is a slice or subsection of this one
Throws:
ucar.ma2.InvalidRangeException - if the slice is not within the range of this DataFrame's dimensions.