Overview
Comment:Put include files here.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: fa65177b543efe092234cdf7eacb5c3aed3892a8d69422a42a29f6d6dbb54e03
User & Date: gawthrop@users.sourceforge.net on 1999-10-26 23:37:20
Other Links: branch diff | manifest | tags
Context
1999-10-26
23:40:37
Put small as a constant - now has same arg list as mtt_solve_lud check-in: 126fc22ab7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
23:37:20
Put include files here. check-in: fa65177b54 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1999-10-22
02:20:32
Changed error handleing of number of attributes >2 check-in: 02618a072e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/p/mtt_solve_lud.p from [25bf4234bb] to [5a83c53fd8].

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
PROCEDURE mtt_solve_lud(VAR x     : StateVector;
			A     : StateMatrix;
		        B     : StateVector;
			n     : integer);




{
Linear equation solution via LU factorisation

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$



% % Revision 1.1  1998/08/17 12:52:16  peterg
% % Initial revision
% %
% % Revision 1.1  1998/08/17 12:41:37  peterg
% % Initial revision
% %
% % Revision 1.2  1998/08/14 12:09:13  peterg
% % A passed by value - its destroyed by SVDcm
% %
% % Revision 1.1  1998/08/13 08:51:57  peterg
% % Initial revision
% %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 }

VAR
   i	 : integer;
   d	 : real;
   Index : StateVector;

(*$I mtt_ludcmp.p *)
(*$I mtt_lubksb.p *)

BEGIN{mtt_solve}
   (* decompose matrix A using LU decomposition *)
   mtt_ludcmp(A,n,Index,d);
   
   (* backsubstitute for B *)
   mtt_lubksb(A,n,Index,B);

   (* x now lives in B *)
   FOR i := 1 TO n DO
      x[i] := B[i];
   
END{mtt_solve};











>
>
>








>
>
>




















<
<

|










|






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
PROCEDURE mtt_solve_lud(VAR x     : StateVector;
			A     : StateMatrix;
		        B     : StateVector;
			n     : integer);

(*$I $MTTPATH/trans/p/mtt_ludcmp.p *)
(*$I $MTTPATH/trans/p/mtt_lubksb.p *)

{
Linear equation solution via LU factorisation

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$
% % Revision 1.2  1998/08/17 15:56:10  peterg
% % Uses LU decomposition - much faster than SVD when N>100
% %
% % Revision 1.1  1998/08/17 12:52:16  peterg
% % Initial revision
% %
% % Revision 1.1  1998/08/17 12:41:37  peterg
% % Initial revision
% %
% % Revision 1.2  1998/08/14 12:09:13  peterg
% % A passed by value - its destroyed by SVDcm
% %
% % Revision 1.1  1998/08/13 08:51:57  peterg
% % Initial revision
% %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 }

VAR
   i	 : integer;
   d	 : real;
   Index : StateVector;




BEGIN{mtt_solve_lud}
   (* decompose matrix A using LU decomposition *)
   mtt_ludcmp(A,n,Index,d);
   
   (* backsubstitute for B *)
   mtt_lubksb(A,n,Index,B);

   (* x now lives in B *)
   FOR i := 1 TO n DO
      x[i] := B[i];
   
END{mtt_solve_lud};







MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]