Mercurial > hg > octave-nkf
diff liboctave/CNDArray.cc @ 10350:12884915a8e4
merge MArray classes & improve Array interface
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 23 Jan 2010 21:41:03 +0100 |
parents | 83fa590b8a09 |
children | a3635bc1ea19 |
line wrap: on
line diff
--- a/liboctave/CNDArray.cc +++ b/liboctave/CNDArray.cc @@ -46,7 +46,7 @@ #include "bsxfun-defs.cc" ComplexNDArray::ComplexNDArray (const charNDArray& a) - : MArrayN<Complex> (a.dims ()) + : MArray<Complex> (a.dims ()) { octave_idx_type n = a.numel (); for (octave_idx_type i = 0; i < n; i++) @@ -217,7 +217,7 @@ ComplexNDArray retval (dv); octave_idx_type npts = dv(dim); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); OCTAVE_LOCAL_BUFFER (Complex, tmp, npts); @@ -264,7 +264,7 @@ ComplexNDArray retval (dv); octave_idx_type npts = dv(dim); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); OCTAVE_LOCAL_BUFFER (Complex, tmp, npts); @@ -314,9 +314,9 @@ { octave_idx_type npts = dv2(i); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); - Array<Complex> row (npts); + Array<Complex> row (npts, 1); Complex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; @@ -362,9 +362,9 @@ { octave_idx_type npts = dv2(i); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); - Array<Complex> row (npts); + Array<Complex> row (npts, 1); Complex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; @@ -410,9 +410,9 @@ { octave_idx_type npts = dv(i); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); - Array<Complex> row (npts); + Array<Complex> row (npts, 1); Complex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; @@ -457,9 +457,9 @@ { octave_idx_type npts = dv(i); octave_idx_type nn = 4*npts+15; - Array<Complex> wsave (nn); + Array<Complex> wsave (nn, 1); Complex *pwsave = wsave.fortran_vec (); - Array<Complex> row (npts); + Array<Complex> row (npts, 1); Complex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; @@ -786,7 +786,7 @@ if (n == dimensions.length ()) { - Array<octave_idx_type> a_ra_idx (a_dv.length (), 0); + Array<octave_idx_type> a_ra_idx (a_dv.length (), 1, 0); a_ra_idx.elem (0) = r; a_ra_idx.elem (1) = c; @@ -873,7 +873,7 @@ ComplexNDArray ComplexNDArray::diag (octave_idx_type k) const { - return MArrayN<Complex>::diag (k); + return MArray<Complex>::diag (k); } // This contains no information on the array structure !!!