org.eclipse.january.dataset

## Class BooleanDataset

- java.lang.Object
- - org.eclipse.january.dataset.LazyDatasetBase
  - - org.eclipse.january.dataset.AbstractDataset
    - - org.eclipse.january.dataset.BooleanDatasetBase
      - - org.eclipse.january.dataset.BooleanDataset

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

      public class BooleanDataset
      extends BooleanDatasetBase

  Extend boolean base dataset for boolean values
  See Also:
    Serialized Form

- - ### Field Summary

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

      `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
    --- | ---
    `BooleanDataset` | `clone()` Clone dataset
    `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.
    `BooleanDataset` | `getSlice(SliceIterator siter)` Get a slice of the dataset.
    `String` | `getStringAbs(int index)` Get an item from given absolute index as a string.
    `BooleanDataset` | `getView(boolean deepCopyMetadata)`
    `BooleanDataset` | `iadd(Object b)` OR
    `BooleanDataset` | `idivide(Object b)` In-place division with object o
    `BooleanDataset` | `imultiply(Object b)` AND
    `BooleanDataset` | `ipower(Object b)` In-place raise to power of object o
    `BooleanDataset` | `iremainder(Object b)` In-place remainder
    `BooleanDataset` | `isubtract(Object b)` XOR
    `double` | `residual(Object b, Dataset w, boolean ignoreNaNs)` Calculate residual of dataset with object o and weight.

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

      `containsInfs, containsInvalidNumbers, containsNans, copyItemsFromAxes, createArray, equals, fill, fillDataset, get, get, get, get, getAbs, getBufferLength, getData, getDType, getObject, getObject, getObject, getObject, getObjectAbs, getString, getString, getString, getString, getUniqueItems, hashCode, ifloor, maxPos, minPos, 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, 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 BooleanDataset getView(boolean deepCopyMetadata)

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

    - #### clone

          public BooleanDataset 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 `BooleanDatasetBase`
      Returns:
        a (shallow) copy of dataset

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

    - #### getDouble

          public double getDouble(int... pos)

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

    - #### getFloat

          public float getFloat(int... pos)

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

    - #### getLong

          public long getLong(int... pos)

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

    - #### getInt

          public int getInt(int... pos)

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

    - #### getShort

          public short getShort(int... pos)

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

    - #### getByte

          public byte getByte(int... pos)

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

    - #### getBoolean

          public boolean getBoolean(int... pos)

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

    - #### getSlice

          public BooleanDataset 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 `BooleanDatasetBase`
      Parameters:
        `siter` - Slice iterator
      Returns:
        The dataset of the sliced data

    - #### iadd

          public BooleanDataset iadd(Object b)

      OR
      Specified by:
        `iadd` in interface `Dataset`
      Overrides:
        `iadd` in class `BooleanDatasetBase`
      Returns:
        sum dataset

    - #### isubtract

          public BooleanDataset isubtract(Object b)

      XOR
      Specified by:
        `isubtract` in interface `Dataset`
      Overrides:
        `isubtract` in class `BooleanDatasetBase`
      Returns:
        difference dataset

    - #### imultiply

          public BooleanDataset imultiply(Object b)

      AND
      Specified by:
        `imultiply` in interface `Dataset`
      Overrides:
        `imultiply` in class `BooleanDatasetBase`
      Returns:
        product dataset

    - #### idivide

          public BooleanDataset idivide(Object b)

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

    - #### iremainder

          public BooleanDataset iremainder(Object b)

      Description copied from interface: `Dataset`
      In-place remainder
      Specified by:
        `iremainder` in interface `Dataset`
      Overrides:
        `iremainder` in class `BooleanDatasetBase`
      Returns:
        remaindered dataset

    - #### ipower

          public BooleanDataset ipower(Object b)

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

    - #### residual

          public double residual(Object b,
                        Dataset w,
                        boolean ignoreNaNs)

      Description copied from interface: `Dataset`
      Calculate residual of dataset with object o and weight. The weight is used to multiply the squared differences
      Specified by:
        `residual` in interface `Dataset`
      Overrides:
        `residual` in class `BooleanDatasetBase`
        `ignoreNaNs` - if true, skip NaNs
      Returns:
        sum of the squares of the differences

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