# | Line 175 | Line 175 | namespace oopse { | |
---|---|---|
175 | * @param w output eigenvalues | |
176 | * @param v output eigenvectors | |
177 | */ | |
178 | < | void jacobi(const SquareMatrix<Real, Dim>& a, |
179 | < | Vector<Real, Dim>& w, |
178 | > | bool jacobi(const SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w, |
179 | SquareMatrix<Real, Dim>& v); | |
180 | };//end SquareMatrix | |
181 | ||
# | Line 184 | Line 183 | namespace oopse { | |
183 | #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) | |
184 | #define MAX_ROTATIONS 60 | |
185 | ||
186 | < | template<Real, int Dim> |
187 | < | void SquareMatrix<Real, int Dim>::jacobi(SquareMatrix<Real, Dim>& a, |
188 | < | Vector<Real, Dim>& w, |
190 | < | SquareMatrix<Real, Dim>& v) { |
186 | > | template<typename Real, int Dim> |
187 | > | bool SquareMatrix<Real, Dim>::jacobi(const SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w, |
188 | > | SquareMatrix<Real, Dim>& v) { |
189 | const int N = Dim; | |
190 | int i, j, k, iq, ip; | |
191 | double tresh, theta, tau, t, sm, s, h, g, c; | |
# | Line 325 | Line 323 | void SquareMatrix<Real, int Dim>::jacobi(SquareMatrix< | |
323 | ||
324 | } | |
325 | ||
328 | – | |
329 | – | } |
326 | #endif //MATH_SQUAREMATRIX_HPP |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |