Registered Member
|
Hi, I'm trying to implement some form of Kaczmarz iterations. My code is as follows:
The problem is: this is quite slow. I think that the bottleneck can be nailed down by answering these questions: 1. is there a more (ideally a WAY more) efficient to extract a sparse row from a sparse matrix, other than e * A (as I'm doing it in my code from the lack of any other idea)? 2. is there a more suitable way to get the dot product between two vectors than (x*y).coeff(0, 0)? 3. what is the cost of transposition of a row vector into a column vector? What is the cost of transposition of a sparse matrix? 4. how would you effectively compute the expression: s^T A A^T s, where s is a column vector (possibly sparse), and A is a sparse matrix? Note that this expression is resulting in one single number (scalar). When I try to implement this, it is very very slow... Do you think there is any way to code this algorithm faster using Eigen structures and available functions? Thanks. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]