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

public interface IPointGenerator<T> extends Iterable<IPosition>, IModelProvider<T>
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 Details

    • getModel

      T getModel()
      The model for the generator.
      Specified by:
      getModel in interface IModelProvider<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<IPosition> iterator()
      Iterator over the points, fast because does not evaluate all points straight away, does it on the fly.
      Specified by:
      iterator in interface Iterable<T>
      Returns:
    • createPoints

      List<IPosition> 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

      default IPosition 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

      List<String> getNames()
      Returns the names of the scalars in the positions generated by this point generator.
      Returns:
      the names of the scalars
    • getDimensionNames

      List<List<String>> getDimensionNames()