#include <matrix.h>
Inheritance diagram for Matrix:
Public Methods | |
virtual | ~Matrix () |
virtual destructor. | |
virtual int | nr (const int i=0) const = 0 |
number of rows. | |
virtual int | nc (const int i=0) const = 0 |
number of columns. | |
virtual int | size () const = 0 |
size is the number of elements of the Matrix. | |
virtual bool | empty () const = 0 |
true if the Matrix is empty. | |
virtual Ref<Tp> | operator() (const int i, const int j=0) = 0 |
operator() is slower because of copy on write checking. | |
virtual Tp | operator() (const int i, const int j=0) const = 0 |
and its read only pendant for fast read access. | |
Protected Methods | |
virtual Tp* | ref (const int i, const int j) const = 0 |
low level reference to data. | |
virtual Tp | read (const int i, const int j) const = 0 |
low level read access. | |
virtual void | write (const int i, const int j, const Tp v) = 0 |
low level write access. | |
virtual void | add (const int i, const int j, const Tp v) = 0 |
low level add to value. | |
virtual void | sub (const int i, const int j, const Tp v) = 0 |
low level sub from value. | |
virtual void | mul (const int i, const int j, const Tp v) = 0 |
low level mul with value. | |
virtual void | div (const int i, const int j, const Tp v) = 0 |
low level div by value. |
The class implements copy on write and provides an interface to some very basic methods and properties of the Matrix.
The most important operator() enables public access to the coefficients of the Matrix. The mechanism of returning a Ref<Tp> object for non constant access and overloading certain operators, that change the value of the operand with low level access functions, ensures that Matrix data is never quietly changed.
Methods nr() and nc() return the number of rows and the number of columns resp.. Both methods can have an optional argument that is for general banded matrices and specifies the row and column number resp..
|
virtual destructor.
|
|
number of rows.
|
|
number of columns.
|
|
size is the number of elements of the Matrix.
|
|
true if the Matrix is empty.
|
|
operator() is slower because of copy on write checking.
Reimplemented in MatrixC, MatrixBD, MatrixSD, MatrixSP, VectorD, and VectorI. |
|
and its read only pendant for fast read access.
Reimplemented in MatrixC, MatrixBD, MatrixSD, MatrixSP, VectorD, and VectorI. |
|
low level reference to data.
|
|
low level read access.
|
|
low level write access.
Reimplemented in MatrixC. |
|
low level add to value.
Reimplemented in MatrixC. |
|
low level sub from value.
Reimplemented in MatrixC. |
|
low level mul with value.
Reimplemented in MatrixC. |
|
low level div by value.
Reimplemented in MatrixC. |