comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: matrix package with Ada
Date: Mon, 19 Jul 2010 17:34:25 -0500
Date: 2010-07-19T17:34:25-05:00	[thread overview]
Message-ID: <i22jtk$gm$1@munin.nbi.dk> (raw)
In-Reply-To: ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com

"Ada novice" <posts@gmx.us> wrote in message 
news:ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com...
...
> A friend uses F# for numerics and here also eigenvalue computation
> exists only for symmetric matrices as in Ada 05. I hope that in the
> next next Ada release, there would be more numeric facilities.

As far as I know, we haven't had a single request for more numeric 
facilities in Ada 2012, and I'm pretty sure that there are no open requests 
for the same.

If you want to see additional facilities, you need to ask (on Ada-Comment) 
and give examples of problems that you have that can't be solved with the 
current facilities. (Even better, would be to actively participate in the 
language revision process; we don't have enough numerics expertise to do a 
great job.)

In any case, the eigenvalue routines originally were supposed to work on all 
matrices. That was dropped as the algorithms to solve such things are 
supposedly suspect. Here's the discussion from AI95-0296-1 (which defines 
the G.3 packages):

We considered providing subprograms for the determination of eigenvalues and 
eigenvectors of general real and complex matrices. Such matrices can have 
complex eigenvalues and therefore provision for these would have to be in 
the complex package. However, there are mathematical difficulties with these 
general cases which are in strong contrast to the real symmetric and 
Hermitian matrices. Thus, Numerical Recipes by Press, Flannery, Teukolsky 
and Vetterling says regarding the real case:

"The algorithms for symmetric matrices ... are highly satisfactory in 
practice. By contrast, it is impossible to design equally satisfactory 
algorithms for the nonsymmetric case. There are two reasons for this. First, 
the eigenvalues of a
nonsymmetric matrix can be very sensitive to small changes in the matrix 
elements. Second, the matrix itself can be defective so that there is no 
complete set of eigenvectors. We emphasize that these difficulties are 
intrinsic properties of certain nonsymmetric matrices, and no numerical 
procedure can cure them."

Similar remarks apply to complex matrices where Hermitian matrices are 
well-behaved but non-Hermitian matrices can be troublesome.

In view of these computational difficulties and the fact that requiring the 
eigensystem of general matrices is uncommon, we decided not to provide such 
facilities.

[End of quote from AI95-0296-1.]

I recall that the situation is actually worse than reported here; some of 
the algorithms used may not terminate for some matricies. Algorithms that 
don't terminate aren't tolerable in the Ada predefined libraries!

I am no expert on numerics, but I have to wonder what other languages and/or 
packages do in such cases? Perhaps they just don't care (there is precedent 
for that; Ada takes great pains to define the accuracy of most of the 
numerical functions, most other languages say nothing at all). Clearly, this 
problem would need to be solved in some way before a general routine could 
in introduced (of course, the abstract above seems to imply that such a 
solution is impossible).

                                           Randy.








  parent reply	other threads:[~2010-07-19 22:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10 13:25 matrix package with Ada fitta
2010-07-10 13:46 ` MRE
2010-07-10 15:42   ` fitta
2010-07-10 18:34     ` tmoran
2010-07-10 18:54       ` Simon Wright
2010-07-10 20:23     ` Gautier write-only
2010-07-14  2:02     ` robin
2010-07-10 20:22 ` Gautier write-only
2010-07-12  1:58   ` Jerry
2010-07-12 13:38   ` Ada novice
2010-07-12 15:13     ` jonathan
2010-07-12 19:13       ` Ada novice
2010-07-12 20:13       ` Simon Wright
2010-07-12 21:09         ` jonathan
2010-07-13  7:07           ` Ada novice
2010-07-13 14:27             ` jonathan
     [not found]               ` <ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com>
2010-07-13 17:59                 ` Jeffrey R. Carter
2010-07-13 18:00                 ` Georg Bauhaus
2010-07-13 18:26                   ` Ada novice
2010-07-19 22:34                 ` Randy Brukardt [this message]
2010-07-20  7:27                   ` Dmitry A. Kazakov
2010-07-25 19:15                   ` Ada novice
     [not found]                   ` <5f0082b8-7688-4422-be38-72f1c60be539@d8g2000yqf.googlegroups.com>
2010-07-25 19:39                     ` Nasser M. Abbasi
2010-07-13 19:11           ` Simon Wright
2010-07-13 20:43             ` Ada novice
2010-07-14 18:55               ` Simon Wright
2010-07-12 20:59     ` Simon Wright
2010-07-13 16:40   ` Warren
2010-07-27 22:10   ` jonathan
2010-07-27 22:40     ` jonathan
2010-07-28  0:51     ` jonathan
2010-07-12  2:04 ` Jerry
2010-07-12  8:52   ` Ada novice
replies disabled

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