From 16edf26a58efef3d0d23cdacbb23a33653b3ee1e Mon Sep 17 00:00:00 2001 From: sunwen Date: Thu, 20 Apr 2023 17:17:08 +0800 Subject: [PATCH] Add Matrix printf with complex number. --- src/Matrix.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Matrix.cpp b/src/Matrix.cpp index 6a85017..bf7b8d2 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -295,14 +295,31 @@ namespace Aurora { void Matrix::printf() { + int k_count = getDimSize(2)==0?1:getDimSize(2); int j_count = getDimSize(1)==0?1:getDimSize(1); + int complexstep = 1; + const char* mark = "+"; + if(mValueType == Complex) + { + complexstep = 2; + } for (int k = 0; k