concepts::SubMatrixN< F > Class Template Reference
Abstract class for an operator, which is a sub matrix of another matrix. More...
#include <submatrix.hh>
Public Types | |
typedef Cmplxtype< type >::type | c_type |
Complex type of data type. More... | |
typedef _SubMatrix_iterator< F, const type &, const type * > | const_iterator |
typedef std::conditional< std::is_same< typename Realtype< F >::type, F >::value, typename Realtype< F >::type, typename Cmplxtype< F >::type >::type | d_type |
Data type, depending if F is real or complex. More... | |
typedef _SubMatrix_iterator< F, type &, type * > | iterator |
typedef Realtype< type >::type | r_type |
Real type of data type. More... | |
typedef F::type | type |
Public Member Functions | |
template<class H , class I > | |
void | addInto (Matrix< H > &dest, const I fact, const uint rowoffset=0, const uint coloffset=0) const |
This matrix is added as block into to the given matrix. More... | |
iterator | begin (uint r=0) |
Iterator over the elements, standing at position (0,0) More... | |
const_iterator | begin (uint r=0) const |
Constant iterator over the elements, standing at position (0,0) More... | |
virtual void | convertCCS (type *a, int *asub, int *xa) const |
Converts sub matrix to CCS format. More... | |
virtual void | convertCRS (type *a, int *asub, int *xa) const |
Converts sub matrix to CRS format. More... | |
virtual void | convertIJK (type *, int *, int *) const |
Converts sub matrix to IJK format. More... | |
const_iterator | end () const |
Constant iterator, standing behind last element. More... | |
const Set< IndexRange > & | indicesX () const |
Returns index range for the rows. More... | |
const Set< IndexRange > & | indicesY () const |
Returns index range for the columns. More... | |
F & | matrix () |
Matrix, which the sub matrix is based on. More... | |
const F & | matrix () const |
template<class H , class I > | |
void | multiply (const H &fact, I &dest) const |
virtual void | operator() (const Function< c_type > &fncY, Function< c_type > &fncX) |
virtual void | operator() (const Function< r_type > &fncY, Function< type > &fncX) |
virtual type & | operator() (const uint i, const uint j) |
virtual type | operator() (const uint i, const uint j) const |
Index operator. More... | |
SubMatrixN () | |
Standard constructor. More... | |
SubMatrixN (F &m, const Set< IndexRange > &indicesX, const Set< IndexRange > &indicesY) | |
Constructor. More... | |
virtual void | transpMult (const Vector< c_type > &fncY, Vector< c_type > &fncX) |
virtual void | transpMult (const Vector< r_type > &fncY, Vector< type > &fncX) |
uint | used () const |
Number of elements in the sub matrix. More... | |
virtual | ~SubMatrixN () |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Protected Attributes | |
const Set< IndexRange > | indicesX_ |
Index sets of sub matrix. More... | |
const Set< IndexRange > | indicesY_ |
Private Attributes | |
F * | m_ |
Matrix. More... | |
Detailed Description
template<class F>
class concepts::SubMatrixN< F >
Abstract class for an operator, which is a sub matrix of another matrix.
- Parameters
-
F type of matrix
Definition at line 26 of file submatrix.hh.
Member Typedef Documentation
◆ c_type
typedef Cmplxtype<type>::type concepts::SubMatrixN< F >::c_type |
Complex type of data type.
Definition at line 47 of file submatrix.hh.
◆ const_iterator
typedef _SubMatrix_iterator<F, const type&, const type*> concepts::SubMatrixN< F >::const_iterator |
Definition at line 53 of file submatrix.hh.
◆ d_type
typedef std::conditional<std::is_same<typename Realtype<F>::type, F>::value , typename Realtype<F>::type, typename Cmplxtype<F>::type >::type concepts::SubMatrixN< F >::d_type |
Data type, depending if F is real or complex.
Definition at line 50 of file submatrix.hh.
◆ iterator
typedef _SubMatrix_iterator<F, type&, type*> concepts::SubMatrixN< F >::iterator |
Definition at line 52 of file submatrix.hh.
◆ r_type
typedef Realtype<type>::type concepts::SubMatrixN< F >::r_type |
Real type of data type.
Definition at line 45 of file submatrix.hh.
◆ type
typedef F::type concepts::SubMatrixN< F >::type |
Definition at line 43 of file submatrix.hh.
Constructor & Destructor Documentation
◆ SubMatrixN() [1/2]
concepts::SubMatrixN< F >::SubMatrixN | ( | F & | m, |
const Set< IndexRange > & | indicesX, | ||
const Set< IndexRange > & | indicesY | ||
) |
Constructor.
◆ SubMatrixN() [2/2]
concepts::SubMatrixN< F >::SubMatrixN | ( | ) |
Standard constructor.
◆ ~SubMatrixN()
|
inlinevirtual |
Definition at line 62 of file submatrix.hh.
Member Function Documentation
◆ addInto()
void concepts::SubMatrixN< F >::addInto | ( | Matrix< H > & | dest, |
const I | fact, | ||
const uint | rowoffset = 0 , |
||
const uint | coloffset = 0 |
||
) | const |
This matrix is added as block into to the given matrix.
- Parameters
-
dest Matrix into which this matrix should be added. fact Factor by which this matrix should be multiplied. rowoffset Row in dest
, where block begins.coloffset Column in dest
, where block begins.
Definition at line 134 of file submatrix.hh.
◆ begin() [1/2]
iterator concepts::SubMatrixN< F >::begin | ( | uint | r = 0 | ) |
Iterator over the elements, standing at position (0,0)
◆ begin() [2/2]
const_iterator concepts::SubMatrixN< F >::begin | ( | uint | r = 0 | ) | const |
Constant iterator over the elements, standing at position (0,0)
◆ convertCCS()
|
virtual |
Converts sub matrix to CCS format.
◆ convertCRS()
|
virtual |
Converts sub matrix to CRS format.
◆ convertIJK()
|
virtual |
Converts sub matrix to IJK format.
◆ end()
const_iterator concepts::SubMatrixN< F >::end | ( | ) | const |
Constant iterator, standing behind last element.
◆ indicesX()
|
inline |
Returns index range for the rows.
Definition at line 116 of file submatrix.hh.
◆ indicesY()
|
inline |
Returns index range for the columns.
Definition at line 118 of file submatrix.hh.
◆ info()
|
protectedvirtual |
◆ matrix() [1/2]
|
inline |
Matrix, which the sub matrix is based on.
Definition at line 121 of file submatrix.hh.
◆ matrix() [2/2]
|
inline |
Definition at line 122 of file submatrix.hh.
◆ multiply()
|
inline |
Definition at line 75 of file submatrix.hh.
◆ operator()() [1/4]
|
virtual |
◆ operator()() [2/4]
|
virtual |
◆ operator()() [3/4]
|
virtual |
◆ operator()() [4/4]
|
virtual |
Index operator.
◆ transpMult() [1/2]
|
virtual |
◆ transpMult() [2/2]
|
virtual |
◆ used()
uint concepts::SubMatrixN< F >::used | ( | ) | const |
Number of elements in the sub matrix.
The sub matrix will be travers with an iterator and the number of elements are count. That's interesting for a sparse sub matrix.
Member Data Documentation
◆ indicesX_
|
protected |
Index sets of sub matrix.
Definition at line 126 of file submatrix.hh.
◆ indicesY_
|
protected |
Definition at line 126 of file submatrix.hh.
◆ m_
|
private |
Definition at line 129 of file submatrix.hh.
The documentation for this class was generated from the following file:
- operator/submatrix.hh