public interface Dataset extends IDataset
Interface for our implementation of dataset that adds a lot of extra functionality.
Warning: It is important to note that methods (get*Abs() and set*Abs()) which use the absolute index must be used with care. In (sliced) views of datasets, neighbouring positions do not necessarily correspond to contiguous indexes. This is also the case with multi-element (or compound) items. Therefore index iterators should be used in conjunction with these methods unless the dataset can be proven to be not a view or be a wholly contiguous slice of a dataset; a copy or new dataset satisfies this criterion.
Modifier and Type | Field and Description |
---|---|
static int |
ARRAYFLOAT32
Array of 32-bit floating points
|
static int |
ARRAYFLOAT64
Array of 64-bit floating points
|
static int |
ARRAYINT16
Array of signed 16-bit integers
|
static int |
ARRAYINT32
Array of signed 32-bit integers
|
static int |
ARRAYINT64
Array of signed 64-bit integers
|
static int |
ARRAYINT8
Array of signed 8-bit integers
|
static int |
ARRAYMUL |
static int |
BOOL
Boolean
|
static int |
COMPLEX
Complex floating point (same as 64-bit floating point)
|
static int |
COMPLEX128
128-bit complex floating point (real and imaginary parts are 64-bit floats)
|
static int |
COMPLEX64
64-bit complex floating point (real and imaginary parts are 32-bit floats)
|
static int |
DATE
Date
|
static int |
FLOAT
Floating point (same as 64-bit floating point)
|
static int |
FLOAT32
32-bit floating point
|
static int |
FLOAT64
64-bit floating point
|
static int |
INT
Integer (same as signed 32-bit integer)
|
static int |
INT16
Signed 16-bit integer
|
static int |
INT32
Signed 32-bit integer
|
static int |
INT64
Signed 64-bit integer
|
static int |
INT8
Signed 8-bit integer
|
static int |
OBJECT
Object
|
static int |
RGB
Array of three signed 16-bit integers for RGB values
|
static int |
RGB8
Array of three signed 8-bit integers for RGB values
|
static long |
serialVersionUID
Update this when there are any serious changes to API
|
static int |
STRING
String
|
Modifier and Type | Method and Description |
---|---|
boolean |
all() |
Dataset |
all(int axis) |
boolean |
any() |
Dataset |
any(int axis) |
int |
argMax(boolean... ignoreInvalids)
Find absolute index of maximum value (in a flattened view)
|
Dataset |
argMax(int axis,
boolean... ignoreInvalids)
Find indices of maximum values along given axis
|
int |
argMin(boolean... ignoreInvalids)
Find absolute index of minimum value (in a flattened view)
|
Dataset |
argMin(int axis,
boolean... ignoreInvalids)
Find indices of minimum values along given axis
|
Dataset |
cast(boolean repeat,
int dtype,
int isize)
Deprecated.
Please use class-based method
cast(int, Class, boolean) |
<T extends Dataset> |
cast(Class<T> clazz)
Cast a dataset
|
Dataset |
cast(int dtype)
Deprecated.
Please use class-based method
cast(Class) |
<T extends Dataset> |
cast(int isize,
Class<T> clazz,
boolean repeat)
Cast a dataset
|
int |
checkAxis(int axis)
Check that axis is in range [-rank,rank)
|
void |
checkCompatibility(ILazyDataset g)
This method takes a dataset and checks its shape against the current dataset.
|
Dataset |
clone()
Clone dataset, making new copy of data
|
boolean |
containsInfs() |
boolean |
containsInvalidNumbers() |
boolean |
containsNans() |
<T extends Dataset> |
copy(Class<T> clazz)
Copy and cast a dataset
|
Dataset |
copy(int dtype)
Deprecated.
Please use class-based method
copy(Class) |
void |
copyItemsFromAxes(int[] pos,
boolean[] axes,
Dataset dest)
Copy content from axes in given position to array
|
long |
count(boolean... ignoreInvalids) |
Dataset |
count(int[] axes,
boolean... ignoreInvalids) |
Dataset |
count(int axis,
boolean... ignoreInvalids) |
Dataset |
fill(Object obj)
Fill dataset with given object
|
void |
fillDataset(Dataset other,
IndexIterator iter)
Populate another dataset with part of current dataset
|
Dataset |
flatten()
Flatten shape
|
int |
get1DIndex(int... n)
This method calculates the index in the data array that corresponds to
the given n-dimensional position
|
boolean |
getBoolean()
Get first item as a boolean.
|
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.
|
BooleanIterator |
getBooleanIterator(Dataset choice)
Get an iterator that visits every item in this dataset where the corresponding item in
choice dataset is true
|
BooleanIterator |
getBooleanIterator(Dataset choice,
boolean value)
Get an iterator that visits every item in this dataset where the corresponding item in
choice dataset is given by value
|
Dataset |
getBroadcastView(int... shape) |
Serializable |
getBuffer() |
Dataset |
getBy1DIndex(IntegerDataset index)
This is modelled after the NumPy get item with an index dataset
|
Dataset |
getByBoolean(Dataset selection)
This is modelled after the NumPy get item with a condition specified by a boolean dataset
|
Dataset |
getByIndexes(Object... indexes)
This is modelled after the NumPy get item with an array of indexing objects
|
byte |
getByte()
Get first item as a byte.
|
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.
|
double |
getDouble()
Get first item as a double.
|
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.
|
double |
getError()
Get the error for the first item.
|
double |
getError(int i)
Get the error for given position.
|
double |
getError(int i,
int j)
Get the error for given position.
|
double[] |
getErrorArray(int i)
Get the error values for given position
|
double[] |
getErrorArray(int i,
int j)
Get the error values for given position
|
Dataset |
getErrorBuffer()
Get the (un-broadcasted) dataset that backs the (squared) error data
|
Dataset |
getErrors()
Get the error array from the dataset of same shape.
|
float |
getFloat()
Get first item as a float.
|
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.
|
IntegerDataset |
getIndices()
Generate an index dataset for current dataset
|
int |
getInt()
Get first item as an int.
|
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.
|
IndexIterator |
getIterator() |
IndexIterator |
getIterator(boolean withPosition) |
long |
getLong()
Get first item as a long.
|
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.
|
int |
getNbytes() |
int[] |
getNDPosition(int n)
This method calculates the n-dimensional position in the dataset of
the given index in the data array
|
Object |
getObject()
Get first item as an object.
|
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.
|
int |
getOffset() |
PositionIterator |
getPositionIterator(int... axes) |
Dataset |
getRealPart() |
Dataset |
getRealView() |
int[] |
getShapeRef()
The shape (or array of lengths for each dimension) of the dataset can be empty for zero-rank
datasets and null for null datasets
|
short |
getShort()
Get first item as a short.
|
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.
|
Dataset |
getSlice(IMonitor mon,
int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
Dataset |
getSlice(IMonitor mon,
Slice... slice)
Get a slice of the dataset.
|
Dataset |
getSlice(IMonitor mon,
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.
|
IndexIterator |
getSliceIterator(int[] start,
int[] stop,
int[] step) |
IndexIterator |
getSliceIterator(SliceND slice) |
SliceIterator |
getSliceIteratorFromAxes(int[] pos,
boolean[] axes)
Get a slice iterator that is defined by a starting position and a set of axes to include
|
Dataset |
getSliceView(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
Dataset |
getSliceView(Slice... slice)
Get a slice of the dataset.
|
Dataset |
getSliceView(SliceND slice)
Get a slice of the dataset.
|
int[] |
getStrides() |
String |
getString()
Get first item as a string.
|
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.
|
Dataset |
getTransposedView(int... axes)
Permute copy of dataset's axes so that given order is old order:
|
Dataset |
getUniqueItems()
Get unique items
|
Dataset |
getView(boolean deepCopyMetadata) |
boolean |
hasFloatingPointElements() |
Dataset |
iadd(Object o)
In-place addition
|
Dataset |
idivide(Object o)
In-place division
|
Dataset |
ifloor()
In-place floor
|
Dataset |
ifloorDivide(Object o)
In-place floor division
|
Dataset |
imultiply(Object o)
In-place multiplication
|
Dataset |
ipower(Object o)
In-place raise to power of argument
|
Dataset |
iremainder(Object o)
In-place remainder of division
|
boolean |
isCompatibleWith(ILazyDataset g)
This method takes a dataset and checks its shape against the current dataset.
|
boolean |
isComplex() |
Dataset |
isubtract(Object o)
In-place subtraction
|
Dataset |
max(int[] axes,
boolean... ignoreInvalids) |
Dataset |
max(int axis,
boolean... ignoreInvalids) |
Dataset |
mean(int[] axes,
boolean... ignoreInvalids) |
Dataset |
mean(int axis,
boolean... ignoreInvalids) |
Dataset |
min(int[] axes,
boolean... ignoreInvalids) |
Dataset |
min(int axis,
boolean... ignoreInvalids) |
void |
overrideInternal(Serializable buffer,
int... shape)
Set the buffer that backs the dataset and its shape
|
Number |
peakToPeak(boolean... ignoreInvalids) |
Dataset |
peakToPeak(int[] axes,
boolean... ignoreInvalids) |
Dataset |
peakToPeak(int axis,
boolean... ignoreInvalids) |
Object |
product(boolean... ignoreInvalids) |
Dataset |
product(int[] axes,
boolean... ignoreInvalids) |
Dataset |
product(int axis,
boolean... ignoreInvalids) |
Dataset |
reshape(int... shape)
Returns new dataset with new shape but old data if possible, otherwise a copy is made
|
double |
residual(Object o)
Calculate residual of dataset with object
See
residual(Object o, boolean ignoreNaNs) with ignoreNaNs = false |
double |
residual(Object o,
boolean ignoreNaNs)
Calculate residual of dataset with object
|
double |
residual(Object o,
Dataset weight,
boolean ignoreNaNs)
Calculate residual of dataset with object and weight.
|
double |
rootMeanSquare(boolean... ignoreInvalids) |
Dataset |
rootMeanSquare(int[] axes,
boolean... ignoreInvalids) |
Dataset |
rootMeanSquare(int axis,
boolean... ignoreInvalids) |
void |
set(Object obj)
Set the value given by object at the first 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.
|
Dataset |
setBy1DIndex(Object obj,
Dataset index)
This is modelled after the NumPy set item with an index dataset
|
Dataset |
setByBoolean(Object obj,
Dataset selection)
This is modelled after the NumPy set item with a condition specified by a boolean dataset
|
Dataset |
setByIndexes(Object obj,
Object... indexes)
This is modelled after the NumPy set item with an array of indexing objects
|
void |
setDirty()
This method allows anything that dirties the dataset to clear various metadata values
so that the other methods can work correctly.
|
void |
setErrorBuffer(Serializable buffer)
Set the buffer that backs the (squared) error data
|
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.
|
Dataset |
setSlice(Object obj,
IndexIterator iterator) |
Dataset |
setSlice(Object obj,
int[] start,
int[] stop,
int[] step)
This is modelled after the NumPy array slice
|
Dataset |
setSlice(Object obj,
Slice... slice)
This is modelled after the NumPy array slice
|
Dataset |
setSlice(Object obj,
SliceND slice)
This is modelled after the NumPy array slice
|
Dataset |
sort(Integer axis)
In-place sort of dataset
|
Dataset |
squeeze()
Remove dimensions of 1 in shape of the dataset
|
Dataset |
squeeze(boolean onlyFromEnds)
Remove dimensions of 1 in shape of the dataset from ends only if true
|
Dataset |
squeezeEnds()
Remove dimensions of 1 from ends of shape of the dataset
|
double |
stdDeviation()
Standard deviation is square root of the variance
|
double |
stdDeviation(boolean isWholePopulation,
boolean... ignoreInvalids)
Standard deviation is square root of the variance
|
Dataset |
stdDeviation(int axis)
Standard deviation is square root of the variance
|
Dataset |
stdDeviation(int[] axes)
Standard deviation is square root of the variance
|
Dataset |
stdDeviation(int[] axes,
boolean isWholePopulation,
boolean... ignoreInvalids)
Standard deviation is square root of the variance
|
Dataset |
stdDeviation(int axis,
boolean isWholePopulation,
boolean... ignoreInvalids)
Standard deviation is square root of the variance
|
Object |
sum(boolean... ignoreInvalids) |
Dataset |
sum(int[] axes,
boolean... ignoreInvalids) |
Dataset |
sum(int axis,
boolean... ignoreInvalids) |
Dataset |
swapAxes(int axis1,
int axis2)
Swap two axes in dataset
|
Dataset |
synchronizedCopy()
This is a synchronized version of the clone method
|
String |
toString(boolean showData) |
Dataset |
transpose(int... axes)
|
double |
variance() |
double |
variance(boolean isWholePopulation,
boolean... ignoreInvalids)
The sample variance can be calculated in two ways: if the dataset is considered as the
entire population then the sample variance is simply the second central moment:
|
Dataset |
variance(int axis) |
Dataset |
variance(int[] axes) |
Dataset |
variance(int[] axes,
boolean isWholePopulation,
boolean... ignoreInvalids) |
Dataset |
variance(int axis,
boolean isWholePopulation,
boolean... ignoreInvalids) |
getBoolean, getByte, getDouble, getError, getErrorArray, getFloat, getInt, getItemBytes, getLong, getMetadata, getObject, getShort, getString, max, maxPos, mean, min, minPos, resize, set, setStringFormat
addMetadata, clearMetadata, getElementClass, getElementsPerItem, getRank, getShape, getSize, hasErrors, setErrors, setMetadata, setShape
getFirstMetadata, getMetadata
static final int BOOL
static final int INT8
static final int INT16
static final int INT32
static final int INT
static final int INT64
static final int FLOAT32
static final int FLOAT64
static final int FLOAT
static final int COMPLEX64
static final int COMPLEX128
static final int COMPLEX
static final int STRING
static final int OBJECT
static final int DATE
static final int ARRAYMUL
static final int ARRAYINT8
static final int RGB8
static final int ARRAYINT16
static final int RGB
static final int ARRAYINT32
static final int ARRAYINT64
static final int ARRAYFLOAT32
static final int ARRAYFLOAT64
static final long serialVersionUID
int[] getShapeRef()
int getDType()
int[] getStrides()
int getOffset()
boolean hasFloatingPointElements()
int getNbytes()
Serializable getBuffer()
void overrideInternal(Serializable buffer, int... shape)
This is very, very dangerous. Please use carefully
buffer
- (can be null to leave unchanged)shape
- (can be null to leave unchanged)Dataset synchronizedCopy()
Dataset getView(boolean deepCopyMetadata)
deepCopyMetadata
- if true then deep-copy metadataDataset getBroadcastView(int... shape)
shape
- to use for broadcastString toString(boolean showData)
showData
- if true, show dataDataset squeezeEnds()
ILazyDataset
squeezeEnds
in interface IDataset
squeezeEnds
in interface ILazyDataset
Dataset squeeze()
IDataset
Dataset squeeze(boolean onlyFromEnds)
IDataset
Dataset clone()
IDataset
clone
in interface IDataset
clone
in interface ILazyDataset
void setDirty()
int[] getNDPosition(int n)
n
- The index in the arrayint get1DIndex(int... n)
n
- the integer array specifying the n-D positionint checkAxis(int axis)
axis
- to checkboolean isCompatibleWith(ILazyDataset g)
g
- The dataset to be comparedvoid checkCompatibility(ILazyDataset g) throws IllegalArgumentException
g
- The dataset to be comparedIllegalArgumentException
- This will be thrown if there is a problem with the compatibilityDataset reshape(int... shape)
shape
- new shapeboolean isComplex()
Dataset getRealPart()
Dataset getRealView()
Dataset getErrors()
getErrors
in interface IDataset
getErrors
in interface ILazyDataset
Dataset getErrorBuffer()
void setErrorBuffer(Serializable buffer)
buffer
- the buffer which contains the (squared) error information (can be null)@Deprecated Dataset copy(int dtype)
copy(Class)
dtype
- dataset type<T extends Dataset> T copy(Class<T> clazz)
T
- dataset sub-interfaceclazz
- dataset sub-interface@Deprecated Dataset cast(int dtype)
cast(Class)
dtype
- dataset type<T extends Dataset> T cast(Class<T> clazz)
T
- dataset sub-interfaceclazz
- dataset sub-interface<T extends Dataset> T cast(int isize, Class<T> clazz, boolean repeat)
T
- dataset sub-interfaceisize
- item sizeclazz
- dataset sub-interfacerepeat
- if true, repeat elements over item@Deprecated Dataset cast(boolean repeat, int dtype, int isize)
cast(int, Class, boolean)
repeat
- if true, repeat elements over itemdtype
- dataset typeisize
- item sizeIntegerDataset getIndices()
Dataset getTransposedView(int... axes)
IDataset
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 IDataset
getTransposedView
in interface ILazyDataset
axes
- if zero length then axes order reversedDataset transpose(int... axes)
axes
- if zero length then axes order reversedDataset swapAxes(int axis1, int axis2)
axis1
- to swapaxis2
- to swapDataset flatten()
Dataset getUniqueItems()
IndexIterator getIterator(boolean withPosition)
withPosition
- set true if position is neededIndexIterator getIterator()
PositionIterator getPositionIterator(int... axes)
axes
- axes to omit from iteratorIndexIterator getSliceIterator(int[] start, int[] stop, int[] step)
start
- specifies the starting indexesstop
- specifies the stopping indexes (nb, these are not included in the slice)step
- specifies the steps in the sliceIndexIterator getSliceIterator(SliceND slice)
slice
- an n-D sliceSliceIterator getSliceIteratorFromAxes(int[] pos, boolean[] axes)
pos
- starting position (can be null for origin)axes
- to includevoid copyItemsFromAxes(int[] pos, boolean[] axes, Dataset dest)
pos
- starting position (can be null for origin)axes
- if true, copydest
- destinationvoid setItemsOnAxes(int[] pos, boolean[] axes, Object src)
pos
- starting position (can be null for origin)axes
- if true, copysrc
- sourceBooleanIterator getBooleanIterator(Dataset choice)
choice
- where true values are usedBooleanIterator getBooleanIterator(Dataset choice, boolean value)
choice
- to usevalue
- to match to items in choiceDataset getByBoolean(Dataset selection)
selection
- a boolean dataset of same shape to use for selecting itemsDataset setByBoolean(Object obj, Dataset selection)
obj
- specifies the object used to set the selected itemsselection
- a boolean dataset of same shape to use for selecting itemsDataset getBy1DIndex(IntegerDataset index)
index
- an integer datasetDataset getByIndexes(Object... indexes)
indexes
- an array of integer dataset, boolean dataset, slices or null entries (same as
full slices)Dataset setBy1DIndex(Object obj, Dataset index)
obj
- specifies the object used to set the selected itemsindex
- an integer datasetDataset setByIndexes(Object obj, Object... indexes)
obj
- specifies the object used to set the selected itemsindexes
- an array of integer dataset, boolean dataset, slices or null entries (same as
full slices)Dataset fill(Object obj)
obj
- fill valueboolean getElementBooleanAbs(int index)
index
- in arraydouble getElementDoubleAbs(int index)
index
- in arraylong getElementLongAbs(int index)
index
- in arrayObject getObjectAbs(int index)
index
- in arrayString getStringAbs(int index)
index
- in arrayvoid setObjectAbs(int index, Object obj)
index
- in arrayobj
- value to setObject getObject()
Object getObject(int i)
i
- position in first dimensionObject getObject(int i, int j)
i
- position in first dimensionj
- position in second dimensionString getString()
String getString(int i)
i
- position in first dimensionString getString(int i, int j)
i
- position in first dimensionj
- position in second dimensiondouble getDouble()
double getDouble(int i)
i
- position in first dimensiondouble getDouble(int i, int j)
i
- position in first dimensionj
- position in second dimensionfloat getFloat()
float getFloat(int i)
i
- position in first dimensionfloat getFloat(int i, int j)
i
- position in first dimensionj
- position in second dimensionlong getLong()
long getLong(int i)
i
- position in first dimensionlong getLong(int i, int j)
i
- position in first dimensionj
- position in second dimensionint getInt()
int getInt(int i)
i
- position in first dimensionint getInt(int i, int j)
i
- position in first dimensionj
- position in second dimensionshort getShort()
short getShort(int i)
i
- position in first dimensionshort getShort(int i, int j)
i
- position in first dimensionj
- position in second dimensionbyte getByte()
byte getByte(int i)
i
- position in first dimensionbyte getByte(int i, int j)
i
- position in first dimensionj
- position in second dimensionboolean getBoolean()
boolean getBoolean(int i)
i
- position in first dimensionboolean getBoolean(int i, int j)
i
- position in first dimensionj
- position in second dimensiondouble getError()
double getError(int i)
i
- position in first dimensiondouble getError(int i, int j)
i
- position in first dimensionj
- position in second dimensiondouble[] getErrorArray(int i)
i
- position in first dimensiondouble[] getErrorArray(int i, int j)
i
- position in first dimensionj
- position in second dimensionvoid set(Object obj)
obj
- value to setvoid set(Object obj, int i)
obj
- value to seti
- position in first dimensionvoid set(Object obj, int i, int j)
obj
- value to seti
- position in first dimensionj
- position in second dimensionDataset sort(Integer axis)
axis
- to sort along. If null, then the flattened view is sortedDataset getSlice(int[] start, int[] stop, int[] step)
ILazyDataset
getSlice
in interface IDataset
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)Dataset getSlice(IMonitor mon, int[] start, int[] stop, int[] step)
ILazyDataset
getSlice
in interface ILazyDataset
mon
- can be nullstart
- 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)Dataset getSlice(Slice... slice)
ILazyDataset
getSlice
in interface IDataset
getSlice
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)Dataset getSlice(IMonitor mon, Slice... slice)
ILazyDataset
getSlice
in interface ILazyDataset
mon
- can be nullslice
- an array of slice objects (the array can be null or contain nulls)Dataset getSlice(SliceND slice)
ILazyDataset
getSlice
in interface IDataset
getSlice
in interface ILazyDataset
slice
- an n-D sliceDataset getSlice(IMonitor mon, SliceND slice)
ILazyDataset
getSlice
in interface ILazyDataset
mon
- can be nullslice
- an n-D sliceDataset getSliceView(int[] start, int[] stop, int[] step)
IDataset
getSliceView
in interface IDataset
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)Dataset getSliceView(Slice... slice)
IDataset
getSliceView
in interface IDataset
getSliceView
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)Dataset getSliceView(SliceND slice)
IDataset
getSliceView
in interface IDataset
getSliceView
in interface ILazyDataset
slice
- an nD slice objectDataset setSlice(Object obj, int[] start, int[] stop, int[] step)
obj
- specifies the object used to set the specified slicestart
- specifies the starting indexesstop
- specifies the stopping indexes (nb, these are not included in the slice)step
- specifies the steps in the sliceDataset setSlice(Object obj, Slice... slice)
obj
- specifies the object used to set the specified sliceslice
- destination where items of obj are setDataset setSlice(Object obj, SliceND slice)
obj
- specifies the object used to set the specified sliceslice
- destination where items of obj are setDataset setSlice(Object obj, IndexIterator iterator)
obj
- specifies the object used to set the specified sliceiterator
- specifies the slice iteratorvoid fillDataset(Dataset other, IndexIterator iter)
other
- destination for items from iterationiter
- over current datasetboolean all()
Dataset all(int axis)
axis
- to check overboolean any()
Dataset any(int axis)
axis
- to check overDataset isubtract(Object o)
o
- object to useDataset imultiply(Object o)
o
- object to useDataset idivide(Object o)
o
- object to useDataset ifloorDivide(Object o)
o
- object to useDataset iremainder(Object o)
o
- object to useDataset ipower(Object o)
o
- object to usedouble residual(Object o)
residual(Object o, boolean ignoreNaNs)
with ignoreNaNs = falseo
- object to usedouble residual(Object o, boolean ignoreNaNs)
o
- object to useignoreNaNs
- if true, skip NaNsdouble residual(Object o, Dataset weight, boolean ignoreNaNs)
o
- object to useweight
- to useignoreNaNs
- if true, skip NaNsboolean containsInfs()
boolean containsNans()
boolean containsInvalidNumbers()
Dataset max(int axis, boolean... ignoreInvalids)
axis
- to reduce overignoreInvalids
- - Can be null, empty, or one or more booleans. By default, all booleans
are false. If the first boolean is true, will ignore NaNs and ignore infinities. Use the second
boolean to ignore infinities separately.Dataset max(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
Dataset min(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset min(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
int argMax(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset argMax(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
int argMin(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset argMin(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Number peakToPeak(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset peakToPeak(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset peakToPeak(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
long count(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset count(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset count(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
Object sum(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset sum(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset sum(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
Object product(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset product(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset product(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
Dataset mean(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset mean(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
double variance()
with isWholePopulation = false
double variance(boolean isWholePopulation, boolean... ignoreInvalids)
sum((x_i - m)^2)/N where {x_i} are set of N population values and m is the mean m = sum(x_i)/NOtherwise, if the dataset is a set of samples (with replacement) from the population then
sum((x_i - m)^2)/(N-1) where {x_i} are set of N sample values and m is the unbiased estimate of the mean m = sum(x_i)/NNote that the second definition is also the unbiased estimator of population variance.
isWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
Dataset variance(int axis)
axis
- to reduce alongwith isWholePopulation = false
Dataset variance(int[] axes)
axes
- to reduce overwith isWholePopulation = false
Dataset variance(int axis, boolean isWholePopulation, boolean... ignoreInvalids)
axis
- to reduce alongisWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
Dataset variance(int[] axes, boolean isWholePopulation, boolean... ignoreInvalids)
axes
- to reduce overisWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
double stdDeviation()
with isWholePopulation = false
double stdDeviation(boolean isWholePopulation, boolean... ignoreInvalids)
isWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
variance(boolean, boolean...)
Dataset stdDeviation(int axis)
axis
- to reduce alongwith isWholePopulation = false
Dataset stdDeviation(int[] axes)
axes
- to reduce overwith isWholePopulation = false
Dataset stdDeviation(int axis, boolean isWholePopulation, boolean... ignoreInvalids)
axis
- to reduce alongisWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
Dataset stdDeviation(int[] axes, boolean isWholePopulation, boolean... ignoreInvalids)
axes
- to reduce overisWholePopulation
- if false, consider as sample of populationignoreInvalids
- - see max(int, boolean...)
double rootMeanSquare(boolean... ignoreInvalids)
ignoreInvalids
- - see IDataset.max(boolean...)
Dataset rootMeanSquare(int axis, boolean... ignoreInvalids)
axis
- to reduce alongignoreInvalids
- - see max(int, boolean...)
Dataset rootMeanSquare(int[] axes, boolean... ignoreInvalids)
axes
- to reduce overignoreInvalids
- - see max(int, boolean...)
Copyright © 2014–2022 Eclipse Foundation. All rights reserved.