public class ByteDataset extends AbstractDataset
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
data |
base, BLOCK_CLOSE, BLOCK_OPEN, odata, offset, size, stride, stringFormatcatchExceptions, logger, metadata, name, shapeARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, STRING| Modifier and Type | Method and Description |
|---|---|
ByteDataset |
clone()
Clone dataset
|
boolean |
containsInfs() |
boolean |
containsInvalidNumbers() |
boolean |
containsNans() |
void |
copyItemsFromAxes(int[] pos,
boolean[] axes,
Dataset dest)
Copy content from axes in given position to array
|
protected static byte[] |
createArray(int size) |
boolean |
equals(Object obj) |
ByteDataset |
fill(Object obj)
Fill dataset with given object
|
void |
fillDataset(Dataset result,
IndexIterator iter)
Populate another dataset with part of current dataset
|
byte |
get() |
byte |
get(int... pos) |
byte |
get(int i) |
byte |
get(int i,
int j) |
byte |
getAbs(int index)
Get a value from an absolute index of the internal array.
|
boolean |
getBoolean()
Get first item as a boolean.
|
boolean |
getBoolean(int... pos) |
boolean |
getBoolean(int i)
Get an item from given position as a boolean.
|
boolean |
getBoolean(int i,
int j)
Get an item from given position as a boolean.
|
protected int |
getBufferLength() |
byte |
getByte()
Get first item as a byte.
|
byte |
getByte(int... pos) |
byte |
getByte(int i)
Get an item from given position as a byte.
|
byte |
getByte(int i,
int j)
Get an item from given positionj as a byte.
|
byte[] |
getData()
This is a typed version of
AbstractDataset.getBuffer() |
double |
getDouble()
Get first item as a double.
|
double |
getDouble(int... pos) |
double |
getDouble(int i)
Get an item from given position as a double.
|
double |
getDouble(int i,
int j)
Get an item from given position as a double.
|
int |
getDType() |
boolean |
getElementBooleanAbs(int index)
Get an element from given absolute index as a boolean.
|
double |
getElementDoubleAbs(int index)
Get an element from given absolute index as a double.
|
long |
getElementLongAbs(int index)
Get an element from given absolute index as a long.
|
float |
getFloat()
Get first item as a float.
|
float |
getFloat(int... pos) |
float |
getFloat(int i)
Get an item from given position as a float.
|
float |
getFloat(int i,
int j)
Get an item from given position as a float.
|
int |
getInt()
Get first item as an int.
|
int |
getInt(int... pos) |
int |
getInt(int i)
Get an item from given position as an int.
|
int |
getInt(int i,
int j)
Get an item from given position as an int.
|
long |
getLong()
Get first item as a long.
|
long |
getLong(int... pos) |
long |
getLong(int i)
Get an item from given position as a long.
|
long |
getLong(int i,
int j)
Get an item from given position as a long.
|
Object |
getObject()
Get first item as an object.
|
Object |
getObject(int... pos) |
Object |
getObject(int i)
Get an item from given position as an object.
|
Object |
getObject(int i,
int j)
Get an item from given position as an object.
|
Object |
getObjectAbs(int index)
Get an item from given absolute index as an object.
|
short |
getShort()
Get first item as a short.
|
short |
getShort(int... pos) |
short |
getShort(int i)
Get an item from given position as a short.
|
short |
getShort(int i,
int j)
Get an item from given position as a short.
|
ByteDataset |
getSlice(SliceIterator siter)
Get a slice of the dataset.
|
String |
getString()
Get first item as a string.
|
String |
getString(int... pos) |
String |
getString(int i)
Get an item from given position as a string.
|
String |
getString(int i,
int j)
Get an item from given position as a string.
|
String |
getStringAbs(int index)
Get an item from given absolute index as a string.
|
ByteDataset |
getUniqueItems()
Get unique items
|
ByteDataset |
getView(boolean deepCopyMetadata) |
int |
hashCode() |
ByteDataset |
iadd(Object b)
In-place addition with object o
|
ByteDataset |
idivide(Object b)
In-place division with object o
|
ByteDataset |
ifloor()
In-place floor
|
ByteDataset |
imultiply(Object b)
In-place multiplication with object o
|
ByteDataset |
ipower(Object b)
In-place raise to power of object o
|
ByteDataset |
iremainder(Object b)
In-place remainder
|
ByteDataset |
isubtract(Object b)
In-place subtraction with object o
|
int[] |
maxPos(boolean... ignoreInvalids) |
int[] |
minPos(boolean... ignoreInvalids) |
double |
residual(Object b,
Dataset w,
boolean ignoreNaNs)
Calculate residual of dataset with object o and weight.
|
void |
resize(int... newShape)
Change shape and size of dataset in-place
|
void |
set(Object obj)
Set the value given by object at the first position.
|
void |
set(Object obj,
int... pos)
Set the value given by object at given position
|
void |
set(Object obj,
int i)
Set the value given by object at given position.
|
void |
set(Object obj,
int i,
int j)
Set the value given by object at given position.
|
void |
setAbs(int index,
byte val)
Set a value at absolute index in the internal array.
|
ByteDataset |
setBy1DIndex(Object obj,
Dataset index)
This is modelled after the NumPy set item with an index dataset
|
ByteDataset |
setByBoolean(Object obj,
Dataset selection)
This is modelled after the NumPy set item with a condition specified by a boolean dataset
|
ByteDataset |
setByIndexes(Object obj,
Object... indexes)
This is modelled after the NumPy set item with an array of indexing objects
|
protected void |
setData()
Set aliased data as base data
|
void |
setItem(byte value)
Sets the value at first point to the passed value.
|
void |
setItem(byte value,
int... pos)
Sets the value at a particular point to the passed value
|
void |
setItem(byte value,
int i)
Sets the value at a particular point to the passed value.
|
void |
setItem(byte value,
int i,
int j)
Sets the value at a particular point to the passed value.
|
protected void |
setItemDirect(int dindex,
int sindex,
Object src)
Set item from compatible dataset in a direct and speedy way.
|
void |
setItemsOnAxes(int[] pos,
boolean[] axes,
Object src)
Set content on axes in given position to values in array
|
void |
setObjectAbs(int index,
Object obj)
Set an item at absolute index from an object.
|
ByteDataset |
setSlice(Object obj,
IndexIterator siter) |
ByteDataset |
sort(Integer axis)
In-place sort of dataset
|
all, all, any, any, argMax, argMax, argMin, argMin, calcSteps, cast, cast, cast, checkAxis, checkAxis, checkCompatibility, copy, copy, copyToView, count, count, createStrides, createStrides, createStrides, createStrides, fillData, flatten, get1DIndex, get1DIndex, get1DIndex, get1DIndexFromShape, get1DIndexFromShape, getBooleanIterator, getBooleanIterator, getBroadcastView, getBuffer, getBy1DIndex, getByBoolean, getByIndexes, getElementClass, getElementsPerItem, getError, getError, getError, getError, getErrorArray, getErrorArray, getErrorArray, getErrorBuffer, getErrors, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getIterator, getMaxLineLength, getMetadataMap, getName, getNbytes, getNDPosition, getOffset, getPositionIterator, getRank, getRealPart, getRealView, getShape, getShapeRef, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getSliceView, getSliceView, getSliceView, getStats, getStrides, getStringStats, getTransposedView, hasFloatingPointElements, ifloorDivide, isCompatibleWith, isComplex, max, max, mean, mean, min, min, overrideInternal, peakToPeak, peakToPeak, product, product, reshape, residual, residual, rootMeanSquare, rootMeanSquare, setErrorBuffer, setMaxLineLength, setName, setShape, setSlice, setSlice, setSlice, setStringFormat, squeeze, squeeze, squeezeEnds, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, sum, swapAxes, synchronizedCopy, toString, toString, transpose, variance, variance, variance, varianceaddMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, sliceMetadata, transposeMetadatafinalize, getClass, notify, notifyAll, wait, wait, waitgetMetadataaddMetadata, clearMetadata, hasErrors, setErrors, setMetadatagetFirstMetadata, getMetadataprotected byte[] data
protected void setData()
AbstractDatasetsetData in class AbstractDatasetprotected static byte[] createArray(int size)
public int getDType()
getDType in interface DatasetgetDType in class LazyDatasetBasepublic boolean equals(Object obj)
equals in class AbstractDatasetpublic int hashCode()
hashCode in class AbstractDatasetpublic ByteDataset clone()
ILazyDatasetclone in interface Datasetclone in interface IDatasetclone in interface ILazyDatasetclone in class AbstractDatasetpublic ByteDataset fill(Object obj)
Datasetpublic byte[] getData()
AbstractDataset.getBuffer()protected int getBufferLength()
getBufferLength in class AbstractDatasetpublic ByteDataset getView(boolean deepCopyMetadata)
getView in interface DatasetgetView in class AbstractDatasetdeepCopyMetadata - if true then deep-copy metadatapublic byte getAbs(int index)
index - absolute indexpublic boolean getElementBooleanAbs(int index)
Datasetpublic double getElementDoubleAbs(int index)
Datasetpublic long getElementLongAbs(int index)
Datasetpublic Object getObjectAbs(int index)
Datasetpublic String getStringAbs(int index)
Datasetpublic void setAbs(int index, byte val)
index - absolute indexval - new valueprotected void setItemDirect(int dindex, int sindex, Object src)
AbstractDatasetsetItemDirect in class AbstractDatasetsrc - is the source data bufferpublic void setObjectAbs(int index, Object obj)
Datasetpublic byte get()
public byte get(int i)
i - public byte get(int i, int j)
i - j - public byte get(int... pos)
pos - public Object getObject()
Datasetpublic Object getObject(int i)
Datasetpublic Object getObject(int i, int j)
Datasetpublic String getString()
Datasetpublic String getString(int i)
Datasetpublic String getString(int i, int j)
Datasetpublic double getDouble()
Datasetpublic double getDouble(int i)
Datasetpublic double getDouble(int i, int j)
Datasetpublic double getDouble(int... pos)
public float getFloat()
Datasetpublic float getFloat(int i)
Datasetpublic float getFloat(int i, int j)
Datasetpublic float getFloat(int... pos)
public long getLong()
Datasetpublic long getLong(int i)
Datasetpublic long getLong(int i, int j)
Datasetpublic long getLong(int... pos)
public int getInt()
Datasetpublic int getInt(int i)
Datasetpublic int getInt(int i, int j)
Datasetpublic int getInt(int... pos)
public short getShort()
Datasetpublic short getShort(int i)
Datasetpublic short getShort(int i, int j)
Datasetpublic short getShort(int... pos)
public byte getByte()
Datasetpublic byte getByte(int i)
Datasetpublic byte getByte(int i, int j)
Datasetpublic byte getByte(int... pos)
public boolean getBoolean()
Datasetpublic boolean getBoolean(int i)
Datasetpublic boolean getBoolean(int i, int j)
Datasetpublic boolean getBoolean(int... pos)
public void setItem(byte value)
value - public void setItem(byte value, int i)
value - i - public void setItem(byte value, int i, int j)
value - i - j - public void setItem(byte value, int... pos)
value - pos - public void set(Object obj)
Datasetpublic void set(Object obj, int i)
Datasetpublic void set(Object obj, int i, int j)
Datasetpublic void set(Object obj, int... pos)
IDatasetpublic void resize(int... newShape)
IDatasetpublic ByteDataset sort(Integer axis)
Datasetaxis - to sort along. If null, then the flattened view is sortedpublic ByteDataset getUniqueItems()
Datasetpublic ByteDataset getSlice(SliceIterator siter)
AbstractDatasetgetSlice in class AbstractDatasetsiter - Slice iteratorpublic void fillDataset(Dataset result, IndexIterator iter)
Datasetiter - over current datasetpublic ByteDataset setByBoolean(Object obj, Dataset selection)
Datasetobj - specifies the object used to set the selected itemsselection - a boolean dataset of same shape to use for selecting itemspublic ByteDataset setBy1DIndex(Object obj, Dataset index)
Datasetobj - specifies the object used to set the selected itemsindex - an integer datasetpublic ByteDataset setByIndexes(Object obj, Object... indexes)
Datasetobj - specifies the object used to set the selected itemsindexes - an array of integer dataset, boolean dataset, slices or null entries (same as
full slices)public ByteDataset setSlice(Object obj, IndexIterator siter)
obj - specifies the object used to set the specified slicesiter - specifies the slice iteratorpublic void copyItemsFromAxes(int[] pos, boolean[] axes, Dataset dest)
Datasetpos - - null means position at originaxes - - true means copypublic void setItemsOnAxes(int[] pos, boolean[] axes, Object src)
Datasetaxes - - true means copypublic int[] maxPos(boolean... ignoreInvalids)
ignoreInvalids - - see IDataset.max(boolean...)public int[] minPos(boolean... ignoreInvalids)
ignoreInvalids - - see IDataset.max(boolean...)public boolean containsNans()
public boolean containsInfs()
public boolean containsInvalidNumbers()
public ByteDataset iadd(Object b)
Datasetpublic ByteDataset isubtract(Object b)
Datasetpublic ByteDataset imultiply(Object b)
Datasetpublic ByteDataset idivide(Object b)
Datasetpublic ByteDataset ifloor()
Datasetpublic ByteDataset iremainder(Object b)
Datasetpublic ByteDataset ipower(Object b)
Datasetpublic double residual(Object b, Dataset w, boolean ignoreNaNs)
DatasetignoreNaNs - if true, skip NaNsCopyright © 2014–2018 Eclipse Foundation. All rights reserved.