Mercurial > hg > octave-nkf
changeset 5593:edaf21425386
[project @ 2006-01-12 20:57:27 by jwe]
author | jwe |
---|---|
date | Thu, 12 Jan 2006 20:57:27 +0000 |
parents | 61d6cebd243b |
children | f2c058edda40 |
files | src/ChangeLog src/oct-map.cc |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -31,6 +31,10 @@ rather than Sparse<T>::nnz(), due to possibility of overallocation of memory. +2006-01-06 John W. Eaton <jwe@octave.org> + + * oct-map.cc (Octave_map::transpose): Avoid GCC 3.3.x parse error. + 2005-12-14 John W. Eaton <jwe@octave.org> * oct-stream.cc (octave_stream::invalid_stream_error): Delete.
--- a/src/oct-map.cc +++ b/src/oct-map.cc @@ -90,9 +90,15 @@ Octave_map::transpose (void) const { assert (ndims () == 2); + dim_vector dv = dims (); - Octave_map retval (dim_vector (dv(1), dv(0))); + octave_idx_type nr = dv(0); + octave_idx_type nc = dv(1); + + dim_vector new_dims (nc, nr); + + Octave_map retval (new_dims); for (const_iterator p = begin (); p != end (); p++) retval.assign (key(p), Cell (contents(p).transpose ()));