"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/functions/linear_algebra/matadjoint" between
pari-2.13.0.tar.gz and pari-2.13.1.tar.gz

About: PARI/GP is a computer algebra system designed for fast computations in number theory (factorizations, algebraic number theory, elliptic curves...), but also contains a large number of other mathematical functions.

matadjoint  (pari-2.13.0):matadjoint  (pari-2.13.1)
skipping to change at line 18 skipping to change at line 18
Doc: Doc:
\idx{adjoint matrix} of $M$, i.e.~a matrix $N$ \idx{adjoint matrix} of $M$, i.e.~a matrix $N$
of cofactors of $M$, satisfying $M*N=\det(M)*\Id$. $M$ must be a of cofactors of $M$, satisfying $M*N=\det(M)*\Id$. $M$ must be a
(not necessarily invertible) square matrix of dimension $n$. (not necessarily invertible) square matrix of dimension $n$.
If $\fl$ is 0 or omitted, we try to use Leverrier-Faddeev's algorithm, If $\fl$ is 0 or omitted, we try to use Leverrier-Faddeev's algorithm,
which assumes that $n!$ invertible. If it fails or $\fl = 1$, which assumes that $n!$ invertible. If it fails or $\fl = 1$,
compute $T = \kbd{charpoly}(M)$ independently first and return compute $T = \kbd{charpoly}(M)$ independently first and return
$(-1)^{n-1} (T(x)-T(0))/x$ evaluated at $M$. $(-1)^{n-1} (T(x)-T(0))/x$ evaluated at $M$.
\bprog \bprog
? a = [1,2,3;3,4,5;6,7,8] * Mod(1,4); ? a = [1,2,3;3,4,5;6,7,8] * Mod(1,4);
? matadjoint(a)
%2 = %2 =
[Mod(1, 4) Mod(2, 4) Mod(3, 4)] [Mod(1, 4) Mod(1, 4) Mod(2, 4)]
[Mod(3, 4) Mod(0, 4) Mod(1, 4)] [Mod(2, 4) Mod(2, 4) Mod(0, 4)]
[Mod(2, 4) Mod(3, 4) Mod(0, 4)] [Mod(1, 4) Mod(1, 4) Mod(2, 4)]
@eprog\noindent @eprog\noindent
Both algorithms use $O(n^4)$ operations in the base ring, and are usually Both algorithms use $O(n^4)$ operations in the base ring. Over a field,
slower than computing the characteristic polynomial or the inverse of $M$ they are usually slower than computing the characteristic polynomial or
directly. the inverse of $M$ directly.
Variant: Also available are Variant: Also available are
\fun{GEN}{adj}{GEN x} (\fl=0) and \fun{GEN}{adj}{GEN x} (\fl=0) and
\fun{GEN}{adjsafe}{GEN x} (\fl=1). \fun{GEN}{adjsafe}{GEN x} (\fl=1).
 End of changes. 5 change blocks. 
6 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)