|
dune-common 2.8.0
|
Loading...
Searching...
No Matches
diagonalmatrix.hh
Go to the documentation of this file.
71 };
87 };
177 typedef ContainerWrapperIterator<const WrapperType, const_reference, const_reference> ConstIterator;
976 class ContainerWrapperIterator : public BidirectionalIteratorFacade<ContainerWrapperIterator<CW,T,R>,T, R, int>
980 friend class ContainerWrapperIterator<CW, typename mutable_reference<T>::type, typename mutable_reference<R>::type>;
981 friend class ContainerWrapperIterator<CW, typename const_reference<T>::type, typename const_reference<R>::type>;
983 typedef ContainerWrapperIterator<CW, typename mutable_reference<T>::type, typename mutable_reference<R>::type> MyType;
984 typedef ContainerWrapperIterator<CW, typename const_reference<T>::type, typename const_reference<R>::type> MyConstType;
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Macro for wrapping boundary checks.
Implements a generic iterator class for writing stl conformant iterators.
A few common exception classes.
Traits for type conversions and type information.
Implements a matrix constructed from a given type representing a field and a compile-time given numbe...
Implements a vector constructed from a given type representing a field and a compile-time given size.
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition boundschecking.hh:28
void mmhv(const X &x, Y &y) const
y -= A^H x
Definition diagonalmatrix.hh:355
DiagonalMatrix & operator*=(const K &k)
vector space multiplication with scalar
Definition diagonalmatrix.hh:244
FieldTraits< K >::field_type field_type
Definition diagonalmatrix.hh:545
std::size_t size_type
The type used for the index access and size operations.
Definition diagonalmatrix.hh:65
size_type dim() const
dimension of the vector space
Definition diagonalmatrix.hh:779
ConstIterator ConstRowIterator
rename the iterators for easier access
Definition diagonalmatrix.hh:181
K & operator[](size_type i)
random access
Definition diagonalmatrix.hh:858
ContainerWrapperIterator & operator=(OtherContainerWrapperIteratorType &other)
Definition diagonalmatrix.hh:1016
static constexpr size_type M()
number of blocks in column direction
Definition diagonalmatrix.hh:470
FieldVector< K, n > & diagonal()
Get reference to diagonal vector.
Definition diagonalmatrix.hh:531
void usmhv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition diagonalmatrix.hh:393
Iterator iterator
typedef for stl compliant access
Definition diagonalmatrix.hh:867
DiagonalRowVectorConst< K, n > type
Definition diagonalmatrix.hh:936
K field_type
export the type representing the field
Definition diagonalmatrix.hh:685
DiagonalRowVector< K, n > type
Definition diagonalmatrix.hh:942
ConstIterator beforeEnd() const
Definition diagonalmatrix.hh:752
const_row_type::ConstIterator ConstColIterator
rename the iterators for easier access
Definition diagonalmatrix.hh:183
bool exists(size_type i, size_type j) const
return true when (i,j) is in pattern
Definition diagonalmatrix.hh:480
ContainerWrapperIterator< const WrapperType, const_reference, const_reference > ConstIterator
Iterator class for sequential access.
Definition diagonalmatrix.hh:177
const_row_type const_row_reference
Definition diagonalmatrix.hh:79
ContainerWrapperIterator(CW containerWrapper, int position)
Definition diagonalmatrix.hh:994
DiagonalRowVector(K *p, int col)
Constructor making vector with identical coordinates.
Definition diagonalmatrix.hh:844
K & diagonal(size_type i)
Get reference to diagonal entry.
Definition diagonalmatrix.hh:519
void solve(V &x, const V &b) const
Solve system A x = b.
Definition diagonalmatrix.hh:436
static constexpr size_type N()
number of blocks in row direction
Definition diagonalmatrix.hh:464
ContainerWrapperIterator(OtherContainerWrapperIteratorType &other)
Definition diagonalmatrix.hh:1000
const_reference operator[](size_type i) const
Return const_reference object as row replacement.
Definition diagonalmatrix.hh:507
Iterator iterator
typedef for stl compliant access
Definition diagonalmatrix.hh:143
ConstIterator begin() const
begin ConstIterator
Definition diagonalmatrix.hh:739
ConstIterator const_iterator
typedef for stl compliant access
Definition diagonalmatrix.hh:898
bool identical(const DiagonalRowVectorConst< K, n > &other) const
Definition diagonalmatrix.hh:728
DiagonalMatrix & operator-=(const DiagonalMatrix &y)
vector space subtraction
Definition diagonalmatrix.hh:223
DiagonalRowVectorConst(K *p, int col)
Constructor making vector with identical coordinates.
Definition diagonalmatrix.hh:712
void mmtv(const X &x, Y &y) const
y -= A^T x
Definition diagonalmatrix.hh:343
DiagonalMatrix(const K &k)
Constructor initializing the whole matrix with a scalar.
Definition diagonalmatrix.hh:102
ContainerWrapperIterator< DiagonalRowVector< K, n >, K, K & > Iterator
Iterator class for sequential access.
Definition diagonalmatrix.hh:865
std::ptrdiff_t distanceTo(OtherContainerWrapperIteratorType &other) const
Definition diagonalmatrix.hh:1069
void umtv(const X &x, Y &y) const
y += A^T x
Definition diagonalmatrix.hh:307
ConstIterator const_iterator
typedef for stl compliant access
Definition diagonalmatrix.hh:736
double infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition diagonalmatrix.hh:425
DiagonalMatrixWrapper(const DiagonalMatrixType *mat)
Definition diagonalmatrix.hh:640
ContainerWrapperIterator< const WrapperType, reference, reference > Iterator
Iterator class for sequential access.
Definition diagonalmatrix.hh:141
DiagonalRowVector< K, n > type
Definition diagonalmatrix.hh:948
double frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition diagonalmatrix.hh:407
size_type rowIndex() const
index of this row in surrounding matrix
Definition diagonalmatrix.hh:785
DiagonalRowVector & operator=(const K &k)
Assignment operator for scalar.
Definition diagonalmatrix.hh:849
bool operator!=(const DiagonalMatrix &other) const
incomparison operator
Definition diagonalmatrix.hh:266
ConstIterator begin() const
begin iterator
Definition diagonalmatrix.hh:186
DiagonalMatrix & operator/=(const K &k)
vector space division by scalar
Definition diagonalmatrix.hh:251
ConstIterator const_iterator
typedef for stl compliant access
Definition diagonalmatrix.hh:179
bool identical(const DiagonalMatrix< K, n > &other) const
Check if matrix is the same object as the other matrix.
Definition diagonalmatrix.hh:134
size_type realIndex(int i) const
Definition diagonalmatrix.hh:644
const K & operator[](size_type i) const
same for read only access
Definition diagonalmatrix.hh:720
DiagonalRowVector()
Constructor making uninitialized vector.
Definition diagonalmatrix.hh:840
DiagonalRowVectorConst * operator&()
Definition diagonalmatrix.hh:808
bool operator==(const DiagonalRowVectorConst &y) const
Binary vector comparison.
Definition diagonalmatrix.hh:765
double frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition diagonalmatrix.hh:413
ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > ConstIterator
ConstIterator class for sequential access.
Definition diagonalmatrix.hh:896
bool identical(const DiagonalMatrixWrapper &other) const
Definition diagonalmatrix.hh:655
void usmtv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition diagonalmatrix.hh:380
const FieldVector< K, n > & diagonal() const
Get const reference to diagonal vector.
Definition diagonalmatrix.hh:525
const K & diagonal(size_type i) const
Get const reference to diagonal entry.
Definition diagonalmatrix.hh:513
size_type N() const
number of blocks in the vector (are of size 1 here)
Definition diagonalmatrix.hh:773
DiagonalMatrix(std::initializer_list< K > const &l)
Construct diagonal matrix from an initializer list.
Definition diagonalmatrix.hh:119
row_type::Iterator ColIterator
rename the iterators for easier access
Definition diagonalmatrix.hh:147
K field_type
export the type representing the field
Definition diagonalmatrix.hh:831
reference operator[](size_type i)
Return reference object as row replacement.
Definition diagonalmatrix.hh:501
DiagonalRowVectorConst< K, n > type
Definition diagonalmatrix.hh:930
DiagonalMatrix(const FieldVector< K, n > &diag)
Constructor initializing the diagonal with a vector.
Definition diagonalmatrix.hh:107
std::size_t size_type
The type used for the index access and size operation.
Definition diagonalmatrix.hh:837
void usmv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A x
Definition diagonalmatrix.hh:367
double infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition diagonalmatrix.hh:419
DiagonalMatrix & operator+=(const DiagonalMatrix &y)
vector space addition
Definition diagonalmatrix.hh:216
K block_type
export the type representing the components
Definition diagonalmatrix.hh:62
void umhv(const X &x, Y &y) const
y += A^H x
Definition diagonalmatrix.hh:319
static void apply(DenseMatrix &denseMatrix, DiagonalMatrix< field, N > const &rhs)
Definition diagonalmatrix.hh:1087
ContainerWrapperIterator(const MyType &other)
Definition diagonalmatrix.hh:1005
ConstIterator end() const
end ConstIterator
Definition diagonalmatrix.hh:745
std::size_t size_type
The type used for the index access and size operation.
Definition diagonalmatrix.hh:691
DiagonalMatrix & operator=(const K &k)
Assignment from a scalar.
Definition diagonalmatrix.hh:127
DiagonalRowVectorConst()
Constructor making uninitialized vector.
Definition diagonalmatrix.hh:706
size_type realIndex(int i) const
Definition diagonalmatrix.hh:798
friend std::ostream & operator<<(std::ostream &s, const DiagonalMatrix< K, n > &a)
Sends the matrix to an output stream.
Definition diagonalmatrix.hh:490
K value_type
export the type representing the field
Definition diagonalmatrix.hh:58
K block_type
export the type representing the components
Definition diagonalmatrix.hh:688
K determinant() const
calculates the determinant of this matrix
Definition diagonalmatrix.hh:451
FieldTraits< K >::real_type real_type
Definition diagonalmatrix.hh:546
ConstIterator beforeBegin() const
Definition diagonalmatrix.hh:759
DiagonalMatrixWrapper()
Definition diagonalmatrix.hh:636
ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > ConstIterator
ConstIterator class for sequential access.
Definition diagonalmatrix.hh:734
bool operator==(const DiagonalMatrix &other) const
comparison operator
Definition diagonalmatrix.hh:260
DiagonalRowVectorConst< K, n > const_row_type
Definition diagonalmatrix.hh:77
DiagonalRowVector< K, n > row_type
Each row is implemented by a field vector.
Definition diagonalmatrix.hh:74
bool equals(const MyType &other) const
Definition diagonalmatrix.hh:1031
Iterator RowIterator
rename the iterators for easier access
Definition diagonalmatrix.hh:145
K block_type
export the type representing the components
Definition diagonalmatrix.hh:834
const K & diagonal() const
the diagonal value
Definition diagonalmatrix.hh:791
@ blocklevel
The number of block levels we contain.
Definition diagonalmatrix.hh:696
@ blocklevel
The number of block levels we contain. This is 1.
Definition diagonalmatrix.hh:70
K conjugateComplex(const K &x)
compute conjugate complex of x
Definition math.hh:161
you have to specialize this structure for any type that should be assignable to a DenseMatrix
Definition densematrix.hh:84
FieldTraits< value_type >::real_type two_norm2() const
square of two norm (sum over squared values of entries), need for block recursion
Definition densevector.hh:651
FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition densevector.hh:642
FieldTraits< vt >::real_type infinity_norm() const
infinity norm (maximum of absolute values of entries)
Definition densevector.hh:662
FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition densevector.hh:678
Definition diagonalmatrix.hh:671
Definition diagonalmatrix.hh:820
Definition diagonalmatrix.hh:623
Iterator class for sparse vector-like containers.
Definition diagonalmatrix.hh:977
ContainerWrapperIterator(const MyConstType &other)
Definition diagonalmatrix.hh:1010
bool equals(const MyConstType &other) const
Definition diagonalmatrix.hh:1036
Definition ftraits.hh:24
T field_type
export the type representing the field
Definition ftraits.hh:26
T real_type
export the type representing the real type of the field
Definition ftraits.hh:28
Get the 'const' version of a reference to a mutable object.
Definition genericiterator.hh:85
get the 'mutable' version of a reference to a const object
Definition genericiterator.hh:114
Facade class for stl conformant bidirectional iterators.
Definition iteratorfacades.hh:272
T begin(T... args)
T copy_n(T... args)
T endl(T... args)
T min(T... args)
T size(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8