Registered Member
|
I encountered the above compile error for my first Eigen program. Really appreciate any help.
The related code is: a += b * (v.matrix() * X).array(); where the definitions are: Map<ArrayXf> a, b; // dim: m ArrayXf v(n); // dim: n SparseMatrix<float, RowMajor, int> X; // n * m Should I transpose v? M is huge, so I'd like to avoid temp object for v.matrix() * X. Can the above code achieve it? |
Moderator
|
yes you have to transpose v which is a column vector, and a temporary will be required. Nevertheless, your error " 'const Type' has no member named 'array'" seems odd to me. Perhaps an explicit evaluation will solve the issue if it's still exist after transposing:
a += b * (v.matrix() * X).eval().array(); |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]