ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/math/SquareMatrix.hpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/math/SquareMatrix.hpp (file contents):
Revision 1603 by tim, Tue Oct 19 21:28:55 2004 UTC vs.
Revision 1606 by tim, Tue Oct 19 23:01:03 2004 UTC

# Line 92 | Line 92 | namespace oopse {
92           * Returns the determinant of this matrix.
93           * @todo need implementation
94           */
95 <        double determinant() const {
96 <            double det;
95 >        Real determinant() const {
96 >            Real det;
97              return det;
98          }
99  
100          /** Returns the trace of this matrix. */
101 <        double trace() const {
102 <           double tmp = 0;
101 >        Real trace() const {
102 >           Real tmp = 0;
103            
104              for (unsigned int i = 0; i < Dim ; i++)
105                  tmp += data_[i][i];
# Line 182 | Line 182 | namespace oopse {
182           * @param w output eigenvalues
183           * @param v output eigenvectors
184           */
185 <        bool jacobi(const SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w,
185 >        bool jacobi(SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w,
186                                SquareMatrix<Real, Dim>& v);
187      };//end SquareMatrix
188  
# Line 191 | Line 191 | bool SquareMatrix<Real, Dim>::jacobi(const SquareMatri
191   #define MAX_ROTATIONS 60
192  
193   template<typename Real, int Dim>
194 < bool SquareMatrix<Real, Dim>::jacobi(const SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w,
194 > bool SquareMatrix<Real, Dim>::jacobi(SquareMatrix<Real, Dim>& a, Vector<Real, Dim>& w,
195                                SquareMatrix<Real, Dim>& v) {
196      const int N = Dim;                                                                      
197      int i, j, k, iq, ip;
198 <    double tresh, theta, tau, t, sm, s, h, g, c;
199 <    double tmp;
198 >    Real tresh, theta, tau, t, sm, s, h, g, c;
199 >    Real tmp;
200      Vector<Real, Dim> b, z;
201  
202      // initialize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines