1. -- 
  2. -- Jan & Uwe R. Zimmer, Australia, September 2019 
  3. -- 
  4.  
  5. generic 
  6.  
  7.    type Integer_Type is range <>; 
  8.    type Coordinates is (<>); 
  9.  
  10. package Vectors_xD_I is 
  11.  
  12.    pragma Elaborate_Body; 
  13.  
  14.    type Vector_xD_I is array (Coordinates) of Integer_Type; 
  15.  
  16.    Zero_Vector_xD : constant Vector_xD_I := (others => Integer_Type'First); 
  17.  
  18.    function Image (V : Vector_xD_I) return String; 
  19.  
  20.    function Norm (V : Vector_xD_I) return Vector_xD_I; 
  21.  
  22.    function "*" (Scalar : Float; V : Vector_xD_I) return Vector_xD_I; 
  23.    function "*" (V : Vector_xD_I; Scalar : Float) return Vector_xD_I; 
  24.    function "/" (V : Vector_xD_I; Scalar : Float) return Vector_xD_I; 
  25.  
  26.    function "*" (V_Left, V_Right : Vector_xD_I) return Float; 
  27.  
  28.    function Angle_Between (V_Left, V_Right : Vector_xD_I) return Float; 
  29.  
  30.    function "+" (V_Left, V_Right : Vector_xD_I) return Vector_xD_I; 
  31.    function "-" (V_Left, V_Right : Vector_xD_I) return Vector_xD_I; 
  32.    function "-" (V : Vector_xD_I)               return Vector_xD_I; 
  33.  
  34.    function "abs" (V : Vector_xD_I) return Float; 
  35.  
  36. end Vectors_xD_I;