public class IndexListDataSetIterator extends java.lang.Object implements DataSetIterator
| Constructor and Description |
|---|
IndexListDataSetIterator(QDataSet indeces)
Create the iterator
|
| Modifier and Type | Method and Description |
|---|---|
DDataSet |
createEmptyDs()
return a dataset that will have the same geometry at the
dataset implied by each dimension iterator.
|
QDataSet |
getRank0Value(QDataSet ds)
get the rank 0 data set the current iterator position.
|
double |
getValue(QDataSet ds)
get the value from ds at the current iterator position.
|
boolean |
hasNext()
return true while the iterator has a next element.
|
int |
index(int dim)
return the current index for the dimension.
|
int |
length(int dim)
return the length of the dimension, or the length reported by the
iterator.
|
void |
next()
iterate to the next position.
|
void |
putRank0Value(WritableDataSet ds,
QDataSet vds)
replace the value in ds at the current iterator position.
|
void |
putValue(WritableDataSet ds,
double v)
replace the value in ds at the current iterator position.
|
int |
rank()
return the rank of the dataset which the iterator will walk through.
|
java.lang.String |
toString() |
public IndexListDataSetIterator(QDataSet indeces)
indeces - rank 2 indeces [npoints,rank] or just [npoints] for rank 1 data.public boolean hasNext()
DataSetIteratorhasNext in interface DataSetIteratorpublic int index(int dim)
DataSetIteratorindex in interface DataSetIteratordim - the dimension number (0<=dim<inputRank)public int length(int dim)
DataSetIteratorlength in interface DataSetIteratordim - the dimension number (0<=dim<inputRank)public void next()
DataSetIteratornext in interface DataSetIteratorpublic int rank()
DataSetIteratorrank in interface DataSetIteratorpublic QDataSet getRank0Value(QDataSet ds)
DataSetIteratorgetRank0Value in interface DataSetIteratorpublic final double getValue(QDataSet ds)
getValue in interface DataSetIteratords - a dataset with compatible geometry as the iterator's geometry.public final void putValue(WritableDataSet ds, double v)
putValue in interface DataSetIteratords - a writable dataset with compatible geometry as the iterator's geometry.v - the value to insert.public void putRank0Value(WritableDataSet ds, QDataSet vds)
DataSetIteratorputRank0Value in interface DataSetIteratords - a writable dataset with compatible geometry as the iterator's geometry.vds - the rank 0 value to insertpublic java.lang.String toString()
toString in class java.lang.Objectpublic DDataSet createEmptyDs()
DataSetIteratorcreateEmptyDs in interface DataSetIteratorQubeDataSetIterator.createEmptyDs()