I optimize the code, which largely depends on the custom Matrix library (which will not be excluded from the project because it is everywhere. It's not nice, but it's a fact ...) Many calculations are performed using matrices from 10-20 rows and columns, many calculations include a quadratic form like
C = A*B*A'
I realized that often A is sparse, and I would like to take advantage of this fact. Therefore, I am looking for an algorithm that will handle this case. Numerical stability is important. Is there anything I can use? (I did not write our library, so I do not know if there are any pitfalls that I should consider?)
As "our" simple method of multiplying O (n ^ 3) is faster than Eigen 3 on the target platform, since I need numerical stability and the matrices are not very large, I think that the Strassen algorithm, as well as the Coppersmith- Winograd algorithm is not what i'm looking for. Instead, it's just multiplying a quadratic form so that I can easily check the zeros in A.
Thanks for any suggestions!
source share