Registered Member
|
According to the Eigen documentation, I would expect the following to work:
However, I get the compile-time-error
What am I doing wrong? Missing include? Second question: As far as I was able to find, Eigen does not yet support multiplication of SparseSelfadjointViews with SparseMatrices. Am I missing something, or is this in fact not implemented? Thank's for your help! |
Moderator
|
For the first issue, the following should do the job:
For te second, you are right, such product is not supported. |
Registered Member
|
You are right, this one does work as expected. Thanks!
However, I do not really understand the semantic difference. For my own learning, could you give me some insights on why the declaration and copy operation may not happen in one single line? Somehow, I seem to have some C++ misunderstanding on that topic. Are there any known plans to support sparse-sparse-multiplication in the future? |
Moderator
|
sparse-sparse products do work. regarding your initial issue, it's because when you do:
A a = b; you do not call operator= but the constructor, and in addition the conversion constructor (assuming b is not of type A), must not be "explicit". |
Registered Member
|
Dear Eigen,
I have a sparse complex symmetric matrix A. Can I also store only the upper-triangular part of A and then get a "symmetric" view on it? i.e. something like A.selfadjointView<UpperAndSymmetric>(); or A.selfsymmetricView<Upper>(); The function A.selfadjointView<Upper>(); gives me a Hermitian matrix, which is not what I need (as my A is complex-symmetric, not Hermitian). Kind regards, Niek |
Moderator
|
This is a planed feature. See: http://comments.gmane.org/gmane.comp.lib.eigen/5301
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]