Class DataPosSequence

  • All Implemented Interfaces:
    CoordSequence, uk.ac.starlink.util.Splittable<CoordSequence>, uk.ac.starlink.util.SplittableSequence<CoordSequence>

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

      • 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 Detail

      • 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 SplittableSequence.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()
        Specified by:
        next in interface uk.ac.starlink.util.SplittableSequence<CoordSequence>
      • splittableSize

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