dune-common  2.7.0
Public Types | Public Member Functions | List of all members
Dune::FieldMatrix< K, ROWS, COLS > Class Template Reference

A dense n x m matrix. More...

#include <dune/common/densematrix.hh>

Public Types

enum  { rows = ROWS, cols = COLS }
 export size More...
 
typedef Base::size_type size_type
 
typedef Base::row_type row_type
 
typedef Base::row_reference row_reference
 
typedef Base::const_row_reference const_row_reference
 

Public Member Functions

constexpr FieldMatrix ()=default
 Default constructor. More...
 
 FieldMatrix (std::initializer_list< Dune::FieldVector< K, cols > > const &l)
 Constructor initializing the matrix from a list of vector. More...
 
template<class T , typename = std::enable_if_t<HasDenseMatrixAssigner<FieldMatrix, T>::value>>
 FieldMatrix (T const &rhs)
 
FieldMatrixoperator= (const FieldMatrix &)=default
 copy assignment operator More...
 
template<typename T >
FieldMatrixoperator= (const FieldMatrix< T, ROWS, COLS > &x)
 copy assignment from FieldMatrix over a different field More...
 
template<typename T , int rows, int cols>
FieldMatrixoperator= (FieldMatrix< T, rows, cols > const &)=delete
 no copy assignment from FieldMatrix of different size More...
 
template<int l>
FieldMatrix< K, l, colsleftmultiplyany (const FieldMatrix< K, l, rows > &M) const
 Multiplies M from the left to this matrix, this matrix is not modified. More...
 
template<int r, int c>
FieldMatrixrightmultiply (const FieldMatrix< K, r, c > &M)
 Multiplies M from the right to this matrix. More...
 
template<int l>
FieldMatrix< K, rows, l > rightmultiplyany (const FieldMatrix< K, cols, l > &M) const
 Multiplies M from the right to this matrix, this matrix is not modified. More...
 
constexpr size_type mat_rows () const
 
constexpr size_type mat_cols () const
 
row_reference mat_access (size_type i)
 
const_row_reference mat_access (size_type i) const
 
template<class RHS , class = std::enable_if_t< HasDenseMatrixAssigner< MAT, RHS >::value >>
derived_type & operator= (const RHS &rhs)
 
template<typename M2 >
MAT & rightmultiply (const DenseMatrix< M2 > &M)
 Multiplies M from the right to this matrix. More...
 

Detailed Description

template<class K, int ROWS, int COLS>
class Dune::FieldMatrix< K, ROWS, COLS >

A dense n x m matrix.

Matrices represent linear maps from a vector space V to a vector space W. This class represents such a linear map by storing a two-dimensional array of numbers of a given field type K. The number of rows and columns is given at compile time.

Member Typedef Documentation

◆ const_row_reference

template<class K , int ROWS, int COLS>
typedef Base::const_row_reference Dune::FieldMatrix< K, ROWS, COLS >::const_row_reference

◆ row_reference

template<class K , int ROWS, int COLS>
typedef Base::row_reference Dune::FieldMatrix< K, ROWS, COLS >::row_reference

◆ row_type

template<class K , int ROWS, int COLS>
typedef Base::row_type Dune::FieldMatrix< K, ROWS, COLS >::row_type

◆ size_type

template<class K , int ROWS, int COLS>
typedef Base::size_type Dune::FieldMatrix< K, ROWS, COLS >::size_type

Member Enumeration Documentation

◆ anonymous enum

template<class K , int ROWS, int COLS>
anonymous enum

export size

Enumerator
rows 

The number of rows.

cols 

The number of columns.

Constructor & Destructor Documentation

◆ FieldMatrix() [1/3]

template<class K , int ROWS, int COLS>
constexpr Dune::FieldMatrix< K, ROWS, COLS >::FieldMatrix ( )
constexprdefault

Default constructor.

◆ FieldMatrix() [2/3]

