DUNE PDELab (2.8)
matrix.hh
Go to the documentation of this file.
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:402
const window_type * operator->() const
arrow
Definition: matrix.hh:485
const window_type & operator*() const
dereferencing
Definition: matrix.hh:479
ConstIterator & operator++()
prefix increment
Definition: matrix.hh:439
ConstIterator(const B *data, size_type columns, size_type _i)
constructor from pointer
Definition: matrix.hh:412
ConstIterator & operator--()
prefix decrement
Definition: matrix.hh:447
ConstIterator(const Iterator &it)
constructor from non_const iterator
Definition: matrix.hh:418
bool operator!=(const ConstIterator &it) const
inequality
Definition: matrix.hh:461
ConstIterator()
constructor
Definition: matrix.hh:405
bool operator==(const ConstIterator &it) const
equality
Definition: matrix.hh:455
Iterator class for sequential access.
Definition: matrix.hh:261
Iterator & operator--()
prefix decrement
Definition: matrix.hh:306
bool operator!=(const Iterator &it) const
inequality
Definition: matrix.hh:320
Iterator & operator=(Iterator &&other)
Move assignment.
Definition: matrix.hh:280
Iterator & operator++()
prefix increment
Definition: matrix.hh:298
Iterator()
constructor, no arguments
Definition: matrix.hh:264
window_type & operator*() const
dereferencing
Definition: matrix.hh:338
bool operator==(const Iterator &it) const
equality
Definition: matrix.hh:314
Iterator & operator=(Iterator &other)
Copy assignment.
Definition: matrix.hh:289
Iterator(B *data, size_type columns, size_type _i)
constructor
Definition: matrix.hh:274
window_type * operator->() const
arrow
Definition: matrix.hh:344
A Vector of blocks with different blocksizes.
Definition: matrix.hh:42
BlockVector< B, A > block_type
Same as value_type, here for historical reasons.
Definition: matrix.hh:65
DenseMatrixBase & operator=(const DenseMatrixBase &a)
assignment
Definition: matrix.hh:180
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition: matrix.hh:48
void resize(size_type rows, size_type columns)
same effect as constructor with same argument
Definition: matrix.hh:151
DenseMatrixBase(size_type rows, size_type columns)
Definition: matrix.hh:93
reference operator[](size_type i)
random access to blocks
Definition: matrix.hh:239
BlockVector< B, A > value_type
Type of the elements of the outer vector, i.e., dynamic vectors of B.
Definition: matrix.hh:61
Iterator find(size_type i)
random access returning iterator (end if not contained)
Definition: matrix.hh:389
size_type N() const
number of blocks in the vector (are of variable size here)
Definition: matrix.hh:537
ConstIterator end() const
end ConstIterator
Definition: matrix.hh:516
ConstIterator rend() const
end ConstIterator
Definition: matrix.hh:529
ConstIterator begin() const
begin ConstIterator
Definition: matrix.hh:510
A allocator_type
export the allocator type
Definition: matrix.hh:51
ConstIterator find(size_type i) const
random access returning iterator (end if not contained)
Definition: matrix.hh:395
A::size_type size_type
The size type for the index access.
Definition: matrix.hh:54
~DenseMatrixBase()
free dynamic memory
Definition: matrix.hh:140
DenseMatrixBase(const DenseMatrixBase &a)
copy constructor, has copy semantics
Definition: matrix.hh:114
FieldTraits< ft >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: matrix.hh:990
FieldTraits< ft >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: matrix.hh:1009
void usmhv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: matrix.hh:954
void usmv(const field_type &alpha, const X &x, Y &y) const
Definition: matrix.hh:852
MatrixImp::DenseMatrixBase< T, A > data_
Abuse DenseMatrixBase as an engine for a 2d array ISTL-style.
Definition: matrix.hh:1079
Matrix transpose() const
Return the transpose of the matrix.
Definition: matrix.hh:743
MatrixImp::DenseMatrixBase< T, A >::ConstIterator ConstRowIterator
Const iterator over the matrix rows.
Definition: matrix.hh:584
void setSize(size_type rows, size_type cols)
Change the matrix size.
Definition: matrix.hh:606
Matrix & operator-=(const Matrix &b)
Subtract the entries of another matrix from this one.
Definition: matrix.hh:733
FieldTraits< field_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: matrix.hh:978
row_type::iterator ColIterator
Iterator for the entries of each row.
Definition: matrix.hh:581
Matrix & operator=(const field_type &t)
Assignment from scalar.
Definition: matrix.hh:664
const row_type operator[](size_type row) const
The const index operator.
Definition: matrix.hh:682
ConstRowIterator end() const
Get const iterator to one beyond last row.
Definition: matrix.hh:644
friend Y operator*(const Matrix< T > &m, const X &vec)
Generic matrix-vector multiplication.
Definition: matrix.hh:768
Matrix< T > & operator*=(const field_type &scalar)
Multiplication with a scalar.
Definition: matrix.hh:703
row_type operator[](size_type row)
The index operator.
Definition: matrix.hh:671
Matrix & operator+=(const Matrix &b)
Add the entries of another matrix to this one.
Definition: matrix.hh:719
ConstRowIterator begin() const
Get const iterator to first row.
Definition: matrix.hh:638
typename Imp::BlockTraits< T >::field_type field_type
Export the type representing the underlying field.
Definition: matrix.hh:563
row_type::const_iterator ConstColIterator
Const iterator for the entries of each row.
Definition: matrix.hh:587
static constexpr auto blocklevel
The number of nesting levels the matrix contains.
Definition: matrix.hh:591
T block_type
Export the type representing the components.
Definition: matrix.hh:566
bool exists(size_type i, size_type j) const
return true if (i,j) is in pattern
Definition: matrix.hh:1066
Matrix< T > & operator/=(const field_type &scalar)
Division by a scalar.
Definition: matrix.hh:709
friend Matrix< T > operator*(const Matrix< T > &m1, const Matrix< T > &m2)
Generic matrix multiplication.
Definition: matrix.hh:753
MatrixImp::DenseMatrixBase< T, A >::window_type row_type
The type implementing a matrix row.
Definition: matrix.hh:572
FieldTraits< field_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: matrix.hh:972
void usmtv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: matrix.hh:903
Matrix(size_type rows, size_type cols)
Create uninitialized matrix of size rows x cols.
Definition: matrix.hh:599
MatrixImp::DenseMatrixBase< T, A >::Iterator RowIterator
Iterator over the matrix rows.
Definition: matrix.hh:578
Traits for type conversions and type information.
Type traits to determine the type of reals (when working with complex numbers)
auto min(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::min()
Definition: defaults.hh:87
auto max(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::max()
Definition: defaults.hh:79
Implements a scalar matrix view wrapper around an existing scalar.
Implements a scalar vector view wrapper around an existing scalar.
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)