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 
  148 typedef Matrix<float,  3> Mat3f;
 
  149 typedef Matrix<double, 3> Mat3d;
 
  150 typedef Matrix<float,  4> Mat4f;
 
  151 typedef Matrix<double, 4> Mat4d;
 
  156 template<
typename Obj, 
unsigned int SIZE>
 
  157 inline MATRIX operator+(
const MATRIX &mat1, 
const MATRIX &mat2);
 
  161 template<
typename Obj, 
unsigned int SIZE>
 
  162 inline MATRIX operator-(
const MATRIX &mat1, 
const MATRIX &mat2);
 
  167 template<
typename Obj, 
unsigned int SIZE>
 
  168 inline MATRIX operator*(
const MATRIX &mat, 
const Obj &obj);
 
  173 template<
typename Obj, 
unsigned int SIZE>
 
  174 inline MATRIX operator*(
const MATRIX &mat1, 
const MATRIX &mat2);
 
  179 template<
typename Obj, 
unsigned int SIZE>
 
  180 inline Vector<Obj,SIZE> operator*(
const Vector<Obj,SIZE> &vec, 
const tlp::Matrix<Obj, SIZE> &);
 
  185 template<
typename Obj, 
unsigned int SIZE>
 
  186 inline Vector<Obj,SIZE> operator*( 
const Matrix<Obj, SIZE> &, 
const Vector<Obj,SIZE> &vec);
 
  192 #include "cxx/Matrix.cxx"