org.eclipse.january.dataset

## Class BroadcastPairIterator

- java.lang.Object
- - org.eclipse.january.dataset.IndexIterator
  - - org.eclipse.january.dataset.BroadcastIteratorBase
    - - org.eclipse.january.dataset.BroadcastIterator
      - - org.eclipse.january.dataset.BroadcastPairIterator

-     public class BroadcastPairIterator
      extends BroadcastIterator

  Class to run over a pair of datasets in parallel with NumPy broadcasting to promote shapes which have lower rank and outputs to a third dataset

- - ### Field Summary

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

      `aDouble, aLong, oDataset, oIndex, outputA, outputB`

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

      `aDataset, aIndex, asDouble, bDataset, bDouble, bIndex, bLong, maxShape, pos, read`

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BroadcastPairIterator(Dataset a, Dataset b, Dataset o, boolean createIfNull)`

  - ### Method Summary

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

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

      `createIterator, createIterator, createIterator, getOutput, storeCurrentValues`

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

      `getPos, getShape, isOutputDouble, setOutputDouble`

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

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

- - ### Constructor Detail

    - #### BroadcastPairIterator

          public BroadcastPairIterator(Dataset a,
                                       Dataset b,
                                       Dataset o,
                                       boolean createIfNull)

      Parameters:
        `a` - dataset to iterate over
        `b` - dataset to iterate over
        `o` - output (can be null for new dataset, or a)
        `createIfNull` - if true, create new dataset if o is null

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

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

    - #### getFirstShape

          public int[] getFirstShape()

      Returns:
        shape of first broadcasted dataset

    - #### getSecondShape

          public int[] getSecondShape()

      Returns:
        shape of second broadcasted dataset

    - #### reset

          public void reset()

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

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