|RE: [eigen] Segfault in assignment of a product of dense matrix and sparse vector to a sparse vector.|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: RE: [eigen] Segfault in assignment of a product of dense matrix and sparse vector to a sparse vector.
- From: "Sergey Morozov" <sergey.morozov@xxxxxxxxxxxxxx>
- Date: Sun, 13 Mar 2011 14:55:47 +0300
- Organization: Datadvance
- Thread-index: AcvgyzTbxL9JgNdRTWSL99M0V8KMewAqjApA
>From: Listengine [mailto:listengine@xxxxxxxxxxxxxxxxx] On Behalf Of
>Sent: Saturday, March 12, 2011 6:36 PM
>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
>> sparse vector is legal or not. In both cases the fix is simple - just
>> template<typename OtherDerived>
>> inline SparseVector& operator=(const MatrixBase<OtherDerived>&
>> method. In the later case just add "Not supported" assert. We are
>> 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: