comp.lang.ada
 help / color / mirror / Atom feed
* Singular Value Decomposition (non-square matrices)?
@ 2008-05-29 11:59 Jacob Sparre Andersen
  2008-05-29 21:07 ` anon
  2008-05-29 21:58 ` Jerry
  0 siblings, 2 replies; 3+ messages in thread
From: Jacob Sparre Andersen @ 2008-05-29 11:59 UTC (permalink / raw)


Does any of you know of an Ada implementation/binding for Singular
Value Decomposition (SVD) of non-square matrices?

/Jacob



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Singular Value Decomposition (non-square matrices)?
  2008-05-29 11:59 Singular Value Decomposition (non-square matrices)? Jacob Sparre Andersen
@ 2008-05-29 21:07 ` anon
  2008-05-29 21:58 ` Jerry
  1 sibling, 0 replies; 3+ messages in thread
From: anon @ 2008-05-29 21:07 UTC (permalink / raw)


Since, in 2004, this question was ask, Simon Wright (a poster) might have 
the answer.

In the mean time simple way is to get the fortran/C version of SVD and 
use the Ada.Interface.C or Ada.Interface.Fortran package to build a SVD 
interface/binder package.


In <a910bb0f-778e-41b7-abd0-6350e5f369e5@s50g2000hsb.googlegroups.com>, Jacob Sparre Andersen <jspa@nykredit.dk> writes:
>Does any of you know of an Ada implementation/binding for Singular
>Value Decomposition (SVD) of non-square matrices?
>
>/Jacob




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Singular Value Decomposition (non-square matrices)?
  2008-05-29 11:59 Singular Value Decomposition (non-square matrices)? Jacob Sparre Andersen
  2008-05-29 21:07 ` anon
@ 2008-05-29 21:58 ` Jerry
  1 sibling, 0 replies; 3+ messages in thread
From: Jerry @ 2008-05-29 21:58 UTC (permalink / raw)


On May 29, 4:59 am, Jacob Sparre Andersen <j...@nykredit.dk> 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/thread/b2744a61f615318e?hl=en#

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/node53.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/62c570a508b79271/4d786c0e76381d5b?hl=en&lnk=gst&q=Duncan+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).




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-29 21:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 11:59 Singular Value Decomposition (non-square matrices)? Jacob Sparre Andersen
2008-05-29 21:07 ` anon
2008-05-29 21:58 ` Jerry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox