changeset 9732:b4fdfee405b5

remove ArrayN<T> + fix nonhom. diag-scalar ops
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 16 Oct 2009 13:12:31 +0200
parents 7b9cbaad68d6
children aab4f2aa9ed9
files liboctave/Array-C.cc liboctave/Array-b.cc liboctave/Array-ch.cc liboctave/Array-d.cc liboctave/Array-f.cc liboctave/Array-fC.cc liboctave/Array.cc liboctave/Array.h liboctave/ArrayN.cc liboctave/ArrayN.h liboctave/CNDArray.cc liboctave/CNDArray.h liboctave/ChangeLog liboctave/MArrayN.h liboctave/boolNDArray.cc liboctave/boolNDArray.h liboctave/chNDArray.h liboctave/dNDArray.cc liboctave/dNDArray.h liboctave/fCNDArray.cc liboctave/fCNDArray.h liboctave/fNDArray.cc liboctave/fNDArray.h liboctave/intNDArray.cc liboctave/intNDArray.h liboctave/lo-specfun.cc liboctave/lo-specfun.h liboctave/mx-op-decl.h liboctave/mx-op-defs.h liboctave/mx-ops src/Cell.cc src/Cell.h src/ChangeLog src/DLD-FUNCTIONS/besselj.cc src/DLD-FUNCTIONS/find.cc src/DLD-FUNCTIONS/lookup.cc src/DLD-FUNCTIONS/max.cc src/OPERATORS/op-dm-scm.cc src/OPERATORS/op-dm-sm.cc src/OPERATORS/op-dms-template.cc src/TEMPLATE-INST/Array-tc.cc src/data.cc src/oct-map.cc src/ov-cx-mat.h src/ov-flt-cx-mat.cc src/ov-flt-cx-mat.h src/ov-flt-re-mat.cc src/ov-flt-re-mat.h src/ov-intx.h src/ov-re-mat.h src/ov.cc src/ov.h src/pr-output.cc src/pr-output.h src/variables.cc
diffstat 55 files changed, 445 insertions(+), 623 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/Array-C.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-C.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -96,12 +96,7 @@
 
 template class OCTAVE_API Array2<Complex>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<Complex>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<Complex>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<Complex>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-b.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-b.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -39,12 +39,7 @@
 
 template class OCTAVE_API Array2<bool>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<bool>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<bool>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<bool>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-ch.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-ch.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -39,12 +39,7 @@
 
 template class OCTAVE_API Array2<char>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<char>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<char>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-d.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-d.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -92,12 +92,7 @@
 
 template class OCTAVE_API Array2<double>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<double>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<double>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<double>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-f.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-f.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -92,12 +92,7 @@
 
 template class OCTAVE_API Array2<float>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<float>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<float>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<float>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-fC.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array-fC.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -97,12 +97,7 @@
 
 template class OCTAVE_API Array2<FloatComplex>;
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
-template class OCTAVE_API ArrayN<FloatComplex>;
-
-template OCTAVE_API std::ostream& operator << (std::ostream&, const ArrayN<FloatComplex>&);
+template OCTAVE_API std::ostream& operator << (std::ostream&, const Array<FloatComplex>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -2937,6 +2937,109 @@
   template <> void Array<T>::instantiation_guard () { } \
   template class API Array<T>
 
+// FIXME: is this used?
+
+template <class T>
+std::ostream&
+operator << (std::ostream& os, const Array<T>& a)
+{
+  dim_vector a_dims = a.dims ();
+
+  int n_dims = a_dims.length ();
+
+  os << n_dims << "-dimensional array";
+
+  if (n_dims)
+    os << " (" << a_dims.str () << ")";
+
+  os <<"\n\n";
+
+  if (n_dims)
+    {
+      os << "data:";
+
+      Array<octave_idx_type> ra_idx (n_dims, 0);
+
+      // Number of times the first 2d-array is to be displayed.
+
+      octave_idx_type m = 1;
+      for (int i = 2; i < n_dims; i++)
+	m *= a_dims(i);
+
+      if (m == 1)
+        {
+          octave_idx_type rows = 0;
+          octave_idx_type cols = 0;
+
+          switch (n_dims)
+            {
+	    case 2:
+	      rows = a_dims(0);
+	      cols = a_dims(1);
+
+	      for (octave_idx_type j = 0; j < rows; j++)
+		{
+		  ra_idx(0) = j;
+		  for (octave_idx_type k = 0; k < cols; k++)
+		    {
+		      ra_idx(1) = k;
+		      os << " " << a.elem(ra_idx);
+		    }
+		  os << "\n";
+		}
+	      break;
+
+	    default:
+	      rows = a_dims(0);
+
+	      for (octave_idx_type k = 0; k < rows; k++)
+		{
+		  ra_idx(0) = k;
+		  os << " " << a.elem(ra_idx);
+		}
+	      break;
+	    }
+
+          os << "\n";
+        }
+      else
+        {
+          octave_idx_type rows = a_dims(0);
+          octave_idx_type cols = a_dims(1);
+
+          for (int i = 0; i < m; i++)
+            {
+              os << "\n(:,:,";
+
+              for (int j = 2; j < n_dims - 1; j++)
+		os << ra_idx(j) + 1 << ",";
+
+	      os << ra_idx(n_dims - 1) + 1 << ") = \n";
+
+	      for (octave_idx_type j = 0; j < rows; j++)
+	        {
+	          ra_idx(0) = j;
+
+	          for (octave_idx_type k = 0; k < cols; k++)
+	            {
+		      ra_idx(1) = k;
+		      os << " " << a.elem(ra_idx);
+		    }
+
+	          os << "\n";
+	        }
+
+	      os << "\n";
+
+	      if (i != m - 1)
+		increment_index (ra_idx, a_dims, 2);
+            }
+        }
+    }
+
+  return os;
+}
+
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
--- a/liboctave/Array.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/Array.h	Fri Oct 16 13:12:31 2009 +0200
@@ -735,6 +735,10 @@
 
 #endif
 
+template <class T>
+std::ostream&
+operator << (std::ostream& os, const Array<T>& a);
+
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
--- a/liboctave/ArrayN.cc	Fri Oct 16 10:28:26 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-// Template array classes
-/*
-
-Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cassert>
-
-#include <iostream>
-
-#include "Array-util.h"
-#include "ArrayN.h"
-#include "idx-vector.h"
-#include "lo-error.h"
-
-// N-dimensional array class.
-
-template <class T>
-std::ostream&
-operator << (std::ostream& os, const ArrayN<T>& a)
-{
-  dim_vector a_dims = a.dims ();
-
-  int n_dims = a_dims.length ();
-
-  os << n_dims << "-dimensional array";
-
-  if (n_dims)
-    os << " (" << a_dims.str () << ")";
-
-  os <<"\n\n";
-
-  if (n_dims)
-    {
-      os << "data:";
-
-      Array<octave_idx_type> ra_idx (n_dims, 0);
-
-      // Number of times the first 2d-array is to be displayed.
-
-      octave_idx_type m = 1;
-      for (int i = 2; i < n_dims; i++)
-	m *= a_dims(i);
-
-      if (m == 1)
-        {
-          octave_idx_type rows = 0;
-          octave_idx_type cols = 0;
-
-          switch (n_dims)
-            {
-	    case 2:
-	      rows = a_dims(0);
-	      cols = a_dims(1);
-
-	      for (octave_idx_type j = 0; j < rows; j++)
-		{
-		  ra_idx(0) = j;
-		  for (octave_idx_type k = 0; k < cols; k++)
-		    {
-		      ra_idx(1) = k;
-		      os << " " << a.elem(ra_idx);
-		    }
-		  os << "\n";
-		}
-	      break;
-
-	    default:
-	      rows = a_dims(0);
-
-	      for (octave_idx_type k = 0; k < rows; k++)
-		{
-		  ra_idx(0) = k;
-		  os << " " << a.elem(ra_idx);
-		}
-	      break;
-	    }
-
-          os << "\n";
-        }
-      else
-        {
-          octave_idx_type rows = a_dims(0);
-          octave_idx_type cols = a_dims(1);
-
-          for (int i = 0; i < m; i++)
-            {
-              os << "\n(:,:,";
-
-              for (int j = 2; j < n_dims - 1; j++)
-		os << ra_idx(j) + 1 << ",";
-
-	      os << ra_idx(n_dims - 1) + 1 << ") = \n";
-
-	      for (octave_idx_type j = 0; j < rows; j++)
-	        {
-	          ra_idx(0) = j;
-
-	          for (octave_idx_type k = 0; k < cols; k++)
-	            {
-		      ra_idx(1) = k;
-		      os << " " << a.elem(ra_idx);
-		    }
-
-	          os << "\n";
-	        }
-
-	      os << "\n";
-
-	      if (i != m - 1)
-		increment_index (ra_idx, a_dims, 2);
-            }
-        }
-    }
-
-  return os;
-}
-
-/*
-;;; Local Variables: ***
-;;; mode: C++ ***
-;;; End: ***
-*/
--- a/liboctave/ArrayN.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/ArrayN.h	Fri Oct 16 13:12:31 2009 +0200
@@ -25,153 +25,13 @@
 #if !defined (octave_ArrayN_h)
 #define octave_ArrayN_h 1
 
-#include <cassert>
-#include <climits>
-#include <cstdlib>
-
-#include <iosfwd>
-
 #include "Array.h"
-#include "Array2.h"
-#include "lo-error.h"
-#include "lo-math.h"
-
-class idx_vector;
-
-// N-dimensional array class.
-
-template <class T>
-class
-ArrayN : public Array<T>
-{
-protected:
-
-  ArrayN (T *d, const dim_vector& dv) : Array<T> (d, dv) { }
-
-public:
-
-  // These really need to be protected (and they will be in the
-  // future, so don't depend on them being here!), but they can't be
-  // until template friends work correctly in g++.
-
-  ArrayN (void) : Array<T> () { }
-
-  ArrayN (const dim_vector& dv) : Array<T> (dv) { }
-
-  ArrayN (const dim_vector& dv, const T& val)
-    : Array<T> (dv) { Array<T>::fill (val); }
-
-  template <class U>
-  explicit ArrayN (const Array2<U>& a) : Array<T> (a, a.dims ()) { }
-
-  template <class U>
-  ArrayN (const ArrayN<U>& a) : Array<T> (a, a.dims ()) { }
-
-  template <class U>
-  ArrayN (const Array<U>& a) : Array<T> (a) { }
-
-  template <class U>
-  ArrayN (const Array<U>& a, const dim_vector& dv)
-    : Array<T> (a, dv) { }
-
-  ~ArrayN (void) { }
-
-  ArrayN<T>& operator = (const ArrayN<T>& a)
-    {
-      if (this != &a)
-	Array<T>::operator = (a);
-
-      return *this;
-    }
-
-  ArrayN<T> column (octave_idx_type k) const
-    { return Array<T>::column (k); }
-  ArrayN<T> page (octave_idx_type k) const
-    { return Array<T>::page (k); }
-
-  ArrayN<T> linearize (void) const
-    { return Array<T>::linearize (); }
-  ArrayN<T> linear_slice (octave_idx_type lo, octave_idx_type up) const
-    { return Array<T>::linear_slice (lo, up); }
-
-  ArrayN<T> reshape (const dim_vector& new_dims) const
-    { return Array<T>::reshape (new_dims); }
+#define ArrayN Array
 
-  ArrayN<T> permute (const Array<octave_idx_type>& vec, bool inv = false) const
-    { return Array<T>::permute (vec, inv); }
-
-  ArrayN<T> ipermute (const Array<octave_idx_type>& vec) const
-    { return Array<T>::ipermute (vec); }
-
-  ArrayN<T> squeeze (void) const { return Array<T>::squeeze (); }
-
-  ArrayN<T> transpose (void) const { return Array<T>::transpose (); }
-  ArrayN<T> hermitian (T (*fcn) (const T&) = 0) const { return Array<T>::hermitian (fcn); }
-
-  ArrayN<T>& insert (const ArrayN<T>& a, const dim_vector& dv)
-    {
-      Array<T>::insert (a, dv);
-      return *this;
-    }
-
-  ArrayN<T>& insert (const ArrayN<T>& a, octave_idx_type r, octave_idx_type c)
-  {
-    Array<T>::insert (a, r, c);
-    return *this;
-  }
-
-  ArrayN<T> index (const idx_vector& i, bool resize_ok = false,
-		   const T& rfv = Array<T>::resize_fill_value ()) const
-    {
-      Array<T> tmp = Array<T>::index (i, resize_ok, rfv);
-      return ArrayN<T> (tmp, tmp.dims ());
-    }
-
-  ArrayN<T> index (const idx_vector& i, const idx_vector& j, bool resize_ok = false,
-		   const T& rfv = Array<T>::resize_fill_value ()) const
-    {
-      Array<T> tmp = Array<T>::index (i, j, resize_ok, rfv);
-      return ArrayN<T> (tmp, tmp.dims ());
-    }
-
-  ArrayN<T> index (const Array<idx_vector>& ra_idx, bool resize_ok = false,
-		   const T& rfv = Array<T>::resize_fill_value ()) const
-    {
-      Array<T> tmp = Array<T>::index (ra_idx, resize_ok, rfv);
-      return ArrayN<T> (tmp, tmp.dims ());
-    }
-
-  ArrayN<T> sort (int dim = 0, sortmode mode = ASCENDING) const
-    {
-      return Array<T>::sort (dim, mode);
-    }
-
-  ArrayN<T> sort (Array<octave_idx_type> &sidx, int dim = 0,
-		 sortmode mode = ASCENDING) const
-    {
-      return Array<T>::sort (sidx, dim, mode);
-    }
-
-  ArrayN<T> nth_element (const idx_vector& n, int dim = 0) const
-    {
-      return Array<T>::nth_element (n, dim);
-    }
-
-  ArrayN<T> diag (octave_idx_type k) const
-  {
-    return Array<T>::diag (k);
-  }
-
-  template <class U, class F>
-  ArrayN<U> map (F fcn) const
-  {
-    return Array<T>::template map<U> (fcn);
-  }
-};
-
-template <class T>
-std::ostream&
-operator << (std::ostream&, const ArrayN<T>&);
+// If we're with GNU C++, issue a warning.
+#ifdef __GNUC__
+#warning Using ArrayN<T> is deprecated. Use Array<T> directly.
+#endif
 
 #endif
 
--- a/liboctave/CNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/CNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -714,7 +714,7 @@
 }
 
 ComplexNDArray
