analyzer.tree
Interface DataSource

All Known Implementing Classes:
ConstDataSource, AverageDataSource, AsciiColumnSource

public abstract interface DataSource

Interface for classes that can supply tensor data.


Field Summary
static int DOUBLE
          Class variable to indicate a tensor of type double.
static int INT
          Class variable to indicate a tensor of type int.
static java.lang.String[] TYPENAME
          Class variable for string representation of type names.
 
Method Summary
 java.lang.Object getData()
          Return the tensor data as an object.
 int[] getDims()
          Return the dimensions of the tensor.
 int getType()
          Return the type of the tensor values.
 

Field Detail

DOUBLE

public static final int DOUBLE
Class variable to indicate a tensor of type double.

INT

public static final int INT
Class variable to indicate a tensor of type int.

TYPENAME

public static final java.lang.String[] TYPENAME
Class variable for string representation of type names.
Method Detail

getData

public java.lang.Object getData()
Return the tensor data as an object. The information from getType may be used to cast this back to a packed 1D array, and the information from getDims may be used to interpret the 1D array as a multidimensional tensor.

getDims

public int[] getDims()
Return the dimensions of the tensor.

getType

public int getType()
Return the type of the tensor values. Return value is either DataSource.DOUBLE or DataSource.INT.


Email questions and comments to
shumway@uiuc.edu or nzhong@ncsa.uiuc.edu