Ada Programming/Libraries/Ada.Numerics.Generic Complex Arrays
Appearance
This language feature is only available from Ada 2005 on.
Ada.Numerics.Generic_Complex_Arrays is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------with
Ada.Numerics.Generic_Real_Arrays;with
Ada.Numerics.Generic_Complex_Types;generic
with
package
Real_Arraysis
new
Ada.Numerics.Generic_Real_Arrays (<>);with
package
Complex_Typesis
new
Ada.Numerics.Generic_Complex_Types (Real_Arrays.Real);package
Ada.Numerics.Generic_Complex_Arraysis
pragma
Pure (Generic_Complex_Arrays); -- Typestype
Complex_Vectoris
array
(Integerrange
<>)of
Complex_Types.Complex;type
Complex_Matrixis
array
(Integerrange
<>, Integerrange
<>)of
Complex_Types.Complex; -- Subprograms for Complex_Vector types -- Complex_Vector selection, conversion and composition operationsfunction
Re (X :in
Complex_Vector)return
Real_Arrays.Real_Vector;function
Im (X :in
Complex_Vector)return
Real_Arrays.Real_Vector;procedure
Set_Re (X :in
out
Complex_Vector; Re :in
Real_Arrays.Real_Vector);procedure
Set_Im (X :in
out
Complex_Vector; Im :in
Real_Arrays.Real_Vector);function
Compose_From_Cartesian (Re :in
Real_Arrays.Real_Vector)return
Complex_Vector;function
Compose_From_Cartesian (Re :in
Real_Arrays.Real_Vector; Im :in
Real_Arrays.Real_Vector)return
Complex_Vector;function
Modulus (X :in
Complex_Vector)return
Real_Arrays.Real_Vector;function
"abs" (Right :in
Complex_Vector)return
Real_Arrays.Real_Vectorrenames
Modulus;function
Argument (X :in
Complex_Vector)return
Real_Arrays.Real_Vector;function
Argument (X :in
Complex_Vector; Cycle :in
Real_Arrays.Real'Base)return
Real_Arrays.Real_Vector;function
Compose_From_Polar (Modulus :in
Real_Arrays.Real_Vector; Argument :in
Real_Arrays.Real_Vector)return
Complex_Vector;function
Compose_From_Polar (Modulus :in
Real_Arrays.Real_Vector; Argument :in
Real_Arrays.Real_Vector; Cycle :in
Real_Arrays.Real'Base)return
Complex_Vector; -- Complex_Vector arithmetic operationsfunction
"+" (Right :in
Complex_Vector)return
Complex_Vector;function
"-" (Right :in
Complex_Vector)return
Complex_Vector;function
Conjugate (X :in
Complex_Vector)return
Complex_Vector;function
"+" (Left :in
Complex_Vector; Right :in
Complex_Vector)return
Complex_Vector;function
"-" (Left :in
Complex_Vector; Right :in
Complex_Vector)return
Complex_Vector;function
"*" (Left :in
Complex_Vector; Right : Complex_Vector)return
Complex_Types.Complex;function
"abs" (Right :in
Complex_Vector)return
Complex_Types.Complex; -- Mixed Real_Arrays.Real_Vector and Complex_Vector arithmetic operationsfunction
"+" (Left :in
Real_Arrays.Real_Vector; Right :in
Complex_Vector)return
Complex_Vector;function
"+" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real_Vector)return
Complex_Vector;function
"-" (Left :in
Real_Arrays.Real_Vector; Right :in
Complex_Vector)return
Complex_Vector;function
"-" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real_Vector)return
Complex_Vector;function
"*" (Left :in
Real_Arrays.Real_Vector; Right :in
Complex_Vector)return
Complex_Types.Complex;function
"*" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real_Vector)return
Complex_Types.Complex; -- Complex_Vector scaling operationsfunction
"*" (Left :in
Complex_Types.Complex; Right :in
Complex_Vector)return
Complex_Vector;function
"*" (Left :in
Complex_Vector; Right :in
Complex_Types.Complex)return
Complex_Vector;function
"/" (Left :in
Complex_Vector; Right :in
Complex_Types.Complex)return
Complex_Vector;function
"*" (Left :in
Real_Arrays.Real'Base; Right :in
Complex_Vector)return
Complex_Vector;function
"*" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real'Base)return
Complex_Vector;function
"/" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real'Base)return
Complex_Vector; -- Other Complex_Vector operationsfunction
Unit_Vector (Index :in
Integer; Order :in
Positive; First :in
Integer := 1)return
Complex_Vector; -- Subprograms for Complex_Matrix types -- Complex_Matrix selection, conversion and composition operationsfunction
Re (X :in
Complex_Matrix)return
Real_Arrays.Real_Matrix;function
Im (X :in
Complex_Matrix)return
Real_Arrays.Real_Matrix;procedure
Set_Re (X :in
out
Complex_Matrix; Re :in
Real_Arrays.Real_Matrix);procedure
Set_Im (X :in
out
Complex_Matrix; Im :in
Real_Arrays.Real_Matrix);function
Compose_From_Cartesian (Re :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
Compose_From_Cartesian (Re :in
Real_Arrays.Real_Matrix; Im :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
Modulus (X :in
Complex_Matrix)return
Real_Arrays.Real_Matrix;function
"abs" (Right :in
Complex_Matrix)return
Real_Arrays.Real_Matrixrenames
Modulus;function
Argument (X :in
Complex_Matrix)return
Real_Arrays.Real_Matrix;function
Argument (X :in
Complex_Matrix; Cycle :in
Real_Arrays.Real'Base)return
Real_Arrays.Real_Matrix;function
Compose_From_Polar (Modulus :in
Real_Arrays.Real_Matrix; Argument :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
Compose_From_Polar (Modulus :in
Real_Arrays.Real_Matrix; Argument :in
Real_Arrays.Real_Matrix; Cycle :in
Real_Arrays.Real'Base)return
Complex_Matrix; -- Complex_Matrix arithmetic operationsfunction
"+" (Right :in
Complex_Matrix)return
Complex_Matrix;function
"-" (Right :in
Complex_Matrix)return
Complex_Matrix;function
Conjugate (X :in
Complex_Matrix)return
Complex_Matrix;function
Transpose (X :in
Complex_Matrix)return
Complex_Matrix;function
"+" (Left :in
Complex_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"-" (Left :in
Complex_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"*" (Left :in
Complex_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"*" (Left :in
Complex_Vector; Right :in
Complex_Vector)return
Complex_Matrix;function
"*" (Left :in
Complex_Vector; Right :in
Complex_Matrix)return
Complex_Vector;function
"*" (Left :in
Complex_Matrix; Right :in
Complex_Vector)return
Complex_Vector; -- Mixed Real_Arrays.Real_Matrix and Complex_Matrix arithmetic operationsfunction
"+" (Left :in
Real_Arrays.Real_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"+" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
"-" (Left :in
Real_Arrays.Real_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"-" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
"*" (Left :in
Real_Arrays.Real_Matrix; Right :in
Complex_Matrix)return
Complex_Matrix;function
"*" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real_Matrix)return
Complex_Matrix;function
"*" (Left :in
Real_Arrays.Real_Vector; Right :in
Complex_Vector)return
Complex_Matrix;function
"*" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real_Vector)return
Complex_Matrix;function
"*" (Left :in
Real_Arrays.Real_Vector; Right :in
Complex_Matrix)return
Complex_Vector;function
"*" (Left :in
Complex_Vector; Right :in
Real_Arrays.Real_Matrix)return
Complex_Vector;function
"*" (Left :in
Real_Arrays.Real_Matrix; Right :in
Complex_Vector)return
Complex_Vector;function
"*" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real_Vector)return
Complex_Vector; -- Complex_Matrix scaling operationsfunction
"*" (Left :in
Complex_Types.Complex; Right :in
Complex_Matrix)return
Complex_Matrix;function
"*" (Left :in
Complex_Matrix; Right :in
Complex_Types.Complex)return
Complex_Matrix;function
"/" (Left :in
Complex_Matrix; Right :in
Complex_Types.Complex)return
Complex_Matrix;function
"*" (Left :in
Real_Arrays.Real'Base; Right :in
Complex_Matrix)return
Complex_Matrix;function
"*" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real'Base)return
Complex_Matrix;function
"/" (Left :in
Complex_Matrix; Right :in
Real_Arrays.Real'Base)return
Complex_Matrix; -- Complex_Matrix inversion and related operationsfunction
Solve (A :in
Complex_Matrix; X :in
Complex_Vector)return
Complex_Vector;function
Solve (A :in
Complex_Matrix; X :in
Complex_Matrix)return
Complex_Matrix;function
Inverse (A :in
Complex_Matrix)return
Complex_Matrix;function
Determinant (A :in
Complex_Matrix)return
Complex_Types.Complex; -- Eigenvalues and vectors of a Hermitian matrixfunction
Eigenvalues (A :in
Complex_Matrix)return
Real_Arrays.Real_Vector;procedure
Eigensystem (A :in
Complex_Matrix; Values :out
Real_Arrays.Real_Vector; Vectors :out
Complex_Matrix); -- Other Complex_Matrix operationsfunction
Unit_Matrix (Order :in
Positive; First_1 :in
Integer := 1; First_2 :in
Integer := 1)return
Complex_Matrix;end
Ada.Numerics.Generic_Complex_Arrays;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada.Numerics.Generic_Complex_Arrays
in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada.Numerics.Generic_Complex_Arrays
in: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-ngcoar.ads
- Body: a-ngcoar.adb
drake
- Specification: numerics/a-ngcoar.ads
- Body: numerics/a-ngcoar.adb