help-octave
[Top][All Lists]
Advanced

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

Re: nnz and char


From: David Bateman
Subject: Re: nnz and char
Date: Tue, 31 Jan 2006 16:17:55 +0100
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

John W. Eaton wrote:

On 31-Jan-2006, David Bateman wrote:

| This patch is not quite right. The problem is that there are two methods
| in Sparse<T> for the number of non-zero elements. These are "nnz" and
| "nonzero". "nnz" returns the size of data and ridx, while nonzero
| returns "cidx[ncol]"... For matlab compatiablity for sparse matrices,
| Fnnz should return "cidx[ncol]" rather than the size of ridx and data,
| which is why the old Fnnz in sparse.cc used the "nonzero" method of
| Sparse<T>..

Can we swap the internal function names so that the Sparse nnz
function implements what is expected by the user-level nnz function?
Otherwise, I think we invite unnecessary confusion.

Thanks,

jwe

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)...

D.


--
David Bateman                                address@hidden
Motorola 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
-------------------------------------------------------------



reply via email to

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