org.eclipse.january.dataset

## Class ObjectDataset

- java.lang.Object
- - org.eclipse.january.dataset.LazyDatasetBase
  - - org.eclipse.january.dataset.AbstractDataset
    - - org.eclipse.january.dataset.ObjectDatasetBase
      - - org.eclipse.january.dataset.ObjectDataset

- All Implemented Interfaces:
    Serializable, Dataset, IDataset, ILazyDataset, IMetadataProvider, INameable

      public class ObjectDataset
      extends ObjectDatasetBase

  Extend dataset for objects
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.january.dataset.ObjectDatasetBase

      `data`

    - ### Fields inherited from class org.eclipse.january.dataset.AbstractDataset

      `base, BLOCK_CLOSE, BLOCK_OPEN, odata, offset, size, stride, stringFormat`

    - ### Fields inherited from class org.eclipse.january.dataset.LazyDatasetBase

      `metadata, name, shape`

    - ### Fields inherited from interface org.eclipse.january.dataset.Dataset

      `ARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, RGB8, STRING`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ObjectDataset` | `clone()` Clone dataset
    `boolean` | `containsInfs()`
    `boolean` | `containsNans()`
    `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.
    `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.
    `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.
    `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.
    `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.
    `ObjectDataset` | `getSlice(SliceIterator siter)` Get a slice of the dataset.
    `String` | `getStringAbs(int index)` Get an item from given absolute index as a string.
    `ObjectDataset` | `getView(boolean deepCopyMetadata)`
    `ObjectDataset` | `iadd(Object o)` In-place addition
    `ObjectDataset` | `idivide(Object o)` In-place division
    `ObjectDataset` | `ifloor()` In-place floor
    `ObjectDataset` | `imultiply(Object o)` In-place multiplication
    `ObjectDataset` | `ipower(Object o)` In-place raise to power of argument
    `ObjectDataset` | `iremainder(Object o)` In-place remainder of division
    `ObjectDataset` | `isubtract(Object o)` In-place subtraction
    `int[]` | `maxPos(boolean... ignoreInvalids)`
    `int[]` | `minPos(boolean... ignoreInvalids)`
    `double` | `residual(Object o)` Calculate residual of dataset with object See `Dataset.residual(Object o, boolean ignoreNaNs)` with ignoreNaNs = false

    - ### Methods inherited from class org.eclipse.january.dataset.ObjectDatasetBase

      `containsInvalidNumbers, copyItemsFromAxes, createArray, equals, fill, fillDataset, get, get, get, get, getAbs, getBufferLength, getData, getObject, getObject, getObject, getObject, getObjectAbs, getString, getString, getString, getString, getUniqueItems, hashCode, residual, resize, set, set, set, set, setAbs, setBy1DIndex, setByBoolean, setByIndexes, setData, setItem, setItem, setItem, setItem, setItemDirect, setItemsOnAxes, setObjectAbs, setSlice, sort`

    - ### Methods inherited from class org.eclipse.january.dataset.AbstractDataset

      `all, all, any, any, argMax, argMax, argMin, argMin, calcSteps, cast, cast, cast, cast, checkAxis, checkAxis, checkCompatibility, copy, copy, copyToView, count, count, count, createStrides, createStrides, createStrides, createStrides, fillData, flatten, get1DIndex, get1DIndex, get1DIndex, get1DIndexFromShape, get1DIndexFromShape, getBooleanIterator, getBooleanIterator, getBroadcastView, getBuffer, getBy1DIndex, getByBoolean, getByIndexes, getDType, getElementClass, getElementsPerItem, getError, getError, getError, getError, getErrorArray, getErrorArray, getErrorArray, getErrorBuffer, getErrors, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getIterator, getMaxLineLength, 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, internalGetSliceIterator, isCompatibleWith, isComplex, max, max, max, mean, mean, mean, min, min, min, overrideInternal, peakToPeak, peakToPeak, peakToPeak, product, product, product, reshape, residual, rootMeanSquare, rootMeanSquare, rootMeanSquare, setErrorBuffer, setMaxLineLength, setShape, setSlice, setSlice, setSlice, setStringFormat, squeeze, squeeze, squeezeEnds, stdDeviation, stdDeviation, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, sum, sum, swapAxes, synchronizedCopy, toString, toString, transpose, variance, variance, variance, variance, variance, variance`

    - ### Methods inherited from class org.eclipse.january.dataset.LazyDatasetBase

      `addMetadata, checkPermutatedAxes, checkSliceND, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadata`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.january.dataset.Dataset

      `setDirty`

    - ### Methods inherited from interface org.eclipse.january.dataset.IDataset

      `getMetadata`

    - ### Methods inherited from interface org.eclipse.january.dataset.ILazyDataset

      `addMetadata, clearMetadata, hasErrors, setErrors, setMetadata`

    - ### Methods inherited from interface org.eclipse.january.dataset.IMetadataProvider

      `getFirstMetadata, getMetadata`

    - ### Methods inherited from interface org.eclipse.january.INameable

      `getName, setName`

