ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/math/SquareMatrix3.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/math/SquareMatrix3.hpp (file contents):
Revision 1695 by tim, Mon Nov 1 22:52:57 2004 UTC vs.
Revision 1822 by tim, Thu Dec 2 02:08:29 2004 UTC

# Line 260 | Line 260 | namespace oopse {
260  
261                  return(x + y + z);
262              }            
263 +
264 +            /** Returns the trace of this matrix. */
265 +            Real trace() const {
266 +                return data_[0][0] + data_[1][1] + data_[2][2];
267 +            }
268              
269              /**
270               * Sets the value of this matrix to  the inversion of itself.
# Line 455 | Line 460 | namespace oopse {
460          return result;
461      }
462  
463 +    template<typename Real>
464 +    inline SquareMatrix3<Real> outProduct(const Vector3<Real>& v1, const Vector3<Real>& v2) {
465 +        SquareMatrix3<Real> result;
466 +
467 +            for (unsigned int i = 0; i < 3; i++) {
468 +                for (unsigned int j = 0; j < 3; j++) {
469 +                        result(i, j)  = v1[i] * v2[j];                
470 +                }
471 +            }
472 +            
473 +        return result;        
474 +    }
475 +
476 +    
477      typedef SquareMatrix3<double> Mat3x3d;
478      typedef SquareMatrix3<double> RotMat3x3d;
479  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines