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

A multiple of the identity matrix of static size. More...

#include <dune/istl/scaledidmatrix.hh>

List of all members.

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 row_type reference
typedef DiagonalRowVectorConst
< K, n > 
const_row_type
typedef const_row_type const_reference
typedef
ContainerWrapperIterator
< const WrapperType, reference,
reference
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
ContainerWrapperIterator
< const WrapperType,
const_reference,
const_reference
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

 ScaledIdentityMatrix ()
 Default constructor.
 ScaledIdentityMatrix (const K &k)
 Constructor initializing the whole matrix with a scalar.
ScaledIdentityMatrixoperator= (const K &k)
bool identical (const ScaledIdentityMatrix< K, n > &other) const
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
ScaledIdentityMatrixoperator+= (const ScaledIdentityMatrix &y)
 vector space addition
ScaledIdentityMatrixoperator-= (const ScaledIdentityMatrix &y)
 vector space subtraction
ScaledIdentityMatrixoperator+= (const K &k)
 vector space multiplication with scalar
ScaledIdentityMatrixoperator-= (const K &k)
 vector space division by scalar
ScaledIdentityMatrixoperator*= (const K &k)
 vector space multiplication with scalar
ScaledIdentityMatrixoperator/= (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 mtv (const X &x, Y &y) const
 y = A^T 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 K & scalar () const
 Get const reference to the scalar diagonal value.
K & scalar ()
 Get reference to the scalar diagonal value.

Friends

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

Detailed Description

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

A multiple of the identity matrix of static size.


Member Typedef Documentation

template<class K, int n>
typedef K Dune::ScaledIdentityMatrix< K, n >::block_type

export the type representing the components

template<class K, int n>
typedef row_type::Iterator Dune::ScaledIdentityMatrix< K, n >::ColIterator

rename the iterators for easier access

template<class K, int n>
typedef ConstIterator Dune::ScaledIdentityMatrix< K, n >::const_iterator

typedef for stl compliant access

template<class K, int n>
typedef const_row_type Dune::ScaledIdentityMatrix< K, n >::const_reference
template<class K, int n>
typedef DiagonalRowVectorConst<K,n> Dune::ScaledIdentityMatrix< K, n >::const_row_type

rename the iterators for easier access

Iterator class for sequential access.

template<class K, int n>
typedef ConstIterator Dune::ScaledIdentityMatrix< K, n >::ConstRowIterator

rename the iterators for easier access

template<class K, int n>
typedef K Dune::ScaledIdentityMatrix< K, n >::field_type

export the type representing the field

template<class K, int n>
typedef Iterator Dune::ScaledIdentityMatrix< K, n >::iterator

typedef for stl compliant access

template<class K, int n>
typedef ContainerWrapperIterator<const WrapperType, reference, reference> Dune::ScaledIdentityMatrix< K, n >::Iterator

Iterator class for sequential access.

template<class K, int n>
typedef row_type Dune::ScaledIdentityMatrix< K, n >::reference
template<class K, int n>
typedef DiagonalRowVector<K,n> Dune::ScaledIdentityMatrix< K, n >::row_type

Each row is implemented by a field vector.

template<class K, int n>
typedef Iterator Dune::ScaledIdentityMatrix< K, n >::RowIterator

rename the iterators for easier access

template<class K, int n>
typedef std::size_t Dune::ScaledIdentityMatrix< K, n >::size_type

The type used for the index access and size operations.


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.


Constructor & Destructor Documentation

template<class K, int n>
Dune::ScaledIdentityMatrix< K, n >::ScaledIdentityMatrix (  )  [inline]

Default constructor.

template<class K, int n>
Dune::ScaledIdentityMatrix< K, n >::ScaledIdentityMatrix ( const K &  k  )  [inline]

Constructor initializing the whole matrix with a scalar.


Member Function Documentation

template<class K, int n>
ConstIterator Dune::ScaledIdentityMatrix< K, n >::begin (  )  const [inline]

begin iterator

template<class K, int n>
Iterator Dune::ScaledIdentityMatrix< K, n >::begin (  )  [inline]

begin iterator

template<class K, int n>
K Dune::ScaledIdentityMatrix< K, n >::determinant (  )  const [inline]

calculates the determinant of this matrix

template<class K, int n>
K& Dune::ScaledIdentityMatrix< K, n >::diagonal ( size_type  i  )  [inline]

Get reference to diagonal entry.

template<class K, int n>
const K& Dune::ScaledIdentityMatrix< K, n >::diagonal ( size_type  i  )  const [inline]

Get const reference to diagonal entry.

template<class K, int n>
ConstIterator Dune::ScaledIdentityMatrix< K, n >::end (  )  const [inline]

end iterator

template<class K, int n>
Iterator Dune::ScaledIdentityMatrix< K, n >::end (  )  [inline]

end iterator

template<class K, int n>
bool Dune::ScaledIdentityMatrix< K, n >::exists ( size_type  i,
size_type  j 
) const [inline]

return true when (i,j) is in pattern

template<class K, int n>
double Dune::ScaledIdentityMatrix< K, n >::frobenius_norm (  )  const [inline]

frobenius norm: sqrt(sum over squared values of entries)

template<class K, int n>
double Dune::ScaledIdentityMatrix< K, n >::frobenius_norm2 (  )  const [inline]

square of frobenius norm, need for block recursion

template<class K, int n>
bool Dune::ScaledIdentityMatrix< K, n >::identical ( const ScaledIdentityMatrix< K, n > &  other  )  const [inline]
template<class K, int n>
double Dune::ScaledIdentityMatrix< K, n >::infinity_norm (  )  const [inline]

infinity norm (row sum norm, how to generalize for blocks?)

template<class K, int n>
double Dune::ScaledIdentityMatrix< K, n >::infinity_norm_real (  )  const [inline]

simplified infinity norm (uses Manhattan norm for complex values)

template<class K, int n>
void Dune::ScaledIdentityMatrix< K, n >::invert (  )  [inline]

Compute inverse.

template<class K, int n>
size_type Dune::ScaledIdentityMatrix< K, n >::M (  )  const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::mmhv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::mmtv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::mmv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::mtv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::mv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
size_type Dune::ScaledIdentityMatrix< K, n >::N (  )  const [inline]
template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator*= ( const K &  k  )  [inline]

vector space multiplication with scalar

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator+= ( const K &  k  )  [inline]

vector space multiplication with scalar

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator+= ( const ScaledIdentityMatrix< K, n > &  y  )  [inline]

vector space addition

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator-= ( const K &  k  )  [inline]

vector space division by scalar

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator-= ( const ScaledIdentityMatrix< K, n > &  y  )  [inline]

vector space subtraction

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator/= ( const K &  k  )  [inline]

vector space division by scalar

template<class K, int n>
ScaledIdentityMatrix& Dune::ScaledIdentityMatrix< K, n >::operator= ( const K &  k  )  [inline]
template<class K, int n>
const_reference Dune::ScaledIdentityMatrix< K, n >::operator[] ( size_type  i  )  const [inline]

Return const_reference object as row replacement.

template<class K, int n>
reference Dune::ScaledIdentityMatrix< K, n >::operator[] ( size_type  i  )  [inline]

Return reference object as row replacement.

template<class K, int n>
ConstIterator Dune::ScaledIdentityMatrix< K, n >::rbegin (  )  const [inline]

begin iterator

template<class K, int n>
Iterator Dune::ScaledIdentityMatrix< K, n >::rbegin (  )  [inline]

begin iterator

template<class K, int n>
ConstIterator Dune::ScaledIdentityMatrix< K, n >::rend (  )  const [inline]

end iterator

template<class K, int n>
Iterator Dune::ScaledIdentityMatrix< K, n >::rend (  )  [inline]

end iterator

template<class K, int n>
K& Dune::ScaledIdentityMatrix< K, n >::scalar (  )  [inline]

Get reference to the scalar diagonal value.

template<class K, int n>
const K& Dune::ScaledIdentityMatrix< K, n >::scalar (  )  const [inline]

Get const reference to the scalar diagonal value.

Referenced by Dune::istl_assign_to_fmatrix().

template<class K, int n>
template<class V >
void Dune::ScaledIdentityMatrix< K, n >::solve ( V &  x,
const V &  b 
) const [inline]

Solve system A x = b.

template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::umhv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::umtv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::umv ( const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::usmhv ( const K &  alpha,
const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::usmtv ( const K &  alpha,
const X &  x,
Y &  y 
) const [inline]
template<class K, int n>
template<class X , class Y >
void Dune::ScaledIdentityMatrix< K, n >::usmv ( const K &  alpha,
const X &  x,
Y &  y 
) const [inline]

Friends And Related Function Documentation

template<class K, int n>
std::ostream& operator<< ( std::ostream &  s,
const ScaledIdentityMatrix< K, n > &  a 
) [friend]

Sends the matrix to an output stream.


The documentation for this class was generated from the following file:
Generated on Sat Apr 24 11:13:50 2010 for dune-istl by  doxygen 1.6.3