Ada 编程/库/Ada.Numerics.Generic Complex Arrays
外观
此语言功能仅从 Ada 2005 开始可用。
Ada.Numerics.Generic_Complex_Arrays 是自 Ada 2005 以来 预定义语言环境 的一个单元。
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- 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;
外部示例
[编辑源代码]- 在以下网站中搜索
Ada.Numerics.Generic_Complex_Arrays
的示例:Rosetta Code,GitHub (gists),任何 Alire 包 或 本维基教科书。 - 在以下网站中搜索与
Ada.Numerics.Generic_Complex_Arrays
相关的帖子:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-ngcoar.ads
- 主体:a-ngcoar.adb
drake