ENH: partial overhaul of Matrix type (#1220)

- additional operators:
  + compound assignment
  + inner product: operator&
  + outer product: operator^

- additional functions:
   - MatrixBlock methods: subColumn, subRow, subMatrix
   - L2 norms for matrix or column
   - trace, diag, round, transpose

- MatrixBlock methods: col(), block() are deprecated since their
  access patterns with (size, offset) are unnatural/unwieldy.

- verifications by test/Matrix/Test-Matrix
This commit is contained in:
kuti
2019-05-23 11:32:45 +01:00
committed by Andrew Heather
parent 3de7cd5207
commit 745624c024
15 changed files with 1974 additions and 594 deletions

View File

@ -118,7 +118,7 @@ public:
};
// Global functions and operators
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
template<class Type>
class typeOfInnerProduct<Type, RectangularMatrix<Type>, RectangularMatrix<Type>>
@ -128,6 +128,7 @@ public:
typedef RectangularMatrix<Type> type;
};
template<class Type>
class typeOfInnerProduct<Type, RectangularMatrix<Type>, SquareMatrix<Type>>
{
@ -136,6 +137,7 @@ public:
typedef RectangularMatrix<Type> type;
};
template<class Type>
class typeOfInnerProduct<Type, SquareMatrix<Type>, RectangularMatrix<Type>>
{
@ -145,6 +147,8 @@ public:
};
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
template<class Type>
RectangularMatrix<Type> outer(const Field<Type>& f1, const Field<Type>& f2);