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	Tue Mar 03 18:52:07 2009 -0500
+++ b/liboctave/PermMatrix.h	Wed Mar 04 22:12:11 2009 +0100
@@ -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