Re: [eigen] Reusing a sparse matrix for SparseLU

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Matthieu Brucher writes:
> Now,, I'd like to reuse the matrix instead of creating a new one, as I'm doing real-time computations and don't want any allocation there.
>
> Can I use the comma operator? Or is there another operator that I can use to update the matrix existing entries? I tried to find information online but couldn't find the best practice for this.
>

Hi, as per

https://stackoverflow.com/questions/40593324/how-to-avoid-memory-allocations-in-sparse-expressions-with-eigen

you can use m.coeffs() to update the non-zero elements of the matrix as
a large array.

--
Alberto



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