Mercurial > hg > octave-avbm
changeset 10270:6ffed9bb5598
fix ipermute
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 08 Feb 2010 07:09:03 +0100 |
parents | 217d36560dfa |
children | 297996005012 |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -469,8 +469,6 @@ checked[perm_elt] = true; identity = identity && perm_elt == i; } - - dv_new(i) = dv(perm_elt); } if (identity) @@ -482,6 +480,9 @@ perm_vec(perm_vec_arg(i)) = i; } + for (int i = 0; i < perm_vec_len; i++) + dv_new(i) = dv(perm_vec(i)); + retval = Array<T> (dv_new); if (numel () > 0)