
Ublas : 
Subject: Re: [ublas] Question regarding sparse vector's nnz() method
From: Jesse Perla (jesseperla_at_[hidden])
Date: 20100310 22:11:43
<aliyaz <at> xs4all.nl> writes:
> To the best of my knowledge nnz() indeed stands for the Number of Non Zero
> entries of a sparse matrix. Checking boost/numeric/ublas/matrix_sparse.hpp,
> it does seem to be implemented accordingly.
One problem I ran into recently was when I was setting elements of the sparse
matrix to be 0.0. As far as I could tell, .nnz() picked these up
as zeros (probably as designed).... if you want to find out how many
of the elements in the matrix are filled in with something, then use .filled()