## org.autoplot.cdf.TrDDataSet

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. TODO: This wasn't modified with the makeImmutable changes. See ArrayDataSet. Note this class may be deprecated after the NIO-based reader is released.

## version

## append

append( org.autoplot.cdf.TrDDataSet 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 TrDDataSet

### 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.TrDDataSet

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.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## copyElements

copyElements( org.autoplot.cdf.TrDDataSet src, int srcpos, org.autoplot.cdf.TrDDataSet 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 TrDDataSet
srcpos - an int
dest - a TrDDataSet
destpos - an int
len - number of records to copy.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## copyElements

copyElements( org.autoplot.cdf.TrDDataSet src, int srcpos, org.autoplot.cdf.TrDDataSet dest, int destpos, int len, boolean checkAlias ) → 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 - source dataset
srcpos - source dataset first dimension index.
dest - destination dataset
destpos - destination dataset first dimension index.
len - total number of elements to copy
checkAlias - bounds for aliased write (same number of elements, different geometry.)

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## create

create( int[] qube ) → org.autoplot.cdf.TrDDataSet

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.TrDDataSet

### Parameters

len0 - an int

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## createRank2

createRank2( int len0, int len1 ) → org.autoplot.cdf.TrDDataSet

### Parameters

len0 - an int
len1 - an int

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## createRank3

createRank3( int len0, int len1, int len2 ) → org.autoplot.cdf.TrDDataSet

### Parameters

len0 - an int
len1 - an int
len2 - an int

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## createRank4

createRank4( int len0, int len1, int len2, int len3 ) → org.autoplot.cdf.TrDDataSet

### Parameters

len0 - an int
len1 - an int
len2 - an int
len3 - an int

### Returns:

org.autoplot.cdf.TrDDataSet
[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 [view source]
length( int i0, int i1 ) → int [view source]
length( int i0, int i1, int i2 ) → int [view source]

## maybeCopy

maybeCopy( QDataSet ds ) → org.autoplot.cdf.TrDDataSet

Copy the dataset to a DDataSet only if the dataset is not already a DDataSet.

### Parameters

ds - a QDataSet

### Returns:

an org.autoplot.cdf.TrDDataSet
[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]

## 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 [view source]
putValue( int i0, int i1, double value ) → void [view source]
putValue( int i0, int i1, int i2, double value ) → void [view source]
putValue( int i0, int i1, int i2, int i3, double value ) → void [view source]

## 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 [view source]
value( int i0, int i1 ) → double [view source]
value( int i0, int i1, int i2 ) → double [view source]
value( int i0, int i1, int i2, int i3 ) → double [view source]

## wrap

wrap( double[] data, int[] qube ) → org.autoplot.cdf.TrDDataSet

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

wrap( double[] back ) → org.autoplot.cdf.TrDDataSet

creates a DDataSet by wrapping an existing double array.

### Parameters

back - a double[]

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## wrap

wrap( double[] back, int nx, int ny ) → org.autoplot.cdf.TrDDataSet

creates a DDataSet by wrapping an existing array, aliasing it to rank 2.

### Parameters

back - a double[]
nx - an int
ny - an int

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]
wrap( double[] back, int rank, int len0, int len1, int len2 ) → org.autoplot.cdf.TrDDataSet [view source]
wrap( double[] back, int rank, int len0, int len1, int len2, int len3 ) → org.autoplot.cdf.TrDDataSet [view source]

## wrapRank2

wrapRank2( double[] back, int n1 ) → org.autoplot.cdf.TrDDataSet

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 double[]
n1 - the size of the second dimension.

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]

## wrapRank3

wrapRank3( double[] back, int n1, int n2 ) → org.autoplot.cdf.TrDDataSet

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 double[]
n1 - the size of the second index.
n2 - the size of the third index.

### Returns:

org.autoplot.cdf.TrDDataSet
[search for examples] [view on GitHub] [view on old javadoc]