public interface ILazyDataset extends Serializable, IMetadataProvider, INameable
Modifier and Type | Method and Description |
---|---|
void |
addMetadata(MetadataType metadata)
Add metadata to the dataset
|
void |
clearMetadata(Class<? extends MetadataType> clazz)
Remove metadata of given class
|
ILazyDataset |
clone()
Clone dataset
|
Class<?> |
getElementClass() |
int |
getElementsPerItem() |
ILazyDataset |
getErrors()
Get the errors, if any.
|
int |
getRank()
The rank (or number of dimensions/indices) of the dataset can be zero for a zero-rank
(single-valued) dataset
|
int[] |
getShape()
The shape (or array of lengths for each dimension) of the dataset can be empty for zero-rank
datasets
|
int |
getSize()
The size of the dataset is the number of items in the array
|
IDataset |
getSlice(IMonitor monitor,
int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
IDataset |
getSlice(IMonitor monitor,
Slice... slice)
Get a slice of the dataset.
|
IDataset |
getSlice(IMonitor monitor,
SliceND slice)
Get a slice of the dataset.
|
IDataset |
getSlice(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
IDataset |
getSlice(Slice... slice)
Get a slice of the dataset.
|
IDataset |
getSlice(SliceND slice)
Get a slice of the dataset.
|
ILazyDataset |
getSliceView(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
ILazyDataset |
getSliceView(Slice... slice)
Get a slice of the dataset.
|
ILazyDataset |
getSliceView(SliceND slice)
Get a slice of the dataset.
|
ILazyDataset |
getTransposedView(int... axes)
Permute copy of dataset's axes so that given order is old order:
|
boolean |
hasErrors()
If error information is set, returns true.
|
void |
setErrors(Serializable errors)
Set the errors.
|
void |
setMetadata(MetadataType metadata)
Set metadata on the dataset
|
void |
setShape(int... shape)
Set a compatible shape for dataset.
|
ILazyDataset |
squeezeEnds()
Remove dimensions of 1 from ends of shape of the dataset
|
getFirstMetadata, getMetadata, getMetadata
Class<?> getElementClass()
int getElementsPerItem()
int getSize()
int[] getShape()
void setShape(int... shape)
shape
- int getRank()
ILazyDataset squeezeEnds()
IDataset getSlice(int[] start, int[] stop, int[] step) throws DatasetException
start
- specifies the starting indexes (can be null for origin)stop
- specifies the stopping indexes (can be null for end)step
- specifies the steps in the slice (can be null for unit steps)DatasetException
IDataset getSlice(IMonitor monitor, int[] start, int[] stop, int[] step) throws DatasetException
monitor
- start
- specifies the starting indexes (can be null for origin)stop
- specifies the stopping indexes (can be null for end)step
- specifies the steps in the slice (can be null for unit steps)DatasetException
IDataset getSlice(Slice... slice) throws DatasetException
slice
- an array of slice objects (the array can be null or contain nulls)DatasetException
IDataset getSlice(IMonitor monitor, Slice... slice) throws DatasetException
monitor
- slice
- an array of slice objects (the array can be null or contain nulls)DatasetException
IDataset getSlice(SliceND slice) throws DatasetException
slice
- an n-D sliceDatasetException
IDataset getSlice(IMonitor monitor, SliceND slice) throws DatasetException
monitor
- slice
- an n-D sliceDatasetException
ILazyDataset getSliceView(int[] start, int[] stop, int[] step)
start
- specifies the starting indexes (can be null for origin)stop
- specifies the stopping indexes (can be null for end)step
- specifies the steps in the slice (can be null for unit steps)ILazyDataset getSliceView(Slice... slice)
slice
- an array of slice objects (the array can be null or contain nulls)ILazyDataset getSliceView(SliceND slice)
slice
- an n-D sliceILazyDataset getTransposedView(int... axes)
axisPerm = (p(0), p(1),...) => newdata(n(0), n(1),...) = olddata(o(0), o(1), ...) such that n(i) = o(p(i)) for all iI.e. for a 3D dataset (1,0,2) implies the new dataset has its 1st dimension running along the old dataset's 2nd dimension and the new 2nd is the old 1st. The 3rd dimension is left unchanged.
axes
- if zero length then axes order reversedvoid addMetadata(MetadataType metadata)
metadata
- void setMetadata(MetadataType metadata)
metadata
- (null is ignored so use clear(null) instead)void clearMetadata(Class<? extends MetadataType> clazz)
clazz
- if null remove everythingILazyDataset clone()
void setErrors(Serializable errors)
errors
- - may be null to remove the error setRuntimeException
- if the rank or shape are incorrectILazyDataset getErrors()
boolean hasErrors()
Copyright © 2014–2019 Eclipse Foundation. All rights reserved.