comp.lang.ada
 help / color / mirror / Atom feed
From: jonathan <johnscpg@googlemail.com>
Subject: Re: matrix package with Ada
Date: Mon, 12 Jul 2010 08:13:39 -0700 (PDT)
Date: 2010-07-12T08:13:39-07:00	[thread overview]
Message-ID: <8f4ba975-5441-4b42-89ad-b53373a59eb9@g19g2000yqc.googlegroups.com> (raw)
In-Reply-To: 23f0d8f1-e7bd-4af9-a0ee-cea85cbff4bd@x21g2000yqa.googlegroups.com

On Jul 12, 2:38 pm, Ada novice <po...@gmx.us> wrote:
> On Jul 10, 10:22 pm, Gautier write-only <gautier_niou...@hotmail.com>
> wrote:
>
> > > And are there other alternatives or other packages?
>
> > Look there - excellent stuff:
> >  http://www.csee.umbc.edu/~squire/adaclass/gnatmath95/
> > The most amazing: add some "Ada." for the basic matrix packages
> > referenced, and you get Ada 2005 compatibility.
>
> > G.
>
> I've tried to compile the file test_generic_complex_eigenvalues.ada
> provided in this package (http://www.csee.umbc.edu/~squire/adaclass/
> gnatmath95/) but it doesn't compile successfully. And The matrix
> package from Drexel doesn't have any eigenvalues/eigenvectors
> computation routine at all.
>
> Looking at all this, I'm tempted to say how silly it is that Ada
> doesn't provide good numerics capabilities. Ada 05 brought a big
> improvement with more vector and matrix operations though it can't
> handle the eigenvalues computation of a non-symmetric matrix. The next
> version of Ada I read will be out in 2 years. I hope that there will
> be better facilities for scientific programming in Ada than there is
> today. Those on the Ada community should be made aware of the need for
> more scientific computing power in Ada.
>
> There are many libraries for Fortran and C/C++ for numerical
> computations while Ada doesn't seem to have a decent one. One cannot
> expect people to switch to Ada if there are no good numerical
> computing libraries. Ada has been here for more than 25 years now but
> maybe has remained confined to military applications for many years.
> However free compilers are out there since many years and I hope that
> good programmers with good understanding of numerical methods will be
> motivated to have bindings for Ada.
>
> YC

OK, after a bit of trouble I got it to run (using the latest gnat/gcc
compiler). There's 1 bug to fix 1st: around line 150 of the package
body

    generic_complex_linear_equations.adb

you need to change a line to initialize X with a complex number.

  --X(N) := 0.0; -- change this to:
    X(N) := COMPOSE_FROM_CARTESIAN( 0.0 , 0.0 ) ;

Finally, if you using GNAT, the file names have to end in either
.adb or .ads

The instructions for that are at the top of each file. For example
the test procedure should end in .adb if you are using gnat.

Notice also that you have to download quite a few packages to get
the eig-stuff to work.  The compiler error messages should tell you
if you are missing anything.

Finally! The test routine is user unfriendly.  (I hope you fix it up
for the rest of us.) You have to enter numbers.  First enter the
size of the matrix
(type the number 2, then enter.)
then enter one by one the 4 elements of the complex matrix, say:
(1.0, 2.0)
(2.0, 2.2)
(3.0, 2.4)
(4.0, 2.6)

I'm just guessing that that is what the program wants, but
it seemed to run when I tried it.

J.




numbers.



  reply	other threads:[~2010-07-12 15:13 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 [this message]
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
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