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)
41 FieldMatrix<Field, otherRows, cols> result;
42 for (std::size_t j=0; j<otherRows; ++j)
43 matrixB.matrix_.mv(matrixA[j], result[j]);
69 template<
class Matrix>
71 return Impl::TransposedMatrixWrapper<Matrix>(matrix);
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Compute type of the result of an arithmetic operation involving two different number types.
bigunsignedint< k > operator*(const bigunsignedint< k > &x, std::uintmax_t y)
Definition: bigunsignedint.hh:544
Dune namespace.
Definition: alignedallocator.hh:11
auto transpose(const Matrix &matrix)
Create a wrapper modelling the transposed matrix.
Definition: transpose.hh:70
T field_type
export the type representing the field
Definition: ftraits.hh:26
decltype(std::declval< T1 >()+std::declval< T2 >()) typedef PromotedType
Definition: promotiontraits.hh:26