# HG changeset patch # User John W. Eaton # Date 1296989449 18000 # Node ID 59efc7da9f7b6db49609b8e53209dbce9a1cf056 # Parent 5ce03b61272557e8a720dce02963b969cae64e87 PermMatrix.cc (operator*): fix mixed row/column case diff -r 5ce03b612725 -r 59efc7da9f7b liboctave/ChangeLog --- a/liboctave/ChangeLog Sun Feb 06 05:18:43 2011 -0500 +++ b/liboctave/ChangeLog Sun Feb 06 05:50:49 2011 -0500 @@ -1,3 +1,8 @@ +2011-02-06 John W. Eaton + + * PermMatrix.cc (operator*): Fix mixed row/column permutation + case. Bug #32346. + 2010-02-04 Rik * Makefile.am: Undo accidental checkin diff -r 5ce03b612725 -r 59efc7da9f7b liboctave/PermMatrix.cc --- a/liboctave/PermMatrix.cc Sun Feb 06 05:18:43 2011 -0500 +++ b/liboctave/PermMatrix.cc Sun Feb 06 05:50:49 2011 -0500 @@ -206,9 +206,9 @@ { Array ra (dim_vector (n, 1)); if (a._colp) - ra.assign (idx_vector (ib), ia); + ra.assign (idx_vector (ia), ib); else - ra.assign (idx_vector (ia), ib); + ra.assign (idx_vector (ib), ia); r = PermMatrix (ra, a._colp, false); } diff -r 5ce03b612725 -r 59efc7da9f7b scripts/ChangeLog --- a/scripts/ChangeLog Sun Feb 06 05:18:43 2011 -0500 +++ b/scripts/ChangeLog Sun Feb 06 05:50:49 2011 -0500 @@ -1,3 +1,7 @@ +2011-02-06 John W. Eaton + + * general/circshift.m: New tests. + 2010-02-05 Rik * miscellaneous/version.m, path/matlabroot.m: Correct spelling. diff -r 5ce03b612725 -r 59efc7da9f7b scripts/general/circshift.m --- a/scripts/general/circshift.m Sun Feb 06 05:18:43 2011 -0500 +++ b/scripts/general/circshift.m Sun Feb 06 05:50:49 2011 -0500 @@ -94,3 +94,6 @@ %!assert (circshift (x, -2), [7, 8, 9; 1, 2, 3; 4, 5, 6]) %!assert (circshift (x, [0, 1]), [3, 1, 2; 6, 4, 5; 9, 7, 8]); %!assert (circshift ([],1), []) + +%!assert (full (circshift (eye (3), 1)), circshift (full (eye (3)), 1)) +%!assert (full (circshift (eye (3), 1)), [0,0,1;1,0,0;0,1,0])