28 #ifndef LATTICES_LATTICESTEPPER_H
29 #define LATTICES_LATTICESTEPPER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/lattices/Lattices/LatticeNavigator.h>
34 #include <casacore/lattices/Lattices/LatticeIndexer.h>
35 #include <casacore/casa/Arrays/IPosition.h>
445 uInt maxCacheSize,
uInt bucketSize)
const;
virtual void subSection(const IPosition &blc, const IPosition &trc, const IPosition &inc)
virtual Bool atEnd() const
Function which returns "True" if an attempt has been made to increment the cursor beyond the end of t...
virtual Bool ok() const
Function which checks the internal data of this class for correct dimensionality and consistant value...
virtual uInt nsteps() const
Function to return the number of steps (increments & decrements) taken since construction (or since l...
virtual IPosition increment() const
virtual IPosition latticeShape() const
Functions which return the shape of the Lattice being iterated through.
virtual IPosition subLatticeShape() const
LatticeStepper(const LatticeStepper &other)
The copy constructor uses copy semantics.
LatticeStepper(const IPosition &latticeShape, const IPosition &cursorShape, const IPosition &cursorAxes, const IPosition &axisPath, const uInt hangOverPolicy=PAD)
Same as the above constructor except that the cursor axes are explicitly specified.
virtual Bool hangOver() const
Function which returns "True" if the increment/decrement operators have moved the cursor position suc...
void setCursorShape(const IPosition &cursorShape, const IPosition &cursorAxes)
virtual void reset()
Function to move the cursor to the beginning of the (sub)-Lattice.
virtual void subSection(const IPosition &blc, const IPosition &trc)
Functions to specify a "section" of the Lattice to step over.
virtual Bool operator++(int)
Increment operator (postfix version) - move the cursor forward one step.
virtual IPosition endPosition() const
Functions which return the current position of the end of the cursor.
virtual uInt calcCacheSize(const IPosition &cubeShape, const IPosition &tileShape, uInt maxCacheSize, uInt bucketSize) const
Calculate the cache size (in tiles) for this type of access to a lattice in the given row of the tile...
virtual Bool operator--(int)
Decrement operator (postfix version) - move the cursor backwards one step.
hangOverPolicy
The hangOverPolicy enumerator is used in the constructors to indicate what this class should do when ...
@ RESIZE
RESIZE means that the cursor shape is adjusted whenever it approaches the edges of the Lattice so tha...
@ PAD
PAD is the default and means that the cursor size supplied by the user is kept fixed.
virtual const IPosition & axisPath() const
Return the axis path.
virtual IPosition position() const
Functions which return the current position of the beginning of the cursor.
virtual IPosition cursorShape() const
Function which returns the shape of the cursor.
LatticeIndexer itsIndexer
Bool niceFit() const
Check if the cursor shape is a factor of the Lattice shape.
virtual IPosition blc() const
Return the bottom left hand corner (blc), top right corner (trc) or step size (increment) used by the...
virtual IPosition cursorAxes() const
Function which returns the axes of the cursor.
virtual IPosition relativePosition() const
virtual IPosition relativeEndPosition() const
LatticeStepper & operator=(const LatticeStepper &other)
The assignment operator uses copy semantics.
LatticeStepper()
Prevent the default constructor from being used.
LatticeStepper(const IPosition &latticeShape, const IPosition &cursorShape, const IPosition &axisPath, const uInt hangOverPolicy=PAD)
Same as the above constructor except that the axis path is explicitly specified.
void padCursor()
Pad the cursor to the right number of dimensions.
LatticeStepper(const IPosition &latticeShape, const IPosition &cursorShape, const uInt hangOverPolicy=PAD)
The first argument is the shape of the Lattice to be iterated and the second argument is the shape of...
virtual LatticeNavigator * clone() const
Function which returns a pointer to dynamic memory of an exact copy of this instance.
void setCursorShape(const IPosition &cursorShape)
Functions to change the cursor shape to a new one.
virtual Bool atStart() const
Function which returns "True" if the cursor is at the beginning of the (sub)-Lattice,...
virtual IPosition trc() const
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.