org.das2.qds.LDataSet
rank 0,1,2,3 or 4 dataset backed by long array (8 byte signed numbers).
Note access to the array is still done via doubles.
version
addValue
addValue( int i0, double value ) → void
add this value to the current value.
Parameters
i0 - the index
value - the value, which is cast to this internal type.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addValue( int i0, int i1, double value ) → void
capability
capability( java.lang.Class clazz ) → Object
Clients should use this instead of
casting the class to the capability class.
Parameters
clazz - the class, such as WritableDataSet.class or LongReadAccess
Returns:
null or the capability if exists, such as WritableDataSet
See Also:
https://github.com/autoplot/dev/blob/master/demos/2019/20190219/demoLongReadAccess.jy
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
create
create( int[] qube ) → org.das2.qds.LDataSet
Makes an array from array of dimension sizes. The result will have
rank qube.length().
Parameters
qube - array specifying the rank and size of each dimension
Returns:
LDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createRank1
createRank1( int len0 ) → org.das2.qds.LDataSet
create a rank 1 dataset backed by array of longs.
Parameters
len0 - length of the dimension
Returns:
rank 1 qube dataset of backed by array of longs.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createRank2
createRank2( int len0, int len1 ) → org.das2.qds.LDataSet
create a rank 2 qube dataset backed by array of longs.
Parameters
len0 - length of the dimension
len1 - length of the dimension
Returns:
rank 2 qube dataset of backed by array of longs.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createRank3
createRank3( int len0, int len1, int len2 ) → org.das2.qds.LDataSet
create a rank 3 qube dataset backed by array of longs.
Parameters
len0 - length of the dimension
len1 - length of the dimension
len2 - length of the dimension
Returns:
rank 3 qube dataset of backed by array of longs.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createRank4
createRank4( int len0, int len1, int len2, int len3 ) → org.das2.qds.LDataSet
create a rank 4 qube dataset backed by array of longs.
Parameters
len0 - length of the dimension
len1 - length of the dimension
len2 - length of the dimension
len3 - length of the dimension
Returns:
rank 4 qube dataset of backed by array of longs.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
putValue
putValue( double value ) → void
Parameters
value - a double
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
putValue( int i0, double value ) → void
putValue( int i0, int i1, double value ) → void
putValue( int i0, int i1, int i2, double value ) → void
putValue( int i0, int i1, int i2, int i3, double value ) → void
slice
slice( int i ) → QDataSet
the slice operator is better implemented here. Presently, we
use System.arraycopy to copy out the data, but this could be
re-implemented along with an offset parameter so the original data
can be used to back the data.
Parameters
i - the index
Returns:
a rank N-1 slice of the data.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
trim
trim( int start, int end ) → QDataSet
trim operator copies the data into a new dataset.
Parameters
start - the first index
end - the last index, exclusive
Returns:
a shorter dataset of the same rank.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
value
value( ) → double
Returns:
double
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
value( int i0 ) → double
value( int i0, int i1 ) → double
value( int i0, int i1, int i2 ) → double
value( int i0, int i1, int i2, int i3 ) → double
wrap
wrap( long[] data, int[] qube ) → org.das2.qds.LDataSet
Wraps an array from array of dimension sizes. The result will have
rank qube.length(). For rank 0, data is 1-element array.
Parameters
data - array containing the data, with the last dimension contiguous in memory.
qube - array specifying the rank and size of each dimension
Returns:
the array as a QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
wrap( long[] back, int rank, int len0, int len1, int len2, int len3 ) → org.das2.qds.LDataSet
wrap( long[] back ) → org.das2.qds.LDataSet
wrap( long[] back, int nx, int ny ) → org.das2.qds.LDataSet
wrap( long[] back, int nx, int ny, int nz ) → org.das2.qds.LDataSet