3#ifndef DUNE_COMMON_TRANSPOSE_HH
4#define DUNE_COMMON_TRANSPOSE_HH
20 class TransposedMatrixWrapper
31 TransposedMatrixWrapper(
const M& matrix) : matrix_(matrix) {}
32 TransposedMatrixWrapper(
const TransposedMatrixWrapper&) =
delete;
33 TransposedMatrixWrapper(TransposedMatrixWrapper&&) =
delete;
35 template<
class OtherField,
int otherRows>
36 friend auto operator* (
const FieldMatrix<OtherField, otherRows, rows>& matrixA,
37 const TransposedMatrixWrapper& matrixB)
39 using ThisField =
typename FieldTraits<M>::field_type;
40 using Field =
typename PromotionTraits<ThisField, OtherField>::PromotedType;
41 FieldMatrix<Field, otherRows, cols> result;
42 for (std::size_t j=0; j<otherRows; ++j)
43 matrixB.matrix_.mv(matrixA[j], result[j]);
71 return Impl::TransposedMatrixWrapper<Matrix>(matrix);
A generic dynamic dense matrix.
Definition: matrix.hh:559
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Dune namespace.
Definition: alignedallocator.hh:11
auto transpose(const Matrix &matrix)
Create a wrapper modelling the transposed matrix.
Definition: transpose.hh:70