casa
5.7.0-16
|
Iterate a Matrix cursor through another Array. More...
#include <MatrixIter.h>
Public Member Functions | |
MatrixIterator (Array< T > &a) | |
Iterate by matrices through array "a". More... | |
MatrixIterator (Array< T > &a, uInt cursorAxis1, uInt cursorAxis2) | |
Iterate by matrices through array "a". More... | |
Matrix< T > & | matrix () |
Return the matrix at the current position. More... | |
Public Member Functions inherited from casacore::ArrayIterator< T > | |
ArrayIterator (const Array< T > &arr, uInt byDim=1) | |
Step through array "arr" over the first byDim axes (using a cursor of dimensionality "byDim"). More... | |
ArrayIterator (const Array< T > &arr, const IPosition &axes, Bool axesAreCursor=True) | |
Step through an array using the given axes. More... | |
virtual | ~ArrayIterator () |
virtual void | next () |
Move the cursor to the next position. More... | |
virtual void | set (const IPosition &cursorPos) |
Set the cursor to the given position. More... | |
virtual void | reset () |
Reset the cursor to the beginning. More... | |
Array< T > & | array () |
Return the cursor. More... | |
virtual ArrayBase & | getArray () |
Get the array in the cursor. More... | |
Public Member Functions inherited from casacore::ArrayPositionIterator | |
ArrayPositionIterator (const IPosition &shape, const IPosition &origin, uInt byDim) | |
Define the shape and origin of the volume the cursor will step through. More... | |
ArrayPositionIterator (const IPosition &shape, uInt byDim) | |
ArrayPositionIterator (const IPosition &shape, const IPosition &axes, Bool axesAreCursor=True) | |
Step through an array using the given axes. More... | |
virtual | ~ArrayPositionIterator () |
void | origin () |
Bool | atStart () const |
Returns true of the cursor is at the origin. More... | |
Bool | pastEnd () const |
Returns true if the cursor has moved past the end of its volume. More... | |
const IPosition & | pos () const |
Return the position of the cursor. More... | |
IPosition | endPos () const |
Return the end position of the cursor. More... | |
uInt | ndim () const |
What is the dimensionality of the volume we are iterating through? More... | |
const IPosition & | iterAxes () const |
Return the iteration axes. More... | |
const IPosition & | cursorAxes () const |
Return the cursor axes. More... | |
Private Member Functions | |
MatrixIterator (const MatrixIterator< T > &) | |
Not implemented. More... | |
MatrixIterator< T > & | operator= (const MatrixIterator< T > &) |
Not implemented. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::ArrayPositionIterator | |
uInt | nextStep () |
Advance cursor to its next position and tell which dimension stepped. More... | |
uInt | dimIter () const |
What is the dimensionality of the "step" the cursor takes, i.e. More... | |
Protected Attributes inherited from casacore::ArrayIterator< T > | |
Array< T > * | ap_p |
A pointer to the cursor. More... | |
Iterate a Matrix cursor through another Array.
MatrixIterator steps a Matrix (the "cursor") through an array. The cursor "refers" to storage in the array, so that changing the values in the cursor changes values in the original array.
This class is derived from ArrayIterator; basically it only adds the matrix() member function which allows you to access the cursor as a Matrix.
Tip: The origin of the cursor, i;e; the subarray that moves through the larger array, is always zero;
In this example we want to make a "moment" map of a cube, i.e. collapse the "Z" axis by averaging it.
Definition at line 69 of file MatrixIter.h.
|
explicit |
Iterate by matrices through array "a".
The first 2 axes form the cursor axes.
casacore::MatrixIterator< T >::MatrixIterator | ( | Array< T > & | a, |
uInt | cursorAxis1, | ||
uInt | cursorAxis2 | ||
) |
Iterate by matrices through array "a".
The given axes form the cursor axes.
|
private |
Not implemented.
|
inline |
Return the matrix at the current position.
Definition at line 81 of file MatrixIter.h.
References casacore::ArrayIterator< T >::ap_p.
|
private |
Not implemented.