From ae9789c9ee8588363759b8f4436b727b6f07ffab Mon Sep 17 00:00:00 2001 From: Eohan George Date: Wed, 2 Dec 2009 23:01:49 +0000 Subject: [PATCH] Cleaner printing with tabs after each element --- cpp/Matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/Matrix.cpp b/cpp/Matrix.cpp index e5038b14d..610c0571d 100644 --- a/cpp/Matrix.cpp +++ b/cpp/Matrix.cpp @@ -182,7 +182,7 @@ void print(const Matrix& A, const string &s) { for( size_t i = 0 ; i < m ; i++) { for( size_t j = 0 ; j < n ; j++) { double aij = A(i,j); - cout << setw(9) << (fabs(aij)<1e-12 ? 0 : aij); + cout << setw(9) << (fabs(aij)<1e-12 ? 0 : aij) << "\t"; } cout << endl; }