I'm creating a sparse matrix using Octave in c++ code. The code is-
octave_value_list out = feval (pstData[0], in, 1);
if(out(0).is_sparse_type())
{
SparseMatrix sparse_matrix=out(0).sparse_matrix_value ();
int iNbItem= sparse_matrix.nnz(); //Get number of non zero elements in sparse matrix
}
How do I get the number of non zero elements in each row and the column indices of the non zero elements?
Shamika