public class JoinDataSet extends AbstractDataSet
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
Constructor and Description |
---|
JoinDataSet(int rank)
Creates a new instance of JoinDataSet
|
JoinDataSet(QDataSet ds1)
create a new JoinDataSet, and join the first dataset.
|
Modifier and Type | Method and Description |
---|---|
static JoinDataSet |
copy(JoinDataSet joinDataSet)
copy the JoinDataSet without copying each dataset it contains.
|
static QDataSet |
deepCopy(QDataSet rds)
Deprecated.
see WritableJoinDataSet
|
void |
join(int index,
QDataSet ds)
set the dataset at the index.
|
void |
join(QDataSet ds)
add the dataset to this set of joined datasets.
|
void |
joinAll(JoinDataSet ds1)
copy all the records into this JoinDataSet.
|
int |
length()
return the length of the first dimension
|
int |
length(int i0)
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.
|
java.lang.Object |
property(java.lang.String name)
accessor for properties attached to the dataset.
|
java.lang.Object |
property(java.lang.String name,
int i0)
accessor for properties attached to the dataset's first index.
|
void |
putProperty(java.lang.String name,
java.lang.Object value)
We override putProperty here because we remove the JOIN_0 if DEPEND_0 is set.
|
int |
rank()
returns the rank of the dataset, which is the number of indeces used to access data.
|
QDataSet |
slice(int idx)
slice the dataset by returning the joined dataset at this index.
|
java.lang.String |
toString()
return a human-readable string representation of this QDataSet.
|
JoinDataSet |
trim(int imin,
int imax)
return a dataset that is a subset of this dataset.
|
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.
|
capability, checkImmutable, isImmutable, makeImmutable, putProperty, svalue, value
public JoinDataSet(int rank)
rank
- The rank of the JoinDataSet. Each dataset joined must have rank rank-1.public JoinDataSet(QDataSet ds1)
ds1= Ops.rand(30); jds= new JoinDataSet( ds1 ); assert( ds1.rank()==1 ); assert( jds.rank()==2 ); assert( jds.slice(0).equals(ds1) );
ds1
- rank N-1 dataset that will be the first slice to add to this rank N dataset.public static QDataSet deepCopy(QDataSet rds)
rds
- any datasetpublic static JoinDataSet copy(JoinDataSet joinDataSet)
joinDataSet
- another JoinDataSetpublic void joinAll(JoinDataSet ds1)
ds1
- public final void join(QDataSet ds)
ds
- rank N-1 dataset where N is the rank of this JoinDataSet.java.lang.IllegalArgumentException
- if the dataset rank is not consistent with the other datasets.public final void join(int index, QDataSet ds)
index
- the index of the datasetds
- the datasetjava.lang.IllegalArgumentException
- if the dataset rank is not consistent with the other datasets.public int rank()
QDataSet
rank
in interface QDataSet
rank
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 java.lang.Object property(java.lang.String name, int i0)
QDataSet
property
in interface QDataSet
property
in class AbstractDataSet
name
- property name, such as "DEPEND_0" or "UNITS"i0
- the indexQDataSet.DEPEND_0
,
QDataSet.UNITS
public java.lang.Object property(java.lang.String name)
QDataSet
property
in interface QDataSet
property
in class AbstractDataSet
name
- property name, such as "DEPEND_0" or "UNITS"QDataSet.DEPEND_0
,
QDataSet.UNITS
public final void putProperty(java.lang.String name, java.lang.Object value)
putProperty
in interface MutablePropertyDataSet
putProperty
in class AbstractDataSet
name
- value
- putProperty which properly checks mutability of the dataset
,
QDataSet.UNITS
public int length()
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
public int length(int i0)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
i0
- the indexpublic int length(int i0, int i1)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
i0
- the indexi1
- the indexpublic 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.String toString()
AbstractDataSet
toString
in class AbstractDataSet
DataSetUtil.toString(org.das2.qds.QDataSet)
public JoinDataSet trim(int imin, int imax)
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
imin
- the first index to be included in the new dataset.imax
- the exclusive index indicating the last index.public QDataSet slice(int idx)
slice
in interface QDataSet
slice
in class AbstractDataSet
idx
- the index for the slice