org.eclipse.january.dataset

## Class BroadcastIterator

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

- Direct Known Subclasses:
    BroadcastPairIterator, ContiguousPairIterator

      public abstract class BroadcastIterator
      extends BroadcastIteratorBase

  Base class for broadcast iterators of pairs with output.

  For speed, there are public members. Note, index is not updated

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `aDouble` Current value in first dataset
    `long` | `aLong` Current value in first dataset
    `protected Dataset` | `oDataset` Output dataset
    `int` | `oIndex` Index in output dataset
    `protected boolean` | `outputA`
    `protected boolean` | `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
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BroadcastIterator(Dataset a, Dataset b, Dataset o)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BroadcastIterator` | `createIterator(Dataset a, Dataset b)`
    `static BroadcastIterator` | `createIterator(Dataset a, Dataset b, Dataset o)`
    `static BroadcastIterator` | `createIterator(Dataset a, Dataset b, Dataset o, boolean createIfNull)`
    `Dataset` | `getOutput()`
    `protected void` | `storeCurrentValues()` Read and store current values

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

      `getPos, getShape, isOutputDouble, setOutputDouble`

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

      `hasNext, reset`

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

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

- - ### Field Detail

    - #### oIndex

          public int oIndex

      Index in output dataset

    - #### aDouble

          public double aDouble

      Current value in first dataset

    - #### aLong

          public long aLong

      Current value in first dataset

    - #### oDataset

          protected Dataset oDataset

      Output dataset

    - #### outputA

          protected final boolean outputA

    - #### outputB

          protected final boolean outputB

  - ### Constructor Detail

    - #### BroadcastIterator

          protected BroadcastIterator(Dataset a,
                                      Dataset b,
                                      Dataset o)

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

  - ### Method Detail

    - #### createIterator

          public static BroadcastIterator createIterator(Dataset a,
                                                         Dataset b)

      Parameters:
        `a` - dataset to iterate over
        `b` - dataset to iterate over
      Returns:
        broadcast iterator

    - #### createIterator

          public static BroadcastIterator createIterator(Dataset a,
                                                         Dataset b,
                                                         Dataset o)

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

    - #### createIterator

          public static BroadcastIterator createIterator(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
      Returns:
        broadcast iterator

    - #### getOutput

          public Dataset getOutput()

      Returns:
        output dataset (can be null)

    - #### storeCurrentValues

          protected void storeCurrentValues()

      Description copied from class: `BroadcastIteratorBase`
      Read and store current values
      Specified by:
        `storeCurrentValues` in class `BroadcastIteratorBase`

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