[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nnz and char

From: John W. Eaton
Subject: Re: nnz and char
Date: Tue, 31 Jan 2006 10:39:54 -0500

On 31-Jan-2006, David Bateman wrote:

| Grrr, I already use these definitions in numerous places.. It would be 
| much easier to do it for the newly introduced code (do a grep on nnz and 
| nonzero is src and liboctave)...


  find . -name '*.cc' -o -name '*.h' | xargs grep 'nnz\|nonzero *(' | wc

in the top-level source directory shows 449 uses.  I can swap them
(taking some care to avoid keep the current use of nnz in the code I
just added yesterday).  Please let me know if there is some reason to
not do this, other than the number of changes required (which does not
matter to me).  I'd really rather avoid having the internal nnz
function not match the behavior of the user-level nnz function as I
think that will just lead to more mistakes like I just made.  Also,
perhaps we could rename the nonzero function at the same time, to make
it clear what that really means, and how it is different from nnz
(which, as I understand it, is supposed to mean the number of nonzero
elements stored in the matrix).  What does nonzero count?  nnz +/- what?



Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]