Re: [eigen] Segfault in assignment of a product of dense matrix and sparse vector to a sparse vector. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 10.03.2011 22:22, Sergey Morozov wrote:
So, one should decide if the assignment of dense matrix and sparse vector to
sparse vector is legal or not. In both cases the fix is simple - just
implement
template<typename OtherDerived>
inline SparseVector& operator=(const MatrixBase<OtherDerived>& other)
method. In the later case just add "Not supported" assert. We are ready to
provide the patch for both solutions.
I guess the best method to force a decision here is to file a bug ;)
My opinion would be that if an expression is dense, it should not be
assignable to a sparse matrix/vector (as you said, you did this
accidentally, so a compile-time error would be nice in general).
For people who really want to assign dense expressions to sparse vectors
a conversion method could be provided.
Regards,
Christoph
--
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: (+49) 421-218-64252
----------------------------------------------