Bug#706376: [Pkg-octave-devel] Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: octave: sparse matrix n*2^16

2013-06-20 Thread John W. Eaton

On 06/19/2013 08:32 PM, David Bateman wrote:

On 06/20/2013 01:10 AM, David Bateman wrote:

I'd like to add some tests first and see if any other bugs have turned
up after this change. For example the changes use made to sprand and
sprandn 2 years ago to call randperm also overflows. At the moment I'm
getting 791 failed tests with make check is that normal ? David


Ok, it seems Jaroslav's code for idx_vector(Sparsebool  hasn't been
used much in the last 5 years as it was completely wrong and when I
started using it, it caused 791 failures in make check. I've fixed his
code as it makes sense to use it and pushed my changeset at

http://hg.savannah.gnu.org/hgweb/octave/rev/8fce0ed4894a


This change seems OK to me, but is there some reason to not use

  dim_vector dv = dims ();
  return (dv.any_zero ());

as the default definition for is_empty?

jwe


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#706376: [Pkg-octave-devel] Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: octave: sparse matrix n*2^16

2013-06-20 Thread David Bateman


Le 20 juin 2013 à 15:01, John W. Eaton j...@octave.org a écrit :

 On 06/19/2013 08:32 PM, David Bateman wrote:
 On 06/20/2013 01:10 AM, David Bateman wrote:
 I'd like to add some tests first and see if any other bugs have turned
 up after this change. For example the changes use made to sprand and
 sprandn 2 years ago to call randperm also overflows. At the moment I'm
 getting 791 failed tests with make check is that normal ? David
 
 Ok, it seems Jaroslav's code for idx_vector(Sparsebool  hasn't been
 used much in the last 5 years as it was completely wrong and when I
 started using it, it caused 791 failures in make check. I've fixed his
 code as it makes sense to use it and pushed my changeset at
 
 http://hg.savannah.gnu.org/hgweb/octave/rev/8fce0ed4894a
 
 This change seems OK to me, but is there some reason to not use
 
  dim_vector dv = dims ();
  return (dv.any_zero ());
 
 as the default definition for is_empty?
 
 jwe

Just the principal of minimum impact on existing code. Making this change 
everywhere will make this slightly faster too, though I doubt the calculation 
of numel is the limiting factor in most codes

D.

--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org