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

File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices / generic_vecmats_io.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:24 2000 UTC (23 years, 7 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with integer_io;                         use integer_io;

package body Generic_VecMats_io is

  use Matrices,Matrices_io;

  procedure get ( n : in natural; v : in out VecMat ) is
  begin
    get(Standard_Input,n,v);
  end get;

  procedure get ( file : in file_type; n : in natural; v : in out VecMat ) is

    n1,n2 : natural;

  begin
    for i in v'range loop
      get(file,n1);
      get(file,n2);
      v(i) := new Matrix(1..n1,1..n2);
      get(file,v(i).all);
    end loop;
  end get;

  procedure get ( n,n1,n2 : in natural; v : in out Link_to_VecMat ) is
  begin
    get(Standard_Input,n,n1,n2,v);
  end get;

  procedure get ( file : in file_type; n,n1,n2 : in natural;
                  v : in out Link_to_VecMat ) is
  begin
    v := new VecMat(1..n);
    for i in 1..n loop
      v(i) := new Matrix(1..n1,1..n2);
      get(file,v(i).all);
    end loop;
  end get;

  procedure put ( v : in VecMat ) is
  begin
    put(Standard_Output,v);
  end put;

  procedure put ( file : in file_type; v : in VecMat ) is
  begin
    for i in v'range loop
      put(file,v(i).all); new_line(file);
    end loop;
  end put;

  procedure put ( v : in Link_to_VecMat ) is
  begin
    put(Standard_Output,v);
  end put;

  procedure put ( file : in file_type; v : in Link_to_VecMat ) is
  begin
    if v /= null
     then put(file,v.all);
    end if;
  end put;

  procedure put ( v : in VecMat; dp : in natural ) is
  begin
    put(Standard_Output,v,dp);
  end put;

  procedure put ( file : in file_type; v : in VecMat; dp : in natural ) is
  begin
    for i in v'range loop
      put(file,v(i).all,dp); new_line(file);
    end loop;
  end put;

  procedure put ( v : in Link_to_VecMat; dp : in natural ) is
  begin
    put(Standard_Output,v,dp);
  end put;

  procedure put ( file : in file_type;
                  v : in Link_to_VecMat; dp : in natural ) is
  begin
    if v /= null
     then put(file,v.all,dp);
    end if;
  end put;

end Generic_VecMats_io;