3#ifndef DUNE_DYNMATRIX_HH
4#define DUNE_DYNMATRIX_HH
9#include <initializer_list>
28 template<
class K >
class DynamicMatrix;
42 typedef typename container_type::size_type
size_type;
59 std::vector< DynamicVector<K> > _data;
103 using Base::operator=;
108 assert(this->
rows());
109 return _data.front().size();
#define DUNE_ASSERT_BOUNDS(cond)
Definition boundschecking.hh:20
Implements a matrix constructed from a given type representing a field and a compile-time given numbe...
A few common exception classes.
This file implements a dense vector with a dynamic size.
Dune namespace.
Definition alignment.hh:11
A dense n x m matrix.
Definition densematrix.hh:135
Traits::value_type value_type
export the type representing the field
Definition densematrix.hh:149
size_type rows() const
number of rows
Definition densematrix.hh:664
Traits::row_type row_type
The type used to represent a row (must fulfill the Dune::DenseVector interface)
Definition densematrix.hh:161
Traits::size_type size_type
The type used for the index access and size operation.
Definition densematrix.hh:158
Construct a matrix with a dynamic size.
Definition dynmatrix.hh:58
size_type mat_cols() const
Definition dynmatrix.hh:107
DynamicMatrix(std::initializer_list< DynamicVector< K > > const &ll)
Constructor initializing the matrix from a list of vector.
Definition dynmatrix.hh:77
Base::row_type row_type
Definition dynmatrix.hh:64
Base::value_type value_type
Definition dynmatrix.hh:63
row_type & mat_access(size_type i)
Definition dynmatrix.hh:111
Base::size_type size_type
Definition dynmatrix.hh:62
size_type mat_rows() const
Definition dynmatrix.hh:106
const row_type & mat_access(size_type i) const
Definition dynmatrix.hh:115
void resize(size_type r, size_type c, value_type v=value_type())
resize matrix to r × c
Definition dynmatrix.hh:96
DynamicMatrix()
Default constructor.
Definition dynmatrix.hh:68
DynamicMatrix(size_type r, size_type c, value_type v=value_type())
Constructor initializing the whole matrix with a scalar.
Definition dynmatrix.hh:71
container_type::size_type size_type
Definition dynmatrix.hh:42
DynamicVector< K > row_type
Definition dynmatrix.hh:35
row_type & row_reference
Definition dynmatrix.hh:37
K value_type
Definition dynmatrix.hh:41
DynamicMatrix< K > derived_type
Definition dynmatrix.hh:33
const row_type & const_row_reference
Definition dynmatrix.hh:38
std::vector< K > container_type
Definition dynmatrix.hh:40
FieldTraits< K >::real_type real_type
Definition dynmatrix.hh:49
FieldTraits< K >::field_type field_type
Definition dynmatrix.hh:48
Construct a vector with a dynamic size.
Definition dynvector.hh:57
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
Definition matvectraits.hh:29