Package uk.ac.starlink.ttools.plot2.data
Class StepDataStore
java.lang.Object
uk.ac.starlink.ttools.plot2.data.StepDataStore
- All Implemented Interfaces:
DataStore
Wrapper data store implementation that dispenses all column data
as evenly spaced subsamples by row.
- Since:
- 13 Nov 2013
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an object that manages iteration over tuples.getTupleSequence
(DataSpec spec) Returns the data described by a given DataSpec as a sequence of tuples.boolean
Indicates whether this store has the data described by a given DataSpec.
-
Constructor Details
-
StepDataStore
Constructor.- Parameters:
base
- base data store to which most behaviour is delegatedstep
- stride indicating the size of the subsample; step=1 means all rows, step=2 means every other one etc
-
-
Method Details
-
getTupleSequence
Description copied from interface:DataStore
Returns the data described by a given DataSpec as a sequence of tuples. Must only be called ifDataStore.hasData(uk.ac.starlink.ttools.plot2.data.DataSpec)
returns true for the given DataSpec; if not, behaviour is undefined.- Specified by:
getTupleSequence
in interfaceDataStore
- Parameters:
spec
- plot data specification object- Returns:
- sequence of values which can be used to perform a plot
-
hasData
Description copied from interface:DataStore
Indicates whether this store has the data described by a given DataSpec. -
getTupleRunner
Description copied from interface:DataStore
Returns an object that manages iteration over tuples. Where possible, the returned TupleRunner should be used for iteration when using this DataStore, since it contains the chosen policy for parallel execution. If only sequential processing is supported however, TupleSequences acquired from this store can be used directly.- Specified by:
getTupleRunner
in interfaceDataStore
- Returns:
- tuple runner
-