From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: ada lapack
Date: Sat, 18 Aug 2012 16:13:33 +0300
Date: 2012-08-18T16:13:33+03:00 [thread overview]
Message-ID: <a99intF24kU1@mid.individual.net> (raw)
In-Reply-To: <5865849c-3897-4be5-8d54-1de2e1acc3a7@googlegroups.com>
On 12-08-18 14:57 , Ada novice wrote:
> If in an example file given say example01.adb one needs to add 2
> matrices. We have the given "matrix" and we can make a copy
> "matrix_copy". Writing
>
> sum_two_matrices := matrix + matrix_copy;
>
> gives an compilation error
>
> ---there is no applicable operator "+" for type "Complex_Matrix" at
> ada_lapack.ads:69, instance at line 24---
>
> The Complex_Matrix type defined in G.3.2 complex vectors and matrices
> of the ARM can do addition + operations. The Complex_Matrix as
> defined in ada_lapack.ads:69 seems different.
They are indeed different types. The standard package
Ada.Numerics.Generic_Complex_Arrays provides the "+" operator (and
several other operators) but ada_lapack.ads does not.
If you want a "+" for Ada_Lapack.Complex_Matrix, you must define one
yourself, either in ada_lapack.ads/adb (best option) or in your own
code. You code the "+" function just like any other Ada function, except
that its name is "+":
function "+" (Left, Right : Complex_Matrix) return Complex_Matrix
is
begin
...
end "+";
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2012-08-18 13:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 6:16 ada lapack Leo Brewin
2012-08-16 3:34 ` Jerry
2012-08-17 6:25 ` Ada novice
2012-08-17 7:11 ` Leo Brewin
2012-08-17 7:42 ` Ada novice
2012-08-17 9:43 ` Niklas Holsti
2012-08-17 10:27 ` Ada novice
2012-08-17 11:08 ` Niklas Holsti
2012-08-17 11:33 ` Ada novice
2012-08-17 13:45 ` Leo Brewin
2012-08-17 14:11 ` Marc C
2012-08-18 11:57 ` Ada novice
2012-08-18 13:13 ` Niklas Holsti [this message]
2012-08-18 13:48 ` Ada novice
2012-08-18 15:22 ` Nasser M. Abbasi
2012-08-18 16:33 ` Ada novice
2012-08-18 17:32 ` Simon Wright
2012-08-18 17:44 ` Nasser M. Abbasi
2012-08-18 20:45 ` Niklas Holsti
2012-08-18 21:46 ` Simon Wright
2012-08-19 2:24 ` Leo Brewin
2012-08-19 5:39 ` Ada novice
2012-08-19 7:10 ` Leo Brewin
2012-08-19 13:02 ` Simon Wright
2012-08-20 14:05 ` Nasser M. Abbasi
2012-08-20 14:57 ` Simon Wright
2012-08-20 15:10 ` Nasser M. Abbasi
2012-08-20 18:09 ` Ada novice
2012-08-20 18:46 ` Nasser M. Abbasi
2012-08-20 15:03 ` Nasser M. Abbasi
2012-08-20 22:57 ` Simon Wright
2012-08-20 23:09 ` Nasser M. Abbasi
2012-08-20 23:31 ` Simon Wright
2012-08-21 10:44 ` Simon Wright
2012-08-21 14:50 ` Nasser M. Abbasi
2012-08-18 22:51 ` Nasser M. Abbasi
2012-08-18 23:16 ` Niklas Holsti
2012-08-18 23:40 ` Nasser M. Abbasi
2012-08-19 7:50 ` Niklas Holsti
2012-08-19 2:20 ` Leo Brewin
2012-08-17 14:12 ` Brian Drummond
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox