Dune Core Modules (2.7.1)
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
matrix.hh
Go to the documentation of this file.
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:401
const window_type * operator->() const
arrow
Definition: matrix.hh:484
const window_type & operator*() const
dereferencing
Definition: matrix.hh:478
ConstIterator & operator++()
prefix increment
Definition: matrix.hh:438
ConstIterator(const B *data, size_type columns, size_type _i)
constructor from pointer
Definition: matrix.hh:411
ConstIterator & operator--()
prefix decrement
Definition: matrix.hh:446
ConstIterator(const Iterator &it)
constructor from non_const iterator
Definition: matrix.hh:417
bool operator!=(const ConstIterator &it) const
inequality
Definition: matrix.hh:460
ConstIterator()
constructor
Definition: matrix.hh:404
bool operator==(const ConstIterator &it) const
equality
Definition: matrix.hh:454
Iterator class for sequential access.
Definition: matrix.hh:260
Iterator & operator--()
prefix decrement
Definition: matrix.hh:305
bool operator!=(const Iterator &it) const
inequality
Definition: matrix.hh:319
Iterator & operator=(Iterator &&other)
Move assignment.
Definition: matrix.hh:279
Iterator & operator++()
prefix increment
Definition: matrix.hh:297
Iterator()
constructor, no arguments
Definition: matrix.hh:263
window_type & operator*() const
dereferencing
Definition: matrix.hh:337
bool operator==(const Iterator &it) const
equality
Definition: matrix.hh:313
Iterator & operator=(Iterator &other)
Copy assignment.
Definition: matrix.hh:288
Iterator(B *data, size_type columns, size_type _i)
constructor
Definition: matrix.hh:273
window_type * operator->() const
arrow
Definition: matrix.hh:343
A Vector of blocks with different blocksizes.
Definition: matrix.hh:41
BlockVector< B, A > block_type
Same as value_type, here for historical reasons.
Definition: matrix.hh:64
DenseMatrixBase & operator=(const DenseMatrixBase &a)
assignment
Definition: matrix.hh:179
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition: matrix.hh:47
void resize(size_type rows, size_type columns)
same effect as constructor with same argument
Definition: matrix.hh:150
DenseMatrixBase(size_type rows, size_type columns)
Definition: matrix.hh:92
reference operator[](size_type i)
random access to blocks
Definition: matrix.hh:238
BlockVector< B, A > value_type
Type of the elements of the outer vector, i.e., dynamic vectors of B.
Definition: matrix.hh:60
Iterator find(size_type i)
random access returning iterator (end if not contained)
Definition: matrix.hh:388
size_type N() const
number of blocks in the vector (are of variable size here)
Definition: matrix.hh:536
ConstIterator end() const
end ConstIterator
Definition: matrix.hh:515
ConstIterator rend() const
end ConstIterator
Definition: matrix.hh:528
ConstIterator begin() const
begin ConstIterator
Definition: matrix.hh:509
A allocator_type
export the allocator type
Definition: matrix.hh:50
ConstIterator find(size_type i) const
random access returning iterator (end if not contained)
Definition: matrix.hh:394
A::size_type size_type
The size type for the index access.
Definition: matrix.hh:53
~DenseMatrixBase()
free dynamic memory
Definition: matrix.hh:139
DenseMatrixBase(const DenseMatrixBase &a)
copy constructor, has copy semantics
Definition: matrix.hh:113
FieldTraits< ft >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: matrix.hh:988
FieldTraits< ft >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: matrix.hh:1007
void usmhv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: matrix.hh:952
void usmv(const field_type &alpha, const X &x, Y &y) const
Definition: matrix.hh:850
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:741
MatrixImp::DenseMatrixBase< T, A >::ConstIterator ConstRowIterator
Const iterator over the matrix rows.
Definition: matrix.hh:583
void setSize(size_type rows, size_type cols)
Change the matrix size.
Definition: matrix.hh:604
Matrix & operator-=(const Matrix &b)
Subtract the entries of another matrix from this one.
Definition: matrix.hh:731
FieldTraits< field_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: matrix.hh:976
row_type::iterator ColIterator
Iterator for the entries of each row.
Definition: matrix.hh:580
Matrix & operator=(const field_type &t)
Assignment from scalar.
Definition: matrix.hh:662
const row_type operator[](size_type row) const
The const index operator.
Definition: matrix.hh:680
ConstRowIterator end() const
Get const iterator to one beyond last row.
Definition: matrix.hh:642
friend Y operator*(const Matrix< T > &m, const X &vec)
Generic matrix-vector multiplication.
Definition: matrix.hh:766
Matrix< T > & operator*=(const field_type &scalar)
Multiplication with a scalar.
Definition: matrix.hh:701
row_type operator[](size_type row)
The index operator.
Definition: matrix.hh:669
static constexpr unsigned int blocklevel
The number of nesting levels the matrix contains.
Definition: matrix.hh:589
Matrix & operator+=(const Matrix &b)
Add the entries of another matrix to this one.
Definition: matrix.hh:717
ConstRowIterator begin() const
Get const iterator to first row.
Definition: matrix.hh:636
typename Imp::BlockTraits< T >::field_type field_type
Export the type representing the underlying field.
Definition: matrix.hh:562
row_type::const_iterator ConstColIterator
Const iterator for the entries of each row.
Definition: matrix.hh:586
T block_type
Export the type representing the components.
Definition: matrix.hh:565
bool exists(size_type i, size_type j) const
return true if (i,j) is in pattern
Definition: matrix.hh:1064
Matrix< T > & operator/=(const field_type &scalar)
Division by a scalar.
Definition: matrix.hh:707
friend Matrix< T > operator*(const Matrix< T > &m1, const Matrix< T > &m2)
Generic matrix multiplication.
Definition: matrix.hh:751
MatrixImp::DenseMatrixBase< T, A >::window_type row_type
The type implementing a matrix row.
Definition: matrix.hh:571
FieldTraits< field_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: matrix.hh:970
void usmtv(const field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: matrix.hh:901
Matrix(size_type rows, size_type cols)
Create uninitialized matrix of size rows x cols.
Definition: matrix.hh:597
MatrixImp::DenseMatrixBase< T, A >::Iterator RowIterator
Iterator over the matrix rows.
Definition: matrix.hh:577
Type traits to determine the type of reals (when working with complex numbers)
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentionally unused function parameters with.
Definition: unused.hh:25
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.
Traits for type conversions and type information.
