org.eclipse.january.dataset

## Class BooleanNullIterator

- java.lang.Object
- - org.eclipse.january.dataset.IndexIterator
  - - org.eclipse.january.dataset.BooleanIterator
    - - org.eclipse.january.dataset.BooleanNullIterator

-     public class BooleanNullIterator
      extends BooleanIterator

  Class to run over a single dataset with NumPy broadcasting to promote shapes which have lower rank and outputs to a second dataset
  Since:
    2.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int[]` | `aDelta`
    `protected int[]` | `aShape`
    `protected int[]` | `aStride`
    `protected int` | `endrank`
    `protected int[]` | `oDelta`
    `protected int[]` | `oStride`
    `protected int[]` | `pos` position in dataset

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

      `aDataset, aMax, aStart, aStep, cDataset, cIndex, maxShape, oDataset, oIndex, oStart, oStep, outputA, value`

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BooleanNullIterator(Dataset a, Dataset o)`
    `BooleanNullIterator(Dataset a, Dataset o, boolean createIfNull)`
    `BooleanNullIterator(Dataset a, Dataset o, boolean createIfNull, boolean allowInteger, boolean allowComplex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `getFirstShape()`
    `int[]` | `getPos()`
    `boolean` | `hasNext()`
    `void` | `reset()` Reset iterator

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

      `createIterator, createIterator, createIterator, createIterator, getChoice, getOutput, getShape`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### aShape

          protected int[] aShape

    - #### aStride

          protected int[] aStride

    - #### oStride

          protected int[] oStride

    - #### endrank

          protected int endrank

    - #### pos

          protected int[] pos

      position in dataset

    - #### aDelta

          protected int[] aDelta

    - #### oDelta

          protected int[] oDelta

  - ### Constructor Detail

    - #### BooleanNullIterator

          public BooleanNullIterator(Dataset a,
                                     Dataset o)

      Parameters:
        `a` - dataset to iterate over
        `o` - output (can be null for new dataset, or a)

    - #### BooleanNullIterator

          public BooleanNullIterator(Dataset a,
                                     Dataset o,
                                     boolean createIfNull)

      Parameters:
        `a` - dataset to iterate over
        `o` - output (can be null for new dataset, or a)
        `createIfNull` - if true create the output dataset if that is null (by default, can create float or complex datasets)

    - #### BooleanNullIterator

          public BooleanNullIterator(Dataset a,
                                     Dataset o,
                                     boolean createIfNull,
                                     boolean allowInteger,
                                     boolean allowComplex)

      Parameters:
        `a` - dataset to iterate over
        `o` - output (can be null for new dataset, or a)
        `createIfNull` - if true create the output dataset if that is null
        `allowInteger` - if true, can create integer datasets
        `allowComplex` - if true, can create complex datasets

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in class `IndexIterator`
      Returns:
        true if there is another iteration

    - #### reset

          public void reset()

      Description copied from class: `IndexIterator`
      Reset iterator
      Specified by:
        `reset` in class `IndexIterator`

    - #### getFirstShape

          public int[] getFirstShape()

      Returns:
        shape of first broadcasted dataset

    - #### getPos

          public int[] getPos()

      Specified by:
        `getPos` in class `IndexIterator`
      Returns:
        position indices (nb this is reference not a copy so avoid changing and can be null)

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