comparison liboctave/CSparse.cc @ 7922:935be827eaf8

error for NaN values in & and | expressions
author John W. Eaton <jwe@octave.org>
date Fri, 11 Jul 2008 14:56:30 -0400
parents 1a446f28ce68
children b11c31849b44
comparison
equal deleted inserted replaced
7921:fcc70f30fe31 7922:935be827eaf8
7177 } 7177 }
7178 7178
7179 // other operations 7179 // other operations
7180 7180
7181 bool 7181 bool
7182 SparseComplexMatrix::any_element_is_nan (void) const
7183 {
7184 octave_idx_type nel = nnz ();
7185
7186 for (octave_idx_type i = 0; i < nel; i++)
7187 {
7188 Complex val = data (i);
7189 if (xisnan (val))
7190 return true;
7191 }
7192
7193 return false;
7194 }
7195
7196 bool
7182 SparseComplexMatrix::any_element_is_inf_or_nan (void) const 7197 SparseComplexMatrix::any_element_is_inf_or_nan (void) const
7183 { 7198 {
7184 octave_idx_type nel = nnz (); 7199 octave_idx_type nel = nnz ();
7185 7200
7186 for (octave_idx_type i = 0; i < nel; i++) 7201 for (octave_idx_type i = 0; i < nel; i++)