23 #ifndef _TLP_GEO_MATRIX_H
24 #define _TLP_GEO_MATRIX_H
29 #include <tulip/Vector.h>
34 #define MATRIX tlp::Matrix<Obj,SIZE>
51 template<
typename Obj,
unsigned int SIZE>
52 class Matrix:
public Array< Vector<Obj,SIZE> , SIZE > {
55 Matrix(
const Array< Vector<Obj,SIZE> , SIZE > &a) :
56 Array< Vector<Obj,SIZE> , SIZE >(a) {
60 Matrix(
const std::vector<std::vector<Obj> > &covarianceMatrix);
65 inline MATRIX& fill(Obj obj);
69 Obj determinant()
const;
81 inline MATRIX & operator+=(
const MATRIX &mat);
85 inline MATRIX & operator-=(
const MATRIX &mat);
89 inline bool operator==(
const MATRIX &)
const;
93 inline bool operator!=(
const MATRIX &)
const;
97 inline MATRIX & operator*=(
const MATRIX &mat);
101 inline MATRIX & operator*=(
const Obj &obj);
105 inline MATRIX & operator/=(
const MATRIX &mat);
109 inline MATRIX & operator/=(
const Obj &obj);
113 MATRIX cofactor()
const;
118 MATRIX operator/(
const MATRIX &mat2)
const;
124 MATRIX operator/(
const Obj &obj)
const;
131 inline Vector<Obj,SIZE> powerIteration(
const unsigned int nIterations)
const;
133 #ifndef DOXYGEN_NOTFOR_DEVEL
137 inline bool simplify(Matrix<Obj, 2> &simplifiedMatrix)
const;
143 inline bool computeEigenVector(
const float x, Vector<Obj, 3> &eigenVector)
const;
144 #endif // DOXYGEN_NOTFOR_DEVEL
152 template<
typename Obj,
unsigned int SIZE>
153 inline MATRIX operator+(
const MATRIX &mat1,
const MATRIX &mat2);
157 template<
typename Obj,
unsigned int SIZE>
158 inline MATRIX operator-(
const MATRIX &mat1,
const MATRIX &mat2);
163 template<
typename Obj,
unsigned int SIZE>
164 inline MATRIX operator*(
const MATRIX &mat,
const Obj &obj);
169 template<
typename Obj,
unsigned int SIZE>
170 inline MATRIX operator*(
const MATRIX &mat1,
const MATRIX &mat2);
175 template<
typename Obj,
unsigned int SIZE>
176 inline Vector<Obj,SIZE> operator*(
const Vector<Obj,SIZE> &vec,
const tlp::Matrix<Obj, SIZE> &);
181 template<
typename Obj,
unsigned int SIZE>
182 inline Vector<Obj,SIZE> operator*(
const Matrix<Obj, SIZE> &,
const Vector<Obj,SIZE> &vec);
188 #include "cxx/Matrix.cxx"