-ComplexNDArray::max (ArrayN<octave_idx_type>& idx_arg, int dim) const
+ComplexNDArray::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<ComplexNDArray> (*this, idx_arg, dim, mx_inline_max);
 }
@@ -726,7 +726,7 @@
 }
 
 ComplexNDArray
-ComplexNDArray::min (ArrayN<octave_idx_type>& idx_arg, int dim) const
+ComplexNDArray::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<ComplexNDArray> (*this, idx_arg, dim, mx_inline_min);
 }
@@ -738,7 +738,7 @@
 }
 
 ComplexNDArray
-ComplexNDArray::cummax (ArrayN<octave_idx_type>& idx_arg, int dim) const
+ComplexNDArray::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<ComplexNDArray> (*this, idx_arg, dim, mx_inline_cummax);
 }
@@ -750,7 +750,7 @@
 }
 
 ComplexNDArray
-ComplexNDArray::cummin (ArrayN<octave_idx_type>& idx_arg, int dim) const
+ComplexNDArray::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<ComplexNDArray> (*this, idx_arg, dim, mx_inline_cummin);
 }
@@ -765,19 +765,19 @@
 boolNDArray
 ComplexNDArray::isnan (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisnan));
+  return Array<bool> (fastmap<bool> (xisnan));
 }
 
 boolNDArray
 ComplexNDArray::isinf (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisinf));
+  return Array<bool> (fastmap<bool> (xisinf));
 }
 
 boolNDArray
 ComplexNDArray::isfinite (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xfinite));
+  return Array<bool> (fastmap<bool> (xfinite));
 }
 
 ComplexNDArray
--- a/liboctave/CNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/CNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -52,7 +52,7 @@
   ComplexNDArray (const MArrayN<U>& a) : MArrayN<Complex> (a) { }
 
   template <class U>
-  ComplexNDArray (const ArrayN<U>& a) : MArrayN<Complex> (a) { }
+  ComplexNDArray (const Array<U>& a) : MArrayN<Complex> (a) { }
 
   ComplexNDArray (const charNDArray&); 
 
@@ -87,14 +87,14 @@
   ComplexNDArray concat (const NDArray& rb, const Array<octave_idx_type>& ra_idx);
 
   ComplexNDArray max (int dim = 0) const;
