comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Ada.Numerics.Long_Real_Arrays
Date: Thu, 26 Jan 2017 15:03:11 +0000
Date: 2017-01-26T15:03:11+00:00	[thread overview]
Message-ID: <lylgtxvp74.fsf@pushface.org> (raw)
In-Reply-To: lypoj9vpo7.fsf@pushface.org

Simon Wright <simon@pushface.org> writes:

> I'm not sure whether one could get something less clumsy by using
> Ada.Containers.Indefinite_Vectors to hold the R_Vectors.

with Ada.Containers.Indefinite_Vectors;
with Ada.Numerics.Long_Real_Arrays;
package Nmc is
   package Matrices is new Ada.Containers.Indefinite_Vectors
     (Positive,
      Ada.Numerics.Long_Real_Arrays.Real_Vector,
      "=" => Ada.Numerics.Long_Real_Arrays."=");
   subtype Matrix is Matrices.Vector;
end Nmc;

with Nmc;
procedure Test_Nmc is
   M : Nmc.Matrix;
begin
   M (1) := (1.0, 2.0);
   M (2) := (3.0, 4.0);
   M (3) := (5.0, 6.0);
end Test_Nmc;


  reply	other threads:[~2017-01-26 15:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 12:25 Ada.Numerics.Long_Real_Arrays hnptz
2017-01-25 13:50 ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-25 14:11 ` Ada.Numerics.Long_Real_Arrays hnptz
2017-01-25 16:17   ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-25 18:35 ` Ada.Numerics.Long_Real_Arrays hnptz
2017-01-25 21:29 ` Ada.Numerics.Long_Real_Arrays hnptz
2017-01-26  7:47   ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-26 11:54     ` Ada.Numerics.Long_Real_Arrays hnptz
2017-01-26 14:52       ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-26 15:03         ` Simon Wright [this message]
2017-01-26  7:49   ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-26  7:55     ` Ada.Numerics.Long_Real_Arrays Simon Wright
2017-01-27 16:51 ` Ada.Numerics.Long_Real_Arrays hnptz
2017-01-27 18:39   ` Ada.Numerics.Long_Real_Arrays Simon Wright
replies disabled

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