]> www.ginac.de Git - ginac.git/commit
Add optional matrix::rank() algorighm selection.
authorVitaly Magerya <vmagerya@gmail.com>
Wed, 13 Jun 2018 21:07:45 +0000 (23:07 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 13 Jun 2018 21:07:45 +0000 (23:07 +0200)
commit26840ecc367d9f9dd4e3758233be1bdd3563cd8a
tree12e4d18b178091a001168956311fd474ed00c863
parent48619ed77871a6bcae23df460f426fc34698cd1e
Add optional matrix::rank() algorighm selection.

Before, matrix::rank() was hardcoded to use Bareiss elimination,
which for some matrices is way too slow (and I had to work around
this limitation in my own code). I propose adding an argument that
will allow users to select which elimination scheme to use. The
argument is the same as matrix::solve() takes (so, solve_algo::*).

I've tried to mimic how a similar argument was added to
matrix::inverse() by keeping the current set of rank() functions
and defining separate ones with the 'algo' argument, with the
old ones calling the new ones with solve_algo::automatic. This
is instead of using default argument values.

I've also put the code that makes the automatic selection of
the elimination method into a separate function so that both
matrix::solve() and matrix::rank() could share it. There's a bit
of similar code in matrix::determinant(), but since the self
of determinant algorithms is different from the elimination
algorithms, it's not clear if these two could be unified.
doc/tutorial/ginac.texi
ginac/matrix.cpp
ginac/matrix.h