public class LazyWriteableDataset extends LazyDynamicDataset implements ILazyWriteableDataset
checker, chunks, eventDelegate, maxShape
begSlice, delSlice, isize, loader, map, oMetadata, oShape, padding, size, sShape
metadata, name, shape
UNLIMITED
Modifier | Constructor and Description |
---|---|
|
LazyWriteableDataset(ILazySaver saver,
String name,
Class<? extends Dataset> clazz,
int[] shape,
int[] maxShape,
int[] chunks)
Create a lazy dataset
|
|
LazyWriteableDataset(ILazySaver saver,
String name,
int elements,
Class<? extends Dataset> clazz,
int[] shape,
int[] maxShape,
int[] chunks)
Create a lazy dataset
|
protected |
LazyWriteableDataset(LazyWriteableDataset other) |
|
LazyWriteableDataset(String name,
Class<?> eClass,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset using element class
|
|
LazyWriteableDataset(String name,
Class<?> eClass,
int elements,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset using element class
|
|
LazyWriteableDataset(String name,
int dtype,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
|
|
LazyWriteableDataset(String name,
int dtype,
int elements,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
|
Modifier and Type | Method and Description |
---|---|
LazyWriteableDataset |
clone()
Clone dataset
|
static LazyWriteableDataset |
createLazyDataset(Dataset dataset)
Create a lazy writeable dataset based on in-memory data (handy for testing)
|
static LazyWriteableDataset |
createLazyDataset(Dataset dataset,
int[] maxShape)
Create a lazy writeable dataset based on in-memory data (handy for testing)
|
boolean |
equals(Object obj) |
Object |
getFillValue()
Get the value used to fill an un-initialized dataset
|
LazyWriteableDataset |
getSliceView(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
LazyWriteableDataset |
getSliceView(Slice... slice)
Get a slice of the dataset.
|
LazyWriteableDataset |
getSliceView(SliceND slice)
Get a slice of the dataset.
|
LazyWriteableDataset |
getTransposedView(int... axes)
Permute copy of dataset's axes so that given order is old order:
|
int |
hashCode() |
void |
setFillValue(Object fill)
Set the value used to fill an un-initialized dataset
|
void |
setSaver(ILazySaver saver)
Set saver (and also loader)
|
void |
setSlice(IDataset data,
SliceND slice)
Set a slice of the dataset
|
void |
setSlice(IMonitor monitor,
IDataset data,
int[] start,
int[] stop,
int[] step)
Set a slice of the dataset
|
void |
setSlice(IMonitor monitor,
IDataset data,
SliceND slice)
Set a slice of the dataset
|
void |
setSliceSync(IMonitor monitor,
IDataset data,
SliceND slice)
Set a slice of the dataset synchronously
|
void |
setWritingAsync(boolean async)
Set writing slices as asynchronous
|
LazyWriteableDataset |
squeezeEnds()
Remove dimensions of 1 from ends of shape of the dataset
|
addDataListener, checkSliceND, createSlice, fireDataListeners, getChunking, getDataset, getMaxShape, refreshShape, removeDataListener, resize, setChunking, setMaxShape, startUpdateChecker
calcTrueSlice, getDType, getElementClass, getElementsPerItem, getInterface, getMaxSliceLength, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, internalGetSlice, internalGetSliceView, setInterface, setShape, toString
addMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getErrors, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, getRank, getShape, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadata
finalize, getClass, notify, notifyAll, wait, wait, wait
getChunking, setChunking
addMetadata, clearMetadata, getElementClass, getElementsPerItem, getErrors, getRank, getShape, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, hasErrors, setErrors, setMetadata, setShape
getFirstMetadata, getMetadata, getMetadata
addDataListener, fireDataListeners, getDataset, getMaxShape, refreshShape, removeDataListener, resize, setMaxShape, startUpdateChecker
@Deprecated public LazyWriteableDataset(String name, int dtype, int elements, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- of datasetdtype
- dataset typeelements
- item sizeshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shapesaver
- lazy saverpublic LazyWriteableDataset(ILazySaver saver, String name, Class<? extends Dataset> clazz, int[] shape, int[] maxShape, int[] chunks)
saver
- lazy savername
- of datasetclazz
- dataset sub-interfaceshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shapepublic LazyWriteableDataset(ILazySaver saver, String name, int elements, Class<? extends Dataset> clazz, int[] shape, int[] maxShape, int[] chunks)
saver
- lazy savername
- of datasetelements
- item sizeclazz
- dataset sub-interfaceshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shape@Deprecated public LazyWriteableDataset(String name, int dtype, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- of datasetdtype
- dataset typeshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shapesaver
- lazy saverpublic LazyWriteableDataset(String name, Class<?> eClass, int elements, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- of dataseteClass
- element classelements
- item sizeshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shapesaver
- lazy saverpublic LazyWriteableDataset(String name, Class<?> eClass, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- of dataseteClass
- element classshape
- dataset shapemaxShape
- maximum shapechunks
- chunk shapesaver
- lazy saverprotected LazyWriteableDataset(LazyWriteableDataset other)
other
- datasetpublic static LazyWriteableDataset createLazyDataset(Dataset dataset)
dataset
- inputpublic static LazyWriteableDataset createLazyDataset(Dataset dataset, int[] maxShape)
dataset
- inputmaxShape
- maximum shapepublic int hashCode()
hashCode
in class LazyDynamicDataset
public boolean equals(Object obj)
equals
in class LazyDynamicDataset
public LazyWriteableDataset clone()
ILazyDataset
clone
in interface ILazyDataset
clone
in class LazyDynamicDataset
public LazyWriteableDataset getSliceView(int[] start, int[] stop, int[] step)
ILazyDataset
getSliceView
in interface ILazyDataset
getSliceView
in class LazyDataset
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 LazyWriteableDataset getSliceView(Slice... slice)
ILazyDataset
getSliceView
in interface ILazyDataset
getSliceView
in class LazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)public LazyWriteableDataset getSliceView(SliceND slice)
ILazyDataset
getSliceView
in interface ILazyDataset
getSliceView
in class LazyDataset
slice
- an n-D slicepublic LazyWriteableDataset 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
getTransposedView
in class LazyDataset
axes
- if zero length then axes order reversedpublic void setWritingAsync(boolean async)
ILazyWriteableDataset
setWritingAsync
in interface ILazyWriteableDataset
async
- true if writing should be asynchronouspublic void setSlice(IDataset data, SliceND slice) throws DatasetException
data
- to setslice
- an n-D sliceDatasetException
- when cannot write datapublic void setSlice(IMonitor monitor, IDataset data, int[] start, int[] stop, int[] step) throws DatasetException
ILazyWriteableDataset
setSlice
in interface ILazyWriteableDataset
monitor
- can be nulldata
- inputstart
- 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
- when cannot write datapublic void setSlice(IMonitor monitor, IDataset data, SliceND slice) throws DatasetException
ILazyWriteableDataset
setSlice
in interface ILazyWriteableDataset
monitor
- can be nulldata
- inputslice
- an n-D sliceDatasetException
- when cannot write datapublic void setSliceSync(IMonitor monitor, IDataset data, SliceND slice) throws DatasetException
ILazyWriteableDataset
setSliceSync
in interface ILazyWriteableDataset
monitor
- can be nulldata
- inputslice
- an n-D sliceDatasetException
- when cannot write datapublic void setSaver(ILazySaver saver)
setSaver
in interface ILazyWriteableDataset
saver
- lazy saverpublic Object getFillValue()
ILazyWriteableDataset
getFillValue
in interface ILazyWriteableDataset
public void setFillValue(Object fill)
ILazyWriteableDataset
setFillValue
in interface ILazyWriteableDataset
fill
- valuepublic LazyWriteableDataset squeezeEnds()
ILazyDataset
squeezeEnds
in interface ILazyDataset
squeezeEnds
in interface ILazyWriteableDataset
squeezeEnds
in class LazyDataset
Copyright © 2014–2022 Eclipse Foundation. All rights reserved.