ARTS
1.0.222
|
A constant view of a Matrix. More...
#include <matpackI.h>
Public Member Functions | |
Index | nrows () const |
Returns the number of rows. More... | |
Index | ncols () const |
Returns the number of columns. More... | |
Numeric | operator() (Index r, Index c) const |
Plain const index operator. More... | |
ConstMatrixView | operator() (const Range &r, const Range &c) const |
Const index operator for subrange. More... | |
ConstVectorView | operator() (const Range &r, Index c) const |
Const index operator returning a column as an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index r, const Range &c) const |
Const index operator returning a row as an object of type ConstVectorView. More... | |
ConstIterator2D | begin () const |
Return const iterator to first row. More... | |
ConstIterator2D | end () const |
Return const iterator behind last row. More... | |
Protected Member Functions | |
ConstMatrixView () | |
Default constructor. More... | |
ConstMatrixView (Numeric *data, const Range &r, const Range &c) | |
Explicit constructor. More... | |
ConstMatrixView (Numeric *data, const Range &pr, const Range &pc, const Range &nr, const Range &nc) | |
Recursive constructor. More... | |
Protected Attributes | |
Range | mrr |
The row range of mdata that is actually used. More... | |
Range | mcr |
The column range of mdata that is actually used. More... | |
Numeric * | mdata |
Pointer to the plain C array that holds the data. More... | |
Friends | |
class | ConstVectorView |
class | MatrixView |
class | ConstIterator3D |
class | ConstTensor3View |
ConstMatrixView | transpose (ConstMatrixView m) |
Const version of transpose. More... | |
A constant view of a Matrix.
This, together with the derived class MatrixView, contains the main implementation of a Matrix. It defines the concepts of MatrixView. Plus additionally the recursive subrange operator, which makes it possible to create a MatrixView from a subrange of a MatrixView.
The class Matrix is just a special case of a MatrixView which also allocates storage.
Definition at line 426 of file matpackI.h.
|
inlineprotected |
Default constructor.
This is necessary, so that we can have a default constructor for derived classes.
Definition at line 1575 of file matpackI.h.
|
inlineprotected |
Explicit constructor.
This one is used by Matrix to initialize its own MatrixView part. The row range rr must have a stride to account for the length of one row.
Definition at line 1584 of file matpackI.h.
|
inlineprotected |
Recursive constructor.
This is used to construct SubMatrices from SubMatrices. That means that the new ranges have to be interpreted relative to the original ranges.
The new ranges may contain -1 for the extent which acts as a joker. However, the used Range constructor converts this to an explicit range, consistent with the original Range.
*data | The actual data. |
p | Previous range. |
n | New Range. |
Definition at line 1605 of file matpackI.h.
|
inline |
Return const iterator to first row.
Definition at line 1558 of file matpackI.h.
|
inline |
Return const iterator behind last row.
Definition at line 1566 of file matpackI.h.
|
inline |
Returns the number of columns.
Definition at line 1497 of file matpackI.h.
|
inline |
Returns the number of rows.
Definition at line 1491 of file matpackI.h.
|
inline |
Const index operator for subrange.
We have to also account for the case, that *this is already a subrange of a Matrix. This allows correct recursive behavior.
Definition at line 1521 of file matpackI.h.
|
inline |
Const index operator returning a column as an object of type ConstVectorView.
r | A range of rows. |
c | Index of selected column |
Definition at line 1532 of file matpackI.h.
|
inline |
Const index operator returning a row as an object of type ConstVectorView.
r | Index of selected row. |
c | Range of columns |
Definition at line 1547 of file matpackI.h.
Plain const index operator.
Definition at line 1503 of file matpackI.h.
|
friend |
Definition at line 445 of file matpackI.h.
|
friend |
Definition at line 446 of file matpackI.h.
|
friend |
Definition at line 443 of file matpackI.h.
|
friend |
Definition at line 444 of file matpackI.h.
|
friend |
Const version of transpose.
Definition at line 2373 of file matpackI.h.
|
protected |
The column range of mdata that is actually used.
Definition at line 462 of file matpackI.h.
|
protected |
Pointer to the plain C array that holds the data.
Definition at line 464 of file matpackI.h.
|
protected |
The row range of mdata that is actually used.
Definition at line 460 of file matpackI.h.