Mercurial > hg > octave-lyh
diff src/ov-re-sparse.cc @ 5604:2857357f9d3c
[project @ 2006-01-31 18:22:59 by jwe]
author | jwe |
---|---|
date | Tue, 31 Jan 2006 18:23:00 +0000 |
parents | 05adf9de7657 |
children | ce79d238f142 |
line wrap: on
line diff
--- a/src/ov-re-sparse.cc +++ b/src/ov-re-sparse.cc @@ -51,7 +51,7 @@ idx_vector octave_sparse_matrix::index_vector (void) const { - if (matrix.numel () == matrix.nonzero ()) + if (matrix.numel () == matrix.nnz ()) return idx_vector (array_value ()); else { @@ -256,7 +256,7 @@ int nr = d(0); int nc = d(1); - int nz = nnz (); + int nz = nzmax (); FOUR_BYTE_INT itmp; // Use negative value for ndims to be consistent with other formats @@ -283,7 +283,7 @@ else st = LS_FLOAT; } - else if (matrix.nnz () > 8192) // XXX FIXME XXX -- make this configurable. + else if (matrix.nzmax () > 8192) // XXX FIXME XXX -- make this configurable. { double max_val, min_val; if (matrix.all_integers (max_val, min_val)) @@ -458,7 +458,7 @@ return false; } - tmp = m.nnz (); + tmp = m.nzmax (); retval = H5Dwrite (data_hid, H5T_NATIVE_IDX, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void*) &tmp) >= 0; H5Dclose (data_hid); @@ -504,7 +504,7 @@ H5Sclose (space_hid); - hdims[0] = m.nnz(); + hdims[0] = m.nzmax (); hdims[1] = 1; space_hid = H5Screate_simple (2, hdims, 0);