Mercurial > hg > octave-nkf
changeset 8908:3c9acbb43f48
fix single element query for perm matrices
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 04 Mar 2009 22:12:11 +0100 |
parents | 5a956c026b6c |
children | 52596fe9f178 |
files | liboctave/ChangeLog liboctave/PermMatrix.h |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2009-03-04 Jaroslav Hajek <highegg@gmail.com> + + * PermMatrix.h (PermMatrix::elem): Fix comparisons. + 2009-03-03 Jaroslav Hajek <highegg@gmail.com> * lo-mappers.cc (xmin (float, float), xmax (float, float)): Simplify.
--- a/liboctave/PermMatrix.h +++ b/liboctave/PermMatrix.h @@ -73,8 +73,8 @@ elem (octave_idx_type i, octave_idx_type j) const { return (_colp - ? ((Array<octave_idx_type>::elem (j) != i) ? 1 : 0) - : ((Array<octave_idx_type>::elem (i) != j) ? 1 : 0)); + ? ((Array<octave_idx_type>::elem (j) == i) ? 1 : 0) + : ((Array<octave_idx_type>::elem (i) == j) ? 1 : 0)); } octave_idx_type