|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.virbo.dataset.DataSetOps
public class DataSetOps
Useful operations for QDataSets
Constructor Summary | |
---|---|
DataSetOps()
|
Method Summary | |
---|---|
static WritableDataSet |
applyIndex(QDataSet ds,
int idim,
QDataSet sort,
boolean deps)
Applies the sort index to the idim-th dimension of the qube dataset ds. |
static QDataSet |
histogram(QDataSet ds,
double min,
double max,
double binsize)
returns a rank 1 dataset that is a histogram of the data. |
static MutablePropertyDataSet |
leafTrim(QDataSet ds,
int start,
int end)
pull out a subset of the dataset by reducing the number of columns in the last dimension. |
static QDataSet |
moment(QDataSet ds)
performs the moment (mean,variance,etc) on the dataset. |
static int[] |
removeElement(int[] array,
int index)
removes the index-th element from the array. |
static MutablePropertyDataSet |
slice0(QDataSet ds,
int index)
slice on the first dimension |
static MutablePropertyDataSet |
slice1(QDataSet ds,
int index)
this strange dataset operator assumes a square or qube dataset by picking the index-th element of dataset's second dimension, without regard to tags. |
static MutablePropertyDataSet |
slice2(QDataSet ds,
int index)
this strange dataset operator assumes a square or qube dataset by picking the index-th element of dataset's second dimension, without regard to tags. |
static QDataSet |
sort(QDataSet ds)
returns a list of indeces that sort the dataset. |
static QDataSet |
transpose2(QDataSet ds)
transpose the rank 2 qube dataset so the rows are columns and the columns are rows. |
static MutablePropertyDataSet |
trim(QDataSet ds,
int offset,
int len)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataSetOps()
Method Detail |
---|
public static MutablePropertyDataSet slice0(QDataSet ds, int index)
public static MutablePropertyDataSet slice1(QDataSet ds, int index)
public static MutablePropertyDataSet slice2(QDataSet ds, int index)
public static MutablePropertyDataSet trim(QDataSet ds, int offset, int len)
public static int[] removeElement(int[] array, int index)
array
- index
-
public static MutablePropertyDataSet leafTrim(QDataSet ds, int start, int end)
start
- first index to include.end
- last index, exclusivepublic static QDataSet sort(QDataSet ds)
public static WritableDataSet applyIndex(QDataSet ds, int idim, QDataSet sort, boolean deps)
ds
- rank 1,2, or 3 qube datasetidim
- the dimension being sorted.sort
- rank 1 dataset of new indeces, needn't be same size as index.deps
- do dependencies as well. Note this does not rearrange planes!
for similar functionality
public static QDataSet histogram(QDataSet ds, double min, double max, double binsize)
ds
- rank N datasetmin
- the min of the first bin.max
- the max of the last bin.binsize
- the size of each bin.
public static QDataSet moment(QDataSet ds)
ds
- rank N QDataSet.
public static QDataSet transpose2(QDataSet ds)
ds
- rank 2 Qube DataSet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |