org.das2.qds.QubeDataSetIterator.DimensionIterator

DimensionIterator iterates over an index. For example, using Jython for brevity:

{@code
 ds= zeros(15,4,2)
 ds[:,:,:] has itertors that count of 0,...,14; 0,...,3; and 0,1
 ds[3:15,:,:]  uses a StartStopStepIterator to count off 3,4,5,...,14
 ds[3,:,:]  uses a SingletonIterator
 i1= [0,1,2,3]
 i2= [0,0,1,1]
 i3= [0,1,0,1]
 ds[i1,i2,i3]  # uses IndexListIterator
}
When index is called before hasNext, it must return -1 to indicate an uninitialized state.


hasNext

hasNext( ) → boolean

true if there are more indices in the iteration

Returns:

true if there are more indices in the iteration

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


index

index( ) → int

return the current index.

Returns:

the current index.

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


length

length( ) → int

return the length of the iteration.

Returns:

the length of the iteration.

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


nextIndex

nextIndex( ) → int

return the next index of the iteration

Returns:

the next index of the iteration

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