|Re: [eigen] Reusing a sparse matrix for SparseLU|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Reusing a sparse matrix for SparseLU
- From: Matthieu Brucher <matthieu.brucher@xxxxxxxxx>
- Date: Mon, 3 Dec 2018 10:52:53 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=SK5pUvzCPBOPamB/WuVR2RC56CpofojqVpIOjeyMJSA=; b=g/7zawaXXeZ6Fs0Y8F3ZppvMtKyerm9y79FIXZigGuQFFsedabsSd1VKglA3fzfDPw zYbXxENaBkNxUQMXDlsN4CGZeYCzoEIODvID3hRWUZDrFx2fLEnjJN/Hg9lcKLWmNzcK ychI8nlXjQOw1HtBToRr+mpbmKyo1hOMCC5915V6+bHwdnLyiFnz6ZvnS4yTST63g7E5 T/LrPwBKRDKiLoCcVpN/9L1jIAftKXKHN155Efe1p2oeDFmg071haI+UTdXPES7A5IuC /rafJaw++s6uaTYVeItxsZmvEm4hCMEFB0en4OyKLBuPsDVIrOpnGdoG+PDmpr5GfpYg aJeQ==
Thanks for the answer. Unfortunately, this still makes me create another array, I'd rather populate the elements directly.
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
you can use m.coeffs() to update the non-zero elements of the matrix as
a large array.