--- trunk/src/math/SquareMatrix.hpp 2004/10/17 01:19:11 93 +++ trunk/src/math/SquareMatrix.hpp 2004/10/19 23:01:03 113 @@ -78,22 +78,28 @@ namespace oopse { return m; } - /** Retunrs the inversion of this matrix. */ + /** + * Retunrs the inversion of this matrix. + * @todo need implementation + */ SquareMatrix inverse() { SquareMatrix result; return result; } - /** Returns the determinant of this matrix. */ - double determinant() const { - double det; + /** + * Returns the determinant of this matrix. + * @todo need implementation + */ + Real determinant() const { + Real det; return det; } /** Returns the trace of this matrix. */ - double trace() const { - double tmp = 0; + Real trace() const { + Real tmp = 0; for (unsigned int i = 0; i < Dim ; i++) tmp += data_[i][i]; @@ -142,8 +148,9 @@ namespace oopse { return true; } + /** @todo need implementation */ void diagonalize() { - jacobi(m, eigenValues, ortMat); + //jacobi(m, eigenValues, ortMat); } /** @@ -158,7 +165,7 @@ namespace oopse { SquareMatrix ortMat; if ( !isSymmetric()){ - throw(); + //throw(); } SquareMatrix m(*this); @@ -175,7 +182,7 @@ namespace oopse { * @param w output eigenvalues * @param v output eigenvectors */ - bool jacobi(const SquareMatrix& a, Vector& w, + bool jacobi(SquareMatrix& a, Vector& w, SquareMatrix& v); };//end SquareMatrix @@ -184,12 +191,12 @@ template #define MAX_ROTATIONS 60 template -bool SquareMatrix::jacobi(const SquareMatrix& a, Vector& w, +bool SquareMatrix::jacobi(SquareMatrix& a, Vector& w, SquareMatrix& v) { const int N = Dim; int i, j, k, iq, ip; - double tresh, theta, tau, t, sm, s, h, g, c; - double tmp; + Real tresh, theta, tau, t, sm, s, h, g, c; + Real tmp; Vector b, z; // initialize @@ -256,6 +263,7 @@ bool SquareMatrix::jacobi(const SquareMatri for (j=iq+1; j