Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: d611ac00e5aca1c90f6a2a711f170fd25b4451678cbc59b1e00bd76efb532f11
User & Date: gawthrop@users.sourceforge.net on 1998-01-22 10:39:01
Other Links: branch diff | manifest | tags
Context
1998-01-22
13:17:37
Initial revision check-in: 1d53b14dfc user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:39:01
Initial revision check-in: d611ac00e5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:59:36
Initial revision check-in: 4752205790 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/reduce_matrix.r version [eb3b78baaa].







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     %%%%% Model Transformation Tools %%%%%
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Reduce function to write matrices in reduce form
% P.J.Gawthrop  January 22 1998
% Copyright (c) P.J.Gawthrop, 1998


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




PROCEDURE Reduce_Matrix;
BEGIN
  IF MTT_Matrix_n>0 THEN
    IF MTT_Matrix_m>0 THEN
    BEGIN
     write "MATRIX ", MTT_Matrix_name, "(", MTT_Matrix_n, ",",
                                            MTT_Matrix_m, ");";
    
    FOR i := 1:MTT_Matrix_n DO
      FOR j := 1:MTT_Matrix_m DO IF MTT_Matrix(i,j) NEQ 0 THEN
        write MTT_Matrix_name, "(", i, ",", j, ") := ",
                                            MTT_Matrix(i,j), ";";
    END;
END;

END;;


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