-  ComplexNDArray max (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  ComplexNDArray max (Array<octave_idx_type>& index, int dim = 0) const;
   ComplexNDArray min (int dim = 0) const;
-  ComplexNDArray min (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  ComplexNDArray min (Array<octave_idx_type>& index, int dim = 0) const;
 
   ComplexNDArray cummax (int dim = 0) const;
-  ComplexNDArray cummax (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  ComplexNDArray cummax (Array<octave_idx_type>& index, int dim = 0) const;
   ComplexNDArray cummin (int dim = 0) const;
-  ComplexNDArray cummin (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  ComplexNDArray cummin (Array<octave_idx_type>& index, int dim = 0) const;
 
   ComplexNDArray diff (octave_idx_type order = 1, int dim = 0) const;
 
--- a/liboctave/ChangeLog	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/ChangeLog	Fri Oct 16 13:12:31 2009 +0200
@@ -1,3 +1,39 @@
+2009-10-16  Jaroslav Hajek  <highegg@gmail.com>
+
+	* ArrayN.h: Remove everything, just #define ArrayN Array. 
+	Warn if under gcc.
+	* ArrayN.cc: Remove.
+	* Array.cc (operator >>): New operator.
+	* Array.h: Declare it.
+
+	* Array-C.cc: Remove traces of ArrayN.
+	* Array-b.cc: Ditto.
+	* Array-ch.cc: Ditto.
+	* Array-d.cc: Ditto.
+	* Array-f.cc: Ditto.
+	* Array-fC.cc: Ditto.
+	* CNDArray.cc: Ditto.
+	* CNDArray.h: Ditto.
+	* MArrayN.h: Ditto.
+	* boolNDArray.cc: Ditto.
+	* boolNDArray.h: Ditto.
+	* chNDArray.h: Ditto.
+	* dNDArray.cc: Ditto.
+	* dNDArray.h: Ditto.
+	* fCNDArray.cc: Ditto.
+	* fCNDArray.h: Ditto.
+	* fNDArray.cc: Ditto.
+	* fNDArray.h: Ditto.
+	* intNDArray.cc: Ditto.
+	* intNDArray.h: Ditto.
+	* lo-specfun.cc: Ditto.
+	* lo-specfun.h: Ditto.
+
+	* mx-op-defs.h (DMS_BIN_OP, SDM_BIN_OP): Rewrite.
+	(DMS_BIN_OPS, SDM_BIN_OPS): Define dm*s and dm/s rather than dm+s and
+	dm-s which are rather useless.
+	* mx-ops: Update.
+
 2009-10-16  Jaroslav Hajek  <highegg@gmail.com>
 
 	* Array.cc (Array<T>::column, Array<T>::page, Array<T>::linearize,
--- a/liboctave/MArrayN.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/MArrayN.h	Fri Oct 16 13:12:31 2009 +0200
@@ -25,7 +25,7 @@
 #if !defined (octave_MArrayN_h)
 #define octave_MArrayN_h 1
 
-#include "ArrayN.h"
+#include "Array.h"
 #include "MArray2.h"
 #include "dim-vector.h"
 
@@ -39,34 +39,34 @@
 
 template <class T>
 class
-MArrayN : public ArrayN<T>
+MArrayN : public Array<T>
 {
 protected:
 
-  MArrayN (T *d, const dim_vector& dv) : ArrayN<T> (d, dv) { }
+  MArrayN (T *d, const dim_vector& dv) : Array<T> (d, dv) { }
 
 public:
   
-  MArrayN (void) : ArrayN<T> () {}
+  MArrayN (void) : Array<T> () {}
   
-  MArrayN (const dim_vector& dv) : ArrayN<T> (dv) { }
+  MArrayN (const dim_vector& dv) : Array<T> (dv) { }
   
-  MArrayN (const dim_vector& dv, const T& val) : ArrayN<T> (dv, val) { }
+  MArrayN (const dim_vector& dv, const T& val) : Array<T> (dv, val) { }
 
   template <class U>
-  explicit MArrayN (const Array2<U>& a) : ArrayN<T> (a) { }
+  explicit MArrayN (const Array2<U>& a) : Array<T> (a) { }
 
   template <class U>
-  MArrayN (const ArrayN<U>& a) : ArrayN<T> (a) { }
+  MArrayN (const Array<U>& a) : Array<T> (a) { }
 
   template <class U>
-  MArrayN (const MArrayN<U>& a) : ArrayN<T> (a) { }
+  MArrayN (const MArrayN<U>& a) : Array<T> (a) { }
 
   ~MArrayN (void) { }
 
   MArrayN<T>& operator = (const MArrayN<T>& a)
     {
-      ArrayN<T>::operator = (a);
+      Array<T>::operator = (a);
       return *this;
     }
 
@@ -88,26 +88,26 @@
     }
 
   MArrayN<T> reshape (const dim_vector& new_dims) const
-    { return ArrayN<T>::reshape (new_dims); }
+    { return Array<T>::reshape (new_dims); }
 
   MArrayN<T> permute (const Array<octave_idx_type>& vec, 
 		      bool inv = false) const
-    { return ArrayN<T>::permute (vec, inv); }
+    { return Array<T>::permute (vec, inv); }
 
   MArrayN<T> ipermute (const Array<octave_idx_type>& vec) const
-    { return ArrayN<T>::ipermute (vec); }
+    { return Array<T>::ipermute (vec); }
 
-  MArrayN squeeze (void) const { return ArrayN<T>::squeeze (); }
+  MArrayN squeeze (void) const { return Array<T>::squeeze (); }
 
   MArrayN<T> diag (octave_idx_type k) const
   {
-    return ArrayN<T>::diag (k);
+    return Array<T>::diag (k);
   }
 
   template <class U, class F>
   MArrayN<U> map (F fcn) const
   {
-    return ArrayN<T>::template map<U> (fcn);
+    return Array<T>::template map<U> (fcn);
   }
 
   void changesign (void);
--- a/liboctave/boolNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/boolNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -150,7 +150,7 @@
 boolNDArray
 boolNDArray::diag (octave_idx_type k) const
 {
-  return ArrayN<bool>::diag (k);
+  return Array<bool>::diag (k);
 }
 
 NDND_BOOL_OPS (boolNDArray, boolNDArray)
--- a/liboctave/boolNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/boolNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -23,7 +23,7 @@
 #if !defined (octave_boolNDArray_h)
 #define octave_boolNDArray_h 1
 
-#include "ArrayN.h"
+#include "Array.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
@@ -32,28 +32,28 @@
 
 class
 OCTAVE_API
-boolNDArray : public ArrayN<bool>
+boolNDArray : public Array<bool>
 {
 public:
 
   typedef boolMatrix matrix_type;
 
-  boolNDArray (void) : ArrayN<bool> () { }
+  boolNDArray (void) : Array<bool> () { }
 
-  boolNDArray (const dim_vector& dv) : ArrayN<bool> (dv) { }
+  boolNDArray (const dim_vector& dv) : Array<bool> (dv) { }
 
   boolNDArray (const dim_vector& dv, const bool& val)
-    : ArrayN<bool> (dv, val) { }
+    : Array<bool> (dv, val) { }
   
-  boolNDArray (const boolNDArray& a) : ArrayN<bool> (a) { }
+  boolNDArray (const boolNDArray& a) : Array<bool> (a) { }
 
-  boolNDArray (const boolMatrix& a) : ArrayN<bool> (a) { }
+  boolNDArray (const boolMatrix& a) : Array<bool> (a) { }
 
-  boolNDArray (const ArrayN<bool>& a) : ArrayN<bool> (a) { }
+  boolNDArray (const Array<bool>& a) : Array<bool> (a) { }
 
   boolNDArray& operator = (const boolNDArray& a)
     {
-      ArrayN<bool>::operator = (a);
+      Array<bool>::operator = (a);
       return *this;
     }
 
@@ -80,7 +80,7 @@
 
   boolMatrix matrix_value (void) const;
 
-  boolNDArray squeeze (void) const { return ArrayN<bool>::squeeze (); }
+  boolNDArray squeeze (void) const { return Array<bool>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
 			       const dim_vector& dimensions,
@@ -120,7 +120,7 @@
 
 private:
 
-  boolNDArray (bool *d, dim_vector& dv) : ArrayN<bool> (d, dv) { }
+  boolNDArray (bool *d, dim_vector& dv) : Array<bool> (d, dv) { }
 };
 
 NDND_BOOL_OP_DECLS (boolNDArray, boolNDArray, OCTAVE_API)
--- a/liboctave/chNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/chNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -55,7 +55,7 @@
 
   charNDArray (const string_vector& s) : MArrayN<char> (charMatrix (s)) { }
 
-  charNDArray (const ArrayN<char>& a) : MArrayN<char> (a) { }
+  charNDArray (const Array<char>& a) : MArrayN<char> (a) { }
 
   charNDArray& operator = (const charNDArray& a)
     {
@@ -77,7 +77,7 @@
   
   charMatrix matrix_value (void) const;
 
-  charNDArray squeeze (void) const { return ArrayN<char>::squeeze (); }
+  charNDArray squeeze (void) const { return Array<char>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
 			       const dim_vector& dimensions,
--- a/liboctave/dNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/dNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -744,7 +744,7 @@
 }
 
 NDArray
-NDArray::max (ArrayN<octave_idx_type>& idx_arg, int dim) const
+NDArray::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<NDArray> (*this, idx_arg, dim, mx_inline_max);
 }
@@ -756,7 +756,7 @@
 }
 
 NDArray
-NDArray::min (ArrayN<octave_idx_type>& idx_arg, int dim) const
+NDArray::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<NDArray> (*this, idx_arg, dim, mx_inline_min);
 }
@@ -768,7 +768,7 @@
 }
 
 NDArray
-NDArray::cummax (ArrayN<octave_idx_type>& idx_arg, int dim) const
+NDArray::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<NDArray> (*this, idx_arg, dim, mx_inline_cummax);
 }
@@ -780,7 +780,7 @@
 }
 
 NDArray
-NDArray::cummin (ArrayN<octave_idx_type>& idx_arg, int dim) const
+NDArray::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<NDArray> (*this, idx_arg, dim, mx_inline_cummin);
 }
@@ -882,19 +882,19 @@
 boolNDArray
 NDArray::isnan (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisnan));
+  return Array<bool> (fastmap<bool> (xisnan));
 }
 
 boolNDArray
 NDArray::isinf (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisinf));
+  return Array<bool> (fastmap<bool> (xisinf));
 }
 
 boolNDArray
 NDArray::isfinite (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xfinite));
+  return Array<bool> (fastmap<bool> (xfinite));
 }
 
 Matrix
--- a/liboctave/dNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/dNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -57,7 +57,7 @@
   NDArray (const MArrayN<U>& a) : MArrayN<double> (a) { }
 
   template <class U>
-  NDArray (const ArrayN<U>& a) : MArrayN<double> (a) { }
+  NDArray (const Array<U>& a) : MArrayN<double> (a) { }
 
   template <class U>
   explicit NDArray (const intNDArray<U>& a) : MArrayN<double> (a) { }
@@ -99,14 +99,14 @@
   charNDArray concat (const charNDArray& rb, const Array<octave_idx_type>& ra_idx);
 
   NDArray max (int dim = 0) const;
-  NDArray max (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  NDArray max (Array<octave_idx_type>& index, int dim = 0) const;
   NDArray min (int dim = 0) const;
-  NDArray min (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  NDArray min (Array<octave_idx_type>& index, int dim = 0) const;
   
   NDArray cummax (int dim = 0) const;
-  NDArray cummax (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  NDArray cummax (Array<octave_idx_type>& index, int dim = 0) const;
   NDArray cummin (int dim = 0) const;
-  NDArray cummin (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  NDArray cummin (Array<octave_idx_type>& index, int dim = 0) const;
 
   NDArray diff (octave_idx_type order = 1, int dim = 0) const;
 
--- a/liboctave/fCNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/fCNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -709,7 +709,7 @@
 }
 
 FloatComplexNDArray
-FloatComplexNDArray::max (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatComplexNDArray::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<FloatComplexNDArray> (*this, idx_arg, dim, mx_inline_max);
 }
@@ -721,7 +721,7 @@
 }
 
 FloatComplexNDArray
-FloatComplexNDArray::min (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatComplexNDArray::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<FloatComplexNDArray> (*this, idx_arg, dim, mx_inline_min);
 }
@@ -733,7 +733,7 @@
 }
 
 FloatComplexNDArray
-FloatComplexNDArray::cummax (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatComplexNDArray::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<FloatComplexNDArray> (*this, idx_arg, dim, mx_inline_cummax);
 }
@@ -745,7 +745,7 @@
 }
 
 FloatComplexNDArray
-FloatComplexNDArray::cummin (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatComplexNDArray::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<FloatComplexNDArray> (*this, idx_arg, dim, mx_inline_cummin);
 }
@@ -760,19 +760,19 @@
 boolNDArray
 FloatComplexNDArray::isnan (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisnan));
+  return Array<bool> (fastmap<bool> (xisnan));
 }
 
 boolNDArray
 FloatComplexNDArray::isinf (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisinf));
+  return Array<bool> (fastmap<bool> (xisinf));
 }
 
 boolNDArray
 FloatComplexNDArray::isfinite (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xfinite));
+  return Array<bool> (fastmap<bool> (xfinite));
 }
 
 FloatComplexNDArray
--- a/liboctave/fCNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/fCNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -52,7 +52,7 @@
   FloatComplexNDArray (const MArrayN<U>& a) : MArrayN<FloatComplex> (a) { }
 
   template <class U>
-  FloatComplexNDArray (const ArrayN<U>& a) : MArrayN<FloatComplex> (a) { }
+  FloatComplexNDArray (const Array<U>& a) : MArrayN<FloatComplex> (a) { }
 
   FloatComplexNDArray (const charNDArray&); 
 
