mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

SetSubmatrix() method, issue

Open MohammadrezaMC2 opened this issue 5 years ago • 2 comments

I have a very large matrix, it has 3014010 rows and 1338 columns, I want to use the SetSubMatrix() method to set a part of this matrix equal to an other matrix(matrix is 134 * 134) but the SetSubMatrix() method is very slow.... Any suggestions ?

MohammadrezaMC2 avatar Jan 16 '21 08:01 MohammadrezaMC2

Hi,

Is your matrix maybe sparse? I am looking at the implementation of the dense matrix storage (DenseColumnMajorMatrixStorage.CopyToUnchecked) and this seems pretty efficient to me, using an array copy (no for-loop)

Do you have some sample code which you could share?

jkalias avatar Apr 06 '22 21:04 jkalias

@MohammadrezaMC2 any feedback here?

jkalias avatar Mar 05 '23 18:03 jkalias