diff liboctave/MSparse.h @ 7620:36594d5bbe13

Move diag function into the octave_value class
author David Bateman <dbateman@free.fr>
date Fri, 21 Mar 2008 00:08:24 +0100
parents 7bfaa9611558
children eb63fbe60fab
line wrap: on
line diff
--- a/liboctave/MSparse.h
+++ b/liboctave/MSparse.h
@@ -112,7 +112,12 @@
     { return Sparse<T>::ipermute (vec); }
 
 
-  template <class U, class F>
+  MSparse<T> diag (octave_idx_type k = 0) const
+  {
+    return Sparse<T>::diag (k);
+  }
+
+ template <class U, class F>
   MSparse<U> map (F fcn) const
   {
     return Sparse<T>::template map<U> (fcn);