@@ -87,14 +87,14 @@
   FloatComplexNDArray concat (const FloatNDArray& rb, const Array<octave_idx_type>& ra_idx);
 
   FloatComplexNDArray max (int dim = 0) const;
-  FloatComplexNDArray max (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatComplexNDArray max (Array<octave_idx_type>& index, int dim = 0) const;
   FloatComplexNDArray min (int dim = 0) const;
-  FloatComplexNDArray min (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatComplexNDArray min (Array<octave_idx_type>& index, int dim = 0) const;
 
   FloatComplexNDArray cummax (int dim = 0) const;
-  FloatComplexNDArray cummax (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatComplexNDArray cummax (Array<octave_idx_type>& index, int dim = 0) const;
   FloatComplexNDArray cummin (int dim = 0) const;
-  FloatComplexNDArray cummin (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatComplexNDArray cummin (Array<octave_idx_type>& index, int dim = 0) const;
 
   FloatComplexNDArray diff (octave_idx_type order = 1, int dim = 0) const;
 
--- a/liboctave/fNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/fNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -702,7 +702,7 @@
 }
 
 FloatNDArray
-FloatNDArray::max (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatNDArray::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<FloatNDArray> (*this, idx_arg, dim, mx_inline_max);
 }
@@ -714,7 +714,7 @@
 }
 
 FloatNDArray
-FloatNDArray::min (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatNDArray::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<FloatNDArray> (*this, idx_arg, dim, mx_inline_min);
 }
@@ -726,7 +726,7 @@
 }
 
 FloatNDArray
-FloatNDArray::cummax (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatNDArray::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<FloatNDArray> (*this, idx_arg, dim, mx_inline_cummax);
 }
@@ -738,7 +738,7 @@
 }
 
 FloatNDArray
-FloatNDArray::cummin (ArrayN<octave_idx_type>& idx_arg, int dim) const
+FloatNDArray::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<FloatNDArray> (*this, idx_arg, dim, mx_inline_cummin);
 }
@@ -840,19 +840,19 @@
 boolNDArray
 FloatNDArray::isnan (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisnan));
+  return Array<bool> (fastmap<bool> (xisnan));
 }
 
 boolNDArray
 FloatNDArray::isinf (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xisinf));
+  return Array<bool> (fastmap<bool> (xisinf));
 }
 
 boolNDArray
 FloatNDArray::isfinite (void) const
 {
-  return ArrayN<bool> (fastmap<bool> (xfinite));
+  return Array<bool> (fastmap<bool> (xfinite));
 }
 
 FloatMatrix
--- a/liboctave/fNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/fNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -54,7 +54,7 @@
   FloatNDArray (const MArrayN<U>& a) : MArrayN<float> (a) { }
 
   template <class U>
-  FloatNDArray (const ArrayN<U>& a) : MArrayN<float> (a) { }
+  FloatNDArray (const Array<U>& a) : MArrayN<float> (a) { }
 
   template <class U>
   explicit FloatNDArray (const intNDArray<U>& a) : MArrayN<float> (a) { }
@@ -96,14 +96,14 @@
   charNDArray concat (const charNDArray& rb, const Array<octave_idx_type>& ra_idx);
 
   FloatNDArray max (int dim = 0) const;
-  FloatNDArray max (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatNDArray max (Array<octave_idx_type>& index, int dim = 0) const;
   FloatNDArray min (int dim = 0) const;
-  FloatNDArray min (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatNDArray min (Array<octave_idx_type>& index, int dim = 0) const;
   
   FloatNDArray cummax (int dim = 0) const;
-  FloatNDArray cummax (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatNDArray cummax (Array<octave_idx_type>& index, int dim = 0) const;
   FloatNDArray cummin (int dim = 0) const;
-  FloatNDArray cummin (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  FloatNDArray cummin (Array<octave_idx_type>& index, int dim = 0) const;
 
   FloatNDArray diff (octave_idx_type order = 1, int dim = 0) const;
 
--- a/liboctave/intNDArray.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/intNDArray.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -231,7 +231,7 @@
 
 template <class T>
 intNDArray<T>
-intNDArray<T>::max (ArrayN<octave_idx_type>& idx_arg, int dim) const
+intNDArray<T>::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<intNDArray<T> > (*this, idx_arg, dim, mx_inline_max);
 }
@@ -245,7 +245,7 @@
 
 template <class T>
 intNDArray<T>
-intNDArray<T>::min (ArrayN<octave_idx_type>& idx_arg, int dim) const
+intNDArray<T>::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<intNDArray<T> > (*this, idx_arg, dim, mx_inline_min);
 }
@@ -259,7 +259,7 @@
 
 template <class T>
 intNDArray<T>
-intNDArray<T>::cummax (ArrayN<octave_idx_type>& idx_arg, int dim) const
+intNDArray<T>::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<intNDArray<T> > (*this, idx_arg, dim, mx_inline_cummax);
 }
@@ -273,7 +273,7 @@
 
 template <class T>
 intNDArray<T>
-intNDArray<T>::cummin (ArrayN<octave_idx_type>& idx_arg, int dim) const
+intNDArray<T>::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<intNDArray<T> > (*this, idx_arg, dim, mx_inline_cummin);
 }
--- a/liboctave/intNDArray.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/intNDArray.h	Fri Oct 16 13:12:31 2009 +0200
@@ -48,9 +48,6 @@
   explicit intNDArray (const Array<U>& a) : MArrayN<T> (a) { }
 
   template <class U>
-  explicit intNDArray (const ArrayN<U>& a) : MArrayN<T> (a) { }
-
-  template <class U>
   intNDArray (const MArrayN<U>& a) : MArrayN<T> (a) { }
 
   template <class U>
@@ -81,14 +78,14 @@
   boolNDArray any (int dim = -1) const;
 
   intNDArray max (int dim = 0) const;
