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

      `catchExceptions, logger, 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, STRING`

  - ### Method Summary

    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 with object o
    `ObjectDataset` | `idivide(Object o)` In-place division with object o
    `ObjectDataset` | `ifloor()` In-place floor
    `ObjectDataset` | `imultiply(Object o)` In-place multiplication with object o
    `ObjectDataset` | `ipower(Object o)` In-place raise to power of object o
    `ObjectDataset` | `iremainder(Object o)` In-place remainder
    `ObjectDataset` | `isubtract(Object o)` In-place subtraction with object o
    `int[]` | `maxPos(boolean... ignoreInvalids)`
    `int[]` | `minPos(boolean... ignoreInvalids)`
    `double` | `residual(Object o)` Calculate residual of dataset with object o 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, getDType, 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, 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, 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, variance`

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

      `addMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, 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`

- - ### 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`
      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`
      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`
      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`
      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`
      Returns:
        item

    - #### getDouble

          public double getDouble(int... pos)

      Specified by:
        `getDouble` in interface `IDataset`
      Overrides:
        `getDouble` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getFloat

          public float getFloat(int... pos)

      Specified by:
        `getFloat` in interface `IDataset`
      Overrides:
        `getFloat` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getLong

          public long getLong(int... pos)

      Specified by:
        `getLong` in interface `IDataset`
      Overrides:
        `getLong` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getInt

          public int getInt(int... pos)

      Specified by:
        `getInt` in interface `IDataset`
      Overrides:
        `getInt` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getShort

          public short getShort(int... pos)

      Specified by:
        `getShort` in interface `IDataset`
      Overrides:
        `getShort` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getByte

          public byte getByte(int... pos)

      Specified by:
        `getByte` in interface `IDataset`
      Overrides:
        `getByte` in class `ObjectDatasetBase`
      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`
      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`
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int... pos)

      Specified by:
        `getBoolean` in interface `IDataset`
      Overrides:
        `getBoolean` in class `ObjectDatasetBase`
      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`
      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 with object o
      Specified by:
        `iadd` in interface `Dataset`
      Overrides:
        `iadd` in class `ObjectDatasetBase`
      Returns:
        sum dataset

    - #### isubtract

          public ObjectDataset isubtract(Object o)

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

    - #### imultiply

          public ObjectDataset imultiply(Object o)

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

    - #### idivide

          public ObjectDataset idivide(Object o)

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

    - #### iremainder

          public ObjectDataset iremainder(Object o)

      Description copied from interface: `Dataset`
      In-place remainder
      Specified by:
        `iremainder` in interface `Dataset`
      Overrides:
        `iremainder` in class `ObjectDatasetBase`
      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 object o
      Specified by:
        `ipower` in interface `Dataset`
      Overrides:
        `ipower` in class `ObjectDatasetBase`
      Returns:
        raised dataset

    - #### residual

          public double residual(Object o)

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

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