1 #ifndef MATH_DIAGONAL_MATRIX_TEMPLATE_H 2 #define MATH_DIAGONAL_MATRIX_TEMPLATE_H 4 #include "VectorTemplate.h" 5 #include "MatrixTemplate.h" 24 DiagonalMatrixTemplate(
const BaseT&);
25 DiagonalMatrixTemplate(
int m);
26 DiagonalMatrixTemplate(
int m, T diagVal);
27 DiagonalMatrixTemplate(
int m,
const T* diagVals);
29 inline int numCols()
const {
return this->n; }
30 inline int numRows()
const {
return this->n; }
32 inline const MyT& operator = (
const MyT& m) { BaseT::operator = (m);
return *
this; }
34 inline void operator += (
const MyT& m) { BaseT::operator +=(m); }
35 inline void operator -= (
const MyT& m) { BaseT::operator -=(m); }
36 void operator *= (
const MyT&);
37 inline void operator *= (T c) { BaseT::operator *=(c); }
38 inline void operator /= (T c) { BaseT::operator /=(c); }
40 void copyDiagonal(
const MatrixT& m);
41 void mulMatrix(
const MyT& a,
const MyT& b);
42 void mulVector(
const VectorT&, VectorT&)
const;
43 void mulInverse(
const VectorT&, VectorT&)
const;
44 void mulPseudoInverse(
const VectorT&, VectorT&)
const;
45 void preMultiply(
const MatrixT& a,MatrixT& x)
const;
46 void postMultiply(
const MatrixT& a,MatrixT& x)
const;
47 void preMultiplyTranspose(
const MatrixT& a,MatrixT& x)
const;
48 void postMultiplyTranspose(
const MatrixT& a,MatrixT& x)
const;
49 void preMultiplyInverse(
const MatrixT& a,MatrixT& x)
const;
50 void postMultiplyInverse(
const MatrixT& a,MatrixT& x)
const;
53 void setInverse(
const MyT&);
54 void setPseudoInverse(
const MyT&);
56 void inplaceInverse();
57 void inplacePseudoInverse();
59 bool isZero(T eps=Zero)
const;
60 bool isIdentity(T eps=Zero)
const;
61 bool isInvertible(T eps=Zero)
const;
62 T determinant()
const;
Complex number class (x + iy).
Definition: complex.h:17
An iterator through VectorTemplate elements.
Definition: VectorTemplate.h:19
A matrix over the field T.
Definition: function.h:10
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12
A vector over the field T.
Definition: function.h:9
A templated diagonal matrix, represented by a vector of the entries on the diagonal.
Definition: DiagonalMatrix.h:14