diff liboctave/dMatrix.h @ 11574:a83bad07f7e3

attempt better backward compatibility for Array resize functions
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 00:12:05 -0500
parents 57632dea2446
children 12df7854fa7c
line wrap: on
line diff
--- a/liboctave/dMatrix.h
+++ b/liboctave/dMatrix.h
@@ -125,6 +125,12 @@
 
   ColumnVector column (octave_idx_type i) const;
 
+  void resize (octave_idx_type nr, octave_idx_type nc,
+               double rfv = resize_fill_value ())
+  {
+    MArray<double>::resize (dim_vector (nr, nc), rfv);
+  }
+
 private:
   Matrix tinverse (MatrixType &mattype, octave_idx_type& info, double& rcon, 
                    int force, int calc_cond) const;
@@ -327,7 +333,6 @@
   friend OCTAVE_API std::istream& operator >> (std::istream& is, Matrix& a);
 
   static double resize_fill_value (void) { return 0; }
-
 };
 
 // Publish externally used friend functions.