From: Jacob \(Jack\) G. <jg...@cs...> - 2005-03-29 22:25:36
|
Hi, Apparently Lapack has a function named DGETRI for obtaining the inverse of a function. Would it be reasonable to create a function called inv() in LaGenMatDouble that makes use of DGETRI? (If not somewhere else?). In addition, I would like to build a pseudoinverse function as well (not implemented in lapack). The two options would be to do it according to the definition pinv(A)=inv(A'A)A', or to do the following (sorry for the matlab style notation) [U,D,V']=svd(A). pinv(A)=Vpinv(D)U', where to get pinv(D), just find the inverse of each non-zero value in the diagonal matrix. The second way apparently is more computationally efficient, but a loop with if statements to get the pseudoinverse of D may take longer than using lapack to calculate the pseudoinverse by definition. Any thoughts on the above? Secondly, if I want to obtain the eigenvalues and eigenvectors of a general matrix, is DGEEV the correct function to implement? Should I create a function to add to EigSlv.cc ? Let me know Jack > -----Original Message----- > From: lap...@li... [mailto:lapackpp-devel- > ad...@li...] On Behalf Of Jacob (Jack) Gryn > Sent: March 24, 2005 4:54 PM > To: lap...@li... > Subject: [Lapackpp-devel] Pseudoinverse, Eigenvalues and Eigenvectors > > Just wondering if there's a fast way to do the following with lapack++ (if > not, then in LAPACK) to do the following functions: > > a) Pseudoinverse (maybe I should do inv(A'A)A', but inv() needs to be done > via solving the linear equation AA'=I (is there a faster way to do this?) > > b) Get eigenvectors and eigenvalues of a general matrix? (or even of a > symmetric matrix)? > > Let me know > > Thanks > > Jack > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > lapackpp-devel mailing list > lap...@li... > https://lists.sourceforge.net/lists/listinfo/lapackpp-devel |