1 #ifndef DUNE_COMMON_IDENTITYMATRIX_HH
2 #define DUNE_COMMON_IDENTITYMATRIX_HH
34 template<
class K,
int N >
48 template<
class X,
class Y >
49 void mv (
const X &x, Y &y )
const
55 template<
class X,
class Y >
56 void mtv (
const X &x, Y &y )
const
62 template<
class X,
class Y >
63 void umv (
const X &x, Y &y )
const
69 template<
class X,
class Y >
70 void umtv (
const X &x, Y &y )
const
76 template<
class X,
class Y >
77 void umhv (
const X &x, Y &y )
const
83 template<
class X,
class Y >
84 void mmv (
const X &x, Y &y )
const
90 template<
class X,
class Y >
91 void mmtv (
const X &x, Y &y )
const
97 template<
class X,
class Y >
98 void mmhv (
const X &x, Y &y )
const
104 template<
class X,
class Y >
105 void usmv (
const field_type &alpha,
const X &x, Y &y )
const
111 template<
class X,
class Y >
112 void usmtv (
const field_type &alpha,
const X &x, Y &y )
const
118 template<
class X,
class Y >
119 void usmhv (
const field_type &alpha,
const X &x, Y &y )
const
152 for(
int i = 0; i < N; ++i )
160 #endif // #ifndef DUNE_COMMON_IDENTITYMATRIX_HH
std::size_t size_type
size type
Definition: identitymatrix.hh:40
void usmtv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: identitymatrix.hh:112
void mtv(const X &x, Y &y) const
y = A^T x
Definition: identitymatrix.hh:56
void usmhv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: identitymatrix.hh:119
FieldTraits< field_type >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: identitymatrix.hh:143
K field_type
field type
Definition: identitymatrix.hh:38
FieldTraits< field_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: identitymatrix.hh:131
#define DUNE_CONSTEXPR
Set method or expression constexpr if supported by the compiler.
Definition: constexpr.hh:21
DUNE_CONSTEXPR size_type cols() const
return number of columns
Definition: identitymatrix.hh:45
void umhv(const X &x, Y &y) const
y += A^H x
Definition: identitymatrix.hh:77
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:27
void umv(const X &x, Y &y) const
y += A x
Definition: identitymatrix.hh:63
void umtv(const X &x, Y &y) const
y += A^T x
Definition: identitymatrix.hh:70
void mmhv(const X &x, Y &y) const
y -= A^H x
Definition: identitymatrix.hh:98
Dune namespace.
Definition: alignment.hh:9
void mv(const X &x, Y &y) const
y = A x
Definition: identitymatrix.hh:49
Type traits to determine the type of reals (when working with complex numbers)
FieldTraits< field_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: identitymatrix.hh:125
void mmv(const X &x, Y &y) const
y -= A x
Definition: identitymatrix.hh:84
DUNE_CONSTEXPR size_type rows() const
return number of rows
Definition: identitymatrix.hh:43
Some useful basic math stuff.
void mmtv(const X &x, Y &y) const
y -= A^T x
Definition: identitymatrix.hh:91
Definition of the DUNE_CONSTEXPR macro.
FieldTraits< field_type >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: identitymatrix.hh:137
void usmv(const field_type &alpha, const X &x, Y &y) const
y += alpha A x
Definition: identitymatrix.hh:105
Implements a matrix constructed from a given type representing a field and compile-time given number ...
A dense n x m matrix.
Definition: densematrix.hh:35
Read-only identity matrix.
Definition: identitymatrix.hh:35