Class DataPosSequence

java.lang.Object
uk.ac.starlink.ttools.plot2.DataPosSequence
All Implemented Interfaces:
CoordSequence, uk.ac.starlink.util.Sequence, uk.ac.starlink.util.Splittable<CoordSequence>

public class DataPosSequence extends Object implements CoordSequence
Splittable iterator over the data positions in a list of PositionClouds.
Since:
13 Sep 2019
Author:
Mark Taylor
  • Constructor Details

    • DataPosSequence

      public DataPosSequence(int ndim, DataPosSequence.PositionCloud[] clouds, DataStore dataStore)
      Constructor.
      Parameters:
      ndim - coordinate dimensionality
      clouds - list of point clouds providing positions over which to iterate
      dataStore - data storage object
  • Method Details

    • getCoords

      public double[] getCoords()
      Description copied from interface: CoordSequence
      Returns the array used to store the coordinates for the current position in this sequence. It contains the coordinates corresponding to the last call of the CoordSequence.next() method. Its contents before the first call or after a call returning false are undefined.

      This method returns the same value throughout the lifetime of this sequence, it's only the contents that change to reflect the current state of the iteration.

      Specified by:
      getCoords in interface CoordSequence
    • next

      public boolean next()
      Description copied from interface: CoordSequence
      Advances to the next entry. No exception is thrown.
      Specified by:
      next in interface CoordSequence
      Specified by:
      next in interface uk.ac.starlink.util.Sequence
    • split

      public DataPosSequence split()
      Specified by:
      split in interface uk.ac.starlink.util.Splittable<CoordSequence>
    • splittableSize

      public long splittableSize()
      Specified by:
      splittableSize in interface uk.ac.starlink.util.Splittable<CoordSequence>