--- trunk/OOPSE-4/src/math/SquareMatrix.hpp 2004/10/14 23:28:09 1569 +++ trunk/OOPSE-4/src/math/SquareMatrix.hpp 2004/10/15 18:18:12 1576 @@ -175,8 +175,7 @@ namespace oopse { * @param w output eigenvalues * @param v output eigenvectors */ - void jacobi(const SquareMatrix& a, - Vector& w, + bool jacobi(const SquareMatrix& a, Vector& w, SquareMatrix& v); };//end SquareMatrix @@ -184,10 +183,9 @@ template #define ROT(a,i,j,k,l) g=a(i, j);h=a(k, l);a(i, j)=g-s*(h+g*tau);a(k, l)=h+s*(g-h*tau) #define MAX_ROTATIONS 60 -template -void SquareMatrix::jacobi(SquareMatrix& a, - Vector& w, - SquareMatrix& v) { +template +bool SquareMatrix::jacobi(const 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; @@ -325,6 +323,4 @@ void SquareMatrix::jacobi(SquareMatrix< } - -} #endif //MATH_SQUAREMATRIX_HPP