org.das2.qds.SparseDataSet

DataSet for storing sparse data. This is used initially to describe bundles. This returns 0 where no data has been set. For example,

sp= SparseDataSet.createQube([2,4])
sp[2,2]= 1
print sp[0,0]


createQube

createQube( int[] qube ) → org.das2.qds.SparseDataSet

create the qube dataset with the given dimensions. This was introduced because setQube cannot be called from Jython scripts.

Parameters

qube - the index dimensions.

Returns:

SparseDataSet with the given rank and dimensions based on qube.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createRank

createRank( int rank ) → org.das2.qds.SparseDataSet

create the dataset with the given rank. The length of any dimension is explicitly set with the setLength method or implicitly by the highest index assigned a value. Note Jython scripts are unable to call the setLength method.

Parameters

rank - number of indeces

Returns:

a dataset that is empty.

See Also:

createRankLen(int, int)
createQube(int[])


[search for examples] [view on GitHub] [view on old javadoc] [view source]


createRankLen

createRankLen( int rank, int len0 ) → org.das2.qds.SparseDataSet

create the dataset with the given rank and initial length. This was introduced because setLength cannot be called from Jython scripts. Each record will have length(i) based on the highest index assigned.

Parameters

rank - the result's rank.
len0 - the number of records in the result.

Returns:

SparseDataSet with the given rank.

See Also:

createQube(int[])


[search for examples] [view on GitHub] [view on old javadoc] [view source]


length

length( ) → int

Returns:

int

[search for examples] [view on GitHub] [view on old javadoc] [view source]

length( int i ) → int
length( int i0, int i1 ) → int
length( int i0, int i1, int i2 ) → int

putValue

putValue( double d ) → void

Parameters

d - a double

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]

putValue( int i0, double d ) → void
putValue( int i0, int i1, double d ) → void
putValue( int i0, int i1, int i2, double d ) → void
putValue( int i0, int i1, int i2, int i3, double d ) → void

rank

rank( ) → int

Returns:

int

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setLength

setLength( int length ) → void

set the length of the zeroth dimension. Other dimensions have length set implicitly by the highest value set. If this is not set explicitly, then it will be implicit as well.

Parameters

length - an int

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setQube

setQube( int[] qube ) → void

make this a qube dataset, where all the lengths are the same.

Parameters

qube - an int[]

Returns:

void (returns nothing)

[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