Download this file

NumAlLib1.def    92 lines (82 with data), 6.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
DEFINITION MODULE NumAlLib1;
(*------------------------------------------------------------------------*)
(* Einige Routinen aus der NUMAL Numerical Algol library (Stichting CWI) *)
(* Teil 1 (numal5p1) *)
(* Some routinen from the NUMAL Numerical Algol library (Stichting CWI) *)
(*------------------------------------------------------------------------*)
(* Implementation : Michael Riedl *)
(* Licence : GNU Lesser General Public License (LGPL) *)
(*------------------------------------------------------------------------*)
(* $Id: NumAlLib1.def,v 1.1 2018/01/16 09:20:20 mriedl Exp $ *)
PROCEDURE ChlDec1(VAR A : ARRAY OF LONGREAL;
N : CARDINAL;
VAR iFehl : INTEGER;
eps : LONGREAL);
(*----------------------------------------------------------------*)
(* Performs the cholesky decomposition of a symmetric positive *)
(* definite matrix, whose upper triangle is stored in a one- *)
(* dimensional array, by cholesky's square root method without *)
(* pivoting. *)
(* *)
(* formal parameters: *)
(* *)
(* A : Array of dimension A[1 : N*(N+1)/2] *)
(* - on entry the upper-triangular part of the positive *)
(* definite symmetric matrix must be given columnwise *)
(* in array A (the (i,j)-th element of the matrix must *)
(* be given in a[(j-1)*j / 2 + i]; 1 <= i <= j <= n); *)
(* - on exit the cholesky decomposition of the matrix *)
(* is delivered columnwise in A. *)
(* N : the order of the matrix *)
(* iFehl : exit code *)
(* - for normal exit iFehl is 0 *)
(* - if the decomposition cannot be carried out because *)
(* the matrix is (numerically) not positive definite, *)
(* iFehl = k - 1, where k is the last stage number *)
(* (abnormal exit) *)
(* eps : a relative tolerance used to control the calculation *)
(* of the diagonal elements; *)
(* *)
(* Source: NUMAL Numerical Algol library (Stichting CWI) *)
(*----------------------------------------------------------------*)
PROCEDURE ChlSol1( N : CARDINAL;
VAR A : ARRAY OF LONGREAL; (* SUPERVEKTOR *)
VAR B : ARRAY OF LONGREAL);
(* ---------------------------------------------------------------*)
(* Calculates the solution of a system of linear equations, *)
(* provided that the coefficient matrix has been decomposed by a *)
(* successful call of chldec1 or chldecsol1. *)
(* Several systems with the same coefficient matrix but different *)
(* right hand sides can be solved by successive calls of chlsol1. *)
(* *)
(* formal parameters: *)
(* *)
(* N : the order of the matrix *)
(* A : the upper-triangular part of the cholesky matrix as *)
(* produced by ChlDec (the contents of A is not changed) *)
(* B : vector parameter *)
(* - On entry the right hand side ot the system of linear *)
(* equations *)
(* - On exit the solution of the system *)
(* *)
(* Source: NUMAL Numerical Algol library (Stichting CWI) *)
(*----------------------------------------------------------------*)
PROCEDURE ChlInv1(VAR A : ARRAY OF LONGREAL;
N : CARDINAL);
(*----------------------------------------------------------------*)
(* Calculated the inversion of a symmetric positive definite *)
(* matrix, if the matrix has been decomposed by a call of the *)
(* procedure ChlDec1 *)
(* *)
(* formal parameters: *)
(* *)
(* A : array A[1:(N+1)*N / 2] *)
(* on entry : upper-triangular part of the cholesky matrix *)
(* as produced by chldec1 columnwise in array a *)
(* on exit : upper-triangular part of the inverse matrix is *)
(* delivered columnwise in array a *)
(* N : the order of the matrix. *)
(* *)
(* Source: NUMAL Numerical Algol library (Stichting CWI) *)
(*----------------------------------------------------------------*)
END NumAlLib1.