28 #ifndef LATTICES_LATTICEINDEXER_H
29 #define LATTICES_LATTICEINDEXER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/IPosition.h>
long long product() const
Returns 0 if nelements() == 0, otherwise it returns the product of its elements.
LatticeIndexer()
Default constructor (one dimensional, unit-length instance).
void fullSize()
Revert from a sub-Lattice description back to the main Lattice.
const IPosition & shape() const
Returns the length of each axis (or the requested one) in the sub-Lattice.
const IPosition & fullShape() const
Returns the length of each axis (or the requested one) in the parent Lattice.
Bool tiledCursorMove(Bool incr, IPosition &cursorPos, const IPosition &cursorShape, const IPosition &cursorHeading) const
Function which increments (incr=True) or decrements (incr=False) the cursor position (the first IPosi...
LatticeIndexer(const LatticeIndexer &other)
The copy constructor uses copy semantics.
void resize(const IPosition &newShape)
Function to change the shape of the Lattice.
const IPosition & offset() const
Function to return the offset (on a specified axis) between the sub-Lattice and the parent one.
LatticeIndexer(const IPosition &shape, const IPosition &blc, const IPosition &trc, const IPosition &inc)
Specify a Lattice and define a sub-Lattice within it.
uInt fullShape(uInt axis) const
size_t nelements() const
Function which returns the number of elements in the sub-Lattice; this value is equal to the product ...
uInt ndim() const
Function which returns the number of dimensions in the Lattice (or sub-Lattice).
LatticeIndexer(const IPosition &shape)
Specify the size of the Lattice.
uInt offset(uInt axis) const
IPosition absolutePosition(const IPosition &position) const
Function which returns an IPosition in the parent Lattice given an IPostion in the sub-Lattice.
void subSection(const IPosition &blc, const IPosition &trc)
const IPosition & increment() const
Function to return the increments along each axis (or the requested one) of the Lattice.
Bool isInside(const IPosition &index) const
Function which returns a value of True if the IPosition argument is within the sub-Lattice.
LatticeIndexer & operator=(const LatticeIndexer &other)
The assignment operator uses copy semantics.
void subSection(const IPosition &blc, const IPosition &trc, const IPosition &inc)
Function which subsections a LatticeIndexer.
Bool ok() const
Is this LatticeIndexer consistent, i.e.
uInt increment(uInt axis) const
uInt shape(uInt axis) const
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.