changeset 150:62670cc2bb50 wasm

print matrix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 01 Feb 2018 16:07:54 +0100
parents f7be90de6d1b
children c5044bbfc303
files Framework/Toolbox/GeometryToolbox.cpp Framework/Toolbox/GeometryToolbox.h
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Toolbox/GeometryToolbox.cpp	Wed Jan 24 17:02:13 2018 +0100
+++ b/Framework/Toolbox/GeometryToolbox.cpp	Thu Feb 01 16:07:54 2018 +0100
@@ -42,6 +42,19 @@
     }
 
 
+    void Print(const Matrix& m)
+    {
+      for (size_t i = 0; i < m.size1(); i++)
+      {
+        for (size_t j = 0; j < m.size2(); j++)
+        {
+          printf("%8.2f  ", m(i,j));
+        }
+        printf("\n");        
+      }
+    }
+
+
     bool ParseVector(Vector& target,
                      const std::string& value)
     {
--- a/Framework/Toolbox/GeometryToolbox.h	Wed Jan 24 17:02:13 2018 +0100
+++ b/Framework/Toolbox/GeometryToolbox.h	Thu Feb 01 16:07:54 2018 +0100
@@ -43,6 +43,8 @@
   {
     void Print(const Vector& v);
 
+    void Print(const Matrix& m);
+
     bool ParseVector(Vector& target,
                      const std::string& s);