public final class DDataSet extends ArrayDataSet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
version |
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 |
DDataSet(int rank,
int len0,
int len1,
int len2,
int len3) |
protected |
DDataSet(int rank,
int len0,
int len1,
int len2,
int len3,
double[] back) |
Modifier and Type | Method and Description |
---|---|
void |
accumValue(int i0,
double value)
Deprecated.
use addValue
|
void |
accumValue(int i0,
int i1,
double value)
Deprecated.
use addValue
|
void |
addValue(int i0,
double value)
add this value to the current value.
|
void |
addValue(int i0,
int i1,
double value)
add this value to the current value.
|
void |
addValue(int i0,
int i1,
int i2,
double value)
add this value to the current value.
|
void |
addValues(QDataSet ds,
QDataSet wds)
add all valid values of ds to this dataset.
|
<T> T |
capability(java.lang.Class<T> clazz)
TODO: this is untested, but is left in to demonstrate how the capability
method should be implemented.
|
static void |
copyElements(DDataSet src,
int srcpos,
DDataSet dest,
int destpos,
int nrec)
copy elements of src DDataSet into dest DDataSet, with System.arraycopy.
|
static void |
copyElements(DDataSet src,
int srcpos,
DDataSet dest,
int destpos,
int len,
boolean checkAlias)
copy elements of src DDataSet into dest DDataSet, with System.arraycopy.
|
static DDataSet |
create(int[] qube)
Makes an array from array of dimension sizes.
|
static DDataSet |
createRank0()
create a rank 1 dataset backed by array of doubles.
|
static DDataSet |
createRank1(int len0)
create a rank 1 dataset backed by array of doubles.
|
static DDataSet |
createRank1Bins(double min,
double max,
Units u)
convenient method for creating DatumRanges bins datasets.
|
static DDataSet |
createRank2(int len0,
int len1)
create a rank 2 qube dataset backed by array of doubles.
|
static DDataSet |
createRank3(int len0,
int len1,
int len2)
create a rank 3 qube dataset backed by array of doubles.
|
static DDataSet |
createRank4(int len0,
int len1,
int len2,
int len3)
create a rank 4 qube dataset backed by array of doubles.
|
protected java.lang.Object |
getBack()
provide access to the backing array.
|
protected java.lang.Object |
getBackCopy()
return a copy of the backing array, to support ArrayDataSet.copy.
|
protected int |
getBackJvmMemory()
return the size of the backing in JvmMemory.
|
protected java.lang.Object |
getBackReadOnly()
return the backing array to the client, who promises not to modify the
memory.
|
void |
putValue(double value)
put a value into the rank 0 dataset.
|
void |
putValue(int i0,
double value)
put a value into the rank 1 dataset.
|
void |
putValue(int i0,
int i1,
double value)
put a value into the rank 2 dataset.
|
void |
putValue(int i0,
int i1,
int i2,
double value)
put a value into the rank 3 dataset.
|
void |
putValue(int i0,
int i1,
int i2,
int i3,
double value)
put a value into the rank 4 dataset.
|
protected void |
setBack(java.lang.Object back)
reset the back to this new backing array.
|
QDataSet |
slice(int i)
the slice operator is better implemented here.
|
QDataSet |
trim(int start,
int end)
return a dataset that is a subset of this dataset.
|
double |
value()
rank 0 accessor.
|
double |
value(int i0)
rank 1 accessor.
|
double |
value(int i0,
int i1)
rank 2 accessor.
|
double |
value(int i0,
int i1,
int i2)
rank 3 accessor.
|
double |
value(int i0,
int i1,
int i2,
int i3)
rank 4 accessor.
|
static DDataSet |
wrap(double[] back)
creates a rank1 DDataSet by wrapping an existing array.
|
static DDataSet |
wrap(double[] data,
int[] qube)
Wraps an array from array of dimension sizes.
|
static DDataSet |
wrap(double[] back,
int nx,
int ny)
creates a DDataSet by wrapping an existing array, aliasing it to rank 2.
|
static DDataSet |
wrap(double[] back,
int rank,
int len0,
int len1,
int len2)
wrap the array to make it into a dataset.
|
static DDataSet |
wrap(double[] back,
int rank,
int len0,
int len1,
int len2,
int len3) |
static DDataSet |
wrap(double[] xx,
Units xunits)
useful create with units.
|
static DDataSet |
wrapRank2(double[] back,
int n1)
creates a DDataSet by wrapping an existing array, and aliasing it to rank2.
|
static DDataSet |
wrapRank3(double[] back,
int n1,
int n2)
creates a DDataSet by wrapping an existing array, and aliasing it to rank2.
|
about, append, append, canAppend, checkFill, copy, copy, copy, create, create, createRank0, createRank1, createRank2, createRank3, createRank4, flattenArray, getComponentType, grow, guessBackingStore, joinProperties, jvmMemory, length, length, length, length, maybeCopy, maybeCopy, monotonicSubset, monotonicSubset2, putLength, rank, setUnits, toString, wrap
checkImmutable, isImmutable, makeImmutable, property, property, putProperty, putProperty, svalue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isImmutable, makeImmutable, putProperty, putProperty
public static final java.lang.String version
protected DDataSet(int rank, int len0, int len1, int len2, int len3)
protected DDataSet(int rank, int len0, int len1, int len2, int len3, double[] back)
public static DDataSet createRank0()
public static DDataSet createRank1(int len0)
len0
- length of the dimensionpublic static DDataSet createRank2(int len0, int len1)
len0
- length of the dimensionlen1
- length of the dimensionpublic static DDataSet createRank3(int len0, int len1, int len2)
len0
- length of the dimensionlen1
- length of the dimensionlen2
- length of the dimensionpublic static DDataSet createRank4(int len0, int len1, int len2, int len3)
len0
- length of the dimensionlen1
- length of the dimensionlen2
- length of the dimensionlen3
- length of the dimensionpublic static DDataSet create(int[] qube)
qube
- array specifying the rank and size of each dimensionpublic static DDataSet createRank1Bins(double min, double max, Units u)
min
- the minumum valuemax
- the maximum valueu
- the ratiometric or time location unitspublic static DDataSet wrap(double[] data, int[] qube)
data
- array containing the data, with the last dimension contiguous in memory.qube
- array specifying the rank and size of each dimensionpublic static DDataSet wrap(double[] back, int rank, int len0, int len1, int len2)
back
- the arrayrank
- the rank of the datasetlen0
- the length, or 1 if the index is not needed.len1
- the length, or 1 if the index is not needed.len2
- the length, or 1 if the index is not needed.protected java.lang.Object getBack()
ArrayDataSet
getBack
in class ArrayDataSet
protected java.lang.Object getBackReadOnly()
ArrayDataSet
getBackReadOnly
in class ArrayDataSet
protected int getBackJvmMemory()
ArrayDataSet
getBackJvmMemory
in class ArrayDataSet
protected java.lang.Object getBackCopy()
ArrayDataSet
getBackCopy
in class ArrayDataSet
protected void setBack(java.lang.Object back)
ArrayDataSet
setBack
in class ArrayDataSet
back
- the new backing array.public double value()
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
public double value(int i0)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
i0
- the indexpublic double value(int i0, int i1)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
i0
- the indexi1
- the indexpublic double value(int i0, int i1, int i2)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
i0
- the indexi1
- the indexi2
- the indexpublic double value(int i0, int i1, int i2, int i3)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
i0
- the indexi1
- the indexi2
- the indexi3
- the indexpublic void putValue(double value)
WritableDataSet
value
- the valuepublic void putValue(int i0, double value)
WritableDataSet
i0
- the indexvalue
- the valuepublic void putValue(int i0, int i1, double value)
WritableDataSet
i0
- the indexi1
- the indexvalue
- the valuepublic void putValue(int i0, int i1, int i2, double value)
WritableDataSet
i0
- the indexi1
- the indexi2
- the indexvalue
- the valuepublic void putValue(int i0, int i1, int i2, int i3, double value)
WritableDataSet
i0
- the indexi1
- the indexi2
- the indexi3
- the indexvalue
- the valuepublic void addValue(int i0, double value)
i0
- the indexvalue
- the value, which is cast to this internal type.public void addValue(int i0, int i1, double value)
i0
- the indexi1
- the indexvalue
- the value, which is cast to this internal type.public void addValue(int i0, int i1, int i2, double value)
i0
- the indexi1
- the indexi2
- the indexvalue
- the value, which is cast to this internal type.public void addValues(QDataSet ds, QDataSet wds)
ds
- wds
- CoerceUtil.coerce(org.das2.qds.QDataSet, org.das2.qds.QDataSet, boolean, org.das2.qds.QDataSet[])
public void accumValue(int i0, double value)
i0
- value
- public void accumValue(int i0, int i1, double value)
i0
- i1
- value
- public static DDataSet wrap(double[] back)
back
- the new backing arraypublic static DDataSet wrap(double[] back, int nx, int ny)
back
- the new backing arraynx
- number of elements in the zeroth indexny
- number of elements in the first indexpublic static DDataSet wrap(double[] back, int rank, int len0, int len1, int len2, int len3)
public static DDataSet wrap(double[] xx, Units xunits)
xx
- xunits
- public static DDataSet wrapRank2(double[] back, int n1)
back
- n1
- the size of the second dimension.public static DDataSet wrapRank3(double[] back, int n1, int n2)
back
- n1
- the size of the second index.n2
- the size of the third index.public static void copyElements(DDataSet src, int srcpos, DDataSet dest, int destpos, int nrec)
src
- source datasetsrcpos
- source dataset first dimension index.dest
- destination datasetnrec
- number of records to copy. Note this is different than the other copyElements!destpos
- destination dataset first dimension index.java.lang.IllegalArgumentException
- if the higher rank geometry doesn't matchjava.lang.IndexOutOfBoundsException
copyElements(org.das2.qds.DDataSet, int, org.das2.qds.DDataSet, int, int, boolean)
public static void copyElements(DDataSet src, int srcpos, DDataSet dest, int destpos, int len, boolean checkAlias)
src
- source datasetsrcpos
- source dataset first dimension index.dest
- destination datasetdestpos
- destination dataset first dimension index.len
- total number of elements to copycheckAlias
- bounds for aliased write (same number of elements, different geometry.)java.lang.IllegalArgumentException
- if the higher rank geometry doesn't matchjava.lang.IndexOutOfBoundsException
public QDataSet slice(int i)
slice
in interface QDataSet
slice
in class AbstractDataSet
i
- the indexpublic QDataSet trim(int start, int end)
QDataSet
ds= DDataSet.createRank1(100);
QDataSet trim= ds.trim(50,60);
assert( trim.length()==10 );
Note start and end must be positive. Negative indices,
referenced from the end of the dataset, are not supported here.trim
in interface QDataSet
trim
in class AbstractDataSet
start
- the first index to be included in the new dataset.end
- the exclusive index indicating the last index.public <T> T capability(java.lang.Class<T> clazz)
capability
in interface QDataSet
capability
in class AbstractDataSet
T
- clazz
- the class, such as WritableDataSet.classLongWriteAccess
,
LongReadAccess
,
FloatReadAccess