public abstract class ArrayDataSet extends AbstractDataSet implements WritableDataSet
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
logger |
properties
AVERAGE_TYPE, BIN_MAX, BIN_MAX_NAME, BIN_MIN, BIN_MIN_NAME, BIN_MINUS, BIN_MINUS_NAME, BIN_PLUS, BIN_PLUS_NAME, BINS_0, BINS_1, BUNDLE_0, BUNDLE_1, BUNDLE_2, BUNDLE_3, CACHE_TAG, CADENCE, CONTEXT_0, CONTEXT_1, COORDINATE_FRAME, DEFAULT_FILL_VALUE, DELTA_MINUS, DELTA_MINUS_NAME, DELTA_PLUS, DELTA_PLUS_NAME, DEPEND_0, DEPEND_1, DEPEND_2, DEPEND_3, DEPENDNAME_0, DEPENDNAME_1, DESCRIPTION, ELEMENT_DIMENSIONS, ELEMENT_LABEL, ELEMENT_NAME, FILL_VALUE, FORMAT, JOIN_0, LABEL, LIMIT_HUGE_DATASET, MAX_HIGH_RANK, MAX_PLANE_COUNT, MAX_RANK, MAX_UNIT_BUNDLE_COUNT, METADATA, METADATA_MODEL, MIN_WAVEFORM_LENGTH, MONOTONIC, NAME, NOTES, PLANE_0, QUBE, RENDER_TYPE, SCALE_TYPE, SOURCE, START_INDEX, TITLE, TYPICAL_MAX, TYPICAL_MIN, UNITS, USER_PROPERTIES, VALID_MAX, VALID_MIN, VALUE_AVERAGE_TYPE_GEOMETRIC, VALUE_AVERAGE_TYPE_LINEAR, VALUE_AVERAGE_TYPE_MOD24, VALUE_AVERAGE_TYPE_MOD360, VALUE_AVERAGE_TYPE_MODPI, VALUE_AVERAGE_TYPE_MODTAU, VALUE_AVERAGE_TYPE_NONE, VALUE_BINS_MIN_MAX, VALUE_BINS_MIN_MAX_INCLUSIVE, VALUE_COORDINATE_FRAME_COMPLEX_NUMBER, VALUE_METADATA_MODEL_ISTP, VALUE_METADATA_MODEL_SPASE, VALUE_RENDER_TYPE_COMPOSITE_IMAGE, VALUE_RENDER_TYPE_DIGITAL, VALUE_RENDER_TYPE_EVENTS_BAR, VALUE_RENDER_TYPE_NNSPECTROGRAM, VALUE_RENDER_TYPE_SERIES, VALUE_RENDER_TYPE_TRIANGLE_MESH, VALUE_SCALE_TYPE_LINEAR, VALUE_SCALE_TYPE_LOG, VERSION, WEIGHTS
Modifier | Constructor and Description |
---|---|
protected |
ArrayDataSet(java.lang.Class componentType) |
Modifier and Type | Method and Description |
---|---|
void |
about()
print some info about this ArrayDataSet.
|
void |
append(ArrayDataSet ds)
append the dataset with the same geometry but different number of records (zeroth dim)
to this.
|
static ArrayDataSet |
append(ArrayDataSet ds1,
ArrayDataSet ds2)
append the second dataset onto this dataset.
|
boolean |
canAppend(ArrayDataSet ds)
return true if the dataset can be appended.
|
protected void |
checkFill()
check for fill property and set local variable.
|
static ArrayDataSet |
copy(java.lang.Class c,
QDataSet ds)
Copy to array of specific type.
|
static ArrayDataSet |
copy(QDataSet ds)
copies the dataset into a writable ArrayDataSet, and all of its depend
datasets as well.
|
static ArrayDataSet |
copy(QDataSet ds,
LongReadAccess lra) |
static ArrayDataSet |
create(java.lang.Class c,
int[] qube)
create a dataset with the backing type and the dimensions given.
|
protected static ArrayDataSet |
create(int rank,
int len0,
int len1,
int len2,
int len3,
java.lang.Object back) |
static ArrayDataSet |
createRank0(java.lang.Class c)
create a rank 0 dataset of the class, which can be
double.class, float.class, long.class, int.class, short.class and byte.class
|
static ArrayDataSet |
createRank1(java.lang.Class c,
int len0)
create a rank 1 dataset of the class, which can be
double.class, float.class, long.class, int.class, short.class and byte.class
|
static ArrayDataSet |
createRank2(java.lang.Class c,
int len0,
int len1)
create a rank 2 dataset of the class, which can be
double.class, float.class, long.class, int.class, short.class and byte.class
|
static ArrayDataSet |
createRank3(java.lang.Class c,
int len0,
int len1,
int len2)
create a rank 3 dataset of the class, which can be
double.class, float.class, long.class, int.class, short.class and byte.class
|
static ArrayDataSet |
createRank4(java.lang.Class c,
int len0,
int len1,
int len2,
int len3)
create a rank 4 dataset of the class, which can be
double.class, float.class, long.class, int.class, short.class and byte.class
|
static java.lang.Object |
flattenArray(java.lang.Object array,
int[] qube) |
protected abstract java.lang.Object |
getBack()
provide access to the backing array.
|
protected abstract java.lang.Object |
getBackCopy()
return a copy of the backing array, to support ArrayDataSet.copy.
|
protected abstract int |
getBackJvmMemory()
return the size of the backing in JvmMemory.
|
protected abstract java.lang.Object |
getBackReadOnly()
return the backing array to the client, who promises not to modify the
memory.
|
java.lang.Class |
getComponentType()
return the component type of the backing array, such as double.class.
|
void |
grow(int newRecCount)
grow the internal store so that append may be used to resize the dataset.
|
static java.lang.Class |
guessBackingStore(QDataSet ds)
guess the type of the backing store, returning double.class
if it cannot be determined.
|
protected static java.util.Map |
joinProperties(ArrayDataSet ds1,
ArrayDataSet ds2)
join the properties of the two datasets.
|
int |
jvmMemory()
returns the size of the dataset in bytes.
|
int |
length()
return the length of the first dimension
|
int |
length(int i)
return the length of the second dimension, for the ith element of the first dimension.
|
int |
length(int i0,
int i1)
return the length of the third dimension, for the ith element of the first dimension and jth element of the second dimension.
|
int |
length(int i0,
int i1,
int i2)
return the length of the fourth dimension for the ith, jth and kth elements of the first three dimensions.
|
static ArrayDataSet |
maybeCopy(java.lang.Class c,
QDataSet ds)
Copy the dataset to a ArrayDataSet only if the dataset is not already a
particular instance of the given type of ArrayDataSet.
|
static ArrayDataSet |
maybeCopy(QDataSet ds)
Copy the dataset to an ArrayDataSet only if the dataset is not
already an ArrayDataSet that is mutable.
|
static ArrayDataSet |
monotonicSubset(ArrayDataSet ds)
ensure that there are no non-monotonic or repeat records, by removing
the first N-1 records of N repeated records.
|
static ArrayDataSet |
monotonicSubset2(ArrayDataSet ds)
ensure that there are no non-monotonic or repeat records, by starting at the middle
of the dataset and finding the monotonic subsection.
|
void |
putLength(int len)
Shorten the dataset by changing it's dim 0 length parameter.
|
int |
rank()
returns the rank of the dataset, which is the number of indeces used to access data.
|
protected abstract void |
setBack(java.lang.Object back)
reset the back to this new backing array.
|
QDataSet |
setUnits(Units units)
set the units for this dataset.
|
java.lang.String |
toString()
return a human-readable string representation of this QDataSet.
|
static ArrayDataSet |
wrap(java.lang.Object array,
int[] qube,
boolean copy)
return the array as ArrayDataSet The array must be a 1-D array and the
dimensions of the result are provided in qube.
|
capability, checkImmutable, isImmutable, makeImmutable, property, property, putProperty, putProperty, slice, svalue, trim, value, value, value, value, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
putValue, putValue, putValue, putValue, putValue
isImmutable, makeImmutable, putProperty, putProperty
protected static ArrayDataSet create(int rank, int len0, int len1, int len2, int len3, java.lang.Object back)
public static ArrayDataSet create(java.lang.Class c, int[] qube)
c
- the backing type, such as double.class, float.class, etc.qube
- dimensions of the datasetgetComponentType()
,
which also supports unsigned types.
public static ArrayDataSet createRank0(java.lang.Class c)
c
- the primitive class of each element.public static ArrayDataSet createRank1(java.lang.Class c, int len0)
c
- the primitive class of each element.len0
- the length of the dimensionpublic static ArrayDataSet createRank2(java.lang.Class c, int len0, int len1)
c
- the primitive class of each element.len0
- the length of the dimensionlen1
- the length of the dimensionpublic static ArrayDataSet createRank3(java.lang.Class c, int len0, int len1, int len2)
c
- the primitive class of each element.len0
- the length of the dimensionlen1
- the length of the dimensionlen2
- the length of the dimensionpublic static ArrayDataSet createRank4(java.lang.Class c, int len0, int len1, int len2, int len3)
c
- the primitive class of each element.len0
- the length of the dimensionlen1
- the length of the dimensionlen2
- the length of the dimensionlen3
- the length of the dimensionpublic static java.lang.Object flattenArray(java.lang.Object array, int[] qube)
public static ArrayDataSet wrap(java.lang.Object array, int[] qube, boolean copy)
array
- 1-D arrayqube
- dimensions of the datasetcopy
- copy the data so that original data is not modified with putValuecreate(java.lang.Class, int[])
public static ArrayDataSet monotonicSubset2(ArrayDataSet ds)
ds
- ArrayDataSet, which must be writable.public static ArrayDataSet monotonicSubset(ArrayDataSet ds)
ds
- ArrayDataSet, which must be writable.public int rank()
QDataSet
rank
in interface QDataSet
rank
in class AbstractDataSet
public final int length()
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
public final int length(int i)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
i
- the indexpublic final int length(int i0, int i1)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
i0
- the indexi1
- the indexpublic final int length(int i0, int i1, int i2)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
i0
- the indexi1
- the indexi2
- the indexpublic java.lang.Class getComponentType()
create(java.lang.Class, int[])
public void putLength(int len)
len
- new number of recordsgrow(int)
public void grow(int newRecCount)
newRecCount
- new number of records, which includes the old records.putLength(int)
public void append(ArrayDataSet ds)
ds
- public boolean canAppend(ArrayDataSet ds)
ds
- the dataset to testpublic static ArrayDataSet maybeCopy(QDataSet ds)
ds
- the dataset to copy, which may be an ArrayDataSetpublic static ArrayDataSet maybeCopy(java.lang.Class c, QDataSet ds)
c
- component type, e.g. float.class double.class int.class, etc.ds
- the dataset.protected abstract java.lang.Object getBack()
protected abstract int getBackJvmMemory()
protected abstract java.lang.Object getBackCopy()
protected abstract java.lang.Object getBackReadOnly()
protected abstract void setBack(java.lang.Object back)
back
- the new backing array.public static ArrayDataSet copy(QDataSet ds, LongReadAccess lra)
public static ArrayDataSet copy(java.lang.Class c, QDataSet ds)
c
- the primitive type to use (e.g. double.class, float.class, int.class).ds
- the data to copy.public static ArrayDataSet copy(QDataSet ds)
ds
- the data to be copied.guessBackingStore(org.das2.qds.QDataSet)
public static java.lang.Class guessBackingStore(QDataSet ds)
ds
- the datasetcopy
protected void checkFill()
public static ArrayDataSet append(ArrayDataSet ds1, ArrayDataSet ds2)
ds1
- rank N datasetds2
- rank N dataset of the same type and compatible geometry as ds1.protected static java.util.Map joinProperties(ArrayDataSet ds1, ArrayDataSet ds2)
ds1
- dataset, typically a time series.ds2
- dataset, typically a time series.public QDataSet setUnits(Units units)
ds= linspace(0.,10.,100).setUnits( Units.seconds )
units
- units object, like Units.secondspublic java.lang.String toString()
AbstractDataSet
toString
in class AbstractDataSet
DataSetUtil.toString(org.das2.qds.QDataSet)
public int jvmMemory()
which stores data outside of the JVM.
public void about()