org.autoplot.cdf.TrFDataSet
hacked DDataSet implementation does transpose for column major files.
rank 1,2,or 3 dataset backed by double array. Note this is not
simply a transpose of DDataSet, as the name implies. The zeroth index is
the same, and the remaining index are reversed.
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.
version
append
append( org.autoplot.cdf.TrFDataSet ds ) → void
append the second dataset onto this dataset. Not thread safe!!!
TODO: this really should return a new dataset. Presumably this is to avoid copies, but currently it copies anyway!
Parameters
ds - a TrFDataSet
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
capability
capability( java.lang.Class clazz ) → Object
TODO: this is untested, but is left in to demonstrate how the capability
method should be implemented. Clients should use this instead of
casting the class to the capability class.
Parameters
clazz - a java.lang.Class
Returns:
an Object
[search for examples]
[view on GitHub]
[view on old javadoc]
copy
copy( QDataSet ds ) → org.autoplot.cdf.TrFDataSet
copies the dataset into a writeable dataset, and all of its depend datasets as well.
An optimized copy is used when the argument is a DDataSet.
Parameters
ds - a QDataSet
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
copyElements
copyElements( org.autoplot.cdf.TrFDataSet src, int srcpos, org.autoplot.cdf.TrFDataSet dest, int destpos, int len ) → void
copy elements of src DDataSet into dest DDataSet, with System.arraycopy.
src and dst must have the same geometry, except for dim 0. Allows for
aliasing when higher dimension element count matches.
Parameters
src - a TrFDataSet
srcpos - an int
dest - a TrFDataSet
destpos - an int
len - number of records to copy.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
copyElements( org.autoplot.cdf.TrFDataSet src, int srcpos, org.autoplot.cdf.TrFDataSet dest, int destpos, int len, boolean checkAlias ) → void
create
create( int[] qube ) → org.autoplot.cdf.TrFDataSet
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:
DDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
createRank1
createRank1( int len0 ) → org.autoplot.cdf.TrFDataSet
Parameters
len0 - an int
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
createRank2
createRank2( int len0, int len1 ) → org.autoplot.cdf.TrFDataSet
Parameters
len0 - an int
len1 - an int
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
createRank3
createRank3( int len0, int len1, int len2 ) → org.autoplot.cdf.TrFDataSet
Parameters
len0 - an int
len1 - an int
len2 - an int
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
createRank4
createRank4( int len0, int len1, int len2, int len3 ) → org.autoplot.cdf.TrFDataSet
Parameters
len0 - an int
len1 - an int
len2 - an int
len3 - an int
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
join
Deprecated: use append instead.
length
length( ) → int
Returns:
int
[search for examples]
[view on GitHub]
[view on old javadoc]
length( int i ) → int
length( int i0, int i1 ) → int
length( int i0, int i1, int i2 ) → int
maybeCopy
maybeCopy( QDataSet ds ) → org.autoplot.cdf.TrFDataSet
Copy the dataset to a DDataSet only if the dataset is not already a DDataSet.
Parameters
ds - a QDataSet
Returns:
an org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
putLength
putLength( int len ) → void
Shorten the dataset by changing it's dim 0 length parameter. The same backing array is used,
so the element that remain ill be the same.
can only shorten!
Parameters
len - an int
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
putProperty
putProperty( String name, Object value ) → void
Parameters
name - a String
value - an Object
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
putValue
putValue( double value ) → void
Parameters
value - a double
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
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
rank
rank( ) → int
Returns:
int
[search for examples]
[view on GitHub]
[view on old javadoc]
toString
toString( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
trim
trim( int start, int end ) → QDataSet
trim operator copies the data into a new dataset.
Parameters
start - an int
end - an int
Returns:
a QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
value
value( ) → double
Returns:
double
[search for examples]
[view on GitHub]
[view on old javadoc]
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( float[] data, int[] qube ) → org.autoplot.cdf.TrFDataSet
Wraps an array from array of dimension sizes. The result will have
rank qube.length().
Parameters
data - array containing the data, with the last dimension contiguous in memory.
qube - array specifying the rank and size of each dimension
Returns:
DDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
wrap( float[] back ) → org.autoplot.cdf.TrFDataSet
wrap( float[] back, int nx, int ny ) → org.autoplot.cdf.TrFDataSet
wrap( float[] back, int rank, int len0, int len1, int len2 ) → org.autoplot.cdf.TrFDataSet
wrap( float[] back, int rank, int len0, int len1, int len2, int len3 ) → org.autoplot.cdf.TrFDataSet
wrapRank2
wrapRank2( float[] back, int n1 ) → org.autoplot.cdf.TrFDataSet
creates a DDataSet by wrapping an existing array, and aliasing it to rank2.
Note the last index is packed closest in memory.
Parameters
back - a float[]
n1 - the size of the second dimension.
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
wrapRank3
wrapRank3( float[] back, int n1, int n2 ) → org.autoplot.cdf.TrFDataSet
creates a DDataSet by wrapping an existing array, and aliasing it to rank2.
Note the last index is packed closest in memory. The first index length
is calculated from the size of the array.
Parameters
back - a float[]
n1 - the size of the second index.
n2 - the size of the third index.
Returns:
org.autoplot.cdf.TrFDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]