[libpdl-linearalgebra-perl] 01/03: fixed bug in msyminv()
Dima Kogan
dima at secretsauce.net
Thu Nov 28 01:41:53 UTC 2013
This is an automated email from the git hooks/post-receive script.
dkogan-guest pushed a commit to branch patch-queue/master
in repository libpdl-linearalgebra-perl.
commit f37aedd5480e29bb2b3a0e6af2a6a79f59831552
Author: Dima Kogan <dima at secretsauce.net>
Date: Sat Oct 29 14:50:27 2011 -0700
fixed bug in msyminv()
msyminv takes in one triangle of a symmetric matrix, and returns the
inverse ONLY IN THAT TRIANGLE. Thus if $m is a symmetric matrix
$m x $m->msyminv
did NOT equal the identity.
---
LinearAlgebra.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/LinearAlgebra.pm b/LinearAlgebra.pm
index e4904c2..620d747 100644
--- a/LinearAlgebra.pm
+++ b/LinearAlgebra.pm
@@ -1287,6 +1287,7 @@ sub PDL::msyminv {
}
else{
$m->sytri($upper,$ipiv,$info);
+ $m = $m->t->tritosym($upper);
}
return wantarray ? ($m, $info) : $m;
}
@@ -1315,6 +1316,7 @@ sub PDL::Complex::msyminv {
}
else{
$m->csytri($upper,$ipiv,$info);
+ $m = $m->xchg(1,2)->tritosym($upper, 0);
}
return wantarray ? ($m, $info) : $m;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpdl-linearalgebra-perl.git
More information about the Pkg-perl-cvs-commits
mailing list