Annotation of OpenXM_contrib/PHC/Ada/Schubert/ts_matinv.adb, Revision 1.1.1.1
1.1 maekawa 1: with text_io,integer_io; use text_io,integer_io;
2: with Standard_Floating_Matrices; use Standard_Floating_Matrices;
3: with Standard_Floating_Matrices_io; use Standard_Floating_Matrices_io;
4: with Standard_Complex_Matrices; use Standard_Complex_Matrices;
5: with Standard_Complex_Matrices_io; use Standard_Complex_Matrices_io;
6: with Standard_Random_Matrices; use Standard_Random_Matrices;
7: with Standard_Matrix_Inversion; use Standard_Matrix_Inversion;
8:
9: procedure ts_matinv is
10:
11: -- DESCRIPTION :
12: -- Test on matrix inversion.
13:
14: procedure Main is
15:
16: n : natural;
17:
18: begin
19: put("Give the dimension : "); get(n);
20: declare
21: cmpmat : Standard_Complex_Matrices.Matrix(1..n,1..n)
22: := Random_Matrix(n,n);
23: invcmp : Standard_Complex_Matrices.Matrix(1..n,1..n) := Inverse(cmpmat);
24: fltmat : Standard_Floating_Matrices.Matrix(1..n,1..n)
25: := Random_Matrix(n,n);
26: invflt : Standard_Floating_Matrices.Matrix(1..n,1..n) := Inverse(fltmat);
27: begin
28: put_line("Test on complex matrix inversion : ");
29: put(cmpmat*invcmp,3);
30: put_line("Test on commutativity with complex matrix inversion : ");
31: put(invcmp*cmpmat,3);
32: put_line("Test on floating matrix inversion : ");
33: put(fltmat*invflt,3);
34: put_line("Test on commutativity with floating matrix inversion : ");
35: put(invflt*fltmat,3);
36: end;
37: end Main;
38:
39: begin
40: Main;
41: end ts_matinv;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>