analyzer.tree
Class ConstDataSource

java.lang.Object
  |
  +--analyzer.tree.ConstDataSource

public class ConstDataSource
extends java.lang.Object
implements DataSource

Simple implementation of DataSource for tensors that are already stored as packed 1D arrays.


Constructor Summary
ConstDataSource(java.lang.Object data, int[] dims, int type)
          Constructor.
 
Method Summary
 java.lang.Object getData()
          Return the data array as an object.
 int[] getDims()
          Return the unpacked dimensions of the data array.
 int getType()
          Return the numerical type of the data array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstDataSource

public ConstDataSource(java.lang.Object data,
                       int[] dims,
                       int type)
Constructor.
Method Detail

getData

public java.lang.Object getData()
Return the data array as an object.
Specified by:
getData in interface DataSource

getDims

public int[] getDims()
Return the unpacked dimensions of the data array.
Specified by:
getDims in interface DataSource

getType

public int getType()
Return the numerical type of the data array. Returns either DataSource.DOUBLE or DataSource.INT.
Specified by:
getType in interface DataSource


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