help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sparse Matrix non zero elements in each row


From: siko1056
Subject: Re: Sparse Matrix non zero elements in each row
Date: Thu, 6 Aug 2015 22:52:08 -0700 (PDT)

I had two ideas:
1. Transpose the matrix (quite expensive for large matrices with many
elements). The differences of the cidx-vector (
http://octave.org/doxygen/4.0/d5/d63/singletonSparse.html#a68239ef9959dca1de3761ca23c08c6ae
) are the number elements in each row.
2. Obtain the ridx-vector (
http://octave.org/doxygen/4.0/d5/d63/singletonSparse.html#aff40cbe383628d45a7705a48b7cad365
) and use any known c++ method to sort the entries and count their
multiples.

When you read the "data"-vector the same way, you can compute from ridx,
cidx, and data all the desired values for each nnz.

HTH, Kai



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Sparse-Matrix-non-zero-elements-in-each-row-tp4672030p4672056.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]