diff libinterp/octave-value/ov-bool-sparse.h @ 16779:8fce0ed4894a

Specialize is_empty and numel methods for sparse matrices (debian bug #706376) * ov-base.h (virtual bool is_empty (void) const) : Make method virtual * ov-base-sparse.h (bool is_empty (void) const)) : Declare new method (octave_idx_type numel (void) const): New method. * ov-base-sparse.cc (template <class T> bool octave_base_sparse<T>:is_empty (void) const)) : Define new method * ov-bool-sparse.h (idx_vector index_vector (void) const): Start specialization for sparse matrices * lo-array-gripes.cc (void gripe_index_value (void)): Clarify error message * data.cc : Add test to isempty * idx-vector.cc (idx_vector::idx_vector_rep::idx_vector_rep (const Sparse<bool>&) : Fix sparse indexing bug * __sprand_impl__.m : Don't use randparm when there are more than sizemax() elements. * sprand.m, sprandn.m : Add a test for large, low density matrices
author David Bateman <dbateman@free.fr>
date Thu, 20 Jun 2013 02:17:25 +0200
parents 2fc554ffbc28
children
line wrap: on
line diff
--- a/libinterp/octave-value/ov-bool-sparse.h
+++ b/libinterp/octave-value/ov-bool-sparse.h
@@ -83,9 +83,9 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  // FIXME Adapt idx_vector to allow sparse logical indexing!!
+  // FIXME Adapt idx_vector to allow sparse logical indexing without overflow!!
   idx_vector index_vector (void) const
-    { return idx_vector (bool_array_value ()); }
+    { return idx_vector (matrix); }
 
   builtin_type_t builtin_type (void) const { return btyp_bool; }