Package uk.ac.starlink.ttools.plot2
Class DataPosSequence
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DataPosSequence.PositionCloud
Adaptor interface defining a cloud of positions for use with DataPosSequence.
-
Constructor Summary
Constructors Constructor Description DataPosSequence(int ndim, DataPosSequence.PositionCloud[] clouds, DataStore dataStore)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCoords()
Returns the array used to store the coordinates for the current position in this sequence.boolean
next()
DataPosSequence
split()
long
splittableSize()
-
-
-
Constructor Detail
-
DataPosSequence
public DataPosSequence(int ndim, DataPosSequence.PositionCloud[] clouds, DataStore dataStore)
Constructor.- Parameters:
ndim
- coordinate dimensionalityclouds
- list of point clouds providing positions over which to iteratedataStore
- 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 theSplittableSequence.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 interfaceCoordSequence
-
next
public boolean next()
- Specified by:
next
in interfaceuk.ac.starlink.util.SplittableSequence<CoordSequence>
-
split
public DataPosSequence split()
- Specified by:
split
in interfaceuk.ac.starlink.util.Splittable<CoordSequence>
-
splittableSize
public long splittableSize()
- Specified by:
splittableSize
in interfaceuk.ac.starlink.util.Splittable<CoordSequence>
-
-