[Genabel-commits] r1202 - pkg/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 26 22:50:32 CEST 2013


Author: lckarssen
Date: 2013-04-26 22:50:32 +0200 (Fri, 26 Apr 2013)
New Revision: 1202

Modified:
   pkg/ProbABEL/src/eigen_mematrix.cpp
   pkg/ProbABEL/src/mematri1.h
Log:
In ProbABEL: Change the way matrices are printed. Don't use cout, but go back to printf() so we have more easy control over nr of digits etc.


Modified: pkg/ProbABEL/src/eigen_mematrix.cpp
===================================================================
--- pkg/ProbABEL/src/eigen_mematrix.cpp	2013-04-26 20:01:55 UTC (rev 1201)
+++ pkg/ProbABEL/src/eigen_mematrix.cpp	2013-04-26 20:50:32 UTC (rev 1202)
@@ -273,7 +273,9 @@
     {
         std:: cout << "nr=" << i << ":\t";
         for (int j = 0; j < ncol; j++)
-            cout << data.data()[i * ncol + j] << "\t";
+        {
+            printf("%1.9e\t", data.data()[i * ncol + j]);
+        }
         std::cout << "\n";
     }
 }

Modified: pkg/ProbABEL/src/mematri1.h
===================================================================
--- pkg/ProbABEL/src/mematri1.h	2013-04-26 20:01:55 UTC (rev 1201)
+++ pkg/ProbABEL/src/mematri1.h	2013-04-26 20:50:32 UTC (rev 1202)
@@ -293,7 +293,9 @@
     {
         cout << "nr=" << i << ":\t";
         for (int j = 0; j < ncol; j++)
-            cout << data[i * ncol + j] << "\t";
+        {
+            printf("%e\t", data[i * ncol + j]);
+        }
         cout << "\n";
     }
 }



More information about the Genabel-commits mailing list