[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 11:49:01 -0500 |
On 31-Jan-2006, David Bateman wrote:
| >
| > Thanks,
| >
| > jwe
| >
| I wouldn't just do a straight swap. I'd rather do
|
| nonzero -> nnz
| nnz -> sz_nnz
|
| or something similar..
Yes, that's what I was suggesting:
| > 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?
| nonzero doesn't really describe the fact that it
| is really the amount of memory allocated to the hold sparse values...
OK, then how about capacity, since we already have that? From Sparse.h:
// Note that capacity and nnz are the amount of storage for non-zero
// elements, while nonzero is the actual number of non-zero terms
octave_idx_type capacity (void) const { return rep->length (); }
octave_idx_type nnz (void) const { return capacity (); }
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
-------------------------------------------------------------
- nnz and char, Andrew Funk, 2006/01/30
- nnz and char, John W. Eaton, 2006/01/30
- Message not available
- Re: nnz and char, David Bateman, 2006/01/31
- Message not available
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char, John W. Eaton, 2006/01/31
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char,
John W. Eaton <=
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char, John W. Eaton, 2006/01/31
- Message not available
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char, John W. Eaton, 2006/01/31