-  intNDArray max (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  intNDArray max (Array<octave_idx_type>& index, int dim = 0) const;
   intNDArray min (int dim = 0) const;
-  intNDArray min (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  intNDArray min (Array<octave_idx_type>& index, int dim = 0) const;
   
   intNDArray cummax (int dim = 0) const;
-  intNDArray cummax (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  intNDArray cummax (Array<octave_idx_type>& index, int dim = 0) const;
   intNDArray cummin (int dim = 0) const;
-  intNDArray cummin (ArrayN<octave_idx_type>& index, int dim = 0) const;
+  intNDArray cummin (Array<octave_idx_type>& index, int dim = 0) const;
   
   intNDArray sum (int dim) const;
   NDArray dsum (int dim) const;
--- a/liboctave/lo-specfun.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/lo-specfun.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -1071,7 +1071,7 @@
 
 static inline ComplexNDArray
 do_bessel (dptr f, const char *, double alpha, const ComplexNDArray& x,
-	   bool scaled, ArrayN<octave_idx_type>& ierr)
+	   bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = x.dims ();
   octave_idx_type nel = dv.numel ();
@@ -1087,7 +1087,7 @@
 
 static inline ComplexNDArray
 do_bessel (dptr f, const char *, const NDArray& alpha, const Complex& x,
-	   bool scaled, ArrayN<octave_idx_type>& ierr)
+	   bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = alpha.dims ();
   octave_idx_type nel = dv.numel ();
@@ -1103,7 +1103,7 @@
 
 static inline ComplexNDArray
 do_bessel (dptr f, const char *fn, const NDArray& alpha,
-	   const ComplexNDArray& x, bool scaled, ArrayN<octave_idx_type>& ierr)
+	   const ComplexNDArray& x, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = x.dims ();
   ComplexNDArray retval;
@@ -1177,7 +1177,7 @@
 #define SN_BESSEL(name, fcn) \
   ComplexNDArray \
   name (double alpha, const ComplexNDArray& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1185,7 +1185,7 @@
 #define NS_BESSEL(name, fcn) \
   ComplexNDArray \
   name (const NDArray& alpha, const Complex& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1193,7 +1193,7 @@
 #define NN_BESSEL(name, fcn) \
   ComplexNDArray \
   name (const NDArray& alpha, const ComplexNDArray& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1668,7 +1668,7 @@
 
 static inline FloatComplexNDArray
 do_bessel (fptr f, const char *, float alpha, const FloatComplexNDArray& x,
-	   bool scaled, ArrayN<octave_idx_type>& ierr)
+	   bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = x.dims ();
   octave_idx_type nel = dv.numel ();
@@ -1684,7 +1684,7 @@
 
 static inline FloatComplexNDArray
 do_bessel (fptr f, const char *, const FloatNDArray& alpha, const FloatComplex& x,
-	   bool scaled, ArrayN<octave_idx_type>& ierr)
+	   bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = alpha.dims ();
   octave_idx_type nel = dv.numel ();
@@ -1700,7 +1700,7 @@
 
 static inline FloatComplexNDArray
 do_bessel (fptr f, const char *fn, const FloatNDArray& alpha,
-	   const FloatComplexNDArray& x, bool scaled, ArrayN<octave_idx_type>& ierr)
+	   const FloatComplexNDArray& x, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = x.dims ();
   FloatComplexNDArray retval;
@@ -1774,7 +1774,7 @@
 #define SN_BESSEL(name, fcn) \
   FloatComplexNDArray \
   name (float alpha, const FloatComplexNDArray& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1782,7 +1782,7 @@
 #define NS_BESSEL(name, fcn) \
   FloatComplexNDArray \
   name (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1790,7 +1790,7 @@
 #define NN_BESSEL(name, fcn) \
   FloatComplexNDArray \
   name (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, \
-	ArrayN<octave_idx_type>& ierr) \
+	Array<octave_idx_type>& ierr) \
   { \
     return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
   }
@@ -1931,7 +1931,7 @@
 }
 
 ComplexNDArray
-airy (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr)
+airy (const ComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = z.dims ();
   octave_idx_type nel = dv.numel ();
@@ -1946,7 +1946,7 @@
 }
 
 ComplexNDArray
-biry (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr)
+biry (const ComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = z.dims ();
   octave_idx_type nel = dv.numel ();
@@ -2061,7 +2061,7 @@
 }
 
 FloatComplexNDArray
-airy (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr)
+airy (const FloatComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = z.dims ();
   octave_idx_type nel = dv.numel ();
@@ -2076,7 +2076,7 @@
 }
 
 FloatComplexNDArray
-biry (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr)
+biry (const FloatComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr)
 {
   dim_vector dv = z.dims ();
   octave_idx_type nel = dv.numel ();
--- a/liboctave/lo-specfun.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/lo-specfun.h	Fri Oct 16 13:12:31 2009 +0200
@@ -25,7 +25,7 @@
 #define octave_liboctave_specfun_h 1
 
 #include "oct-cmplx.h"
-#include "ArrayN.h"
+#include "Array.h"
 
 template <class T> class Array2;
 class Matrix;
@@ -202,75 +202,75 @@
 
 extern OCTAVE_API ComplexNDArray
 besselj (double alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 bessely (double alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besseli (double alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselk (double alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh1 (double alpha, const ComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh2 (double alpha, const ComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselj (const NDArray& alpha, const Complex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 bessely (const NDArray& alpha, const Complex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besseli (const NDArray& alpha, const Complex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselk (const NDArray& alpha, const Complex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh1 (const NDArray& alpha, const Complex& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh2 (const NDArray& alpha, const Complex& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselj (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 bessely (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besseli (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselk (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh1 (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
 besselh2 (const NDArray& alpha, const ComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexMatrix
 besselj (const RowVector& alpha, const ComplexColumnVector& x, bool scaled,
@@ -388,75 +388,75 @@
 
 extern OCTAVE_API FloatComplexNDArray
 besselj (float alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 bessely (float alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besseli (float alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselk (float alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh1 (float alpha, const FloatComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh2 (float alpha, const FloatComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselj (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 bessely (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besseli (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselk (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh1 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh2 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselj (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 bessely (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besseli (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselk (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	 ArrayN<octave_idx_type>& ierr);
+	 Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh1 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
 besselh2 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled,
-	  ArrayN<octave_idx_type>& ierr);
+	  Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexMatrix
 besselj (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled,
@@ -492,10 +492,10 @@
 biry (const ComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
-airy (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr);
+airy (const ComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API ComplexNDArray
-biry (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr);
+biry (const ComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplex airy (const FloatComplex& z, bool deriv, bool scaled, octave_idx_type& ierr);
 extern OCTAVE_API FloatComplex biry (const FloatComplex& z, bool deriv, bool scaled, octave_idx_type& ierr);
@@ -507,10 +507,10 @@
 biry (const FloatComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
-airy (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr);
+airy (const FloatComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API FloatComplexNDArray
-biry (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr);
+biry (const FloatComplexNDArray& z, bool deriv, bool scaled, Array<octave_idx_type>& ierr);
 
 extern OCTAVE_API double betainc (double x, double a, double b);
 extern OCTAVE_API Matrix betainc (double x, double a, const Matrix& b);
--- a/liboctave/mx-op-decl.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/mx-op-decl.h	Fri Oct 16 13:12:31 2009 +0200
@@ -237,8 +237,7 @@
 // scalar by diagonal matrix operations.
 
 #define SDM_BIN_OP_DECLS(R, S, DM, API) \
-  BIN_OP_DECL (R, operator +, S, DM, API); \
-  BIN_OP_DECL (R, operator -, S, DM, API);
+  BIN_OP_DECL (R, operator *, S, DM, API); \
 
 #define SDM_OP_DECLS(R, S, DM, API) \
   SDM_BIN_OP_DECLS(R, S, DM, API)
@@ -246,8 +245,8 @@
 // diagonal matrix by scalar operations.
 
 #define DMS_BIN_OP_DECLS(R, DM, S, API) \
-  BIN_OP_DECL (R, operator +, DM, S, API); \
-  BIN_OP_DECL (R, operator -, DM, S, API);
+  BIN_OP_DECL (R, operator *, DM, S, API); \
+  BIN_OP_DECL (R, operator /, DM, S, API);
 
 #define DMS_OP_DECLS(R, DM, S, API) \
   DMS_BIN_OP_DECLS(R, DM, S, API)
--- a/liboctave/mx-op-defs.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/mx-op-defs.h	Fri Oct 16 13:12:31 2009 +0200
@@ -334,45 +334,38 @@
 
 // scalar by diagonal matrix operations.
 
-#define SDM_BIN_OP(R, OP, S, DM, OPEQ) \
+#define SDM_BIN_OP(R, OP, S, DM) \
   R \
-  OP (const S& s, const DM& dm) \
+  operator OP (const S& s, const DM& dm) \
   { \
-    octave_idx_type nr = dm.rows (); \
-    octave_idx_type nc = dm.cols (); \
- \
-    R r (nr, nc, s); \
+    R r (dm.rows (), dm.cols ()); \
  \
     for (octave_idx_type i = 0; i < dm.length (); i++) \
-      r.elem(i, i) OPEQ dm.elem(i, i); \
+      r.dgxelem (i) = s OP dm.dgelem (i); \
  \
     return r; \
 }
 
 #define SDM_BIN_OPS(R, S, DM) \
-  SDM_BIN_OP (R, operator +, S, DM, +=) \
-  SDM_BIN_OP (R, operator -, S, DM, -=)
+  SDM_BIN_OP (R, *, S, DM)
 
 // diagonal matrix by scalar operations.
 
-#define DMS_BIN_OP(R, OP, DM, S, SGN) \
+#define DMS_BIN_OP(R, OP, DM, S) \
   R \
-  OP (const DM& dm, const S& s) \
+  operator OP (const DM& dm, const S& s) \
   { \
-    octave_idx_type nr = dm.rows (); \
-    octave_idx_type nc = dm.cols (); \
- \
-    R r (nr, nc, SGN s); \
+    R r (dm.rows (), dm.cols ()); \
  \
     for (octave_idx_type i = 0; i < dm.length (); i++) \
-      r.elem(i, i) += dm.elem(i, i); \
+      r.dgxelem (i) = dm.dgelem (i) OP s; \
  \
     return r; \
   }
 
 #define DMS_BIN_OPS(R, DM, S) \
-  DMS_BIN_OP (R, operator +, DM, S, ) \
-  DMS_BIN_OP (R, operator -, DM, S, -)
+  DMS_BIN_OP (R, *, DM, S) \
+  DMS_BIN_OP (R, /, DM, S)
 
 // matrix by diagonal matrix operations.
 
--- a/liboctave/mx-ops	Fri Oct 16 10:28:26 2009 +0200
+++ b/liboctave/mx-ops	Fri Oct 16 13:12:31 2009 +0200
@@ -82,65 +82,57 @@
 #
 cdm cdm dm B
 cdm dm cdm B
-cm cs cdm B
-cm cs dm B
+cdm cs dm B
 cm cs m BCL real NONE boolMatrix.h
 cnda cs nda BCL real NONE boolMatrix.h boolNDArray.h
-cm cdm cs B
 cm cdm cm B
 cm cdm m B
-cm cdm s B
+cdm cdm s B
 cm cm cdm B
 cm cm dm B
 cm cm m BCL real NONE boolMatrix.h
 cnda cnda nda BCL real NONE boolMatrix.h boolNDArray.h
 cm cm s BCL real NONE boolMatrix.h
 cnda cnda s BCL real NONE boolMatrix.h boolNDArray.h
-cm dm cs B
+cdm dm cs B
 cm dm cm B
 cm m cs BCL NONE real boolMatrix.h
 cnda nda cs BCL NONE real boolMatrix.h boolNDArray.h
 cm m cdm B
 cm m cm BCL NONE real boolMatrix.h
 cnda nda cnda BCL NONE real boolMatrix.h boolNDArray.h
-cm s cdm B
+cdm s cdm B
 cm s cm BCL NONE real boolMatrix.h
 cnda s cnda BCL NONE real boolMatrix.h boolNDArray.h
 m dm m B
-m dm s B
 m m dm B
-m s dm B
 #
 fcdm fcdm fdm B
 fcdm fdm fcdm B
-fcm fcs fcdm B
-fcm fcs fdm B
+fcdm fcs fdm B
 fcm fcs fm BCL real NONE boolMatrix.h
 fcnda fcs fnda BCL real NONE boolMatrix.h boolNDArray.h
-fcm fcdm fcs B
 fcm fcdm fcm B
 fcm fcdm fm B
-fcm fcdm fs B
+fcdm fcdm fs B
 fcm fcm fcdm B
 fcm fcm fdm B
 fcm fcm fm BCL real NONE boolMatrix.h
 fcnda fcnda fnda BCL real NONE boolMatrix.h boolNDArray.h
 fcm fcm fs BCL real NONE boolMatrix.h
 fcnda fcnda fs BCL real NONE boolMatrix.h boolNDArray.h
-fcm fdm fcs B
+fcdm fdm fcs B
 fcm fdm fcm B
 fcm fm fcs BCL NONE real boolMatrix.h
 fcnda fnda fcs BCL NONE real boolMatrix.h boolNDArray.h
 fcm fm fcdm B
 fcm fm fcm BCL NONE real boolMatrix.h
 fcnda fnda fcnda BCL NONE real boolMatrix.h boolNDArray.h
-fcm fs fcdm B
+fcdm fs fcdm B
 fcm fs fcm BCL NONE real boolMatrix.h
 fcnda fs fcnda BCL NONE real boolMatrix.h boolNDArray.h
 fm fdm fm B
-fm fdm fs B
 fm fm fdm B
-fm fs fdm B
 #
 m pm m B
 m m pm B
--- a/src/Cell.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/Cell.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -33,12 +33,12 @@
 #include "oct-obj.h"
 
 Cell::Cell (const octave_value_list& ovl)
-  : ArrayN<octave_value> (ovl.cell_value ())
+  : Array<octave_value> (ovl.cell_value ())
 {
 }
 
 Cell::Cell (const string_vector& sv, bool trim)
-  : ArrayN<octave_value> ()
+  : Array<octave_value> ()
 {
   octave_idx_type n = sv.length ();
 
@@ -63,7 +63,7 @@
 }
 
 Cell::Cell (const Array<std::string>& sa)
-  : ArrayN<octave_value> (sa.dims ())
+  : Array<octave_value> (sa.dims ())
 {
   octave_idx_type n = sa.numel ();
 
@@ -78,7 +78,7 @@
 // SV as possible.
 
 Cell::Cell (const dim_vector& dv, const string_vector& sv, bool trim)
-  : ArrayN<octave_value> (dv, resize_fill_value ())
+  : Array<octave_value> (dv, resize_fill_value ())
 {
   octave_idx_type n = sv.length ();
 
@@ -139,7 +139,7 @@
 	idx_vector i = idx_arg(0).index_vector ();
 
 	if (! error_state)
-	  retval = ArrayN<octave_value>::index (i, resize_ok, resize_fill_value ());
+	  retval = Array<octave_value>::index (i, resize_ok, resize_fill_value ());
       }
       break;
 
@@ -152,7 +152,7 @@
 	    idx_vector j = idx_arg(1).index_vector ();
 
 	    if (! error_state)
-	      retval = ArrayN<octave_value>::index (i, j, resize_ok,
+	      retval = Array<octave_value>::index (i, j, resize_ok,
                                                     resize_fill_value ());
 	  }
       }
@@ -171,7 +171,7 @@
 	  }
 
 	if (!error_state)
-	  retval = ArrayN<octave_value>::index (iv, resize_ok,
+	  retval = Array<octave_value>::index (iv, resize_ok,
                                                 resize_fill_value ());
       }
       break;
@@ -282,7 +282,7 @@
 Cell
 Cell::diag (octave_idx_type k) const
 {
-  return ArrayN<octave_value>::diag (k);
+  return Array<octave_value>::diag (k);
 }
 
 /*
--- a/src/Cell.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/Cell.h	Fri Oct 16 13:12:31 2009 +0200
@@ -26,7 +26,7 @@
 
 #include <string>
 
-#include "ArrayN.h"
+#include "Array.h"
 #include "oct-alloc.h"
 #include "str-vec.h"
 #include "ov.h"
@@ -35,33 +35,30 @@
 
 class
 OCTINTERP_API
-Cell : public ArrayN<octave_value>
+Cell : public Array<octave_value>
 {
 public:
 
   Cell (void)
-    : ArrayN<octave_value> (dim_vector (0, 0)) { }
+    : Array<octave_value> (dim_vector (0, 0)) { }
 
   Cell (const octave_value& val)
-    : ArrayN<octave_value> (dim_vector (1, 1), val) { }
+    : Array<octave_value> (dim_vector (1, 1), val) { }
 
   Cell (const octave_value_list& ovl);
 
   Cell (octave_idx_type n, octave_idx_type m,
 	const octave_value& val = resize_fill_value ())
-    : ArrayN<octave_value> (dim_vector (n, m), val) { }
+    : Array<octave_value> (dim_vector (n, m), val) { }
 
   Cell (const dim_vector& dv, const octave_value& val = resize_fill_value ())
-    : ArrayN<octave_value> (dv, val) { }
-
-  Cell (const ArrayN<octave_value>& c)
-    : ArrayN<octave_value> (c) { }
+    : Array<octave_value> (dv, val) { }
 
   Cell (const Array<octave_value>& c)
-    : ArrayN<octave_value> (c) { }
+    : Array<octave_value> (c) { }
 
   Cell (const Array<octave_value>& c, octave_idx_type nr, octave_idx_type nc)
-    : ArrayN<octave_value> (c, dim_vector (nr, nc)) { }
+    : Array<octave_value> (c, dim_vector (nr, nc)) { }
 
   Cell (const string_vector& sv, bool trim = false);
 
@@ -70,7 +67,7 @@
   Cell (const dim_vector& dv, const string_vector& sv, bool trim = false);
 
   Cell (const Cell& c)
-    : ArrayN<octave_value> (c) { }
+    : Array<octave_value> (c) { }
 
   bool is_cellstr (void) const;
 
@@ -82,7 +79,7 @@
 		const octave_value& fill_val = resize_fill_value ());
 
   Cell reshape (const dim_vector& new_dims) const
-    { return ArrayN<octave_value>::reshape (new_dims); }
+    { return Array<octave_value>::reshape (new_dims); }
 
   octave_idx_type nnz (void) const;
 
--- a/src/ChangeLog	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ChangeLog	Fri Oct 16 13:12:31 2009 +0200
@@ -1,3 +1,31 @@
+2009-10-16  Jaroslav Hajek  <highegg@gmail.com>
+
+	* Cell.cc: Remove traces of ArrayN.
+	* Cell.h: Ditto.
+	* DLD-FUNCTIONS/besselj.cc: Ditto.
+	* DLD-FUNCTIONS/find.cc: Ditto.
+	* DLD-FUNCTIONS/lookup.cc: Ditto.
+	* DLD-FUNCTIONS/max.cc: Ditto.
+	* TEMPLATE-INST/Array-tc.cc: Ditto.
+	* data.cc: Ditto.
+	* oct-map.cc: Ditto.
+	* ov-cx-mat.h: Ditto.
+	* ov-flt-cx-mat.cc: Ditto.
+	* ov-flt-cx-mat.h: Ditto.
+	* ov-flt-re-mat.cc: Ditto.
+	* ov-flt-re-mat.h: Ditto.
+	* ov-intx.h: Ditto.
+	* ov-re-mat.h: Ditto.
+	* ov.cc: Ditto.
+	* ov.h: Ditto.
+	* pr-output.cc: Ditto.
+	* pr-output.h: Ditto.
+	* variables.cc: Ditto.
+
+	* OPERATORS/op-dm-scm.cc: Avoid using dm + s, dm - s operators.
+	* OPERATORS/op-dm-sm.cc: Ditto.
+	* OPERATORS/op-dms-template.cc: Ditto.
+
 2009-10-16  Jaroslav Hajek  <highegg@gmail.com>
 
 	* DLD-FUNCTIONS/cellfun.cc (Fnum2cell): Use Array<T>::column here.
--- a/src/DLD-FUNCTIONS/besselj.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/DLD-FUNCTIONS/besselj.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -133,7 +133,7 @@
 
 		      if (! error_state)
 			{
-			  ArrayN<octave_idx_type> ierr;
+			  Array<octave_idx_type> ierr;
 			  octave_value result;
 
 			  DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -197,7 +197,7 @@
 
 			  if (! error_state)
 			    {
-			      ArrayN<octave_idx_type> ierr;
+			      Array<octave_idx_type> ierr;
 			      octave_value result;
 
 			      DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -216,7 +216,7 @@
 
 			  if (! error_state)
 			    {
-			      ArrayN<octave_idx_type> ierr;
+			      Array<octave_idx_type> ierr;
 			      octave_value result;
 			  
 			      DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -268,7 +268,7 @@
 
 		      if (! error_state)
 			{
-			  ArrayN<octave_idx_type> ierr;
+			  Array<octave_idx_type> ierr;
 			  octave_value result;
 
 			  DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -332,7 +332,7 @@
 
 			  if (! error_state)
 			    {
-			      ArrayN<octave_idx_type> ierr;
+			      Array<octave_idx_type> ierr;
 			      octave_value result;
 
 			      DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -351,7 +351,7 @@
 
 			  if (! error_state)
 			    {
-			      ArrayN<octave_idx_type> ierr;
+			      Array<octave_idx_type> ierr;
 			      octave_value result;
 			  
 			      DO_BESSEL (type, alpha, x, scaled, ierr, result);
@@ -587,7 +587,7 @@
 
 	      if (! error_state)
 		{
-		  ArrayN<octave_idx_type> ierr;
+		  Array<octave_idx_type> ierr;
 		  octave_value result;
 
 		  if (kind > 1)
@@ -609,7 +609,7 @@
 
 	      if (! error_state)
 		{
-		  ArrayN<octave_idx_type> ierr;
+		  Array<octave_idx_type> ierr;
 		  octave_value result;
 
 		  if (kind > 1)
--- a/src/DLD-FUNCTIONS/find.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/DLD-FUNCTIONS/find.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -53,7 +53,7 @@
     {
     default:
     case 3:
-      retval(2) = ArrayN<T> (nda.index (idx_vector (idx)));
+      retval(2) = Array<T> (nda.index (idx_vector (idx)));
       // Fall through!
 
     case 2:
@@ -175,7 +175,7 @@
   Matrix i_idx (result_nr, result_nc);
   Matrix j_idx (result_nr, result_nc);
 
-  ArrayN<T> val (dim_vector (result_nr, result_nc));
+  Array<T> val (dim_vector (result_nr, result_nc));
 
   if (count > 0)
     {
@@ -285,7 +285,7 @@
   Matrix i_idx (count, 1);
   Matrix j_idx (count, 1);
   // Every value is 1.
-  ArrayN<double> val (dim_vector (count, 1), 1.0);
+  Array<double> val (dim_vector (count, 1), 1.0);
 
   if (count > 0)
     {
--- a/src/DLD-FUNCTIONS/lookup.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/DLD-FUNCTIONS/lookup.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -113,7 +113,7 @@
 
   if (match_bool)
     {
-      boolNDArray match = ArrayN<bool> (array.lookupb (values));
+      boolNDArray match = Array<bool> (array.lookupb (values));
       retval = match;
     }
   else
--- a/src/DLD-FUNCTIONS/max.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/DLD-FUNCTIONS/max.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -71,7 +71,7 @@
     } \
   else if (nargout == 2) \
     { \
-      ArrayN<octave_idx_type> index; \
+      Array<octave_idx_type> index; \
  \
       if (arg1.is_real_type ()) \
 	{ \
@@ -238,7 +238,7 @@
     } \
   else if (nargout == 2) \
     { \
-      ArrayN<octave_idx_type> index; \
+      Array<octave_idx_type> index; \
  \
       if (arg1.is_real_type ()) \
 	{ \
@@ -390,7 +390,7 @@
     } \
   else if (nargout == 2) \
     { \
-      ArrayN<octave_idx_type> index; \
+      Array<octave_idx_type> index; \
  \
       TYP ## NDArray m = arg1. TYP ## _array_value (); \
  \
--- a/src/OPERATORS/op-dm-scm.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/OPERATORS/op-dm-scm.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -148,7 +148,7 @@
     {
       std::complex<double> d = v2.complex_value ();
 
-      return octave_value (v1.diag_matrix_value () + d);
+      return octave_value (v1.matrix_value () + d);
     }
   else
     return v1.diag_matrix_value () + v2.sparse_complex_matrix_value ();
@@ -164,7 +164,7 @@
     {
       double d = v2.scalar_value ();
 
-      return octave_value (v1.complex_diag_matrix_value () + d);
+      return octave_value (v1.complex_matrix_value () + d);
     }
   else
     return v1.complex_diag_matrix_value () + v2.sparse_matrix_value ();
@@ -180,7 +180,7 @@
     {
       std::complex<double> d = v2.complex_value ();
 
-      return octave_value (v1.complex_diag_matrix_value () + d);
+      return octave_value (v1.complex_matrix_value () + d);
     }
   else
     return v1.complex_diag_matrix_value () + v2.sparse_complex_matrix_value ();
@@ -196,7 +196,7 @@
     {
       std::complex<double> d = v2.complex_value ();
 
-      return octave_value (v1.diag_matrix_value () + (-d));
+      return octave_value (v1.matrix_value () + (-d));
     }
   else
     return v1.diag_matrix_value () - v2.sparse_complex_matrix_value ();
@@ -212,7 +212,7 @@
     {
       double d = v2.scalar_value ();
 
-      return octave_value (v1.complex_diag_matrix_value () + (-d));
+      return octave_value (v1.complex_matrix_value () + (-d));
     }
   else
     return v1.complex_diag_matrix_value () - v2.sparse_matrix_value ();
@@ -228,7 +228,7 @@
     {
       std::complex<double> d = v2.complex_value ();
 
-      return octave_value (v1.complex_diag_matrix_value () + (-d));
+      return octave_value (v1.complex_matrix_value () + (-d));
     }
   else
     return v1.complex_diag_matrix_value () - v2.sparse_complex_matrix_value ();
--- a/src/OPERATORS/op-dm-sm.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/OPERATORS/op-dm-sm.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -78,7 +78,7 @@
     {
       double d = v2.scalar_value ();
 
-      return octave_value (v1.diag_matrix_value () + d);
+      return octave_value (v1.matrix_value () + d);
     }
   else
     return v1.diag_matrix_value () + v2.sparse_matrix_value ();
@@ -94,7 +94,7 @@
     {
       double d = v2.scalar_value ();
 
-      return octave_value (v1.diag_matrix_value () - d);
+      return octave_value (v1.matrix_value () - d);
     }
   else
     return v1.diag_matrix_value () - v2.sparse_matrix_value ();
@@ -155,7 +155,7 @@
     {
       double d = v1.scalar_value ();
 
-      return octave_value (d + v2.diag_matrix_value ());
+      return octave_value (d + v2.matrix_value ());
     }
   else
     return v1.sparse_matrix_value () + v2.diag_matrix_value ();
@@ -171,7 +171,7 @@
     {
       double d = v1.scalar_value ();
 
-      return octave_value (d - v2.diag_matrix_value ());
+      return octave_value (d - v2.matrix_value ());
     }
   else
     return v1.sparse_matrix_value () - v2.diag_matrix_value ();
--- a/src/OPERATORS/op-dms-template.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/OPERATORS/op-dms-template.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -40,11 +40,7 @@
 #define MATRIXV MATRIX
 #endif
 
-DEFNDBINOP_OP (sdmadd, SCALAR, MATRIX, SCALARV, MATRIXV, +)
-DEFNDBINOP_OP (sdmsub, SCALAR, MATRIX, SCALARV, MATRIXV, -)
 DEFNDBINOP_OP (sdmmul, SCALAR, MATRIX, SCALARV, MATRIXV, *)
-DEFNDBINOP_OP (dmsadd, MATRIX, SCALAR, MATRIXV, SCALARV, +)
-DEFNDBINOP_OP (dmssub, MATRIX, SCALAR, MATRIXV, SCALARV, -)
 DEFNDBINOP_OP (dmsmul, MATRIX, SCALAR, MATRIXV, SCALARV, *)
 
 #define OCTAVE_MATRIX CONCAT2(octave_, MATRIX)
@@ -88,12 +84,8 @@
 void
 INST_NAME (void)
 {
-  INSTALL_BINOP (op_add, OCTAVE_MATRIX, OCTAVE_SCALAR, dmsadd);
-  INSTALL_BINOP (op_sub, OCTAVE_MATRIX, OCTAVE_SCALAR, dmssub);
   INSTALL_BINOP (op_mul, OCTAVE_MATRIX, OCTAVE_SCALAR, dmsmul);
   INSTALL_BINOP (op_div, OCTAVE_MATRIX, OCTAVE_SCALAR, dmsdiv);
-  INSTALL_BINOP (op_add, OCTAVE_SCALAR, OCTAVE_MATRIX, sdmadd);
-  INSTALL_BINOP (op_sub, OCTAVE_SCALAR, OCTAVE_MATRIX, sdmsub);
   INSTALL_BINOP (op_mul, OCTAVE_SCALAR, OCTAVE_MATRIX, sdmmul);
   INSTALL_BINOP (op_ldiv, OCTAVE_SCALAR, OCTAVE_MATRIX, sdmldiv);
   INSTALL_BINOP (op_pow, OCTAVE_MATRIX, OCTAVE_SCALAR, dmspow);
--- a/src/TEMPLATE-INST/Array-tc.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/TEMPLATE-INST/Array-tc.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -32,9 +32,6 @@
 
 #include "Array2.h"
 
-#include "ArrayN.h"
-#include "ArrayN.cc"
-
 #include "ov.h"
 
 #include "oct-sort.cc"
@@ -45,8 +42,6 @@
 
 template class OCTINTERP_API Array2<octave_value>;
 
-template class OCTINTERP_API ArrayN<octave_value>;
-
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
--- a/src/data.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/data.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -6263,7 +6263,7 @@
   else
     error ("accumarray: dimensions mismatch");
 
-  return NDT (MArrayN<T> (ArrayN<T> (array)));
+  return NDT (MArrayN<T> (Array<T> (array)));
 }
 
 DEFUN (__accumarray_sum__, args, ,
--- a/src/oct-map.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/oct-map.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -509,7 +509,7 @@
             {
               Cell tmp = contents (p);
 
-              tmp = tmp.ArrayN<octave_value>::index (ra_idx, resize_ok);
+              tmp = tmp.Array<octave_value>::index (ra_idx, resize_ok);
 
               if (error_state)
                 break;
--- a/src/ov-cx-mat.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-cx-mat.h	Fri Oct 16 13:12:31 2009 +0200
@@ -66,7 +66,7 @@
   octave_complex_matrix (const ComplexMatrix& m, const MatrixType& t)
     : octave_base_matrix<ComplexNDArray> (m, t) { }
 
-  octave_complex_matrix (const ArrayN<Complex>& m)
+  octave_complex_matrix (const Array<Complex>& m)
     : octave_base_matrix<ComplexNDArray> (ComplexNDArray (m)) { }
 
   octave_complex_matrix (const ComplexDiagMatrix& d)
--- a/src/ov-flt-cx-mat.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-flt-cx-mat.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -259,7 +259,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
 			       "complex matrix", "real matrix");
 
-  retval = SparseMatrix (::real (matrix.matrix_value ()));
+  retval = SparseMatrix (::real (complex_matrix_value ()));
 
   return retval;
 }
@@ -267,7 +267,7 @@
 SparseComplexMatrix
 octave_float_complex_matrix::sparse_complex_matrix_value (bool) const
 {
-  return SparseComplexMatrix (matrix.matrix_value ());
+  return SparseComplexMatrix (complex_matrix_value ());
 }
 
 octave_value
--- a/src/ov-flt-cx-mat.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-flt-cx-mat.h	Fri Oct 16 13:12:31 2009 +0200
@@ -66,7 +66,7 @@
   octave_float_complex_matrix (const FloatComplexMatrix& m, const MatrixType& t)
     : octave_base_matrix<FloatComplexNDArray> (m, t) { }
 
-  octave_float_complex_matrix (const ArrayN<FloatComplex>& m)
+  octave_float_complex_matrix (const Array<FloatComplex>& m)
     : octave_base_matrix<FloatComplexNDArray> (FloatComplexNDArray (m)) { }
 
   octave_float_complex_matrix (const FloatComplexDiagMatrix& d)
--- a/src/ov-flt-re-mat.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-flt-re-mat.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -238,7 +238,7 @@
 SparseMatrix 
 octave_float_matrix::sparse_matrix_value (bool) const
 {
-  return SparseMatrix (matrix.matrix_value ());
+  return SparseMatrix (matrix_value ());
 }
 
 SparseComplexMatrix 
--- a/src/ov-flt-re-mat.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-flt-re-mat.h	Fri Oct 16 13:12:31 2009 +0200
@@ -66,7 +66,7 @@
   octave_float_matrix (const FloatNDArray& nda)
     : octave_base_matrix<FloatNDArray> (nda) { }
 
-  octave_float_matrix (const ArrayN<float>& m)
+  octave_float_matrix (const Array<float>& m)
     : octave_base_matrix<FloatNDArray> (FloatNDArray (m)) { }
 
   octave_float_matrix (const FloatDiagMatrix& d)
--- a/src/ov-intx.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-intx.h	Fri Oct 16 13:12:31 2009 +0200
@@ -52,7 +52,7 @@
   OCTAVE_VALUE_INT_MATRIX_T (const intNDArray<OCTAVE_INT_T>& nda)
     : octave_base_int_matrix<intNDArray<OCTAVE_INT_T> > (nda) { }
 
-  OCTAVE_VALUE_INT_MATRIX_T (const ArrayN<OCTAVE_INT_T>& nda)
+  OCTAVE_VALUE_INT_MATRIX_T (const Array<OCTAVE_INT_T>& nda)
     : octave_base_int_matrix<intNDArray<OCTAVE_INT_T> >
         (intNDArray<OCTAVE_INT_T> (nda)) { }
 
--- a/src/ov-re-mat.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov-re-mat.h	Fri Oct 16 13:12:31 2009 +0200
@@ -66,7 +66,7 @@
   octave_matrix (const NDArray& nda)
     : octave_base_matrix<NDArray> (nda) { }
 
-  octave_matrix (const ArrayN<double>& m)
+  octave_matrix (const Array<double>& m)
     : octave_base_matrix<NDArray> (NDArray (m)) { }
 
   octave_matrix (const DiagMatrix& d)
--- a/src/ov.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -586,7 +586,7 @@
 {
 }
 
-octave_value::octave_value (const ArrayN<octave_value>& a, bool is_csl)
+octave_value::octave_value (const Array<octave_value>& a, bool is_csl)
   : rep (is_csl
 	 ? dynamic_cast<octave_base_value *> (new octave_cs_list (Cell (a)))
 	 : dynamic_cast<octave_base_value *> (new octave_cell (Cell (a))))
@@ -617,13 +617,13 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<double>& a)
+octave_value::octave_value (const Array<double>& a)
   : rep (new octave_matrix (a))
 {
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<float>& a)
+octave_value::octave_value (const Array<float>& a)
   : rep (new octave_float_matrix (a))
 {
   maybe_mutate ();
@@ -701,13 +701,13 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<Complex>& a)
+octave_value::octave_value (const Array<Complex>& a)
   : rep (new octave_complex_matrix (a))
 {
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<FloatComplex>& a)
+octave_value::octave_value (const Array<FloatComplex>& a)
   : rep (new octave_float_complex_matrix (a))
 {
   maybe_mutate ();
@@ -772,7 +772,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<bool>& bnda)
+octave_value::octave_value (const Array<bool>& bnda)
   : rep (new octave_bool_matrix (bnda))
 {
   maybe_mutate ();
@@ -826,7 +826,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<char>& chm, char type)
+octave_value::octave_value (const Array<char>& chm, char type)
   : rep (type == '"'
 	 ? new octave_char_matrix_dq_str (chm)
 	 : new octave_char_matrix_sq_str (chm))
@@ -850,7 +850,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<char>& chm, bool, char type)
+octave_value::octave_value (const Array<char>& chm, bool, char type)
   : rep (type == '"'
 	 ? new octave_char_matrix_dq_str (chm)
 	 : new octave_char_matrix_sq_str (chm))
@@ -948,7 +948,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_int8>& inda)
+octave_value::octave_value (const Array<octave_int8>& inda)
   : rep (new octave_int8_matrix (inda))
 {
   maybe_mutate ();
@@ -960,7 +960,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_uint8>& inda)
+octave_value::octave_value (const Array<octave_uint8>& inda)
   : rep (new octave_uint8_matrix (inda))
 {
   maybe_mutate ();
@@ -972,7 +972,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_int16>& inda)
+octave_value::octave_value (const Array<octave_int16>& inda)
   : rep (new octave_int16_matrix (inda))
 {
   maybe_mutate ();
@@ -984,7 +984,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_uint16>& inda)
+octave_value::octave_value (const Array<octave_uint16>& inda)
   : rep (new octave_uint16_matrix (inda))
 {
   maybe_mutate ();
@@ -996,7 +996,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_int32>& inda)
+octave_value::octave_value (const Array<octave_int32>& inda)
   : rep (new octave_int32_matrix (inda))
 {
   maybe_mutate ();
@@ -1008,7 +1008,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_uint32>& inda)
+octave_value::octave_value (const Array<octave_uint32>& inda)
   : rep (new octave_uint32_matrix (inda))
 {
   maybe_mutate ();
@@ -1020,7 +1020,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_int64>& inda)
+octave_value::octave_value (const Array<octave_int64>& inda)
   : rep (new octave_int64_matrix (inda))
 {
   maybe_mutate ();
@@ -1032,7 +1032,7 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<octave_uint64>& inda)
+octave_value::octave_value (const Array<octave_uint64>& inda)
   : rep (new octave_uint64_matrix (inda))
 {
   maybe_mutate ();
--- a/src/ov.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/ov.h	Fri Oct 16 13:12:31 2009 +0200
@@ -190,14 +190,14 @@
   octave_value (octave_time t);
   octave_value (double d);
   octave_value (float d);
-  octave_value (const ArrayN<octave_value>& a, bool is_cs_list = false);
+  octave_value (const Array<octave_value>& a, bool is_cs_list = false);
   octave_value (const Cell& c, bool is_cs_list = false);
   octave_value (const Matrix& m, const MatrixType& t = MatrixType());
   octave_value (const FloatMatrix& m, const MatrixType& t = MatrixType());
   octave_value (const NDArray& nda);
   octave_value (const FloatNDArray& nda);
-  octave_value (const ArrayN<double>& m);
-  octave_value (const ArrayN<float>& m);
+  octave_value (const Array<double>& m);
+  octave_value (const Array<float>& m);
   octave_value (const DiagMatrix& d);
   octave_value (const FloatDiagMatrix& d);
   octave_value (const RowVector& v);
@@ -210,8 +210,8 @@
   octave_value (const FloatComplexMatrix& m, const MatrixType& t = MatrixType());
   octave_value (const ComplexNDArray& cnda);
   octave_value (const FloatComplexNDArray& cnda);
-  octave_value (const ArrayN<Complex>& m);
-  octave_value (const ArrayN<FloatComplex>& m);
+  octave_value (const Array<Complex>& m);
+  octave_value (const Array<FloatComplex>& m);
   octave_value (const ComplexDiagMatrix& d);
   octave_value (const FloatComplexDiagMatrix& d);
   octave_value (const ComplexRowVector& v);
@@ -222,19 +222,19 @@
   octave_value (bool b);
   octave_value (const boolMatrix& bm, const MatrixType& t = MatrixType());
   octave_value (const boolNDArray& bnda);
-  octave_value (const ArrayN<bool>& bnda);
+  octave_value (const Array<bool>& bnda);
   octave_value (char c, char type = '\'');
   octave_value (const char *s, char type = '\'');
   octave_value (const std::string& s, char type = '\'');
   octave_value (const string_vector& s, char type = '\'');
   octave_value (const charMatrix& chm, 	char type = '\'');
   octave_value (const charNDArray& chnda, char type = '\'');
-  octave_value (const ArrayN<char>& chnda, char type = '\'');
+  octave_value (const Array<char>& chnda, char type = '\'');
   octave_value (const charMatrix& chm, bool is_string,
 		char type = '\'') GCC_ATTR_DEPRECATED;
   octave_value (const charNDArray& chnda, bool is_string,
 		char type = '\'') GCC_ATTR_DEPRECATED;
-  octave_value (const ArrayN<char>& chnda, bool is_string,
+  octave_value (const Array<char>& chnda, bool is_string,
 		char type = '\'') GCC_ATTR_DEPRECATED;
   octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ());
   octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ());
@@ -253,21 +253,21 @@
   octave_value (const octave_uint32& i);
   octave_value (const octave_uint64& i);
   octave_value (const int8NDArray& inda);
-  octave_value (const ArrayN<octave_int8>& inda);
+  octave_value (const Array<octave_int8>& inda);
   octave_value (const int16NDArray& inda);
-  octave_value (const ArrayN<octave_int16>& inda);
+  octave_value (const Array<octave_int16>& inda);
   octave_value (const int32NDArray& inda);
-  octave_value (const ArrayN<octave_int32>& inda);
+  octave_value (const Array<octave_int32>& inda);
   octave_value (const int64NDArray& inda);
-  octave_value (const ArrayN<octave_int64>& inda);
+  octave_value (const Array<octave_int64>& inda);
   octave_value (const uint8NDArray& inda);
-  octave_value (const ArrayN<octave_uint8>& inda);
+  octave_value (const Array<octave_uint8>& inda);
   octave_value (const uint16NDArray& inda);
-  octave_value (const ArrayN<octave_uint16>& inda);
+  octave_value (const Array<octave_uint16>& inda);
   octave_value (const uint32NDArray& inda);
-  octave_value (const ArrayN<octave_uint32>& inda);
+  octave_value (const Array<octave_uint32>& inda);
   octave_value (const uint64NDArray& inda);
-  octave_value (const ArrayN<octave_uint64>& inda);
+  octave_value (const Array<octave_uint64>& inda);
   octave_value (const Array<octave_idx_type>& inda, 
                 bool zero_based = false, bool cache_index = false);
   octave_value (const Array<std::string>& cellstr);
--- a/src/pr-output.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/pr-output.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -2661,13 +2661,13 @@
 octave_print_internal (std::ostream& os, const std::string& s,
 		       bool pr_as_read_syntax, int extra_indent)
 {
-  ArrayN<std::string> nda (dim_vector (1, 1), s);
+  Array<std::string> nda (dim_vector (1, 1), s);
 
   octave_print_internal (os, nda, pr_as_read_syntax, extra_indent);
 }
 
 void
-octave_print_internal (std::ostream& os, const ArrayN<std::string>& nda,
+octave_print_internal (std::ostream& os, const Array<std::string>& nda,
 		       bool pr_as_read_syntax, int /* extra_indent */)
 {
   // FIXME -- this mostly duplicates the code in the
--- a/src/pr-output.h	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/pr-output.h	Fri Oct 16 13:12:31 2009 +0200
@@ -28,7 +28,7 @@
 
 #include "oct-cmplx.h"
 
-template <typename T> class ArrayN;
+template <typename T> class Array;
 class ComplexMatrix;
 class FloatComplexMatrix;
 class ComplexDiagMatrix;
@@ -171,7 +171,7 @@
 		       int extra_indent = 0);
 
 extern OCTINTERP_API void
-octave_print_internal (std::ostream& os, const ArrayN<std::string>& sa,
+octave_print_internal (std::ostream& os, const Array<std::string>& sa,
 		       bool pr_as_read_syntax = false,
 		       int extra_indent = 0);
 
--- a/src/variables.cc	Fri Oct 16 10:28:26 2009 +0200
+++ b/src/variables.cc	Fri Oct 16 13:12:31 2009 +0200
@@ -1088,15 +1088,15 @@
   {
     size_t len = lst.size ();
 
-    Array<octave_value> name_info (len, 1);
-    Array<octave_value> size_info (len, 1);
-    Array<octave_value> bytes_info (len, 1);
-    Array<octave_value> class_info (len, 1);
-    Array<octave_value> global_info (len, 1);
-    Array<octave_value> sparse_info (len, 1);
-    Array<octave_value> complex_info (len, 1);
-    Array<octave_value> nesting_info (len, 1);
-    Array<octave_value> persistent_info (len, 1);
+    Cell name_info (len, 1);
+    Cell size_info (len, 1);
+    Cell bytes_info (len, 1);
+    Cell class_info (len, 1);
+    Cell global_info (len, 1);
+    Cell sparse_info (len, 1);
+    Cell complex_info (len, 1);
+    Cell nesting_info (len, 1);
+    Cell persistent_info (len, 1);
 
     std::list<symbol_info>::const_iterator p = lst.begin ();