Dune::DiagonalMatrix< K, n > Class Template Reference

#include <diagonalmatrix.hh>

List of all members.


Detailed Description

template<class K, int n>
class Dune::DiagonalMatrix< K, n >

A diagonal matrix of static size.

Public Types

enum  { blocklevel = 1 }
 We are at the leaf of the block recursion. More...
enum  { rows = n, cols = n }
 export size More...
typedef K field_type
 export the type representing the field
typedef K block_type
 export the type representing the components
typedef std::size_t size_type
 The type used for the index access and size operations.
typedef DiagonalRowVector< K, n > row_type
 Each row is implemented by a field vector.
typedef
ReferenceStorageIterator
< DiagonalMatrix< K, n >
, reference, reference,
DiagonalMatrix< K, n > & > 
Iterator
 Iterator class for sequential access.
typedef Iterator iterator
 typedef for stl compliant access
typedef Iterator RowIterator
 rename the iterators for easier access
typedef row_type::Iterator ColIterator
 rename the iterators for easier access
typedef
ReferenceStorageIterator
< const DiagonalMatrix< K, n >
, const_reference,
const_reference, const
DiagonalMatrix< K, n > & > 
ConstIterator
 Iterator class for sequential access.
typedef ConstIterator const_iterator
 typedef for stl compliant access
typedef ConstIterator ConstRowIterator
 rename the iterators for easier access
typedef
const_row_type::ConstIterator 
ConstColIterator
 rename the iterators for easier access

Public Member Functions

 DiagonalMatrix ()
 Default constructor.
 DiagonalMatrix (const K &k)
 Constructor initializing the whole matrix with a scalar.
 DiagonalMatrix (const FieldVector< K, n > &diag)
 Constructor initializing the diagonal with a vector.
Iterator begin ()
 begin iterator
Iterator end ()
 end iterator
Iterator rbegin ()
 begin iterator
Iterator rend ()
 end iterator
ConstIterator begin () const
 begin iterator
ConstIterator end () const
 end iterator
ConstIterator rbegin () const
 begin iterator
ConstIterator rend () const
 end iterator
DiagonalMatrixoperator+= (const DiagonalMatrix &y)
 vector space addition
DiagonalMatrixoperator-= (const DiagonalMatrix &y)
 vector space subtraction
DiagonalMatrixoperator+= (const K &k)
 vector space multiplication with scalar
DiagonalMatrixoperator-= (const K &k)
 vector space division by scalar
DiagonalMatrixoperator*= (const K &k)
 vector space multiplication with scalar
DiagonalMatrixoperator/= (const K &k)
 vector space division by scalar
template<class X, class Y>
void mv (const X &x, Y &y) const
 y = A x
template<class X, class Y>
void umv (const X &x, Y &y) const
 y += A x
template<class X, class Y>
void umtv (const X &x, Y &y) const
 y += A^T x
template<class X, class Y>
void umhv (const X &x, Y &y) const
 y += A^H x
template<class X, class Y>
void mmv (const X &x, Y &y) const
 y -= A x
template<class X, class Y>
void mmtv (const X &x, Y &y) const
 y -= A^T x
template<class X, class Y>
void mmhv (const X &x, Y &y) const
 y -= A^H x
template<class X, class Y>
void usmv (const K &alpha, const X &x, Y &y) const
 y += alpha A x
template<class X, class Y>
void usmtv (const K &alpha, const X &x, Y &y) const
 y += alpha A^T x
template<class X, class Y>
void usmhv (const K &alpha, const X &x, Y &y) const
 y += alpha A^H x
double frobenius_norm () const
 frobenius norm: sqrt(sum over squared values of entries)
double frobenius_norm2 () const
 square of frobenius norm, need for block recursion
double infinity_norm () const
 infinity norm (row sum norm, how to generalize for blocks?)
double infinity_norm_real () const
 simplified infinity norm (uses Manhattan norm for complex values)
template<class V>
void solve (V &x, const V &b) const
 Solve system A x = b.
void invert ()
 Compute inverse.
determinant () const
 calculates the determinant of this matrix
size_type N () const
 number of blocks in row direction
size_type M () const
 number of blocks in column direction
bool exists (size_type i, size_type j) const
 return true when (i,j) is in pattern
reference operator[] (size_type i)
 Return reference object as row replacement.
const_reference operator[] (size_type i) const
 Return const_reference object as row replacement.
const K & diagonal (size_type i) const
 Get const reference to diagonal entry.
K & diagonal (size_type i)
 Get reference to diagonal entry.
const FieldVector< K, n > & diagonal () const
 Get const reference to diagonal vector.
FieldVector< K, n > & diagonal ()
 Get reference to diagonal vector.

Friends

std::ostream & operator<< (std::ostream &s, const DiagonalMatrix< K, n > &a)
 Sends the matrix to an output stream.

Member Enumeration Documentation

template<class K, int n>
anonymous enum

We are at the leaf of the block recursion.

Enumerator:
blocklevel  The number of block levels we contain. This is 1.

template<class K, int n>
anonymous enum

export size

Enumerator:
rows  The number of rows.
cols  The number of columns.


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

Generated on Thu Apr 2 10:40:17 2009 for dune-istl by  doxygen 1.5.6