[Genabel-commits] r908 - branches/ProbABEL-refactoring/ProbABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 17 21:35:22 CEST 2012
Author: maartenk
Date: 2012-05-17 21:35:22 +0200 (Thu, 17 May 2012)
New Revision: 908
Modified:
branches/ProbABEL-refactoring/ProbABEL/src/eigen_mematri1.h
Log:
transpose function is about 3 to 4 times as fast as before
Modified: branches/ProbABEL-refactoring/ProbABEL/src/eigen_mematri1.h
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/eigen_mematri1.h 2012-05-16 15:29:00 UTC (rev 907)
+++ branches/ProbABEL-refactoring/ProbABEL/src/eigen_mematri1.h 2012-05-17 19:35:22 UTC (rev 908)
@@ -263,11 +263,10 @@
{
// cout << "[DEBUG TRANSPOSE PRE]nrow=" << M.nrow << "; ncol=" << M.ncol << "; nelements=" << M.nelements;
- mematrix<DT> temp = M;
- temp.data.transposeInPlace();
- int swap=temp.ncol;
- temp.ncol=temp.nrow;
- temp.nrow=swap;
+ mematrix<DT> temp;
+ temp.data=M.data.transpose();
+ temp.ncol=M.nrow;
+ temp.nrow=M.ncol;
// cout << "[DEBUG TRANSPOSE post]nrow=" << temp.nrow << "; ncol=" << temp.ncol << "; nelements=" << temp.nelements;
return temp;
More information about the Genabel-commits
mailing list