casacore
|
Iterate an Vector cursor through another Array. More...
#include <VectorIter.h>
Public Member Functions | |
VectorIterator (Array< T > &a, uInt axis=0) | |
Iterate by vector cursors through array "a". More... | |
Vector< T > & | vector () |
Return a Vector at the current position. More... | |
![]() | |
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 () |
Private Member Functions | |
VectorIterator (const VectorIterator< T > &) | |
Not implemented. More... | |
VectorIterator< T > & | operator= (const VectorIterator< T > &) |
Not implemented. More... | |
Additional Inherited Members | |
![]() | |
Array< T > * | ap_p |
A pointer to the cursor. More... | |
Iterate an Vector cursor through another Array.
VectorIterator steps a Vector (the "cursor") through an array for the given axis. 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 vector() member function which allows you to access the cursor as a Vector.
Tip: The origin of the cursor, i;e; the subarray that moves through the larger array, is always zero;
In this example we sum all the elements of an array; of course we already have the "sum" function in ArrayMath.h that we should use instead.
Definition at line 74 of file VectorIter.h.
|
explicit |
Iterate by vector cursors through array "a".
The vector cursor is taken for the given axis.
|
private |
Not implemented.
|
private |
Not implemented.
|
inline |
Return a Vector at the current position.
Definition at line 82 of file VectorIter.h.
References casacore::ArrayIterator< T >::ap_p.