help-octave
[Top][All Lists]
Advanced

[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:03:08 -0500

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



-------------------------------------------------------------
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]