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

    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)

  - ### Method Detail

    - #### createIterator

          public static BroadcastIterator createIterator(Dataset a,
                                         Dataset b)

    - #### createIterator

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

    - #### createIterator

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

    - #### 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–2018 Eclipse Foundation. All rights reserved.