[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 12:08:54 -0500 |
On 31-Jan-2006, David Bateman wrote:
| John W. Eaton wrote:
|
| > 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
|
| Seems fine, in this case delete the old nnz definition...
Now I see that the user-level nzmax function calls capacity if it is
given a sparse matrix object, and has this comment:
// XXX FIXME XXX should nnz be a method of octave_base_value
// so that the below can be replaced with "retval = (double)
// (args(0).nz ());"
(this is referring to the original nnz function). So maybe it would
be better to use the name nzmax instead of capacity. Unless you
object, I will make that change, and add nzmax to the octave_value
class.
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, (continued)
- 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, 2006/01/31
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char,
John W. Eaton <=
- Message not available
- Re: nnz and char, David Bateman, 2006/01/31
- Re: nnz and char, John W. Eaton, 2006/01/31