C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
cxsc::rmatrix Class Reference

The Data Type rmatrix. More...

#include <rmatrix.hpp>

Collaboration diagram for cxsc::rmatrix:
Collaboration graph

Public Member Functions

rmatrixoperator() () noexcept
 Operator for accessing the whole matrix.
 
rmatrix_slice operator() (const int &m, const int &n) noexcept
 Operator for accessing a part of the matrix.
 
rmatrix_slice operator() (const int &m1, const int &m2, const int &n1, const int &n2) noexcept
 Operator for accessing a part of the matrix.
 
rmatrix operator() (const intmatrix &P)
 Computes permutation of matrix according to permutation matrix, 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 intvector &p, const intvector &q)
 Computes permutation of matrix according to permutation vectors, C=PAQ.
 
rmatrixoperator*= (const srmatrix &m)
 Implementation of multiplication and allocation operation.
 
rmatrixoperator*= (const srmatrix_slice &m)
 Implementation of multiplication and allocation operation.
 
rmatrixoperator+= (const srmatrix &m)
 Implementation of addition and allocation operation.
 
rmatrixoperator+= (const srmatrix_slice &m)
 Implementation of addition and allocation operation.
 
rmatrixoperator-= (const srmatrix &m)
 Implementation of substraction and allocation operation.
 
rmatrixoperator-= (const srmatrix_slice &m)
 Implementation of substraction and allocation operation.
 
rmatrixoperator= (const real &r) noexcept
 Implementation of standard assigning operator.
 
rmatrixoperator= (const rmatrix &m) noexcept
 Implementation of standard assigning operator.
 
rmatrixoperator= (const rmatrix_slice &ms) noexcept
 Implementation of standard assigning operator.
 
rmatrixoperator= (const rvector &v) noexcept
 Implementation of standard assigning operator.
 
rmatrixoperator= (const rvector_slice &v) noexcept
 Implementation of standard assigning operator.
 
rmatrixoperator= (const srmatrix &)
 Implementation of standard assigning operator.
 
rmatrixoperator= (const srmatrix_slice &)
 Implementation of standard assigning operator.
 
rmatrix_subv operator[] (const cxscmatrix_column &i) const noexcept
 Operator for accessing a single column of the matrix.
 
rmatrix_subv operator[] (const int &i) const noexcept
 Operator for accessing a single row of the matrix.
 
 rmatrix () noexcept
 Constructor of class rmatrix.
 
 rmatrix (const int &m, const int &n) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const int &m1, const int &n1, const int &m2, const int &n2) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const intmatrix &)
 Constructor of class rmatrix.
 
 rmatrix (const real &r) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const rmatrix &rm) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const rmatrix_slice &rm) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const rvector &v) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const rvector_slice &v) noexcept
 Constructor of class rmatrix.
 
 rmatrix (const srmatrix &)
 Constructor of class rmatrix.
 
 rmatrix (const srmatrix_slice &)
 Constructor of class rmatrix.
 

Friends

rmatrix InfIm (const cimatrix &v)
 Returns componentwise the infimum of the imaginary part.
 
rmatrix InfIm (const cimatrix_slice &v)
 Returns componentwise the infimum of the imaginary part.
 
rmatrix InfRe (const cimatrix &v)
 Returns componentwise the infimum of the real part.
 
rmatrix InfRe (const cimatrix_slice &v)
 Returns componentwise the infimum of the real part.
 
rmatrix SupIm (const cimatrix &v)
 Returns componentwise the supremum of the imaginary part.
 
rmatrix SupIm (const cimatrix_slice &v)
 Returns componentwise the supremum of the imaginary part.
 
rmatrix SupRe (const cimatrix &v)
 Returns componentwise the supremum of the real part.
 
rmatrix SupRe (const cimatrix_slice &v)
 Returns componentwise the supremum of the real part.
 

Detailed Description

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 $ lb_1 $, $ ub_1 $ and a ower and an upper column index bound $ lb_2 $, $ ub_2 $ of type int. The number $ n $ of components actually stored in matrix is

\[ n = (ub_1 - lb_1 + 1) \cdot (ub_2 - lb_2 + 1) \]

Internally, a matrix is interpreted as an array of length $ ub_1 - lb_1 + 1) $ whose elements are $ (lb_2 , ub_2) $ 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.

See also
cxsc::dotprecision

Definition at line 470 of file rmatrix.hpp.

Member Function Documentation

◆ operator()()

rmatrix cxsc::rmatrix::operator() ( const intmatrix & P)
inline

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.


The documentation for this class was generated from the following files: