ARTS
1.0.222
|
#include <matpackI.h>
Public Member Functions | |
Matrix () | |
Default constructor. More... | |
Matrix (Index r, Index c) | |
Constructor setting size. More... | |
Matrix (Index r, Index c, Numeric fill) | |
Constructor setting size and filling with constant value. More... | |
Matrix (const ConstMatrixView &v) | |
Copy constructor from MatrixView. More... | |
Matrix (const Matrix &v) | |
Copy constructor from Matrix. More... | |
Matrix & | operator= (const Matrix &x) |
Assignment operator from another matrix. More... | |
Matrix & | operator= (Numeric x) |
Assignment operator from scalar. More... | |
Matrix & | operator= (const ConstVectorView &v) |
Assignment from a vector. More... | |
void | resize (Index r, Index c) |
Resize function. More... | |
~Matrix () | |
Destructor for Matrix. 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... | |
Numeric & | operator() (Index r, Index c) |
Plain index operator. More... | |
MatrixView | operator() (const Range &r, const Range &c) |
Index operator for subrange. More... | |
VectorView | operator() (const Range &r, Index c) |
Index operator returning a column as an object of type VectorView. More... | |
VectorView | operator() (Index r, const Range &c) |
Index operator returning a row as an object of type VectorView. More... | |
ConstIterator2D | begin () const |
Return const iterator to first row. More... | |
ConstIterator2D | end () const |
Return const iterator behind last row. More... | |
Iterator2D | begin () |
Return iterator to first row. More... | |
Iterator2D | end () |
Return iterator behind last row. More... | |
MatrixView & | operator= (const ConstMatrixView &v) |
Assignment operator. More... | |
MatrixView & | operator= (const MatrixView &v) |
Assignment from MatrixView to MatrixView. More... | |
MatrixView & | operator= (const Matrix &v) |
Assignment from a Matrix. More... | |
MatrixView & | operator= (const ConstVectorView &v) |
Assignment from a vector. More... | |
MatrixView & | operator= (Numeric x) |
Assigning a scalar to a MatrixView will set all elements to this value. More... | |
MatrixView & | operator*= (Numeric x) |
Multiplication by scalar. More... | |
MatrixView & | operator/= (Numeric x) |
Division by scalar. More... | |
MatrixView & | operator+= (Numeric x) |
Addition of scalar. More... | |
MatrixView & | operator-= (Numeric x) |
Subtraction of scalar. More... | |
MatrixView & | operator*= (const ConstMatrixView &x) |
Element-vise multiplication by another Matrix. More... | |
MatrixView & | operator/= (const ConstMatrixView &x) |
Element-vise division by another Matrix. More... | |
MatrixView & | operator+= (const ConstMatrixView &x) |
Element-vise addition of another Matrix. More... | |
MatrixView & | operator-= (const ConstMatrixView &x) |
Element-vise subtraction of another Matrix. More... | |
MatrixView & | operator*= (const ConstVectorView &x) |
Element-vise multiplication by a Vector (acting like a 1-column Matrix). More... | |
MatrixView & | operator/= (const ConstVectorView &x) |
Element-vise division by a Vector (acting like a 1-column Matrix). More... | |
MatrixView & | operator+= (const ConstVectorView &x) |
Element-vise addition of a Vector (acting like a 1-column Matrix). More... | |
MatrixView & | operator-= (const ConstVectorView &x) |
Element-vise subtraction of a Vector (acting like a 1-column Matrix). More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
MatrixView () | |
Default constructor. More... | |
MatrixView (Numeric *data, const Range &r, const Range &c) | |
Explicit constructor. More... | |
MatrixView (Numeric *data, const Range &pr, const Range &pc, const Range &nr, const Range &nc) | |
Recursive constructor. More... | |
![]() | |
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... | |
![]() | |
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... | |
The Matrix class.
This is a MatrixView that also allocates storage automatically, and deallocates it when it is destroyed. We take all the functionality from MatrixView. Additionally defined here are:
Definition at line 544 of file matpackI.h.
|
inline |
Default constructor.
Definition at line 2123 of file matpackI.h.
Constructor setting size.
This constructor has to set the stride in the row range correctly!
Definition at line 2134 of file matpackI.h.
Constructor setting size and filling with constant value.
Definition at line 2143 of file matpackI.h.
|
inline |
Copy constructor from MatrixView.
This automatically sets the size and copies the data.
Definition at line 2156 of file matpackI.h.
|
inline |
Copy constructor from Matrix.
This automatically sets the size and copies the data.
Definition at line 2166 of file matpackI.h.
|
inline |
Destructor for Matrix.
This is important, since Matrix uses new to allocate storage.
Definition at line 2259 of file matpackI.h.
|
inline |
Assignment from a vector.
This copies the data from a VectorView to this MatrixView. Dimensions must agree! Resizing would destroy the selection that we might have done in this MatrixView by setting its range.
Definition at line 2223 of file matpackI.h.
Assignment operator from another matrix.
It is important that this operator exists. Otherwise the = operator seems to copy references instead of content in some cases.
The Behavior of this one is a bit special: If the size of the target Matrix is 0 then it will be automatically resized to match (this is needed to have the correct initialization for constructed classes that use the assignment operator to initialize their data).
Definition at line 2188 of file matpackI.h.
Assignment operator from scalar.
Assignment operators also seem to be not inherited.
Definition at line 2213 of file matpackI.h.
Resize function.
If the size is already correct this function does nothing. All data is lost after resizing! The new Matrix is not initialized, so it will contain random values.
Definition at line 2237 of file matpackI.h.