Dune Core Modules (2.9.0)
matrix.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
Helper functions for determining the vector/matrix block level.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
ConstIterator class for sequential access.
Definition: matrix.hh:404
const window_type * operator->() const
arrow
Definition: matrix.hh:487
const window_type & operator*() const
dereferencing
Definition: matrix.hh:481
ConstIterator & operator++()
prefix increment
Definition: matrix.hh:441
ConstIterator(const B *data, size_type columns, size_type _i)
constructor from pointer
Definition: matrix.hh:414
ConstIterator & operator--()
prefix decrement
Definition: matrix.hh:449
ConstIterator(const Iterator &it)
constructor from non_const iterator
Definition: matrix.hh:420
bool operator!=(const ConstIterator &it) const
inequality
Definition: matrix.hh:463
ConstIterator()
constructor
Definition: matrix.hh:407
bool operator==(const ConstIterator &it) const
equality
Definition: matrix.hh:457
Iterator class for sequential access.
Definition: matrix.hh:263
Iterator & operator--()
prefix decrement
Definition: matrix.hh:308
bool operator!=(const Iterator &it) const
inequality
Definition: matrix.hh:322
Iterator & operator=(Iterator &&other)
Move assignment.
Definition: matrix.hh:282
Iterator & operator++()
prefix increment
Definition: matrix.hh:300
Iterator()
constructor, no arguments
Definition: matrix.hh:266
window_type & operator*() const
dereferencing
Definition: matrix.hh:340
bool operator==(const Iterator &it) const
equality
Definition: matrix.hh:316
Iterator & operator=(Iterator &other)
Copy assignment.
Definition: matrix.hh:291
Iterator(B *data, size_type columns, size_type _i)
constructor
Definition: matrix.hh:276
window_type * operator->() const
arrow
Definition: matrix.hh:346
A Vector of blocks with different blocksizes.
Definition: matrix.hh:44
BlockVector< B, A > block_type
Same as value_type, here for historical reasons.
Definition: matrix.hh:67
DenseMatrixBase & operator=(const DenseMatrixBase &a)
assignment
Definition: matrix.hh:182
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition: matrix.hh:50
void resize(size_type rows, size_type columns)
same effect as constructor with same argument
Definition: matrix.hh:153
DenseMatrixBase(size_type rows, size_type columns)
Definition: matrix.hh:95
reference operator[](size_type i)
random access to blocks
Definition: matrix.hh:241
BlockVector< B, A > value_type
Type of the elements of the outer vector, i.e., dynamic vectors of B.
Definition: matrix.hh:63
Iterator find(size_type i)
random access returning iterator (end if not contained)
Definition: matrix.hh:391
size_type N() const
number of blocks in the vector (are of variable size here)
Definition: matrix.hh:539
ConstIterator end() const
end ConstIterator
Definition: matrix.hh:518
ConstIterator rend() const
end ConstIterator
Definition: matrix.hh:531
ConstIterator begin() const
begin ConstIterator
Definition: matrix.hh:512
A allocator_type
export the allocator type
Definition: matrix.hh:53
ConstIterator find(size_type i) const
random access returning iterator (end if not contained)
Definition: matrix.hh:397
A::size_type size_type
The size type for the index access.
Definition: matrix.hh:56
~DenseMatrixBase()
free dynamic memory
Definition: matrix.hh:142
DenseMatrixBase(const DenseMatrixBase &a)
copy constructor, has copy semantics
Definition: matrix.hh:116
FieldTraits< ft >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: matrix.hh:992
FieldTraits< ft >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: matrix.hh:1011
void usmhv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: matrix.hh:956
void usmv(const field_type &alpha, const X &x, Y &y) const
Definition: matrix.hh:854
MatrixImp::DenseMatrixBase< T, A > data_
Abuse DenseMatrixBase as an engine for a 2d array ISTL-style.
Definition: matrix.hh:1081
Matrix transpose() const
Return the transpose of the matrix.
Definition: matrix.hh:745
MatrixImp::DenseMatrixBase< T, A >::ConstIterator ConstRowIterator
Const iterator over the matrix rows.
Definition: matrix.hh:586
void setSize(size_type rows, size_type cols)
Change the matrix size.
Definition: matrix.hh:608
Matrix & operator-=(const Matrix &b)
Subtract the entries of another matrix from this one.
Definition: matrix.hh:735
FieldTraits< field_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: matrix.hh:980
row_type::iterator ColIterator
Iterator for the entries of each row.
Definition: matrix.hh:583
Matrix & operator=(const field_type &t)
Assignment from scalar.
Definition: matrix.hh:666
const row_type operator[](size_type row) const
The const index operator.
Definition: matrix.hh:684
ConstRowIterator end() const
Get const iterator to one beyond last row.
Definition: matrix.hh:646
friend Y operator*(const Matrix< T > &m, const X &vec)
Generic matrix-vector multiplication.
Definition: matrix.hh:770
Matrix< T > & operator*=(const field_type &scalar)
Multiplication with a scalar.
Definition: matrix.hh:705
row_type operator[](size_type row)
The index operator.
Definition: matrix.hh:673
Matrix & operator+=(const Matrix &b)
Add the entries of another matrix to this one.
Definition: matrix.hh:721
ConstRowIterator begin() const
Get const iterator to first row.
Definition: matrix.hh:640
typename Imp::BlockTraits< T >::field_type field_type
Export the type representing the underlying field.
Definition: matrix.hh:565
row_type::const_iterator ConstColIterator
Const iterator for the entries of each row.
Definition: matrix.hh:589
static constexpr auto blocklevel
The number of nesting levels the matrix contains.
Definition: matrix.hh:593
T block_type
Export the type representing the components.
Definition: matrix.hh:568
bool exists(size_type i, size_type j) const
return true if (i,j) is in pattern
Definition: matrix.hh:1068
Matrix< T > & operator/=(const field_type &scalar)
Division by a scalar.
Definition: matrix.hh:711
friend Matrix< T > operator*(const Matrix< T > &m1, const Matrix< T > &m2)
Generic matrix multiplication.
Definition: matrix.hh:755
MatrixImp::DenseMatrixBase< T, A >::window_type row_type
The type implementing a matrix row.
Definition: matrix.hh:574
FieldTraits< field_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: matrix.hh:974
void usmtv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: matrix.hh:905
Matrix(size_type rows, size_type cols)
Create uninitialized matrix of size rows x cols.
Definition: matrix.hh:601
MatrixImp::DenseMatrixBase< T, A >::Iterator RowIterator
Iterator over the matrix rows.
Definition: matrix.hh:580
Traits for type conversions and type information.
Type traits to determine the type of reals (when working with complex numbers)
auto max(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::max()
Definition: defaults.hh:81
Implements a scalar matrix view wrapper around an existing scalar.
Implements a scalar vector view wrapper around an existing scalar.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Dec 21, 23:30, 2024)