--- ais/ai-00296.txt 2004/04/30 02:35:38 1.15 +++ ais/ai-00296.txt 2004/05/29 00:38:36 1.16 @@ -1,4 +1,4 @@ -!standard G.3 (01) 04-01-13 AI95-00296/08 +!standard G.3 (01) 04-05-24 AI95-00296/09 !standard G.3.1 (01) !standard G.3.2 (01) !class amendment 02-06-07 @@ -27,7 +27,7 @@ The UK was asked to review the situation and to make a recommendation; they recommended that if Ada were amended then consideration should be given to -including the packages within the Numerics annex. +including the packages within the Numerics Annex. The packages can be implemented entirely in Ada and thus present little burden to implementors. Providing secondary standards has not proved satisfactory @@ -35,7 +35,7 @@ !proposal -It is proposed that two generic packages be added to the numerics annex. They +It is proposed that two generic packages be added to the Numerics Annex. They are Ada.Numerics.Generic_Real_Arrays and Ada.Numerics.Generic_Complex_Arrays. They are included as a new subclause G.3 in order to avoid excessive renumbering of other clauses. @@ -133,11 +133,11 @@ -- Eigenvalues and vectors of a real symmetric matrix - function Eigenvalues(A : Real_Matrix) return Real_Vector; + function Eigenvalues (A : Real_Matrix) return Real_Vector; - procedure Eigensystem(A : in Real_Matrix; - Values : out Real_Vector; - Vectors : out Real_Matrix); + procedure Eigensystem (A : in Real_Matrix; + Values : out Real_Vector; + Vectors : out Real_Matrix); -- Other Real_Matrix operations @@ -164,7 +164,7 @@ The effect of the various functions is as described below. In most cases the functions are described in terms of corresponding scalar operations of the type Real; any exception raised by those operations is propagated by the array -operation. Moreover the accuracy of the result for each individual component is +operation. Moreover, the accuracy of the result for each individual component is as defined for the scalar operation unless stated otherwise. In the case of those operations which are defined to involve an inner product, @@ -184,12 +184,12 @@ Each operation returns the result of applying the corresponding operation of the type Real to each component of Left and the matching component of Right. -The index range of the result is Left'Range. The exception Constraint_Error +The index range of the result is Left'Range. Constraint_Error is raised if Left'Length is not equal to Right'Length. function "*" (Left, Right : Real_Vector) return Real'Base; -This operation returns the inner product of Left and Right. The exception +This operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. This operation involves an inner product. @@ -212,7 +212,7 @@ This function returns a "unit vector" with Order components and a lower bound of First. All components are set to 0.0 except for the Index component which is -set to 1.0. The exception Constraint_Error is raised if Index < First, Index > +set to 1.0. Constraint_Error is raised if Index < First, Index > First + Order - 1 or if First + Order - 1 > Integer'Last. function "+" (Right : Real_Matrix) return Real_Matrix; @@ -232,8 +232,8 @@ function "-" (Left, Right : Real_Matrix) return Real_Matrix; Each operation returns the result of applying the corresponding operation of -type Real to each component of Left and the matching component of Right. -The index ranges of the result are those of Left. The exception +the type Real to each component of Left and the matching component of Right. +The index ranges of the result are those of Left. Constraint_Error is raised if Left'Length(1) is not equal to Right'Length(1) or Left'Length(2) is not equal to Right'Length(2). @@ -241,14 +241,14 @@ This operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). This operation involves inner products. function "*" (Left, Right : Real_Vector) return Real_Matrix; This operation returns the outer product of a (column) vector Left by a -(row) vector Right using the appropriate operation "*" of the type Real for +(row) vector Right using the operation "*" of the type Real for computing the individual components. The first and second index ranges of the matrix result are Left'Range and Right'Range respectively. @@ -256,7 +256,7 @@ This operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). This operation involves inner products. @@ -264,7 +264,7 @@ This operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. This operation involves inner products. @@ -299,27 +299,27 @@ function Inverse (A : Real_Matrix) return Real_Matrix; -This function returns a matrix B such that A * B is (nearly) the unit matrix. -The index ranges of the result are those of A. Constraint_Error is raised if -A'Length(1) is not equal to A'Length(2). Constraint_Error is raised if -the matrix A is ill-conditioned. +This function returns a matrix B such that A * B is (nearly) equal to the unit +matrix. The index ranges of the result are those of A. Constraint_Error is +raised if A'Length(1) is not equal to A'Length(2). Constraint_Error is raised +if the matrix A is ill-conditioned. function Determinant (A : Real_Matrix) return Real'Base; This function returns the determinant of the matrix A. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). -function Eigenvalues(A : Real_Matrix) return Real_Vector; +function Eigenvalues (A : Real_Matrix) return Real_Vector; This function returns the eigenvalues of the symmetric matrix A as a vector -sorted into order with the largest first. The exception Constraint_Error is +sorted into order with the largest first. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index range of the -result is A'Range(1). The exception Argument_Error is raised if the matrix A +result is A'Range(1). Argument_Error is raised if the matrix A is not symmetric. -procedure Eigensystem(A : in Real_Matrix; - Values : out Real_Vector; - Vectors : out Real_Matrix); +procedure Eigensystem (A : in Real_Matrix; + Values : out Real_Vector; + Vectors : out Real_Matrix); This procedure computes both the eigenvalues and eigenvectors of the symmetric matrix A. The out parameter Values is the same as that obtained by calling the @@ -327,9 +327,9 @@ the eigenvectors of the matrix A. The order of the columns corresponds to the order of the eigenvalues. The eigenvectors are normalized and mutually orthogonal (they are orthonormal), including when there are repeated -eigenvalues. The exception Constraint_Error is raised if A'Length(1) is not +eigenvalues. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index ranges of the parameter Vectors are those of A. -The exception Argument_Error is raised if the matrix A is not symmetric. +Argument_Error is raised if the matrix A is not symmetric. function Unit_Matrix (Order : Positive; First_1, First_2 : Integer := 1) return Real_Matrix; @@ -337,7 +337,7 @@ This function returns a square "unit matrix" with Order**2 components and lower bounds of First_1 and First_2 (for the first and second index ranges respectively). All components are set to 0.0 except for the main diagonal, -whose components are set to 1.0. The exception Constraint_Error is raised if +whose components are set to 1.0. Constraint_Error is raised if First_1 + Order - 1 > Integer'Last or First_2 + Order - 1 > Integer'Last. Implementation Requirements @@ -590,11 +590,11 @@ -- Eigenvalues and vectors of a Hermitian matrix - function Eigenvalues(A : Complex_Matrix) return Real_Vector; + function Eigenvalues (A : Complex_Matrix) return Real_Vector; - procedure Eigensystem(A : in Complex_Matrix; - Values : out Real_Vector; - Vectors : out Complex_Matrix); + procedure Eigensystem (A : in Complex_Matrix; + Values : out Real_Vector; + Vectors : out Complex_Matrix); -- Other Complex_Matrix operations @@ -625,8 +625,8 @@ The effect of the various subprograms is as described below. In many cases they are described in terms of corresponding scalar operations in Numerics.Generic_Complex_Types. Any exception raised by those operations is -propagated by the array subprogram. Moreover any constraints on the parameters -and the accuracy of the result for each individual component is as defined for +propagated by the array subprogram. Moreover, any constraints on the parameters +and the accuracy of the result for each individual component are as defined for the scalar operation. In the case of those operations which are defined to involve an inner product, @@ -646,7 +646,7 @@ Each procedure replaces the specified (cartesian) component of each of the components of X by the value of the matching component of Re or Im; the other (cartesian) component of each of the components is unchanged. -The exception Constraint_Error is raised if X'Length is not equal to +Constraint_Error is raised if X'Length is not equal to Re'Length or Im'Length. function Compose_From_Cartesian (Re : Real_Vector) return Complex_Vector; @@ -655,7 +655,7 @@ Each function constructs a vector of Complex results (in cartesian representation) formed from given vectors of cartesian components; when only the real components are given, imaginary components of zero are assumed. -The index range of the result is Re'Range. The exception Constraint_Error is +The index range of the result is Re'Range. Constraint_Error is raised if Re'Length is not equal to Im'Length. function Modulus (X : Complex_Vector) return Real_Vector; @@ -678,7 +678,7 @@ representation) formed from given vectors of polar components using the corresponding function in Numerics.Generic_Complex_Types on matching components of Modulus and Argument. The index range of the result is -Modulus'Range. The exception Constraint_Error is raised if +Modulus'Range. Constraint_Error is raised if Modulus'Length is not equal to Argument'Length. function "+" (Right : Complex_Vector) return Complex_Vector; @@ -700,12 +700,12 @@ Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index range of the result is Left'Range. -The exception Constraint_Error is raised if Left'Length is not equal to +Constraint_Error is raised if Left'Length is not equal to Right'Length. function "*" (Left, Right : Complex_Vector) return Complex; -This operation returns the inner product of Left and Right. The exception +This operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. This operation involves an inner product. @@ -721,13 +721,13 @@ Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index range of the result is Left'Range. -The exception Constraint_Error is raised if Left'Length is not equal to +Constraint_Error is raised if Left'Length is not equal to Right'Length. function "*" (Left : Real_Vector; Right : Complex_Vector) return Complex; function "*" (Left : Complex_Vector; Right : Real_Vector) return Complex; -Each operation returns the inner product of Left and Right. The exception +Each operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. These operations involve an inner product. @@ -763,7 +763,7 @@ This function returns a "unit vector" with Order components and a lower bound of First. All components are set to (0.0,0.0) except for the Index -component which is set to (1.0,0.0). The exception Constraint_Error is +component which is set to (1.0,0.0). Constraint_Error is raised if Index < First, Index > First + Order - 1, or if First + Order - 1 > Integer'Last. @@ -778,7 +778,7 @@ Each procedure replaces the specified (cartesian) component of each of the components of X by the value of the matching component of Re or Im; the other -(cartesian) component of each of the components is unchanged. The exception +(cartesian) component of each of the components is unchanged. Constraint_Error is raised if X'Length(1) is not equal to Re'Length(1) or Im'Length(1) or if X'Length(2) is not equal to Re'Length(2) or Im'Length(2). @@ -788,7 +788,7 @@ Each function constructs a matrix of Complex results (in cartesian representation) formed from given matrices of cartesian components; when only the real components are given, imaginary components of zero are -assumed. The index ranges of the result are those of Re. The exception +assumed. The index ranges of the result are those of Re. Constraint_Error is raised if Re'Length(1) is not equal to Im'Length(1) or Re'Length(2) is not equal to Im'Length(2). @@ -813,7 +813,7 @@ representation) formed from given matrices of polar components using the corresponding function in Numerics.Generic_Complex_Types on matching components of Modulus and Argument. The index ranges of the result are those -of Modulus. The exception Constraint_Error is raised if Modulus'Length(1) is +of Modulus. Constraint_Error is raised if Modulus'Length(1) is not equal to Argument'Length(1) or Modulus'Length(2) is not equal to Argument'Length(2). @@ -841,14 +841,14 @@ Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index ranges of the result are those of -Left. The exception Constraint_Error is raised if Left'Length(1) is not equal to +Left. Constraint_Error is raised if Left'Length(1) is not equal to Right'Length(1) or Left'Length(2) is not equal to Right'Length(2). function "*" (Left, Right : Complex_Matrix) return Complex_Matrix; This operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). This operation involves inner products. @@ -865,7 +865,7 @@ This operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). This operation involves inner products. @@ -874,7 +874,7 @@ This operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. This operation involves inner products. @@ -900,7 +900,7 @@ Each operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). These operations involve inner products. @@ -922,7 +922,7 @@ Each operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). These operations involve inner products. @@ -933,7 +933,7 @@ Each operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. These operations involve inner products. @@ -963,7 +963,7 @@ Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of the matrix Left and the -scalar Right. The index ranges of the result are those of Left. +real number Right. The index ranges of the result are those of Left. function Solve (A : Complex_Matrix; X: Complex_Vector) return Complex_Vector; @@ -983,10 +983,10 @@ function Inverse (A : Complex_Matrix) return Complex_Matrix; -This function returns a matrix B such that A * B is (nearly) the unit matrix. -The index ranges of the result are those of A. Constraint_Error is raised if -A'Length(1) is not equal to A'Length(2). Constraint_Error is raised if -the matrix A is ill-conditioned. +This function returns a matrix B such that A * B is (nearly) equal to the unit +matrix. The index ranges of the result are those of A. Constraint_Error is +raised if A'Length(1) is not equal to A'Length(2). Constraint_Error is raised +if the matrix A is ill-conditioned. function Determinant (A : Complex_Matrix) return Complex; @@ -996,23 +996,23 @@ function Eigenvalues(A : Complex_Matrix) return Real_Vector; This function returns the eigenvalues of the Hermitian matrix A as a vector -sorted into order with the largest first. The exception Constraint_Error is +sorted into order with the largest first. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index range of the -result is A'Range(1). The exception Argument_Error is raised if the matrix A +result is A'Range(1). Argument_Error is raised if the matrix A is not Hermitian. -procedure Eigensystem(A : in Complex_Matrix; - Values : out Real_Vector; - Vectors : out Complex_Matrix); +procedure Eigensystem (A : in Complex_Matrix; + Values : out Real_Vector; + Vectors : out Complex_Matrix); This procedure computes both the eigenvalues and eigenvectors of the Hermitian matrix A. The out parameter Values is the same as that obtained by calling the function Eigenvalues. The out parameter Vectors is a matrix whose columns are the eigenvectors of the matrix A. The order of the columns corresponds to the order of the eigenvalues. The eigenvectors are mutually orthonormal, -including when there are repeated eigenvalues. The exception Constraint_Error is +including when there are repeated eigenvalues. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index ranges of the -parameter Vectors are those of A. The exception Argument_Error is raised if the +parameter Vectors are those of A. Argument_Error is raised if the matrix A is not Hermitian. function Unit_Matrix (Order : Positive; @@ -1022,7 +1022,7 @@ This function returns a square "unit matrix" with Order**2 components and lower bounds of First_1 and First_2 (for the first and second index ranges respectively). All components are set to (0.0,0.0) except for the main diagonal, -whose components are set to (1.0,0.0). The exception Constraint_Error is raised +whose components are set to (1.0,0.0). Constraint_Error is raised if First_1 + Order - 1 > Integer'Last or First_2 + Order - 1 > Integer'Last. Implementation Requirements @@ -1116,7 +1116,7 @@ * to provide commonly required facilities for the user who is not a numerical professional, -* to provide a baseline of types and operations that form a firm foundation +* to provide a baseline of types and operations that forms a firm foundation for binding to more general facilities such as the well-known BLAS (Basic Linear Algebra Subprograms, see www.netlib.org/blas). @@ -1150,7 +1150,7 @@ The accuracy of most simple operations follows from the underlying operations on scalar components. In the case of inner product there is the potential for special operations to improve the speed and/or accuracy. We have specified -reasonable requirements in the exact mode, which are met by the canonical +reasonable requirements in the strict mode, which are met by the canonical implementation using a loop statement. This is because on some hardware, built-in instructions which are fast actually lose accuracy. Note that the Fortran language standard recognizes the existence of inner product @@ -1360,7 +1360,7 @@ @b<function> "+" (Right : Real_Matrix) @b<return> Real_Matrix; @b<function> "-" (Right : Real_Matrix) @b<return> Real_Matrix; - @b<function> "abs" (Right : Real_Matrix) @b<return> Real_Matrix; + @b<function> "@b<abs>" (Right : Real_Matrix) @b<return> Real_Matrix; @b<function> Transpose (X : Real_Matrix) @b<return> Real_Matrix; @b<function> "+" (Left, Right : Real_Matrix) @b<return> Real_Matrix; @@ -1418,7 +1418,7 @@ The effect of the various functions is as described below. In most cases the functions are described in terms of corresponding scalar operations of the type Real; any exception raised by those operations is propagated by the array -operation. Moreover the accuracy of the result for each individual component is +operation. Moreover, the accuracy of the result for each individual component is as defined for the scalar operation unless stated otherwise. In the case of those operations which are defined to involve an inner product, @@ -1438,12 +1438,12 @@ @xindent<Each operation returns the result of applying the corresponding operation of the type Real to each component of Left and the matching component of Right. -The index range of the result is Left'Range. The exception Constraint_Error +The index range of the result is Left'Range. Constraint_Error is raised if Left'Length is not equal to Right'Length.> @xcode<@b<function> "*" (Left, Right : Real_Vector) @b<return> Real'Base;> -@xindent<This operation returns the inner product of Left and Right. The exception +@xindent<This operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. This operation involves an inner product.> @@ -1466,12 +1466,12 @@ @xindent<This function returns a "unit vector" with Order components and a lower bound of First. All components are set to 0.0 except for the Index component which is -set to 1.0. The exception Constraint_Error is raised if Index < First, Index @> +set to 1.0. Constraint_Error is raised if Index < First, Index @> First + Order - 1 or if First + Order - 1 @> Integer'Last.> @xcode<@b<function> "+" (Right : Real_Matrix) @b<return> Real_Matrix; @b<function> "-" (Right : Real_Matrix) @b<return> Real_Matrix; -@b<function> "abs" (Right : Real_Matrix) @b<return> Real_Matrix;> +@b<function> "@b<abs>" (Right : Real_Matrix) @b<return> Real_Matrix;> @xindent<Each operation returns the result of applying the corresponding operation of the type Real to each component of Right. The index ranges of the result are @@ -1486,8 +1486,8 @@ @b<function> "-" (Left, Right : Real_Matrix) @b<return> Real_Matrix;> @xindent<Each operation returns the result of applying the corresponding operation of -type Real to each component of Left and the matching component of Right. -The index ranges of the result are those of Left. The exception +the type Real to each component of Left and the matching component of Right. +The index ranges of the result are those of Left. Constraint_Error is raised if Left'Length(1) is not equal to Right'Length(1) or Left'Length(2) is not equal to Right'Length(2).> @@ -1495,14 +1495,14 @@ @xindent<This operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). This operation involves inner products.> @xcode<@b<function> "*" (Left, Right : Real_Vector) @b<return> Real_Matrix;> @xindent<This operation returns the outer product of a (column) vector Left by a -(row) vector Right using the appropriate operation "*" of the type Real for +(row) vector Right using the operation "*" of the type Real for computing the individual components. The first and second index ranges of the matrix result are Left'Range and Right'Range respectively.> @@ -1510,7 +1510,7 @@ @xindent<This operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). This operation involves inner products.> @@ -1518,7 +1518,7 @@ @xindent<This operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. This operation involves inner products.> @@ -1553,10 +1553,10 @@ @xcode<@b<function> Inverse (A : Real_Matrix) @b<return> Real_Matrix;> -@xindent<This function returns a matrix B such that A * B is (nearly) the unit matrix. -The index ranges of the result are those of A. Constraint_Error is raised if -A'Length(1) is not equal to A'Length(2). Constraint_Error is raised if -the matrix A is ill-conditioned.> +@xindent<This function returns a matrix B such that A * B is (nearly) equal to +the unit matrix. The index ranges of the result are those of A. +Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). +Constraint_Error is raised if the matrix A is ill-conditioned.> @xcode<@b<function> Determinant (A : Real_Matrix) @b<return> Real'Base;> @@ -1566,9 +1566,9 @@ @xcode<@b<function> Eigenvalues(A : Real_Matrix) @b<return> Real_Vector;> @xindent<This function returns the eigenvalues of the symmetric matrix A as a vector -sorted into order with the largest first. The exception Constraint_Error is +sorted into order with the largest first. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index range of the -result is A'Range(1). The exception Argument_Error is raised if the matrix A +result is A'Range(1). Argument_Error is raised if the matrix A is not symmetric.> @xcode<@b<procedure> Eigensystem(A : @b<in> Real_Matrix; @@ -1581,9 +1581,9 @@ the eigenvectors of the matrix A. The order of the columns corresponds to the order of the eigenvalues. The eigenvectors are normalized and mutually orthogonal (they are orthonormal), including when there are repeated -eigenvalues. The exception Constraint_Error is raised if A'Length(1) is not +eigenvalues. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index ranges of the parameter Vectors are those of A. -The exception Argument_Error is raised if the matrix A is not symmetric.> +Argument_Error is raised if the matrix A is not symmetric.> @xcode<@b<function> Unit_Matrix (Order : Positive; First_1, First_2 : Integer := 1) @b<return> Real_Matrix;> @@ -1591,7 +1591,7 @@ @xindent<This function returns a square "unit matrix" with Order**2 components and lower bounds of First_1 and First_2 (for the first and second index ranges respectively). All components are set to 0.0 except for the main diagonal, -whose components are set to 1.0. The exception Constraint_Error is raised if +whose components are set to 1.0. Constraint_Error is raised if First_1 + Order - 1 @> Integer'Last or First_2 + Order - 1 @> Integer'Last.> @i<@s8<Implementation Requirements>> @@ -1870,8 +1870,8 @@ The effect of the various subprograms is as described below. In many cases they are described in terms of corresponding scalar operations in Numerics.Generic_Complex_Types. Any exception raised by those operations is -propagated by the array subprogram. Moreover any constraints on the parameters -and the accuracy of the result for each individual component is as defined for +propagated by the array subprogram. Moreover, any constraints on the parameters +and the accuracy of the result for each individual component are as defined for the scalar operation. In the case of those operations which are defined to involve an inner product, @@ -1891,7 +1891,7 @@ @xindent<Each procedure replaces the specified (cartesian) component of each of the components of X by the value of the matching component of Re or Im; the other (cartesian) component of each of the components is unchanged. -The exception Constraint_Error is raised if X'Length is not equal to +Constraint_Error is raised if X'Length is not equal to Re'Length or Im'Length.> @xcode<@b<function> Compose_From_Cartesian (Re : Real_Vector) @b<return> Complex_Vector; @@ -1900,11 +1900,11 @@ @xindent<Each function constructs a vector of Complex results (in cartesian representation) formed from given vectors of cartesian components; when only the real components are given, imaginary components of zero are assumed. -The index range of the result is Re'Range. The exception Constraint_Error is +The index range of the result is Re'Range. Constraint_Error is raised if Re'Length is not equal to Im'Length.> @xcode<@b<function> Modulus (X : Complex_Vector) @b<return> Real_Vector; -@b<function> "abs" (Right : Complex_Vector) @b<return> Real_Vector @b<renames> Modulus; +@b<function> "@b<abs>" (Right : Complex_Vector) @b<return> Real_Vector @b<renames> Modulus; @b<function> Argument (X : Complex_Vector) @b<return> Real_Vector; @b<function> Argument (X : Complex_Vector; Cycle : Real'Base) @b<return> Real_Vector;> @@ -1923,7 +1923,7 @@ representation) formed from given vectors of polar components using the corresponding function in Numerics.Generic_Complex_Types on matching components of Modulus and Argument. The index range of the result is -Modulus'Range. The exception Constraint_Error is raised if +Modulus'Range. Constraint_Error is raised if Modulus'Length is not equal to Argument'Length.> @xcode<@b<function> "+" (Right : Complex_Vector) @b<return> Complex_Vector; @@ -1945,12 +1945,12 @@ @xindent<Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index range of the result is Left'Range. -The exception Constraint_Error is raised if Left'Length is not equal to +Constraint_Error is raised if Left'Length is not equal to Right'Length.> @xcode<@b<function> "*" (Left, Right : Complex_Vector) @b<return> Complex;> -@xindent<This operation returns the inner product of Left and Right. The exception +@xindent<This operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. This operation involves an inner product.> @@ -1966,13 +1966,13 @@ @xindent<Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index range of the result is Left'Range. -The exception Constraint_Error is raised if Left'Length is not equal to +Constraint_Error is raised if Left'Length is not equal to Right'Length.> @xcode<@b<function> "*" (Left : Real_Vector; Right : Complex_Vector) @b<return> Complex; @b<function> "*" (Left : Complex_Vector; Right : Real_Vector) @b<return> Complex;> -@xindent<Each operation returns the inner product of Left and Right. The exception +@xindent<Each operation returns the inner product of Left and Right. Constraint_Error is raised if Left'Length is not equal to Right'Length. These operations involve an inner product.> @@ -2008,7 +2008,7 @@ @xindent<This function returns a "unit vector" with Order components and a lower bound of First. All components are set to (0.0,0.0) except for the Index -component which is set to (1.0,0.0). The exception Constraint_Error is +component which is set to (1.0,0.0). Constraint_Error is raised if Index < First, Index @> First + Order - 1, or if First + Order - 1 @> Integer'Last.> @@ -2023,7 +2023,7 @@ @xindent<Each procedure replaces the specified (cartesian) component of each of the components of X by the value of the matching component of Re or Im; the other -(cartesian) component of each of the components is unchanged. The exception +(cartesian) component of each of the components is unchanged. Constraint_Error is raised if X'Length(1) is not equal to Re'Length(1) or Im'Length(1) or if X'Length(2) is not equal to Re'Length(2) or Im'Length(2).> @@ -2033,7 +2033,7 @@ @xindent<Each function constructs a matrix of Complex results (in cartesian representation) formed from given matrices of cartesian components; when only the real components are given, imaginary components of zero are -assumed. The index ranges of the result are those of Re. The exception +assumed. The index ranges of the result are those of Re. Constraint_Error is raised if Re'Length(1) is not equal to Im'Length(1) or Re'Length(2) is not equal to Im'Length(2).> @@ -2058,7 +2058,7 @@ representation) formed from given matrices of polar components using the corresponding function in Numerics.Generic_Complex_Types on matching components of Modulus and Argument. The index ranges of the result are those -of Modulus. The exception Constraint_Error is raised if Modulus'Length(1) is +of Modulus. Constraint_Error is raised if Modulus'Length(1) is not equal to Argument'Length(1) or Modulus'Length(2) is not equal to Argument'Length(2).> @@ -2086,14 +2086,14 @@ @xindent<Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of Left and the matching component of Right. The index ranges of the result are those of -Left. The exception Constraint_Error is raised if Left'Length(1) is not equal to +Left. Constraint_Error is raised if Left'Length(1) is not equal to Right'Length(1) or Left'Length(2) is not equal to Right'Length(2).> @xcode<@b<function> "*" (Left, Right : Complex_Matrix) @b<return> Complex_Matrix;> @xindent<This operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). This operation involves inner products.> @@ -2110,7 +2110,7 @@ @xindent<This operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). This operation involves inner products.> @@ -2119,7 +2119,7 @@ @xindent<This operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. This operation involves inner products.> @@ -2145,7 +2145,7 @@ @xindent<Each operation provides the standard mathematical operation for matrix multiplication. The first and second index ranges of the result are -Left'Range(1) and Right'Range(2) respectively. The exception +Left'Range(1) and Right'Range(2) respectively. Constraint_Error is raised if Left'Length(2) is not equal to Right'Length(1). These operations involve inner products.> @@ -2167,7 +2167,7 @@ @xindent<Each operation provides the standard mathematical operation for multiplication of a (row) vector Left by a matrix Right. The index range of the (row) vector -result is Right'Range(2). The exception Constraint_Error is raised if +result is Right'Range(2). Constraint_Error is raised if Left'Length is not equal to Right'Length(1). These operations involve inner products.> @@ -2178,7 +2178,7 @@ @xindent<Each operation provides the standard mathematical operation for multiplication of a matrix Left by a (column) vector Right. The index range of the (column) -vector result is Left'Range(1). The exception Constraint_Error is raised if +vector result is Left'Range(1). Constraint_Error is raised if Left'Length(2) is not equal to Right'Length. These operations involve inner products.> @@ -2208,7 +2208,7 @@ @xindent<Each operation returns the result of applying the corresponding operation in Numerics.Generic_Complex_Types to each component of the matrix Left and the -scalar Right. The index ranges of the result are those of Left.> +real number Right. The index ranges of the result are those of Left.> @xcode<@b<function> Solve (A : Complex_Matrix; X: Complex_Vector) @b<return> Complex_Vector;> @@ -2228,10 +2228,10 @@ @xcode<@b<function> Inverse (A : Complex_Matrix) @b<return> Complex_Matrix;> -@xindent<This function returns a matrix B such that A * B is (nearly) the unit matrix. -The index ranges of the result are those of A. Constraint_Error is raised if -A'Length(1) is not equal to A'Length(2). Constraint_Error is raised if -the matrix A is ill-conditioned.> +@xindent<This function returns a matrix B such that A * B is (nearly) equal to +the unit matrix. The index ranges of the result are those of A. +Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). +Constraint_Error is raised if the matrix A is ill-conditioned.> @xcode<@b<function> Determinant (A : Complex_Matrix) @b<return> Complex;> @@ -2241,9 +2241,9 @@ @xcode<@b<function> Eigenvalues(A : Complex_Matrix) @b<return> Real_Vector;> @xindent<This function returns the eigenvalues of the Hermitian matrix A as a vector -sorted into order with the largest first. The exception Constraint_Error is +sorted into order with the largest first. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index range of the -result is A'Range(1). The exception Argument_Error is raised if the matrix A +result is A'Range(1). Argument_Error is raised if the matrix A is not Hermitian.> @xcode<@b<procedure> Eigensystem(A : @b<in> Complex_Matrix; @@ -2255,9 +2255,9 @@ function Eigenvalues. The out parameter Vectors is a matrix whose columns are the eigenvectors of the matrix A. The order of the columns corresponds to the order of the eigenvalues. The eigenvectors are mutually orthonormal, -including when there are repeated eigenvalues. The exception Constraint_Error is +including when there are repeated eigenvalues. Constraint_Error is raised if A'Length(1) is not equal to A'Length(2). The index ranges of the -parameter Vectors are those of A. The exception Argument_Error is raised if the +parameter Vectors are those of A. Argument_Error is raised if the matrix A is not Hermitian.> @xcode<@b<function> Unit_Matrix (Order : Positive; @@ -2267,7 +2267,7 @@ @xindent<This function returns a square "unit matrix" with Order**2 components and lower bounds of First_1 and First_2 (for the first and second index ranges respectively). All components are set to (0.0,0.0) except for the main diagonal, -whose components are set to (1.0,0.0). The exception Constraint_Error is raised +whose components are set to (1.0,0.0). Constraint_Error is raised if First_1 + Order - 1 @> Integer'Last or First_2 + Order - 1 @> Integer'Last.> @i<@s8<Implementation Requirements>>

Questions? Ask the ACAA Technical Agent