Mercurial > hg > octave-lyh
diff liboctave/PermMatrix.h @ 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 | 937921654627 |
children | eb63fbe60fab |
line wrap: on
line diff
--- 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