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 typeoperator() (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< IndexRangeindicesX_
 Index sets of sub matrix. More...
 
const Set< IndexRangeindicesY_
 

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.

Author
Kersten Schmidt, 2005
Parameters
Ftype of matrix

Definition at line 26 of file submatrix.hh.

Member Typedef Documentation

◆ c_type

template<class F >
typedef Cmplxtype<type>::type concepts::SubMatrixN< F >::c_type

Complex type of data type.

Definition at line 47 of file submatrix.hh.

◆ const_iterator

template<class F >
typedef _SubMatrix_iterator<F, const type&, const type*> concepts::SubMatrixN< F >::const_iterator

Definition at line 53 of file submatrix.hh.

◆ d_type

template<class F >
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

template<class F >
typedef _SubMatrix_iterator<F, type&, type*> concepts::SubMatrixN< F >::iterator

Definition at line 52 of file submatrix.hh.

◆ r_type

template<class F >
typedef Realtype<type>::type concepts::SubMatrixN< F >::r_type

Real type of data type.

Definition at line 45 of file submatrix.hh.

◆ type

template<class F >
typedef F::type concepts::SubMatrixN< F >::type

Definition at line 43 of file submatrix.hh.

Constructor & Destructor Documentation

◆ SubMatrixN() [1/2]

template<class F >
concepts::SubMatrixN< F >::SubMatrixN ( F &  m,
const Set< IndexRange > &  indicesX,
const Set< IndexRange > &  indicesY 
)

Constructor.

◆ SubMatrixN() [2/2]

template<class F >
concepts::SubMatrixN< F >::SubMatrixN ( )

Standard constructor.

◆ ~SubMatrixN()

template<class F >
virtual concepts::SubMatrixN< F >::~SubMatrixN ( )
inlinevirtual

Definition at line 62 of file submatrix.hh.

Member Function Documentation

◆ addInto()

template<class F >
template<class H , class I >
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
destMatrix into which this matrix should be added.
factFactor by which this matrix should be multiplied.
rowoffsetRow in dest, where block begins.
coloffsetColumn in dest, where block begins.

Definition at line 134 of file submatrix.hh.

◆ begin() [1/2]

template<class F >
iterator concepts::SubMatrixN< F >::begin ( uint  r = 0)

Iterator over the elements, standing at position (0,0)

◆ begin() [2/2]

template<class F >
const_iterator concepts::SubMatrixN< F >::begin ( uint  r = 0) const

Constant iterator over the elements, standing at position (0,0)

◆ convertCCS()

template<class F >
virtual void concepts::SubMatrixN< F >::convertCCS ( type a,
int *  asub,
int *  xa 
) const
virtual

Converts sub matrix to CCS format.

◆ convertCRS()

template<class F >
virtual void concepts::SubMatrixN< F >::convertCRS ( type a,
int *  asub,
int *  xa 
) const
virtual

Converts sub matrix to CRS format.

◆ convertIJK()

template<class F >
virtual void concepts::SubMatrixN< F >::convertIJK ( type ,
int *  ,
int *   
) const
virtual

Converts sub matrix to IJK format.

◆ end()

template<class F >
const_iterator concepts::SubMatrixN< F >::end ( ) const

Constant iterator, standing behind last element.

◆ indicesX()

template<class F >
const Set<IndexRange>& concepts::SubMatrixN< F >::indicesX ( ) const
inline

Returns index range for the rows.

Definition at line 116 of file submatrix.hh.

◆ indicesY()

template<class F >
const Set<IndexRange>& concepts::SubMatrixN< F >::indicesY ( ) const
inline

Returns index range for the columns.

Definition at line 118 of file submatrix.hh.

◆ info()

template<class F >
virtual std::ostream& concepts::SubMatrixN< F >::info ( std::ostream &  os) const
protectedvirtual

◆ matrix() [1/2]

template<class F >
F& concepts::SubMatrixN< F >::matrix ( )
inline

Matrix, which the sub matrix is based on.

Definition at line 121 of file submatrix.hh.

◆ matrix() [2/2]

template<class F >
const F& concepts::SubMatrixN< F >::matrix ( ) const
inline

Definition at line 122 of file submatrix.hh.

◆ multiply()

template<class F >
template<class H , class I >
void concepts::SubMatrixN< F >::multiply ( const H &  fact,
I &  dest 
) const
inline

Definition at line 75 of file submatrix.hh.

◆ operator()() [1/4]

template<class F >
virtual void concepts::SubMatrixN< F >::operator() ( const Function< c_type > &  fncY,
Function< c_type > &  fncX 
)
virtual

◆ operator()() [2/4]

template<class F >
virtual void concepts::SubMatrixN< F >::operator() ( const Function< r_type > &  fncY,
Function< type > &  fncX 
)
virtual

◆ operator()() [3/4]

template<class F >
virtual type& concepts::SubMatrixN< F >::operator() ( const uint  i,
const uint  j 
)
virtual

◆ operator()() [4/4]

template<class F >
virtual type concepts::SubMatrixN< F >::operator() ( const uint  i,
const uint  j 
) const
virtual

Index operator.

◆ transpMult() [1/2]

template<class F >
virtual void concepts::SubMatrixN< F >::transpMult ( const Vector< c_type > &  fncY,
Vector< c_type > &  fncX 
)
virtual

◆ transpMult() [2/2]

template<class F >
virtual void concepts::SubMatrixN< F >::transpMult ( const Vector< r_type > &  fncY,
Vector< type > &  fncX 
)
virtual

◆ used()

template<class F >
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_

template<class F >
const Set<IndexRange> concepts::SubMatrixN< F >::indicesX_
protected

Index sets of sub matrix.

Definition at line 126 of file submatrix.hh.

◆ indicesY_

template<class F >
const Set<IndexRange> concepts::SubMatrixN< F >::indicesY_
protected

Definition at line 126 of file submatrix.hh.

◆ m_

template<class F >
F* concepts::SubMatrixN< F >::m_
private

Matrix.

Definition at line 129 of file submatrix.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich