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

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

1.1       maekawa     1: package body Generic_Matrices_io is
                      2:
                      3:   use Ring_io;
                      4:
                      5:   procedure get ( m : out Matrix ) is
                      6:   begin
                      7:     get(Standard_Input,m);
                      8:   end get;
                      9:
                     10:   procedure get ( m : out Matrix; rw1,rw2 : in integer ) is
                     11:   begin
                     12:     get(Standard_Input,m,rw1,rw2);
                     13:   end get;
                     14:
                     15:   procedure get ( file : in file_type; m : out Matrix ) is
                     16:   begin
                     17:     for i in m'range(1) loop
                     18:       for j in m'range(2) loop
                     19:         get(file,m(i,j));
                     20:       end loop;
                     21:     end loop;
                     22:   end get;
                     23:
                     24:   procedure get ( file : in file_type;
                     25:                   m : out Matrix; rw1,rw2 : in integer ) is
                     26:   begin
                     27:     for i in rw1..rw2 loop
                     28:       for j in m'range(2) loop
                     29:         get(file,m(i,j));
                     30:       end loop;
                     31:     end loop;
                     32:   end get;
                     33:
                     34:   procedure put ( m : in Matrix ) is
                     35:   begin
                     36:     put(Standard_Output,m);
                     37:   end put;
                     38:
                     39:   procedure put ( m : in Matrix; rw1,rw2 : in integer ) is
                     40:   begin
                     41:     put(Standard_Output,m,rw1,rw2);
                     42:   end put;
                     43:
                     44:   procedure put ( file : in file_type; m : in Matrix ) is
                     45:   begin
                     46:     for i in m'range(1) loop
                     47:       for j in m'range(2) loop
                     48:         put(file,' '); put(file,m(i,j));
                     49:       end loop;
                     50:       new_line(file);
                     51:     end loop;
                     52:   end put;
                     53:
                     54:   procedure put ( file : in file_type; m : in Matrix; rw1,rw2 : in integer ) is
                     55:   begin
                     56:     for i in rw1..rw2 loop
                     57:       for j in m'range(2) loop
                     58:         put(file,' '); put(file,m(i,j));
                     59:       end loop;
                     60:       new_line(file);
                     61:     end loop;
                     62:   end put;
                     63:
                     64:   procedure put ( m : in Matrix; dp : in natural ) is
                     65:   begin
                     66:     put(Standard_Output,m,dp);
                     67:   end put;
                     68:
                     69:   procedure put ( m : in Matrix; rw1,rw2 : in integer; dp : in natural ) is
                     70:   begin
                     71:     put(Standard_Output,m,rw1,rw2,dp);
                     72:   end put;
                     73:
                     74:   procedure put ( file : in file_type; m : in Matrix; dp : in natural ) is
                     75:   begin
                     76:     for i in m'range(1) loop
                     77:       for j in m'range(2) loop
                     78:         put(file,' '); put(file,m(i,j),dp);
                     79:       end loop;
                     80:       new_line(file);
                     81:     end loop;
                     82:   end put;
                     83:
                     84:   procedure put ( file : in file_type;
                     85:                   m : in Matrix; rw1,rw2 : in integer; dp : in natural ) is
                     86:   begin
                     87:     for i in rw1..rw2 loop
                     88:       for j in m'range(2) loop
                     89:         put(file,' '); put(file,m(i,j),dp);
                     90:       end loop;
                     91:       new_line(file);
                     92:     end loop;
                     93:   end put;
                     94:
                     95: end Generic_Matrices_io;

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