- - ### Method Detail

    - #### getView

          public ObjectDataset getView(boolean deepCopyMetadata)

      Specified by:
        `getView` in interface `Dataset`
      Overrides:
        `getView` in class `ObjectDatasetBase`
      Parameters:
        `deepCopyMetadata` - if true then deep-copy metadata
      Returns:
        whole view of dataset (i.e. data buffer is shared)

    - #### clone

          public ObjectDataset clone()

      Description copied from interface: `ILazyDataset`
      Clone dataset
      Specified by:
        `clone` in interface `Dataset`
      Specified by:
        `clone` in interface `IDataset`
      Specified by:
        `clone` in interface `ILazyDataset`
      Overrides:
        `clone` in class `ObjectDatasetBase`
      Returns:
        a (shallow) copy of dataset

    - #### getSlice

          public ObjectDataset getSlice(SliceIterator siter)

      Description copied from class: `AbstractDataset`
      Get a slice of the dataset. The returned dataset is a copied selection of items
      Overrides:
        `getSlice` in class `ObjectDatasetBase`
      Parameters:
        `siter` - Slice iterator
      Returns:
        The dataset of the sliced data

    - #### getElementBooleanAbs

          public boolean getElementBooleanAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a boolean. See warning in interface doc
      Specified by:
        `getElementBooleanAbs` in interface `Dataset`
      Overrides:
        `getElementBooleanAbs` in class `ObjectDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as boolean

    - #### getElementDoubleAbs

          public double getElementDoubleAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a double. See warning in interface doc
      Specified by:
        `getElementDoubleAbs` in interface `Dataset`
      Overrides:
        `getElementDoubleAbs` in class `ObjectDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as double

    - #### getElementLongAbs

          public long getElementLongAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a long. See warning in interface doc
      Specified by:
        `getElementLongAbs` in interface `Dataset`
      Overrides:
        `getElementLongAbs` in class `ObjectDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as long

    - #### getDouble

          public double getDouble()

      Description copied from interface: `Dataset`
      Get first item as a double. The dataset must not be null
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getDouble

          public double getDouble(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a double. The dataset must be 1D
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getDouble

          public double getDouble(int i,
                                  int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a double. The dataset must be 2D
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getDouble

          public double getDouble(int... pos)

      Specified by:
        `getDouble` in interface `IDataset`
      Overrides:
        `getDouble` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a double

    - #### getFloat

          public float getFloat()

      Description copied from interface: `Dataset`
      Get first item as a float. The dataset must not be null
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getFloat

          public float getFloat(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a float. The dataset must be 1D
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getFloat

          public float getFloat(int i,
                                int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a float. The dataset must be 2D
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getFloat

          public float getFloat(int... pos)

      Specified by:
        `getFloat` in interface `IDataset`
      Overrides:
        `getFloat` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a float

    - #### getLong

          public long getLong()

      Description copied from interface: `Dataset`
      Get first item as a long. The dataset must not be null
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getLong

          public long getLong(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a long. The dataset must be 1D
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getLong

          public long getLong(int i,
                              int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a long. The dataset must be 2D
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getLong

          public long getLong(int... pos)

      Specified by:
        `getLong` in interface `IDataset`
      Overrides:
        `getLong` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a long

    - #### getInt

          public int getInt()

      Description copied from interface: `Dataset`
      Get first item as an int. The dataset must not be null
      Specified by:
        `getInt` in interface `Dataset`
      Overrides:
        `getInt` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getInt

          public int getInt(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as an int. The dataset must be 1D
      Specified by:
        `getInt` in interface `Dataset`
      Overrides:
        `getInt` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getInt

          public int getInt(int i,
                            int j)

      Description copied from interface: `Dataset`
      Get an item from given position as an int. The dataset must be 2D
      Specified by:
        `getInt` in interface `Dataset`
      Overrides:
        `getInt` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getInt

          public int getInt(int... pos)

      Specified by:
        `getInt` in interface `IDataset`
      Overrides:
        `getInt` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as an int

    - #### getShort

          public short getShort()

      Description copied from interface: `Dataset`
      Get first item as a short. The dataset must not be null
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getShort

          public short getShort(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a short. The dataset must be 1D
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getShort

          public short getShort(int i,
                                int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a short. The dataset must be 2D
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getShort

          public short getShort(int... pos)

      Specified by:
        `getShort` in interface `IDataset`
      Overrides:
        `getShort` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a short

    - #### getByte

          public byte getByte()

      Description copied from interface: `Dataset`
      Get first item as a byte. The dataset must not be null
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getByte

          public byte getByte(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a byte. The dataset must be 1D
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getByte

          public byte getByte(int i,
                              int j)

      Description copied from interface: `Dataset`
      Get an item from given positionj as a byte. The dataset must be 2D
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getByte

          public byte getByte(int... pos)

      Specified by:
        `getByte` in interface `IDataset`
      Overrides:
        `getByte` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a byte

    - #### getBoolean

          public boolean getBoolean()

      Description copied from interface: `Dataset`
      Get first item as a boolean. The dataset must not be null
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `ObjectDatasetBase`
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a boolean. The dataset must be 1D
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int i,
                                    int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a boolean. The dataset must be 2D
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `ObjectDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int... pos)

      Specified by:
        `getBoolean` in interface `IDataset`
      Overrides:
        `getBoolean` in class `ObjectDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a boolean

    - #### getStringAbs

          public String getStringAbs(int index)

      Description copied from interface: `Dataset`
      Get an item from given absolute index as a string. See warning in interface doc
      Specified by:
        `getStringAbs` in interface `Dataset`
      Overrides:
        `getStringAbs` in class `ObjectDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        item

    - #### minPos

          public int[] minPos(boolean... ignoreInvalids)

      Specified by:
        `minPos` in interface `IDataset`
      Overrides:
        `minPos` in class `ObjectDatasetBase`
      Parameters:
        `ignoreInvalids` - - see `IDataset.max(boolean...)`
      Returns:
        Position of minimum value (or first position if there are more than one)

    - #### maxPos

          public int[] maxPos(boolean... ignoreInvalids)

      Specified by:
        `maxPos` in interface `IDataset`
      Overrides:
        `maxPos` in class `ObjectDatasetBase`
      Parameters:
        `ignoreInvalids` - - see `IDataset.max(boolean...)`
      Returns:
        Position of maximum value (or first position if there are more than one)

    - #### containsInfs

          public boolean containsInfs()

      Specified by:
        `containsInfs` in interface `Dataset`
      Overrides:
        `containsInfs` in class `ObjectDatasetBase`
      Returns:
        true if dataset contains any infinities

    - #### containsNans

          public boolean containsNans()

      Specified by:
        `containsNans` in interface `Dataset`
      Overrides:
        `containsNans` in class `ObjectDatasetBase`
      Returns:
        true if dataset contains any NaNs

    - #### iadd

          public ObjectDataset iadd(Object o)

      Description copied from interface: `Dataset`
      In-place addition
      Specified by:
        `iadd` in interface `Dataset`
      Overrides:
        `iadd` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        sum dataset

    - #### isubtract

          public ObjectDataset isubtract(Object o)

      Description copied from interface: `Dataset`
      In-place subtraction
      Specified by:
        `isubtract` in interface `Dataset`
      Overrides:
        `isubtract` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        difference dataset

    - #### imultiply

          public ObjectDataset imultiply(Object o)

      Description copied from interface: `Dataset`
      In-place multiplication
      Specified by:
        `imultiply` in interface `Dataset`
      Overrides:
        `imultiply` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        product dataset

    - #### idivide

          public ObjectDataset idivide(Object o)

      Description copied from interface: `Dataset`
      In-place division
      Specified by:
        `idivide` in interface `Dataset`
      Overrides:
        `idivide` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        dividend dataset

    - #### iremainder

          public ObjectDataset iremainder(Object o)

      Description copied from interface: `Dataset`
      In-place remainder of division
      Specified by:
        `iremainder` in interface `Dataset`
      Overrides:
        `iremainder` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        remaindered dataset

    - #### ifloor

          public ObjectDataset ifloor()

      Description copied from interface: `Dataset`
      In-place floor
      Specified by:
        `ifloor` in interface `Dataset`
      Overrides:
        `ifloor` in class `ObjectDatasetBase`
      Returns:
        floored dataset

    - #### ipower

          public ObjectDataset ipower(Object o)

      Description copied from interface: `Dataset`
      In-place raise to power of argument
      Specified by:
        `ipower` in interface `Dataset`
      Overrides:
        `ipower` in class `ObjectDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        raised dataset

    - #### residual

          public double residual(Object o)

      Description copied from interface: `Dataset`
      Calculate residual of dataset with object See `Dataset.residual(Object o, boolean ignoreNaNs)` with ignoreNaNs = false
      Specified by:
        `residual` in interface `Dataset`
      Overrides:
        `residual` in class `AbstractDataset`
      Parameters:
        `o` - object to use
      Returns:
        sum of the squares of the differences

Copyright © 2014–2022 Eclipse Foundation. All rights reserved.