public interface IDataset extends ILazyDataset
The position array used in the getters
Modifier and Type | Method and Description |
---|---|
IDataset |
clone()
Clone dataset, making new copy of data
|
boolean |
getBoolean(int... pos) |
byte |
getByte(int... pos) |
double |
getDouble(int... pos) |
double |
getError(int... pos)
Get the error for a given position.
|
double[] |
getErrorArray(int... pos)
Get the error values for a single point in the dataset
|
IDataset |
getErrors()
Get the errors, if any.
|
float |
getFloat(int... pos) |
int |
getInt(int... pos) |
int |
getItemBytes() |
long |
getLong(int... pos) |
IMetadata |
getMetadata()
Deprecated.
Use
#getFirstMetadata(IMetadata.class) instead |
Object |
getObject(int... pos) |
short |
getShort(int... pos) |
IDataset |
getSlice(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
IDataset |
getSlice(Slice... slice)
Get a slice of the dataset.
|
IDataset |
getSlice(SliceND slice)
Get a slice of the dataset.
|
IDataset |
getSliceView(int[] start,
int[] stop,
int[] step)
Get a slice of the dataset.
|
IDataset |
getSliceView(Slice... slice)
Get a slice of the dataset.
|
IDataset |
getSliceView(SliceND slice)
Get a slice of the dataset.
|
String |
getString(int... pos) |
IDataset |
getTransposedView(int... axes)
Permute copy of dataset's axes so that given order is old order:
|
Number |
max(boolean... ignoreInvalids) |
int[] |
maxPos(boolean... ignoreInvalids) |
Object |
mean(boolean... ignoreInvalids) |
Number |
min(boolean... ignoreInvalids) |
int[] |
minPos(boolean... ignoreInvalids) |
void |
resize(int... newShape)
Change shape and size of dataset in-place
|
void |
set(Object obj,
int... pos)
Set the value given by object at given position
|
void |
setStringFormat(Format format)
Set string output format
|
IDataset |
squeeze()
Remove dimensions of 1 in shape of the dataset
|
IDataset |
squeeze(boolean onlyFromEnds)
Remove dimensions of 1 in shape of the dataset from ends only if true
|
IDataset |
squeezeEnds()
Remove dimensions of 1 from ends of shape of the dataset
|
addMetadata, clearMetadata, getElementClass, getElementsPerItem, getRank, getShape, getSize, getSlice, getSlice, getSlice, hasErrors, setErrors, setMetadata, setShape
getFirstMetadata, getMetadata
void setStringFormat(Format format)
format
- int getItemBytes()
double getDouble(int... pos)
pos
- long getLong(int... pos)
pos
- float getFloat(int... pos)
pos
- int getInt(int... pos)
pos
- short getShort(int... pos)
pos
- byte getByte(int... pos)
pos
- boolean getBoolean(int... pos)
pos
- void set(Object obj, int... pos)
obj
- pos
- void resize(int... newShape)
newShape
- IDataset squeezeEnds()
ILazyDataset
squeezeEnds
in interface ILazyDataset
IDataset squeeze(boolean onlyFromEnds)
onlyFromEnds
- Number max(boolean... ignoreInvalids)
ignoreInvalids
- - 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.UnsupportedOperationException
- if comparisons are not validObject mean(boolean... ignoreInvalids)
ignoreInvalids
- - see max(boolean...)
Number min(boolean... ignoreInvalids)
ignoreInvalids
- - see max(boolean...)
UnsupportedOperationException
- if comparisons are not validint[] minPos(boolean... ignoreInvalids)
ignoreInvalids
- - see max(boolean...)
int[] maxPos(boolean... ignoreInvalids)
ignoreInvalids
- - see max(boolean...)
IDataset clone()
clone
in interface ILazyDataset
@Deprecated IMetadata getMetadata()
#getFirstMetadata(IMetadata.class)
insteadgetMetadata
in interface IMetadataProvider
IDataset getSlice(int[] start, int[] stop, int[] step)
ILazyDataset
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)IDataset getSlice(Slice... slice)
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)IDataset getSlice(SliceND slice)
ILazyDataset
getSlice
in interface ILazyDataset
slice
- an n-D sliceIDataset getSliceView(int[] start, int[] stop, int[] step)
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)IDataset getSliceView(Slice... slice)
getSliceView
in interface ILazyDataset
slice
- an array of slice objects (the array can be null or contain nulls)IDataset getSliceView(SliceND slice)
getSliceView
in interface ILazyDataset
slice
- an nD slice objectIDataset getTransposedView(int... axes)
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
axes
- if zero length then axes order reversedIDataset getErrors()
ILazyDataset
getErrors
in interface ILazyDataset
double getError(int... pos)
pos
- double[] getErrorArray(int... pos)
pos
- of the point to be referencedCopyright © 2017. All rights reserved.