changeset 10619:9f0a264d2f60

mark sqrtm(triangular) as triangular
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 07 May 2010 12:40:06 +0200
parents 773566827bcf
children 6fb954475e21
files src/ChangeLog src/DLD-FUNCTIONS/sqrtm.cc
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon May 10 11:55:16 2010 -0700
+++ b/src/ChangeLog	Fri May 07 12:40:06 2010 +0200
@@ -1,3 +1,8 @@
+2010-05-07  Jaroslav Hajek  <highegg@gmail.com>
+
+	* DLD-FUNCTIONS/sqrtm.cc (do_sqrtm): Mark the result as triangular
+	where applicable.
+
 2010-05-10  Rik <octave@nomad.inbox5.com>
 
 	* DLD-FUNCTIONS/qr.cc: Split qrdelete test into high precision test 
--- a/src/DLD-FUNCTIONS/sqrtm.cc	Mon May 10 11:55:16 2010 -0700
+++ b/src/DLD-FUNCTIONS/sqrtm.cc	Fri May 07 12:40:06 2010 +0200
@@ -122,6 +122,7 @@
                   // Do it in real arithmetic.
                   sqrtm_utri_inplace (x);
                   retval = x;
+                  retval.matrix_type (mt);
                 }
               else
                 iscomplex = true;
@@ -135,6 +136,7 @@
                   x = x.transpose ();
                   sqrtm_utri_inplace (x);
                   retval = x.transpose ();
+                  retval.matrix_type (mt);
                 }
               else
                 iscomplex = true;
@@ -166,6 +168,7 @@
             {
               sqrtm_utri_inplace (x);
               retval = x;
+              retval.matrix_type (mt);
 
               break;
             }
@@ -174,6 +177,7 @@
               x = x.transpose ();
               sqrtm_utri_inplace (x);
               retval = x.transpose ();
+              retval.matrix_type (mt);
 
               break;
             }