MathTL
 All Classes Functions Variables Typedefs Enumerations
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
MathTL::DecomposableMatrix< C > Class Template Reference

#include <decomposable_matrix.h>

Inheritance diagram for MathTL::DecomposableMatrix< C >:
MathTL::Matrix< C > MathTL::MatrixBlock< C >

List of all members.

Public Types

enum  DecompositionType { none, LU, QU }
typedef Vector< C >::size_type size_type

Public Member Functions

 DecomposableMatrix (const size_type n=0)
 DecomposableMatrix (const DecomposableMatrix< C > &M)
 DecomposableMatrix (const Matrix< C > &M)
DecomposableMatrix< C > & operator= (const DecomposableMatrix< C > &M)
const size_type row_dimension () const
const size_type column_dimension () const
const size_type size () const
void decompose (DecompositionType d=LU)
void solve (const Vector< C > &b, Vector< C > &x, DecompositionType d=LU)
void print (std::ostream &os, const unsigned int tabwidth=10, const unsigned int precision=3) const

Protected Member Functions

void LU_decomposition ()
void QU_decomposition ()
void revert_decomposition ()

Protected Attributes

DecompositionType decomposition
Vector< double > D
Array1D< size_typeP

Detailed Description

template<class C>
class MathTL::DecomposableMatrix< C >

This class models finite, densely populated matrices M = (m_{i,j})_{0<=i<m, 0<=j<n} with entries from an arbitrary (scalar) class C, designed for the solution of linear systems A*x=b or least squares problems min \|A*x-b\|_2 by the application of LU or QU factorization (m >= n). The factorizations is stored in place.


Member Typedef Documentation

template<class C>
typedef Vector<C>::size_type MathTL::DecomposableMatrix< C >::size_type

type of indices and size type (cf. STL containers)

Reimplemented from MathTL::Matrix< C >.


Member Enumeration Documentation

type of factorizations


Constructor & Destructor Documentation

template<class C >
MathTL::DecomposableMatrix< C >::DecomposableMatrix ( const size_type  n = 0) [inline, explicit]

default constructor, yields zero square matrix which is empty per default

template<class C>
MathTL::DecomposableMatrix< C >::DecomposableMatrix ( const DecomposableMatrix< C > &  M) [inline]

copy constructor

template<class C>
MathTL::DecomposableMatrix< C >::DecomposableMatrix ( const Matrix< C > &  M) [inline]

copy constructor from a Matrix


Member Function Documentation

template<class C >
const DecomposableMatrix< C >::size_type MathTL::DecomposableMatrix< C >::column_dimension ( ) const [inline, virtual]

column dimension

Reimplemented from MathTL::Matrix< C >.

template<class C >
void MathTL::DecomposableMatrix< C >::decompose ( DecompositionType  d = LU)

perform (or revert) decomposition

template<class C>
DecomposableMatrix< C > & MathTL::DecomposableMatrix< C >::operator= ( const DecomposableMatrix< C > &  M)

assignment from another matrix

template<class C >
void MathTL::DecomposableMatrix< C >::print ( std::ostream &  os,
const unsigned int  tabwidth = 10,
const unsigned int  precision = 3 
) const [inline, virtual]

stream output with user-defined tabwidth and precision (cf. deal.II)

Reimplemented from MathTL::Matrix< C >.

template<class C >
const DecomposableMatrix< C >::size_type MathTL::DecomposableMatrix< C >::row_dimension ( ) const [inline, virtual]

row dimension

Reimplemented from MathTL::Matrix< C >.

template<class C >
const DecomposableMatrix< C >::size_type MathTL::DecomposableMatrix< C >::size ( ) const [inline]

size as an STL-compatible container for matrix entries

Reimplemented from MathTL::Matrix< C >.

template<class C>
void MathTL::DecomposableMatrix< C >::solve ( const Vector< C > &  b,
Vector< C > &  x,
DecompositionType  d = LU 
)

solve the linear system A*x=b via a given decomposition (x will be scaled appropriately)


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations