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 ]


>-----Original Message-----
>From: Listengine [mailto:listengine@xxxxxxxxxxxxxxxxx] On Behalf Of
>Christoph Hertzberg
>Sent: Saturday, March 12, 2011 6:36 PM
>To: eigen@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [eigen] Segfault in assignment of a product of dense matrix
>and sparse vector to a sparse vector.
>
>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.

As you suggested I've submitted a bug:

http://eigen.tuxfamily.org/bz/show_bug.cgi?id=221

Best regards,
Sergey.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/