public class DataSetUtil
extends java.lang.Object
Constructor and Description |
---|
DataSetUtil() |
Modifier and Type | Method and Description |
---|---|
static DataSet |
append(DataSet ds1,
DataSet ds2)
provides convenient method for appending datasets together.
|
static DataSet |
append(DataSet ds1,
DataSet ds2,
CacheTag ct)
provides convenient method for appending datasets together.
|
protected static int |
closest(double[] xx,
double x)
finds the element closest to x in monotonic array xx.
|
static int |
closestColumn(DataSet table,
Datum datum) |
static int |
closestColumn(DataSet table,
Datum xdatum,
int guessIndex)
finds the dataset column closest to the value, starting the search at guessIndex.
|
static int |
closestColumn(DataSet table,
double x,
Units units) |
static java.lang.String[] |
getAllPlaneIds(DataSet ds)
returns all planes, including the default plane "".
|
static int |
getNextColumn(DataSet ds,
Datum datum)
returns the first column that is after the given datum.
|
static int |
getPreviousColumn(DataSet ds,
Datum datum)
returns the first column that is before the given datum.
|
static DataSet |
getWeightsDataSet(DataSet ds) |
static double[] |
getXTagArrayDouble(DataSet vds,
Units units) |
static DatumVector |
getXTags(DataSet ds) |
static CacheTag |
guessCacheTag(DataSet ds) |
static long |
guessSizeBytes(DataSet ds)
Give an estimate of the size of the data set, or PROPERTY_SIZE_BYTES if available.
|
static Datum |
guessXTagWidth(DataSet table)
Provide a reasonable xTagWidth either by returning the specified xTagWidth property,
or by statistically looking at the X tags.
|
static VectorDataSet |
log10(VectorDataSet ds) |
static DatumRange |
xRange(DataSet ds)
returns the xrange of the dataset.
|
static int |
xTagBinarySearch(DataSet ds,
Datum datum,
int low,
int high)
returns the index of a tag, or the (-(insertion point) - 1).
|
static DatumRange |
yRange(DataSet ds) |
static DatumRange |
zRange(DataSet ds)
guess a range that characterizes the data.
|
public static DatumRange xRange(DataSet ds)
ds
- public static DatumRange yRange(DataSet ds)
public static Datum guessXTagWidth(DataSet table)
protected static int closest(double[] xx, double x)
xx
- monotonic array of numbers. When xx is decreasing, a copy
of the array is made.x
- public static int xTagBinarySearch(DataSet ds, Datum datum, int low, int high)
public static int closestColumn(DataSet table, Datum xdatum, int guessIndex)
table
- xdatum
- guessIndex
- public static int getPreviousColumn(DataSet ds, Datum datum)
public static int getNextColumn(DataSet ds, Datum datum)
public static DatumVector getXTags(DataSet ds)
public static DatumRange zRange(DataSet ds)
java.lang.UnsupportedOperationException
- if the dataset is not a TableDataSet.public static long guessSizeBytes(DataSet ds)
public static DataSet append(DataSet ds1, DataSet ds2, CacheTag ct)
ds1
- the first data set. May be null.ds2
- the second data set. This data set should be after ds1, and
may be null.ct
- the cache tag for the second dataset. May be null, in which
case guessCacheTag is used to identify the dataset cache tag.public static DataSet append(DataSet ds1, DataSet ds2)
ds1
- the first data set. May be null.ds2
- the second data set. This data set should be after ds1, and
may be null.public static VectorDataSet log10(VectorDataSet ds)
public static java.lang.String[] getAllPlaneIds(DataSet ds)