Mercurial > hg > octave-lyh
changeset 4507:65f47f8a92a2
[project @ 2003-09-10 15:48:02 by jwe]
author | jwe |
---|---|
date | Wed, 10 Sep 2003 15:48:08 +0000 |
parents | 3c82fc8f822c |
children | 2bc437206787 |
files | liboctave/ChangeLog liboctave/Makefile.in liboctave/mx-base.h src/ChangeLog src/data.cc src/ov-base.cc src/ov-base.h src/ov-re-mat.h src/ov-re-nd-array.cc src/ov-re-nd-array.h src/ov-scalar.h src/ov.cc src/ov.h |
diffstat | 13 files changed, 41 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2003-09-10 Petter Risholm <risholm@stud.ntnu.no> + + * mx-base.h: Include NDArray.h, not ArrayN.h. + + * MArrayN.cc, MArrayN.h, NDArray.h, NDArray.cc: New files. + * Makefile.in: Add them to the appropriate lists. + 2003-09-09 David Bateman <dbateman@free.fr> * lo-specfun.cc (zbesj, zbesy, zbesi, zbesk, zbesh1, zbesh2, airy,
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -27,8 +27,8 @@ MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h \ Array-flags.h Array-idx.h Array2-idx.h Array3-idx.h \ - ArrayN-idx.h ArrayN-inlines.h MArray-defs.h \ - MArray.h MArray2.h MDiagArray2.h Matrix.h \ + ArrayN-idx.h ArrayN-inlines.h MArray-defs.h MArray.h \ + MArray2.h MDiagArray2.h Matrix.h MArrayN.h NDArray.h \ base-lu.h mx-base.h mx-op-defs.h mx-ops.h mx-defs.h mx-ext.h \ CColVector.h CDiagMatrix.h CMatrix.h CRowVector.h CmplxAEPBAL.h \ CmplxCHOL.h CmplxDET.h CmplxHESS.h CmplxLU.h CmplxQR.h \ @@ -82,7 +82,8 @@ MATRIX_SRC := Array-flags.cc CColVector.cc CDiagMatrix.cc CMatrix.cc \ CRowVector.cc CmplxAEPBAL.cc CmplxCHOL.cc CmplxDET.cc \ CmplxHESS.cc CmplxLU.cc CmplxQR.cc CmplxQRP.cc CmplxSCHUR.cc \ - CmplxSVD.cc EIG.cc MArray-misc.cc boolMatrix.cc chMatrix.cc \ + CmplxSVD.cc EIG.cc MArray-misc.cc MArrayN.cc NDArray.cc \ + boolMatrix.cc chMatrix.cc \ dColVector.cc dDiagMatrix.cc dMatrix.cc dRowVector.cc \ dbleAEPBAL.cc dbleCHOL.cc dbleDET.cc dbleHESS.cc dbleLU.cc \ dbleQR.cc dbleQRP.cc dbleSCHUR.cc dbleSVD.cc
--- a/liboctave/mx-base.h +++ b/liboctave/mx-base.h @@ -47,7 +47,7 @@ // N-dimensional Array classes. -#include "ArrayN.h" +#include "NDArray.h" #endif
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-09-10 Petter Risholm <risholm@stud.ntnu.no> + + * data.cc, ov-base.cc, ov-base.h, ov.h, ov.cc, ov-re-mat.h, + ov-scalar.h, ov-re-nd-array.h, ov-re-nd-array.cc: Use NDArray, not + ArrayN<double>. + 2003-09-09 John W. Eaton <jwe@bevo.che.wisc.edu> * ov.h (octave_value::double_nd_array_value): New function.
--- a/src/data.cc +++ b/src/data.cc @@ -1004,7 +1004,7 @@ break; default: - retval = ArrayN<double> (dims, val); + retval = NDArray (dims, val); break; } }
--- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -291,10 +291,10 @@ return retval; } -ArrayN<double> +NDArray octave_base_value::double_nd_array_value (bool) const { - ArrayN<double> retval; + NDArray retval; gripe_wrong_type_arg ("octave_base_value::double_nd_array_value()", type_name ()); return retval;
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -191,7 +191,7 @@ Matrix matrix_value (bool = false) const; - ArrayN<double> double_nd_array_value (bool frc_str_conv = false) const; + NDArray double_nd_array_value (bool frc_str_conv = false) const; Complex complex_value (bool = false) const;
--- a/src/ov-re-mat.h +++ b/src/ov-re-mat.h @@ -98,8 +98,8 @@ ComplexMatrix complex_matrix_value (bool = false) const { return ComplexMatrix (matrix); } - ArrayN<double> double_nd_array_value (bool = false) const - { return ArrayN<double> (matrix); } + NDArray double_nd_array_value (bool = false) const + { return NDArray (matrix); } void increment (void) { matrix += 1.0; }
--- a/src/ov-re-nd-array.cc +++ b/src/ov-re-nd-array.cc @@ -47,7 +47,7 @@ #include "pr-output.h" #include "variables.h" -template class octave_base_nd_array<ArrayN<double> >; +template class octave_base_nd_array<NDArray>; DEFINE_OCTAVE_ALLOCATOR (octave_double_nd_array); @@ -83,7 +83,7 @@ void octave_double_nd_array::assign (const octave_value_list& idx, - const ArrayN<double>& rhs) + const NDArray& rhs) { int len = idx.length ();
--- a/src/ov-re-nd-array.h +++ b/src/ov-re-nd-array.h @@ -45,18 +45,18 @@ // Real N-dimensional array values. class -octave_double_nd_array : public octave_base_nd_array<ArrayN<double> > +octave_double_nd_array : public octave_base_nd_array<NDArray> { public: octave_double_nd_array (void) - : octave_base_nd_array<ArrayN<double> > () { } + : octave_base_nd_array<NDArray> () { } - octave_double_nd_array (const ArrayN<double>& a) - : octave_base_nd_array<ArrayN<double> > (a) { } + octave_double_nd_array (const NDArray& a) + : octave_base_nd_array<NDArray> (a) { } octave_double_nd_array (const octave_double_nd_array& a) - : octave_base_nd_array<ArrayN<double> > (a) { } + : octave_base_nd_array<NDArray> (a) { } ~octave_double_nd_array (void) { } @@ -68,9 +68,9 @@ octave_value *try_narrowing_conversion (void); - void assign (const octave_value_list& idx, const ArrayN<double>& rhs); + void assign (const octave_value_list& idx, const NDArray& rhs); - // Need to implement idx_vector (ArrayN<double>) for this one. + // Need to implement idx_vector (NDArray) for this one. // // idx_vector index_vector (void) const { return idx_vector (array); } @@ -84,7 +84,7 @@ double double_value (bool = false) const; - ArrayN<double> double_nd_array_value (bool = false) const { return array; } + NDArray double_nd_array_value (bool = false) const { return array; } double scalar_value (bool frc_str_conv = false) const { return double_value (frc_str_conv); }
--- a/src/ov-scalar.h +++ b/src/ov-scalar.h @@ -89,8 +89,9 @@ Matrix matrix_value (bool = false) const { return Matrix (1, 1, scalar); } - ArrayN<double> double_nd_array_value (bool = false) const - { return ArrayN<double> (Array<int> (1, 1), scalar); } + NDArray double_nd_array_value (bool = false) const + { Array<int> temp (1, 1); + return NDArray (temp, double_value ()); } Complex complex_value (bool = false) const { return scalar; }
--- a/src/ov.cc +++ b/src/ov.cc @@ -407,7 +407,7 @@ maybe_mutate (); } -octave_value::octave_value (const ArrayN<double>& a) +octave_value::octave_value (const NDArray& a) : rep (new octave_double_nd_array (a)) { rep->count = 1;
--- a/src/ov.h +++ b/src/ov.h @@ -33,7 +33,7 @@ #include <string> #include <list> -#include "ArrayN.h" + #include "Range.h" #include "idx-vector.h" #include "mx-base.h" @@ -184,7 +184,7 @@ octave_value (double d); octave_value (const Cell& m); octave_value (const Matrix& m); - octave_value (const ArrayN<double>& m); + octave_value (const NDArray& m); octave_value (const DiagMatrix& d); octave_value (const RowVector& v); octave_value (const ColumnVector& v); @@ -475,7 +475,7 @@ virtual Matrix matrix_value (bool frc_str_conv = false) const { return rep->matrix_value (frc_str_conv); } - virtual ArrayN<double> double_nd_array_value (bool frc_str_conv = false) const + virtual NDArray double_nd_array_value (bool frc_str_conv = false) const { return rep->double_nd_array_value (frc_str_conv); } virtual Complex complex_value (bool frc_str_conv = false) const