Re: [eigen] Copy into a MappedSparseMatrix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 16.07.2015 at 17:22, Norman Goldstein wrote:
So, copy( a, b ) works, but copy( a*b, c ) does not work.
Directly assigning a product to a MappedSparseMatrix won't work, since
the number of non zeros are not known beforehand, so you need to
evaluate into a temporary anyways. The reason why your code does not
automatically convert into a temporary is that implicit type conversions
are disabled for templated functions.
I still don't understand why you want to assign your result to a Mapped
matrix?
N.B.: I thought about "recomputing" sparse products (without
re-allocating) quite a while ago
(http://eigen.tuxfamily.org/bz/show_bug.cgi?id=284,
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=385), but never found it
important enough to further work on that. If someone wants to work on
that, contributions are welcome.
Christoph
--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: +49 (421) 218-64252
----------------------------------------------