|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.virbo.dataset.AbstractDataSet org.virbo.dataset.DDataSet
public final class DDataSet
rank 1,2,or 3 dataset backed by double array. Mutable datasets warning: No dataset should be mutable once it is accessible to the rest of the system. This would require clients make defensive copies which would seriously degrade performance.
Field Summary | |
---|---|
static java.lang.String |
version
|
Fields inherited from class org.virbo.dataset.AbstractDataSet |
---|
properties |
Fields inherited from interface org.virbo.dataset.QDataSet |
---|
CACHE_TAG, CADENCE, COORDINATE_FRAME, DELTA_MINUS, DELTA_PLUS, DEPEND_0, DEPEND_1, DEPEND_2, FILL_VALUE, LABEL, MAX_PLANE_COUNT, MAX_RANK, MONOTONIC, NAME, PLANE_0, QUBE, RENDER_TYPE, SCALE_TYPE, TITLE, TYPICAL_MAX, TYPICAL_MIN, UNITS, USER_PROPERTIES, VALID_MAX, VALID_MIN, WEIGHTS_PLANE |
Method Summary | |
---|---|
void |
append(DDataSet ds)
append the second dataset onto this dataset. |
static DDataSet |
copy(QDataSet ds)
copies the dataset into a writeable dataset, and all of its depend datasets as well. |
static void |
copyElements(DDataSet src,
int srcpos,
DDataSet dest,
int destpos,
int len)
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. |
protected static java.util.Map |
copyProperties(QDataSet ds)
copies the properties, copying depend datasets as well. |
static DDataSet |
create(int[] qube)
Makes an array from array of dimension sizes. |
static DDataSet |
createRank1(int len0)
|
static DDataSet |
createRank2(int len0,
int len1)
|
static DDataSet |
createRank3(int len0,
int len1,
int len2)
|
void |
join(DDataSet ds)
Deprecated. use append instead. |
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. |
static DDataSet |
maybeCopy(QDataSet ds)
Copy the dataset to a DDataSet only if the dataset is not already a DDataSet. |
void |
putLength(int len)
Shorten the dataset by changing it's dim 0 length parameter. |
void |
putValue(int i0,
double value)
|
void |
putValue(int i0,
int i1,
double value)
|
void |
putValue(int i0,
int i1,
int i2,
double value)
|
int |
rank()
returns the rank of the dataset, which is the number of indeces used to access data. |
java.lang.String |
toString()
|
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. |
static DDataSet |
wrap(double[] back)
creates a DDataSet by wrapping an existing double 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)
|
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. |
Methods inherited from class org.virbo.dataset.AbstractDataSet |
---|
property, property, property, putProperty, putProperty, putProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.virbo.dataset.WritableDataSet |
---|
putProperty, putProperty, putProperty |
Methods inherited from interface org.virbo.dataset.QDataSet |
---|
property, property, property |
Field Detail |
---|
public static final java.lang.String version
Method Detail |
---|
public static DDataSet createRank1(int len0)
public static DDataSet createRank2(int len0, int len1)
public static DDataSet createRank3(int len0, int len1, int len2)
public static DDataSet create(int[] qube)
qube
- array specifying the rank and size of each dimension
public 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 dimension
public int rank()
QDataSet
rank
in interface QDataSet
rank
in class AbstractDataSet
public int length()
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
public int length(int i)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
public int length(int i0, int i1)
QDataSet
length
in interface QDataSet
length
in class AbstractDataSet
public double value(int i0)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
public double value(int i0, int i1)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
public double value(int i0, int i1, int i2)
QDataSet
value
in interface QDataSet
value
in class AbstractDataSet
public void putValue(int i0, double value)
putValue
in interface WritableDataSet
public void putValue(int i0, int i1, double value)
putValue
in interface WritableDataSet
public void putValue(int i0, int i1, int i2, double value)
putValue
in interface WritableDataSet
public void putLength(int len)
public java.lang.String toString()
toString
in class AbstractDataSet
protected static java.util.Map copyProperties(QDataSet ds)
DataSetUtil.copyProperties, which is a shallow copy.
public static DDataSet maybeCopy(QDataSet ds)
ds
-
public static DDataSet copy(QDataSet ds)
public static DDataSet wrap(double[] back)
public static DDataSet wrapRank2(double[] back, int n1)
n1
- the size of the second dimension.public static DDataSet wrapRank3(double[] back, int n1, int n2)
n1
- the size of the second index.n2
- the size of the third index.public static DDataSet wrap(double[] back, int nx, int ny)
public static DDataSet wrap(double[] back, int rank, int len0, int len1, int len2)
public static void copyElements(DDataSet src, int srcpos, DDataSet dest, int destpos, int len)
len
- number of records to copy.
java.lang.IllegalArgumentException
- if the higher rank geometry doesn't match
java.lang.IndexOutOfBoundsException
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 match
java.lang.IndexOutOfBoundsException
public void join(DDataSet ds)
public void append(DDataSet ds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |