From: Simon Wright <simon@pushface.org>
Subject: Re: ANN: Ada 2005 Math Extensions, 20100810 release
Date: Wed, 11 Aug 2010 22:38:46 +0100
Date: 2010-08-11T22:38:46+01:00 [thread overview]
Message-ID: <m2bp98n82h.fsf@pushface.org> (raw)
In-Reply-To: m2lj8eywqo.fsf@pushface.org
I was thinking about the next release, and contemplating
-- Obtain the eigenvalues of a non-symmetric real matrix.
function Eigenvalues (A : Real_Matrix) return Complex_Vector;
It's easy enough to implement this in
Ada.Numerics.Generic_Complex_Arrays.Extensions, but it seems slightly
more natural to put it into Ada.Numerics.Generic_Real_Arrays.Extensions.
However, I'm puzzled about how to get Complex_Vector in there, because
it's declared in Generic_Complex_Arrays (and of course you'd want to use
the same instantiation throughout, not a local one).
Starting from the declaration of Generic_Complex_Arrays, I arrived at
with Ada.Numerics.Generic_Complex_Arrays;
with Ada.Numerics.Generic_Complex_Types;
generic
with package Complex_Types is new Ada.Numerics.Generic_Complex_Types
(Real);
with package Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays
(Generic_Real_Arrays, Complex_Types); -- <<<<<<<<<<<<<<<<<<
use Complex_Arrays;
package Ada.Numerics.Generic_Real_Arrays.Extensions is
function Eigenvalues (A : Real_Matrix) return Complex_Vector;
end Ada.Numerics.Generic_Real_Arrays.Extensions;
but GNAT complains about Generic_Real_Arrays where I've indicated,
saying it expects a package instance to instantiate a formal.
I'd been hoping that -- in the context of a child of
Generic_Real_Arrays -- the name would mean 'the current instantiation',
but clearly not (GNAT GPL 2010, GCC 4.5.0).
Any thoughts?
next prev parent reply other threads:[~2010-08-11 21:38 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 21:38 ANN: Ada 2005 Math Extensions, 20100810 release Simon Wright
2010-08-11 11:40 ` Ada novice
2010-08-11 21:38 ` Simon Wright [this message]
2010-08-12 5:57 ` Dmitry A. Kazakov
2010-08-12 19:45 ` Simon Wright
2010-08-13 6:27 ` Dmitry A. Kazakov
2010-08-13 6:54 ` Ludovic Brenta
2010-08-13 13:36 ` Yannick Duchêne (Hibou57)
2010-08-13 7:42 ` Georg Bauhaus
2010-08-13 8:40 ` Dmitry A. Kazakov
2010-08-13 13:41 ` Yannick Duchêne (Hibou57)
2010-08-13 13:57 ` Dmitry A. Kazakov
2010-08-13 13:31 ` Yannick Duchêne (Hibou57)
2010-08-13 13:48 ` Dmitry A. Kazakov
2010-08-13 19:50 ` Simon Wright
2010-08-13 20:17 ` Yannick Duchêne (Hibou57)
2010-08-13 22:04 ` Simon Wright
2010-08-13 22:28 ` Yannick Duchêne (Hibou57)
2010-08-13 22:30 ` Yannick Duchêne (Hibou57)
2010-08-14 16:12 ` Simon Wright
2010-08-14 17:16 ` Dmitry A. Kazakov
2010-08-14 17:34 ` Jeffrey Carter
2010-08-14 19:18 ` Simon Wright
2010-08-14 23:51 ` Georg Bauhaus
2010-08-15 0:57 ` Yannick Duchêne (Hibou57)
2010-08-15 2:27 ` Jeffrey Carter
2010-08-12 10:36 ` Stephen Leake
2010-08-12 12:48 ` sjw
2010-08-14 1:05 ` Stephen Leake
2010-08-14 16:26 ` Simon Wright
2010-08-14 17:24 ` Dmitry A. Kazakov
2010-08-14 19:16 ` Simon Wright
2010-08-14 20:48 ` Dmitry A. Kazakov
2010-08-14 21:55 ` Simon Wright
2010-08-15 6:14 ` Dmitry A. Kazakov
2010-08-15 17:06 ` Simon Wright
2010-08-15 18:18 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox