[BACK]Return to multprec_random_matrices.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Matrices/multprec_random_matrices.adb, Revision 1.1.1.1

1.1       maekawa     1: with Multprec_Random_Numbers;            use Multprec_Random_Numbers;
                      2:
                      3: package body Multprec_Random_Matrices is
                      4:
                      5:   function Random_Matrix ( n,m,sz : natural )
                      6:                          return Multprec_Integer_Matrices.Matrix is
                      7:
                      8:     res : Multprec_Integer_Matrices.Matrix(1..n,1..m);
                      9:
                     10:   begin
                     11:     for i in 1..n loop
                     12:       for j in 1..m loop
                     13:         res(i,j) := Random(sz);
                     14:       end loop;
                     15:     end loop;
                     16:     return res;
                     17:   end Random_Matrix;
                     18:
                     19:   function Random_Matrix ( n,m,sz : natural )
                     20:                          return Multprec_Floating_Matrices.Matrix is
                     21:
                     22:     res : Multprec_Floating_Matrices.Matrix(1..n,1..m);
                     23:
                     24:   begin
                     25:     for i in 1..n loop
                     26:       for j in 1..m loop
                     27:         res(i,j) := Random(sz);
                     28:       end loop;
                     29:     end loop;
                     30:     return res;
                     31:   end Random_Matrix;
                     32:
                     33:   function Random_Matrix ( n,m,sz : natural )
                     34:                          return Multprec_Complex_Matrices.Matrix is
                     35:
                     36:     res : Multprec_Complex_Matrices.Matrix(1..n,1..m);
                     37:
                     38:   begin
                     39:     for i in 1..n loop
                     40:       for j in 1..m loop
                     41:         res(i,j) := Random(sz);
                     42:       end loop;
                     43:     end loop;
                     44:     return res;
                     45:   end Random_Matrix;
                     46:
                     47: end Multprec_Random_Matrices;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>