public class AggregateDataset extends LazyDatasetBase implements ILazyDataset
Modifier and Type | Field and Description |
---|---|
protected AggregateDataset |
base |
catchExceptions, logger, metadata, name, shape
Constructor and Description |
---|
AggregateDataset(boolean extend,
ILazyDataset... datasets)
Create an aggregate dataset
|
Modifier and Type | Method and Description |
---|---|
static int[][] |
calcShapes(boolean extend,
ILazyDataset... datasets)
Calculate (possibly extended) shapes from given datasets
|
AggregateDataset |
clone()
Clone dataset
|
int |
getDType() |
Class<?> |
getElementClass() |
int |
getElementsPerItem() |
ILazyDataset |
getErrors()
Get the errors, if any.
|
int |
getSize()
The size of the dataset is the number of items in the array
|
Dataset |
getSlice(IMonitor monitor,
int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
Dataset |
getSlice(IMonitor monitor,
Slice... slice)
Get a slice of the dataset.
|
Dataset |
getSlice(IMonitor monitor,
SliceND slice)
Get a slice of the dataset.
|
Dataset |
getSlice(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
Dataset |
getSlice(Slice... slice)
Get a slice of the dataset.
|
Dataset |
getSlice(SliceND slice)
Get a slice of the dataset.
|
AggregateDataset |
getSliceView(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
AggregateDataset |
getSliceView(Slice... slice)
Get a slice of the dataset.
|
AggregateDataset |
getSliceView(SliceND slice)
Get a slice of the dataset.
|
AggregateDataset |
getTransposedView(int... axes)
Permute copy of dataset's axes so that given order is old order:
|
void |
setErrors(Serializable errors)
Set the errors.
|
void |
setShape(int... shape)
Set a compatible shape for dataset.
|
ILazyDataset |
squeezeEnds()
Remove dimensions of 1 from ends of shape of the dataset
|
String |
toString() |
addMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, equals, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getName, getRank, getShape, hasErrors, hashCode, reshapeMetadata, restoreMetadata, setMetadata, setName, sliceMetadata, transposeMetadata
finalize, getClass, notify, notifyAll, wait, wait, wait
addMetadata, clearMetadata, getRank, getShape, hasErrors, setMetadata
getFirstMetadata, getMetadata, getMetadata
protected AggregateDataset base
public AggregateDataset(boolean extend, ILazyDataset... datasets)
extend
- if true, extend rank by onedatasets
- public static int[][] calcShapes(boolean extend, ILazyDataset... datasets)
extend
- if true, extend rank by onedatasets
- public Class<?> getElementClass()
getElementClass
in interface ILazyDataset
getElementClass
in class LazyDatasetBase
public int getElementsPerItem()
getElementsPerItem
in interface ILazyDataset
public int getDType()
getDType
in class LazyDatasetBase
public int getSize()
ILazyDataset
getSize
in interface ILazyDataset
public void setShape(int... shape)
ILazyDataset
setShape
in interface ILazyDataset
public ILazyDataset squeezeEnds()
ILazyDataset
squeezeEnds
in interface ILazyDataset
public Dataset getSlice(int[] start, int[] stop, int[] step) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
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
public Dataset getSlice(IMonitor monitor, int[] start, int[] stop, int[] step) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
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
public Dataset getSlice(IMonitor monitor, SliceND slice) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an n-D sliceDatasetException
public Dataset getSlice(Slice... slice) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)DatasetException
public Dataset getSlice(SliceND slice) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an n-D sliceDatasetException
public Dataset getSlice(IMonitor monitor, Slice... slice) throws DatasetException
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)DatasetException
public AggregateDataset getSliceView(Slice... slice)
ILazyDataset
getSliceView
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)public AggregateDataset getSliceView(int[] start, int[] stop, int[] step)
ILazyDataset
getSliceView
in interface ILazyDataset
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)public AggregateDataset getSliceView(SliceND slice)
ILazyDataset
getSliceView
in interface ILazyDataset
slice
- an n-D slicepublic AggregateDataset getTransposedView(int... axes)
ILazyDataset
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.
getTransposedView
in interface ILazyDataset
axes
- if zero length then axes order reversedpublic AggregateDataset clone()
ILazyDataset
clone
in interface ILazyDataset
clone
in class LazyDatasetBase
public void setErrors(Serializable errors)
ILazyDataset
setErrors
in interface ILazyDataset
setErrors
in class LazyDatasetBase
errors
- - may be null to remove the error setpublic ILazyDataset getErrors()
ILazyDataset
getErrors
in interface ILazyDataset
getErrors
in class LazyDatasetBase
Copyright © 2017. All rights reserved.