public class LazyWriteableDataset extends LazyDynamicDataset implements ILazyWriteableDataset
checker, eventDelegate, maxShape
begSlice, delSlice, isize, loader, map, oMetadata, oShape, padding, size, sShape
catchExceptions, logger, metadata, name, shape
UNLIMITED
Modifier | Constructor and Description |
---|---|
protected |
LazyWriteableDataset(LazyWriteableDataset other) |
|
LazyWriteableDataset(String name,
Class<?> clazz,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset
|
|
LazyWriteableDataset(String name,
Class<?> clazz,
int elements,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset
|
|
LazyWriteableDataset(String name,
int dtype,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset
|
|
LazyWriteableDataset(String name,
int dtype,
int elements,
int[] shape,
int[] maxShape,
int[] chunks,
ILazySaver saver)
Create a lazy dataset
|
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)
|
protected SliceND |
createSlice(int[] nstart,
int[] nstop,
int[] nstep) |
boolean |
equals(Object obj) |
int[] |
getChunking()
Get chunking
|
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 |
setChunking(int... chunks)
Set chunking
|
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
|
addDataListener, fireDataListeners, getDataset, getMaxShape, refreshShape, removeDataListener, resize, setMaxShape, startUpdateChecker
calcTrueSlice, getDType, getElementsPerItem, getInterface, getMaxSliceLength, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, setShape, squeezeEnds, toString
addMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getElementClass, 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
addMetadata, clearMetadata, getElementClass, getElementsPerItem, getErrors, getRank, getShape, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, hasErrors, setErrors, setMetadata, setShape, squeezeEnds
getFirstMetadata, getMetadata, getMetadata
addDataListener, fireDataListeners, getDataset, getMaxShape, refreshShape, removeDataListener, resize, setMaxShape, startUpdateChecker
public LazyWriteableDataset(String name, int dtype, int elements, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- dtype
- dataset typeelements
- shape
- maxShape
- chunks
- saver
- public LazyWriteableDataset(String name, int dtype, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- dtype
- dataset typeshape
- maxShape
- chunks
- saver
- public LazyWriteableDataset(String name, Class<?> clazz, int elements, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- clazz
- dataset element classelements
- shape
- maxShape
- chunks
- saver
- public LazyWriteableDataset(String name, Class<?> clazz, int[] shape, int[] maxShape, int[] chunks, ILazySaver saver)
name
- clazz
- dataset element classshape
- maxShape
- chunks
- saver
- protected LazyWriteableDataset(LazyWriteableDataset other)
public static LazyWriteableDataset createLazyDataset(Dataset dataset)
dataset
- public static LazyWriteableDataset createLazyDataset(Dataset dataset, int[] maxShape)
dataset
- public int hashCode()
hashCode
in class LazyDynamicDataset
public boolean equals(Object obj)
equals
in class LazyDynamicDataset
public int[] getChunking()
ILazyWriteableDataset
getChunking
in interface ILazyWriteableDataset
public void setChunking(int... chunks)
ILazyWriteableDataset
setChunking
in interface ILazyWriteableDataset
chunks
- chunk shapepublic 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
public void setSlice(IDataset data, SliceND slice) throws DatasetException
data
- slice
- an n-D sliceDatasetException
public void setSlice(IMonitor monitor, IDataset data, int[] start, int[] stop, int[] step) throws DatasetException
ILazyWriteableDataset
setSlice
in interface ILazyWriteableDataset
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 void setSlice(IMonitor monitor, IDataset data, SliceND slice) throws DatasetException
ILazyWriteableDataset
setSlice
in interface ILazyWriteableDataset
slice
- an n-D sliceDatasetException
public void setSliceSync(IMonitor monitor, IDataset data, SliceND slice) throws DatasetException
ILazyWriteableDataset
setSliceSync
in interface ILazyWriteableDataset
slice
- an n-D sliceDatasetException
public void setSaver(ILazySaver saver)
setSaver
in interface ILazyWriteableDataset
saver
- protected SliceND createSlice(int[] nstart, int[] nstop, int[] nstep)
createSlice
in class LazyDataset
public Object getFillValue()
ILazyWriteableDataset
getFillValue
in interface ILazyWriteableDataset
public void setFillValue(Object fill)
ILazyWriteableDataset
setFillValue
in interface ILazyWriteableDataset
Copyright © 2014–2019 Eclipse Foundation. All rights reserved.