From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bac9c2db6ed57d8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!postnews.google.com!z16g2000prn.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: Re: Singular Value Decomposition (non-square matrices)? Date: Thu, 29 May 2008 14:58:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <46ac56d2-2f4c-4434-aa96-0552950d2fd5@z16g2000prn.googlegroups.com> References: NNTP-Posting-Host: 75.171.34.207 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1212098337 17115 127.0.0.1 (29 May 2008 21:58:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 29 May 2008 21:58:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z16g2000prn.googlegroups.com; posting-host=75.171.34.207; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/523 (KHTML, like Gecko, Safari/523.10) OmniWeb/v621.0.99313,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:459 Date: 2008-05-29T14:58:57-07:00 List-Id: On May 29, 4:59=A0am, Jacob Sparre Andersen wrote: > Does any of you know of an Ada implementation/binding for Singular > Value Decomposition (SVD) of non-square matrices? > > /Jacob The recent post http://groups.google.com/group/comp.lang.ada/browse_thread/t= hread/b2744a61f615318e?hl=3Den# by Gautier contains a link to a Pascal-to-Ada converter called p2ada. He used it to convert the Numerical Recipes Pascal code to Ada; the original Pascal contained a SVD routine, svdcmp. I'll leave it to you to determine copyright issues. LAPACK contains SVD routines; see e.g. http://www.netlib.org/lapack/lug/node= 53.html There is an Ada binding for BLAS, the Basic Linear Algebra System. There is apparently a partial Ada binding to LAPACK; LAPACK contains SVD and is the way to go if you can. (LAPACK uses BLAS.) You might have to write your own Import statement if the partial binding does not include it. See this thread for more info, some of it relevant: http://groups.google.com/group/comp.lang.ada/browse_thread/thread/62c570a508= b79271/4d786c0e76381d5b?hl=3Den&lnk=3Dgst&q=3DDuncan+Sands+BLAS# I don't know if these bindings have been updated to use the Vector and Matrix definitions specified in ARM G.3 for Ada 2005. This would make lots of sense to do so since, on GNAT, the G.3 Annex of Ada 2005 is already a partial binding to LAPACK. Maybe the authors would comment on this. FWIW, if you are on OS X, BLAS and LAPACK are already on your computer, presumably in a form optimized for your system. Both Fortran and C versions are provided, but if you are Import-ing from Ada it probably doesn't matter which form you use (since Import requires that you specify C or Fortran calling conventions).