Package org.eclipse.scanning.api.points
Interface IPointGenerator<T>
- Type Parameters:
T-
- All Superinterfaces:
IModelProvider<T>,Iterable<IPosition>
- All Known Implementing Classes:
AbstractGenerator,AbstractLineGenerator,AbstractMultiGenerator,AbstractScanPointGenerator,AxialArrayGenerator,AxialCollatedStepGenerator,CompoundGenerator,ConcurrentMultiGenerator,ConsecutiveMultiGenerator,NoModelGenerator,TwoAxisGridPointsGenerator,TwoAxisGridPointsRandomOffsetGenerator,TwoAxisLinePointsGenerator,TwoAxisLissajousGenerator,TwoAxisPointSingleGenerator,TwoAxisPtychographyGenerator
Generator for a give type, T (for instance LissajousModel).
The generator is an iterator used in the scan and a controller object
for the user interface which provides naming information about the
type of scan.
-
Method Summary
Modifier and TypeMethodDescriptionRelatively slow because all the points have to exist in memory.default IPositionBy default this gets the first point from the iterator.getModel()The model for the generator.getNames()Returns the names of the scalars in the positions generated by this point generator.intgetRank()The rank of the points iterator.int[]getShape()The shape of the points iterator.iterator()Iterator over the points, fast because does not evaluate all points straight away, does it on the fly.intsize()The size of the points iterator.Methods inherited from interface org.eclipse.scanning.api.IModelProvider
setModel, updateModelMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getModel
T getModel()The model for the generator.- Specified by:
getModelin interfaceIModelProvider<T>- Returns:
-
size
int size()The size of the points iterator. This call will be as fast as possible but can be as slow as iterating all points.- Returns:
-
getShape
int[] getShape()The shape of the points iterator.- Returns:
- Throws:
GeneratorException
-
getRank
int getRank()The rank of the points iterator.- Returns:
- Throws:
GeneratorException
-
iterator
Iterator over the points, fast because does not evaluate all points straight away, does it on the fly. -
createPoints
Relatively slow because all the points have to exist in memory. Points are lightweight and it is normally ok to have them all in memory. However if it can be avoided for a given scan, the scan will start faster.- Returns:
-
getFirstPoint
By default this gets the first point from the iterator. Override to define a more efficient first point, for instance if the iterator does a sleep this method can be overridden to avoid the sleep.- Returns:
-
getNames
Returns the names of the scalars in the positions generated by this point generator.- Returns:
- the names of the scalars
-
getDimensionNames
-