28 #ifndef CASA_MATRIXITER_2_H
29 #define CASA_MATRIXITER_2_H
67 template<
typename T,
typename Alloc=std::allocator<T>>
106 mi(const_cast<
Array<T>&>(a)) {}
109 size_t cursorAxis1,
size_t cursorAxis2)
110 :
mi(const_cast<
Array<T>&>(a), cursorAxis1, cursorAxis2) {}
137 #include "MatrixIter.tcc"
A Vector of integers, for indexing into Array<T> objects.
MatrixIterator(Array< T, Alloc > &a)
Iterate by matrices through array "a".
const IPosition & pos() const
ReadOnlyMatrixIterator< T > & operator=(const ReadOnlyMatrixIterator< T > &)=delete
Not implemented.
const Matrix< T > & matrix()
Iterate a Matrix cursor through another Array.
MatrixIterator< T, Alloc > & operator=(const MatrixIterator< T, Alloc > &)=delete
Not implemented.
ReadOnlyMatrixIterator(const Array< T > &a, size_t cursorAxis1, size_t cursorAxis2)
Iterate a Matrix cursor through a R/O Array.
A 2-D Specialization of the Array class.
Matrix< T, Alloc > & matrix()
Return the matrix at the current position.
Iterate an Array cursor through another Array.
virtual void next() override
Move the cursor to the next position.
const Array< T > & array()
std::unique_ptr< Array< T, Alloc > > ap_p
The cursor.
size_t ndim() const
What is the dimensionality of the volume we are iterating through?
IPosition endPos() const
Return the end position of the cursor.
bool pastEnd() const
Returns true if the cursor has moved past the end of its volume.
A templated N-D Array class with zero origin. Array<T, Alloc> is a templated, N-dimensional, Array class. The origin is zero, but by default indices are zero-based. This Array class is the base class for the Vector, Matrix, and Cube subclasses.
bool atStart() const
Returns true of the cursor is at the origin.
Array< T, Alloc > & array()
Return the cursor.
ReadOnlyMatrixIterator(const Array< T > &a)
const IPosition & pos() const
Return the position of the cursor.