Skip Menu |

This queue is for tickets about the PDL-LinearAlgebra CPAN distribution.

Report information
The Basics
Id: 68222
Status: resolved
Priority: 0/
Queue: PDL-LinearAlgebra

People
Owner: Nobody in particular
Requestors: DKOGAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.08



Subject: [PATCH] msyminv() returns only half of the result
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 does NOT equal the identity. The attached patch extends the triangle to the whole matrix to make msyminv() a drop-in-replacement for minv() for symmetric matrices. This issue and patch apply to both the Real and Complex versions of msyminv()
Subject: msyminv.patch
--- LinearAlgebra.pm 2007-10-08 14:59:11.000000000 -0700 +++ LinearAlgebra.pm 2011-05-15 17:00:22.000000000 -0700 @@ -1287,6 +1287,7 @@ } else{ $m->sytri($upper,$ipiv,$info); + $m = $m->t->tritosym($upper); } return wantarray ? ($m, $info) : $m; } @@ -1315,6 +1316,7 @@ } else{ $m->csytri($upper,$ipiv,$info); + $m = $m->xchg(1,2)->tritosym($upper, 0); } return wantarray ? ($m, $info) : $m; }
Le Dim 15 Mai 2011 20:03:02, DKOGAN a écrit : Show quoted text
> 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 > > does NOT equal the identity. The attached patch extends the triangle to > the whole matrix to make msyminv() a drop-in-replacement for minv() for > symmetric matrices. This issue and patch apply to both the Real and > Complex versions of msyminv()
Thanks! Will be applied in the next release, which will happen soon. Cheers, G. Vanuxem