Do someone know a good way for matrix inversion be...
# mathematics
a
Do someone know a good way for matrix inversion benchmarking? The problem is that obviously inversion will have different complexity for different matrices, and I can't use random ones because not every matrix could be inverted. To generate them as LUD?
Are you rolling your own implementation or wrapping an existing BLAS?
a
Thanks, I will look into it, but, I probably won't be able to use lapack for it because it requires binding native code. For now I have only LUD-decomposition ported from commons math. I want to see how bad is it.
It is not my intention to rival BLAS, I just want to have a single pure kotlin linear solver implementation.
For the rest we will have @kyonifer's collection of implementations
b
JavaCPP has some presets for BLAS binding, for most platforms you only need the Maven artifact https://github.com/bytedeco/javacpp-presets/tree/master/openblas#sample-usage
t
I never attempted to inverse a matrix from scratch. Isn't it some kind of stochastic local search? Or is that a very naive way to do Gaussian elimination?
a
Usually it is some variant of elimination. Stochastic is used in special cases. My question is what is a typical use case
✔️ 1
e
Note that for degenerate matrices you’d usually want to get pseudo-inverse, not a failure https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse
a
Thanks, I've introduced a new thing called matrix feature to list matrix features like degenerate and diagonal as optional tags. I will see how it will play out. The reason behind it is that not all linear algebra contexts will support all features.
I will try to wrap current commons-math implementation for jvm-only and see how it looks like