diff src/ov-base-diag.cc @ 10363:a0728e81ed25

improve diag matrix interface & implementation
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 26 Feb 2010 11:44:38 +0100
parents 57a59eae83cc
children fd0a3ac60b0e
line wrap: on
line diff
--- a/src/ov-base-diag.cc
+++ b/src/ov-base-diag.cc
@@ -82,8 +82,7 @@
 
       if (idx0.is_scalar () && idx1.is_scalar ())
         {
-          // FIXME: the proxy mechanism of DiagArray2 causes problems here.
-          retval = el_type (matrix.checkelem (idx0(0), idx1(0)));
+          retval = matrix.checkelem (idx0(0), idx1(0));
         }
       else
         {
@@ -131,7 +130,7 @@
                     && i0(0) < matrix.rows () && i1(0) < matrix.cols ()
                     && chk_valid_scalar (rhs, val))
                   {
-                    matrix (i0(0), i1(0)) = val;                    
+                    matrix.dgelem (i0(0)) = val;                    
                     retval = this;
                     this->count++;
                     // invalidate cache