-- complex_arrays.ads package specification with Ada.Numerics.Long_Complex_Types; use Ada.Numerics.Long_Complex_Types; with Real_Arrays; use Real_Arrays; package Complex_Arrays is -- Types -- type Complex_Vector is array (Integer range <>) of Complex; type Complex_Matrix is array (Integer range <>, Integer range <>) of Complex; -- SUBPROGRAMS for Complex_Vector TYPES -- -- Vector arithmetic operations -- function "+" (Right : Complex_Vector) return Complex_Vector; function "-" (Right : Complex_Vector) return Complex_Vector; function "abs" (Right : Complex_Vector) return Real_Vector; function Conjugate (Right : Complex_Vector) return Complex_Vector; function "+" (Left, Right : Complex_Vector) return Complex_Vector; function "-" (Left, Right : Complex_Vector) return Complex_Vector; function "*" (Left, Right : Complex_Vector) return Complex_Vector; function "/" (Left, Right : Complex_Vector) return Complex_Vector; function "*" (Left, Right : Complex_Vector) return Complex; -- Vector scaling operations -- function "*" (Left : Complex; Right : Complex_Vector) return Complex_Vector; function "*" (Left : Complex_Vector; Right : Complex) return Complex_Vector; function "/" (Left : Complex_Vector; Right : Complex) return Complex_Vector; -- other operations -- function UNIT_Vector (Index : Integer; Order : Positive; First : Integer := 1) return Complex_Vector; -- SUBPROGRAMS for Complex_Matrix TYPES -- -- Matrix arithmetic operations -- function "+" (Right : Complex_Matrix) return Complex_Matrix; function "-" (Right : Complex_Matrix) return Complex_Matrix; function "abs" (Right : Complex_Matrix) return Real_Matrix; function Conjugate (A : Complex_Matrix) return Complex_Matrix; function Transpose (A : Complex_Matrix) return Complex_Matrix; function "+" (Left, Right : Complex_Matrix) return Complex_Matrix; function "-" (Left, Right : Complex_Matrix) return Complex_Matrix; function "*" (Left, Right : Complex_Matrix) return Complex_Matrix; function "*" (Left, Right : Complex_Vector) return Complex_Matrix; function "*" (Left : Complex_Vector; Right : Complex_Matrix) return Complex_Vector; function "*" (Left : Complex_Matrix; Right : Complex_Vector) return Complex_Vector; -- Matrix scaling operations -- function "*" (Left : Complex; Right : Complex_Matrix) return Complex_Matrix; function "*" (Left : Complex_Matrix; Right : Complex) return Complex_Matrix; function "/" (Left : Complex_Matrix; Right : Complex) return Complex_Matrix; -- other operations -- function IDENTITY_Matrix (Order : Positive; First_1, First_2 : Integer := 1) return Complex_Matrix; -- EXCEPTIONS -- Array_Index_Error: exception; end Complex_Arrays;