PHPMatrix icon indicating copy to clipboard operation
PHPMatrix copied to clipboard

Other inverse algos

Open kronthto opened this issue 4 years ago • 1 comments

Hi,

I noticed that the built-in reverse function gets very slow as soon as the matrix gets bigger (say 10x10 +).

Please excuse that I'm not very deep into the math behind your or other implementations and possible differences, but using i.E. this Gauss algorithm implementation the operation runs magnitudes faster: https://gist.github.com/unix1/7510208

Maybe it should be considered adding that, even if only as an alternative / second inverse function.

Cheers

kronthto avatar Mar 24 '21 06:03 kronthto

Apparently I can also use the solve() of this lib with an identity matrix - this also works much faster than reverse().

kronthto avatar Mar 24 '21 18:03 kronthto