Ada 编程/库/Ada.Numerics.Generic Real Arrays
外观
此语言特性仅从 Ada 2005 开始可用。
Ada.Numerics.Generic_Real_Arrays 是 预定义语言环境 自 Ada 2005 以来的一部分。
-- 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 -- -------------------------------------------------------------------------generictypeRealisdigits<>;packageAda.Numerics.Generic_Real_ArraysispragmaPure (Generic_Real_Arrays); -- TypestypeReal_Vectorisarray(Integerrange<>)ofReal'Base;typeReal_Matrixisarray(Integerrange<>, Integerrange<>)ofReal'Base; -- Subprograms for Real_Vector types -- Real_Vector arithmetic operationsfunction"+" (Right :inReal_Vector)returnReal_Vector;function"-" (Right :inReal_Vector)returnReal_Vector;function"abs" (Right :inReal_Vector)returnReal_Vector;function"+" (Left :inReal_Vector; Right : Real_Vector)returnReal_Vector;function"-" (Left :inReal_Vector; Right : Real_Vector)returnReal_Vector;function"*" (Left :inReal_Vector; Right : Real_Vector)returnReal'Base;function"abs" (Right :inReal_Vector)returnReal'Base; -- Real_Vector scaling operationsfunction"*" (Left :inReal'Base; Right :inReal_Vector)returnReal_Vector;function"*" (Left :inReal_Vector; Right :inReal'Base)returnReal_Vector;function"/" (Left :inReal_Vector; Right :inReal'Base)returnReal_Vector; -- Other Real_Vector operationsfunctionUnit_Vector (Index :inInteger; Order :inPositive; First :inInteger := 1)returnReal_Vector; -- Subprograms for Real_Matrix types -- Real_Matrix arithmetic operationsfunction"+" (Right :inReal_Matrix)returnReal_Matrix;function"-" (Right :inReal_Matrix)returnReal_Matrix;function"abs" (Right :inReal_Matrix)returnReal_Matrix;functionTranspose (X :inReal_Matrix)returnReal_Matrix;function"+" (Left :inReal_Matrix; Right :inReal_Matrix)returnReal_Matrix;function"-" (Left :inReal_Matrix; Right :inReal_Matrix)returnReal_Matrix;function"*" (Left :inReal_Matrix; Right :inReal_Matrix)returnReal_Matrix;function"*" (Left :inReal_Matrix; Right :inReal_Vector)returnReal_Matrix;function"*" (Left :inReal_Vector; Right :inReal_Matrix)returnReal_Vector;function"*" (Left :inReal_Matrix; Right :inReal_Vector)returnReal_Vector; -- Real_Matrix scaling operationsfunction"*" (Left :inReal'Base; Right :inReal_Matrix)returnReal_Matrix;function"*" (Left :inReal_Matrix; Right :inReal'Base)returnReal_Matrix;function"/" (Left :inReal_Matrix; Right :inReal'Base)returnReal_Matrix; -- Real_Matrix inversion and related operationsfunctionSolve (A :inReal_Matrix; X :inReal_Vector)returnReal_Vector;functionSolve (A :inReal_Matrix; X :inReal_Matrix)returnReal_Matrix;functionInverse (A :inReal_Matrix)returnReal_Matrix;functionDeterminant (A :inReal_Matrix)returnReal'Base; -- Eigenvalues and vectors of a real symmetric matrixfunctionEigenvalues (A :inReal_Matrix)returnReal_Vector;procedureEigensystem (A :inReal_Matrix; Values :outReal_Vector; Vectors :outReal_Matrix); -- Other Real_Matrix operationsfunctionUnit_Matrix (Order : Positive; First_1 : Integer := 1; First_2 : Integer := 1)returnReal_Matrix;endAda.Numerics.Generic_Real_Arrays;
外部示例
[编辑源代码]- 在以下位置搜索
Ada.Numerics.Generic_Real_Arrays的 **示例**: Rosetta Code, GitHub (gists), 任何 Alire 包 或 此. - 在以下位置搜索与
Ada.Numerics.Generic_Real_Arrays相关的 **帖子**: Stack Overflow, comp.lang.ada 或 任何与 Ada 相关的页面.
FSF GNAT
- 规范: a-ngrear.ads
- 主体: a-ngrear.adb
drake
