C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
The Data Type rmatrix. More...
#include <rmatrix.hpp>
Public Member Functions | |
rmatrix | operator() (const intvector &p, const intvector &q) |
Computes permutation of matrix according to permutation vectors, C=PAQ. | |
rmatrix | operator() (const intmatrix &P, const intmatrix &Q) |
Computes permutation of matrix according to permutation matrices, C=PAQ. | |
rmatrix | operator() (const intvector &p) |
Computes permutation of matrix according to permutation vector, C=PA. | |
rmatrix | operator() (const intmatrix &P) |
Computes permutation of matrix according to permutation matrix, C=PAQ. | |
rmatrix & | operator() () throw () |
Operator for accessing the whole matrix. | |
rmatrix_slice | operator() (const int &m, const int &n) throw () |
Operator for accessing a part of the matrix. | |
rmatrix_slice | operator() (const int &m1, const int &m2, const int &n1, const int &n2) throw () |
Operator for accessing a part of the matrix. | |
rmatrix & | operator*= (const srmatrix &m) |
Implementation of multiplication and allocation operation. | |
rmatrix & | operator*= (const srmatrix_slice &m) |
Implementation of multiplication and allocation operation. | |
rmatrix & | operator+= (const srmatrix &m) |
Implementation of addition and allocation operation. | |
rmatrix & | operator+= (const srmatrix_slice &m) |
Implementation of addition and allocation operation. | |
rmatrix & | operator-= (const srmatrix &m) |
Implementation of substraction and allocation operation. | |
rmatrix & | operator-= (const srmatrix_slice &m) |
Implementation of substraction and allocation operation. | |
rmatrix & | operator= (const real &r) throw () |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const rmatrix &m) throw () |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const rmatrix_slice &ms) throw () |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const rvector &v) throw () |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const rvector_slice &v) throw () |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const srmatrix &) |
Implementation of standard assigning operator. | |
rmatrix & | operator= (const srmatrix_slice &) |
Implementation of standard assigning operator. | |
rmatrix_subv | operator[] (const int &i) const throw () |
Operator for accessing a single row of the matrix. | |
rmatrix_subv | operator[] (const cxscmatrix_column &i) const throw () |
Operator for accessing a single column of the matrix. | |
rmatrix (const rmatrix &rm) throw () | |
Constructor of class rmatrix. | |
rmatrix (const rmatrix_slice &rm) throw () | |
Constructor of class rmatrix. | |
rmatrix () throw () | |
Constructor of class rmatrix. | |
rmatrix (const int &m, const int &n) throw () | |
Constructor of class rmatrix. | |
rmatrix (const int &m1, const int &n1, const int &m2, const int &n2) throw () | |
Constructor of class rmatrix. | |
rmatrix (const rvector &v) throw () | |
Constructor of class rmatrix. | |
rmatrix (const rvector_slice &v) throw () | |
Constructor of class rmatrix. | |
rmatrix (const real &r) throw () | |
Constructor of class rmatrix. | |
rmatrix (const srmatrix &) | |
Constructor of class rmatrix. | |
rmatrix (const srmatrix_slice &) | |
Constructor of class rmatrix. | |
rmatrix (const intmatrix &) | |
Constructor of class rmatrix. | |
Friends | |
rmatrix | InfIm (const cimatrix &v) throw () |
Returns componentwise the infimum of the imaginary part. | |
rmatrix | InfIm (const cimatrix_slice &v) throw () |
Returns componentwise the infimum of the imaginary part. | |
rmatrix | InfRe (const cimatrix &v) throw () |
Returns componentwise the infimum of the real part. | |
rmatrix | InfRe (const cimatrix_slice &v) throw () |
Returns componentwise the infimum of the real part. | |
rmatrix | SupIm (const cimatrix &v) throw () |
Returns componentwise the supremum of the imaginary part. | |
rmatrix | SupIm (const cimatrix_slice &v) throw () |
Returns componentwise the supremum of the imaginary part. | |
rmatrix | SupRe (const cimatrix &v) throw () |
Returns componentwise the supremum of the real part. | |
rmatrix | SupRe (const cimatrix_slice &v) throw () |
Returns componentwise the supremum of the real part. |
The Data Type rmatrix.
Matrices are two dimensional dynamic arrays of the corresponding scalar base type. Every matrix possesses a lower and an upper row index bound , and a ower and an upper column index bound , of type int. The number of components actually stored in matrix is
Internally, a matrix is interpreted as an array of length whose elements are row vectors of the corresponding base type.
The matrix data types are implemented as vectors of vectors. This is also the usual method of C. But, for example, one might define data types for sparse matrices using the class concept of C++. They might store their components in another way even if the user interface was the same as presented here. Thus, due to data hiding, it is not important for the user how a C-XSC data type is actually implemented.
Matrices of dimension greater than two are not built into C-XSC, but they can be built up (perhaps in appropiate classes) using dense structures of vectors of vectors or using appropiate sparse data structures. The elements and the components of such higher-dimensional matrices can be accessed and manipulated by the usual facilities of C-XSC.
All matrix and vector operators which require dot product computations use higher precision dot products provided by the dotprecision classes. The precision to be used for these implicit dot products can be choosen by setting the global variable opdotprec accordingly. A value of 0 means maximum accuracy (the default, always used by all older C-XSC versions), a value of 1 means double accuracy, a value of 2 or higher means k-fold double accuracy. Lower accuracy leads to (significantly) faster computing times, but also to less exact results. For all dot products with an interval result, error bounds are computed to guarantee a correct enclosure. For all other dot products approximations without error bounds are computed.
Definition at line 470 of file rmatrix.hpp.
Computes permutation of matrix according to permutation matrix, C=PAQ.
Computes permutation of matrix according to permutation matrix, C=PA.
Definition at line 969 of file rmatrix.inl.