template<class K , int ROWS, int COLS>
Dune::FieldMatrix< K, ROWS, COLS >::FieldMatrix ( std::initializer_list< Dune::FieldVector< K, cols > > const &  l)
inline

Constructor initializing the matrix from a list of vector.

◆ FieldMatrix() [3/3]

template<class K , int ROWS, int COLS>
template<class T , typename = std::enable_if_t<HasDenseMatrixAssigner<FieldMatrix, T>::value>>
Dune::FieldMatrix< K, ROWS, COLS >::FieldMatrix ( T const &  rhs)
inline

Member Function Documentation

◆ leftmultiplyany()

template<class K , int ROWS, int COLS>
template<int l>
FieldMatrix<K,l,cols> Dune::FieldMatrix< K, ROWS, COLS >::leftmultiplyany ( const FieldMatrix< K, l, rows > &  M) const
inline

Multiplies M from the left to this matrix, this matrix is not modified.

◆ mat_access() [1/2]

template<class K , int ROWS, int COLS>
row_reference Dune::FieldMatrix< K, ROWS, COLS >::mat_access ( size_type  i)
inline

◆ mat_access() [2/2]

template<class K , int ROWS, int COLS>
const_row_reference Dune::FieldMatrix< K, ROWS, COLS >::mat_access ( size_type  i) const
inline

◆ mat_cols()

template<class K , int ROWS, int COLS>
constexpr size_type Dune::FieldMatrix< K, ROWS, COLS >::mat_cols ( ) const
inlineconstexpr

◆ mat_rows()

template<class K , int ROWS, int COLS>
constexpr size_type Dune::FieldMatrix< K, ROWS, COLS >::mat_rows ( ) const
inlineconstexpr

◆ operator=() [1/4]

template<class K , int ROWS, int COLS>
FieldMatrix& Dune::FieldMatrix< K, ROWS, COLS >::operator= ( const FieldMatrix< K, ROWS, COLS > &  )
default

copy assignment operator

◆ operator=() [2/4]

template<class K , int ROWS, int COLS>
template<typename T >
FieldMatrix& Dune::FieldMatrix< K, ROWS, COLS >::operator= ( const FieldMatrix< T, ROWS, COLS > &  x)
inline

copy assignment from FieldMatrix over a different field

◆ operator=() [3/4]

template<class K , int ROWS, int COLS>
template<class RHS , class = std::enable_if_t< HasDenseMatrixAssigner< MAT, RHS >::value >>
derived_type& Dune::DenseMatrix< MAT >::operator= ( class RHS  ,
class  = std::enable_if_t< HasDenseMatrixAssigner< MAT, RHS >::value > 
)
inline

◆ operator=() [4/4]

template<class K , int ROWS, int COLS>
template<typename T , int rows, int cols>
FieldMatrix& Dune::FieldMatrix< K, ROWS, COLS >::operator= ( FieldMatrix< T, rows, cols > const &  )
delete

no copy assignment from FieldMatrix of different size

◆ rightmultiply() [1/2]

template<class K , int ROWS, int COLS>
template<typename M2 >
MAT& Dune::DenseMatrix< MAT >::rightmultiply ( typename M2  )
inline

Multiplies M from the right to this matrix.

◆ rightmultiply() [2/2]

template<class K , int ROWS, int COLS>
template<int r, int c>
FieldMatrix& Dune::FieldMatrix< K, ROWS, COLS >::rightmultiply ( const FieldMatrix< K, r, c > &  M)
inline

Multiplies M from the right to this matrix.

◆ rightmultiplyany()

template<class K , int ROWS, int COLS>
template<int l>
FieldMatrix<K,rows,l> Dune::FieldMatrix< K, ROWS, COLS >::rightmultiplyany ( const FieldMatrix< K, cols, l > &  M) const
inline

Multiplies M from the right to this matrix, this matrix is not modified.


The documentation for this class was generated from the following files: