[BACK]Return to generic_vecmats.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.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 unchecked_deallocation;

package body Generic_VecMats is

  procedure Clear ( v : in out VecMat ) is
  begin
    for i in v'range loop
      Matrices.Clear(v(i));
    end loop;
  end Clear;

  procedure Shallow_Clear ( v : in out Link_to_VecMat ) is

    procedure free is new unchecked_deallocation(VecMat,Link_to_VecMat);

  begin
    free(v);
  end Shallow_Clear;

  procedure Deep_Clear ( v : in out Link_to_VecMat ) is
  begin
    if v /= null
     then Clear(v.all);
          Shallow_Clear(v);
    end if;
  end Deep_Clear;

end Generic_VecMats;