[libpdl-linearalgebra-perl] 08/11: fixed bug in msyminv()

Dima Kogan dima at secretsauce.net
Thu Nov 28 20:21:57 UTC 2013


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch chm
in repository libpdl-linearalgebra-perl.

commit adabdada9bcc250c717978a76b6bb56b5250a100
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 008f700..953a34c 100644
--- a/LinearAlgebra.pm
+++ b/LinearAlgebra.pm
@@ -1288,6 +1288,7 @@ sub PDL::msyminv {
 	}
 	else{
 		$m->sytri($upper,$ipiv,$info);
+                $m = $m->t->tritosym($upper);
 	}
 	return wantarray ? ($m, $info) : $m;
 }
@@ -1316,6 +1317,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