--- trunk/OOPSE-2.0/src/math/SquareMatrix.hpp 2005/01/12 22:41:40 1930 +++ trunk/OOPSE-2.0/src/math/SquareMatrix.hpp 2005/01/25 17:45:23 1957 @@ -175,6 +175,17 @@ namespace oopse { return true; } + /** Return the transpose of this matrix */ + SquareMatrix transpose() const{ + SquareMatrix result; + + for (unsigned int i = 0; i < Dim; i++) + for (unsigned int j = 0; j < Dim; j++) + result(j, i) = data_[i][j]; + + return result; + } + /** @todo need implementation */ void diagonalize() { //jacobi(m, eigenValues, ortMat);