public class CompoundIntegerDataset extends AbstractCompoundDataset
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
data |
isizebase, BLOCK_CLOSE, BLOCK_OPEN, ELLIPSIS, odata, offset, size, stride, stringFormatmetadata, name, shapeARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, RGB8, STRING| Modifier and Type | Method and Description |
|---|---|
IntegerDataset |
asNonCompoundDataset(boolean shareData)
Get a non-compound dataset version
|
CompoundIntegerDataset |
clone()
Clone dataset
|
boolean |
containsInfs() |
boolean |
containsInvalidNumbers() |
boolean |
containsNans() |
void |
copyElements(Dataset destination,
int element)
Copy chosen elements from each item to another dataset
|
void |
copyItemsFromAxes(int[] pos,
boolean[] axes,
Dataset dest)
Copy content from axes in given position to array
|
protected int[] |
createArray(int size) |
static CompoundIntegerDataset |
createCompoundDatasetWithLastDimension(Dataset a,
boolean shareData)
Create a compound dataset using last dimension of given dataset
|
static CompoundIntegerDataset |
createFromObject(int itemSize,
Object obj)
Create a 1D dataset from an object which could be a Java list, array (of arrays...) or Number.
|
boolean |
equals(Object obj) |
CompoundIntegerDataset |
fill(Object obj)
Fill dataset with given object
|
void |
fillDataset(Dataset result,
IndexIterator iter)
Populate another dataset with part of current dataset
|
int[] |
getAbs(int index)
Get values at absolute index in the internal array.
|
void |
getAbs(int index,
int[] values)
Get values at absolute index in the internal array.
|
protected int |
getBufferLength() |
byte[] |
getByteArray() |
byte[] |
getByteArray(int... pos) |
byte[] |
getByteArray(int i) |
byte[] |
getByteArray(int i,
int j) |
int[] |
getData()
This is a typed version of
AbstractDataset.getBuffer() |
double[] |
getDoubleArray() |
double[] |
getDoubleArray(int... pos) |
double[] |
getDoubleArray(int i) |
double[] |
getDoubleArray(int i,
int j) |
void |
getDoubleArrayAbs(int index,
double[] darray)
Get an item as a double array
|
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.
|
IntegerDataset |
getElements(int element)
Get chosen elements from each item as a dataset
|
IntegerDataset |
getElementsView(int element)
Get chosen elements from each item as a view on dataset
|
protected double |
getFirstValue() |
protected double |
getFirstValue(int... pos) |
protected double |
getFirstValue(int i) |
protected double |
getFirstValue(int i,
int j) |
float[] |
getFloatArray() |
float[] |
getFloatArray(int... pos) |
float[] |
getFloatArray(int i) |
float[] |
getFloatArray(int i,
int j) |
int[] |
getIntArray() |
int[] |
getIntArray(int... pos) |
int[] |
getIntArray(int i) |
int[] |
getIntArray(int i,
int j) |
long[] |
getLongArray() |
long[] |
getLongArray(int... pos) |
long[] |
getLongArray(int i) |
long[] |
getLongArray(int i,
int j) |
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[] |
getShortArray() |
short[] |
getShortArray(int... pos) |
short[] |
getShortArray(int i) |
short[] |
getShortArray(int i,
int j) |
CompoundIntegerDataset |
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.
|
CompoundIntegerDataset |
getView(boolean deepCopyMetadata) |
int |
hashCode() |
CompoundIntegerDataset |
iadd(Object b)
In-place addition
|
CompoundIntegerDataset |
idivide(Object b)
In-place division
|
CompoundIntegerDataset |
ifloor()
In-place floor
|
CompoundIntegerDataset |
imultiply(Object b)
In-place multiplication
|
CompoundIntegerDataset |
ipower(Object b)
In-place raise to power of argument
|
CompoundIntegerDataset |
iremainder(Object b)
In-place remainder of division
|
CompoundIntegerDataset |
isubtract(Object b)
In-place subtraction
|
double |
residual(Object b,
Dataset w,
boolean ignoreNaNs)
Calculate residual of dataset with object 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,
int val)
Set element value at absolute index in the internal array.
|
void |
setAbs(int index,
int[] val)
Set values at absolute index in the internal array.
|
CompoundIntegerDataset |
setBy1DIndex(Object o,
Dataset index)
This is modelled after the NumPy set item with an index dataset
|
CompoundIntegerDataset |
setByBoolean(Object o,
Dataset selection)
This is modelled after the NumPy set item with a condition specified by a boolean dataset
|
CompoundIntegerDataset |
setByIndexes(Object o,
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 |
setElements(Dataset source,
int element)
Set values of chosen elements from each item according to source dataset
|
void |
setItem(int[] d)
Set values at first position.
|
void |
setItem(int[] d,
int... pos)
Set values at given position
|
void |
setItem(int[] d,
int i)
Set values at given position.
|
void |
setItem(int[] d,
int i,
int j)
Set values at given position.
|
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.
|
CompoundIntegerDataset |
setSlice(Object o,
IndexIterator siter) |
argMax, argMin, cast, cast, flatten, get1DIndex, get1DIndex, get1DIndexFromShape, getBoolean, getBoolean, getBoolean, getBoolean, getBroadcastView, getBy1DIndex, getByBoolean, getByIndexes, getByte, getByte, getByte, getByte, getCompoundStats, getDouble, getDouble, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleArray, getDoubleArray, getElementsPerItem, getError, getError, getError, getErrorArray, getErrorArray, getErrorArray, getErrors, getFloat, getFloat, getFloat, getFloat, getInt, getInt, getInt, getInt, getIterator, getIterator, getLong, getLong, getLong, getLong, getShort, getShort, getShort, getShort, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, getSliceView, getSliceView, getSliceView, getTransposedView, getUniqueItems, ifloorDivide, internalGetSliceIterator, max, max, maxItem, maxPos, mean, mean, min, min, minItem, minPos, peakToPeak, product, reshape, rootMeanSquare, rootMeanSquare, setSlice, setSlice, sort, squeeze, squeeze, squeezeEnds, stdDeviation, stdDeviation, sum, sum, swapAxes, synchronizedCopy, transpose, variance, variance, varianceall, all, any, any, argMax, argMin, calcSteps, cast, cast, checkAxis, checkAxis, checkCompatibility, copy, copy, copyToView, count, count, count, createStrides, createStrides, createStrides, createStrides, fillData, get1DIndex, get1DIndexFromShape, getBooleanIterator, getBooleanIterator, getBuffer, getDType, getElementClass, getError, getErrorBuffer, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getMaxLineLength, getNbytes, getNDPosition, getOffset, getPositionIterator, getRank, getRealPart, getRealView, getShape, getShapeRef, getSize, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getStats, getStrides, getStringStats, hasFloatingPointElements, isCompatibleWith, isComplex, max, mean, min, overrideInternal, peakToPeak, peakToPeak, product, product, residual, residual, rootMeanSquare, setErrorBuffer, setMaxLineLength, setShape, setSlice, setStringFormat, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, toString, toString, variance, variance, varianceaddMetadata, checkPermutatedAxes, checkSliceND, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadatafinalize, getClass, notify, notifyAll, wait, wait, waitall, all, any, any, argMax, argMin, cast, cast, checkAxis, checkCompatibility, copy, copy, count, count, count, get1DIndex, getBooleanIterator, getBooleanIterator, getBuffer, getDType, getError, getErrorBuffer, getIndices, getIterator, getNbytes, getNDPosition, getOffset, getPositionIterator, getRealPart, getRealView, getShapeRef, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getStrides, hasFloatingPointElements, isCompatibleWith, isComplex, max, mean, min, overrideInternal, peakToPeak, peakToPeak, product, product, residual, residual, rootMeanSquare, setDirty, setErrorBuffer, setSlice, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, toString, variance, variance, variancegetItemBytes, getMetadata, setStringFormataddMetadata, clearMetadata, getElementClass, getRank, getShape, getSize, hasErrors, setErrors, setMetadata, setShapegetFirstMetadata, getMetadataprotected int[] data
protected void setData()
AbstractDatasetsetData in class AbstractDatasetprotected int[] createArray(int size)
public boolean equals(Object obj)
equals in class AbstractCompoundDatasetpublic int hashCode()
hashCode in class AbstractCompoundDatasetpublic CompoundIntegerDataset clone()
ILazyDatasetclone in interface CompoundDatasetclone in interface Datasetclone in interface IDatasetclone in interface ILazyDatasetclone in class AbstractCompoundDatasetpublic static CompoundIntegerDataset createFromObject(int itemSize, Object obj)
itemSize - item sizeobj - objectpublic static CompoundIntegerDataset createCompoundDatasetWithLastDimension(Dataset a, boolean shareData)
a - datasetshareData - if true, then share data when possible otherwise copy itpublic IntegerDataset asNonCompoundDataset(boolean shareData)
CompoundDatasetshareData - if true, then share data when possible otherwise copy itpublic CompoundIntegerDataset fill(Object obj)
Datasetobj - fill valuepublic int[] getData()
AbstractDataset.getBuffer()protected int getBufferLength()
getBufferLength in class AbstractDatasetpublic CompoundIntegerDataset getView(boolean deepCopyMetadata)
getView in interface CompoundDatasetgetView in interface DatasetgetView in class AbstractCompoundDatasetdeepCopyMetadata - if true then deep-copy metadatapublic int[] getAbs(int index)
index - absolute indexpublic void getAbs(int index, int[] values)
index - absolute indexvalues - output destinationpublic boolean getElementBooleanAbs(int index)
Datasetindex - in arraypublic double getElementDoubleAbs(int index)
Datasetindex - in arraypublic long getElementLongAbs(int index)
Datasetindex - in arrayprotected void setItemDirect(int dindex, int sindex, Object src)
AbstractDatasetsetItemDirect in class AbstractDatasetdindex - destination indexsindex - source indexsrc - is the source data bufferpublic void setAbs(int index, int[] val)
index - absolute indexval - new valuespublic void setAbs(int index, int val)
index - absolute indexval - new valuepublic Object getObject()
Datasetpublic Object getObject(int i)
Dataseti - position in first dimensionpublic Object getObject(int i, int j)
Dataseti - position in first dimensionj - position in second dimensionpublic Object getObject(int... pos)
pos - positionpublic byte[] getByteArray()
public byte[] getByteArray(int i)
i - position in first dimensionpublic byte[] getByteArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic byte[] getByteArray(int... pos)
pos - positionpublic short[] getShortArray()
public short[] getShortArray(int i)
i - position in first dimensionpublic short[] getShortArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic short[] getShortArray(int... pos)
pos - positionpublic int[] getIntArray()
public int[] getIntArray(int i)
i - position in first dimensionpublic int[] getIntArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic int[] getIntArray(int... pos)
pos - positionpublic long[] getLongArray()
public long[] getLongArray(int i)
i - position in first dimensionpublic long[] getLongArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic long[] getLongArray(int... pos)
pos - positionpublic float[] getFloatArray()
public float[] getFloatArray(int i)
i - position in first dimensionpublic float[] getFloatArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic float[] getFloatArray(int... pos)
pos - positionpublic double[] getDoubleArray()
public double[] getDoubleArray(int i)
i - position in first dimensionpublic double[] getDoubleArray(int i, int j)
i - position in first dimensionj - position in second dimensionpublic double[] getDoubleArray(int... pos)
pos - positionpublic void getDoubleArrayAbs(int index, double[] darray)
CompoundDatasetindex - in arraydarray - double array must be allocated and have sufficient lengthpublic String getString()
Datasetpublic String getString(int i)
Dataseti - position in first dimensionpublic String getString(int i, int j)
Dataseti - position in first dimensionj - position in second dimensionpublic String getString(int... pos)
pos - positionprotected double getFirstValue()
getFirstValue in class AbstractCompoundDatasetprotected double getFirstValue(int i)
getFirstValue in class AbstractCompoundDatasetprotected double getFirstValue(int i, int j)
getFirstValue in class AbstractCompoundDatasetprotected double getFirstValue(int... pos)
getFirstValue in class AbstractCompoundDatasetpublic Object getObjectAbs(int index)
Datasetindex - in arraypublic String getStringAbs(int index)
Datasetindex - in arraypublic void setObjectAbs(int index, Object obj)
Datasetindex - in arrayobj - value to setpublic void set(Object obj)
Datasetobj - value to setpublic void set(Object obj, int i)
Datasetobj - value to seti - position in first dimensionpublic void set(Object obj, int i, int j)
Datasetobj - value to seti - position in first dimensionj - position in second dimensionpublic void set(Object obj, int... pos)
IDatasetobj - value to setpos - positionpublic void setItem(int[] d)
d - input sourcepublic void setItem(int[] d, int i)
d - input sourcei - position in first dimensionpublic void setItem(int[] d, int i, int j)
d - input sourcei - position in first dimensionj - position in second dimensionpublic void setItem(int[] d, int... pos)
d - input sourcepos - positionpublic void resize(int... newShape)
IDatasetnewShape - to usepublic CompoundIntegerDataset getSlice(SliceIterator siter)
AbstractDatasetgetSlice in class AbstractCompoundDatasetsiter - Slice iteratorpublic IntegerDataset getElementsView(int element)
CompoundDatasetelement - to choosepublic IntegerDataset getElements(int element)
CompoundDatasetelement - to choosepublic void copyElements(Dataset destination, int element)
CompoundDatasetdestination - datasetelement - to choosepublic void setElements(Dataset source, int element)
CompoundDatasetsource - datasetelement - to choosepublic void fillDataset(Dataset result, IndexIterator iter)
Datasetresult - destination for items from iterationiter - over current datasetpublic CompoundIntegerDataset setByBoolean(Object o, Dataset selection)
Dataseto - specifies the object used to set the selected itemsselection - a boolean dataset of same shape to use for selecting itemspublic CompoundIntegerDataset setBy1DIndex(Object o, Dataset index)
Dataseto - specifies the object used to set the selected itemsindex - an integer datasetpublic CompoundIntegerDataset setByIndexes(Object o, Object... indexes)
Dataseto - 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 CompoundIntegerDataset setSlice(Object o, IndexIterator siter)
o - specifies the object used to set the specified slicesiter - specifies the slice iteratorpublic void copyItemsFromAxes(int[] pos, boolean[] axes, Dataset dest)
Datasetpos - starting position (can be null for origin)axes - if true, copydest - destinationpublic void setItemsOnAxes(int[] pos, boolean[] axes, Object src)
Datasetpos - starting position (can be null for origin)axes - if true, copysrc - sourcepublic boolean containsNans()
public boolean containsInfs()
public boolean containsInvalidNumbers()
public CompoundIntegerDataset iadd(Object b)
Datasetb - object to usepublic CompoundIntegerDataset isubtract(Object b)
Datasetb - object to usepublic CompoundIntegerDataset imultiply(Object b)
Datasetb - object to usepublic CompoundIntegerDataset idivide(Object b)
Datasetb - object to usepublic CompoundIntegerDataset ifloor()
Datasetpublic CompoundIntegerDataset iremainder(Object b)
Datasetb - object to usepublic CompoundIntegerDataset ipower(Object b)
Datasetb - object to usepublic double residual(Object b, Dataset w, boolean ignoreNaNs)
Datasetb - object to usew - to useignoreNaNs - if true, skip NaNsCopyright © 2014–2022 Eclipse Foundation. All rights reserved.