|
From: | David Bateman |
Subject: | Re: nnz and char |
Date: | Tue, 31 Jan 2006 17:07:25 +0100 |
User-agent: | Mozilla Thunderbird 0.8 (X11/20040923) |
John W. Eaton wrote:
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)... Running 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? Thanks, jwe
I wouldn't just do a straight swap. I'd rather do nonzero -> nnz nnz -> sz_nnzor something similar.. nonzero doesn't really describe the fact that it is really the amount of memory allocated to the hold sparse values...
-- David Bateman address@hiddenMotorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary
------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |