This forum has been archived. All content is frozen. Please use KDE Discuss instead.

dot product using row of SparseMatrix

Tags: None
(comma "," separated)
eftang
Registered Member
Posts
7
Karma
0
Hi,

The following code produces the wrong result, and I cannot figure out why:
Code: Select all
A.row(i).dot(c);


A is an Eigen::SparseMatrix<double> and c is Eigen::VectorXd. However, if I copy the contents of row i of A into a vector beforehand, as

Code: Select all
VectorXd r = A.row(i);
r.dot(c);


I obtain correct results.

I am using Eigen 3.2.8.

Is this a know bug, or am I missing something obvious here?

Jens
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Please update to 3.2.10 or 3.3.1.
eftang
Registered Member
Posts
7
Karma
0
The behavior is correct in Eigen 3.3.1. Thanks.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]