aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/95-homologie/hx.m
blob: 0003e76b64b0f47cdecc16450f4e01d0fd535f5c (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
split_long_rows(0)

d = [
#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
-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  1
 1,-1, 0, 0, 0,-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  2
 0, 1,-1, 0, 0, 0, 0,-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  3
 0, 0, 1,-1, 0, 0, 0, 0, 0,-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  4
 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  5
 0, 0, 0, 0,-1, 1, 0, 0, 0, 0, 0, 0,-1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  6
 0, 0, 0, 0, 0, 0,-1, 1, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; #  7
 0, 0, 0, 0, 0, 0, 0,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-1,-1, 1; # 19
 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0; # 20
 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,-1, 1; # 21
 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0; # 22
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,-1; # 23
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0; # 24
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0; # 25
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1; # 26
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1  # 27
]

d * Z

T = zeros(22, 9);
T(1:9,1:27) = B';
T(10:22,1:27) = Z';

T

for i = (2:22)
	T(i,:) = T(i,:) - T(i,1) * T(1,:);
end
for i = (3:22)
	T(i,:) = T(i,:) - T(i,2) * T(2,:);
end
for i = (4:22)
	T(i,:) = T(i,:) - T(i,3) * T(3,:);
end
for i = (5:22)
	T(i,:) = T(i,:) - T(i,4) * T(4,:);
end

T

for i = (15:22)
	T(i,:) = T(i,:) - T(i,6) * T(14,:);
end
T
for i = (19:22)
	T(i,:) = T(i,:) - T(i,8) * T(18,:);
end
T
for i = (16:22)
	T(i,:) = T(i,:) - T(i,10) * T(15,:);
end
T
for i = (6:22)
	T(i,:) = T(i,:) - T(i,13) * T(5,:);
end
T
for i = (7:22)
	T(i,:) = T(i,:) - T(i,14) * T(6,:);
end
T
for i = (8:22)
	T(i,:) = T(i,:) - T(i,19) * T(7,:);
end
T
for i = (9:22)
	T(i,:) = T(i,:) - T(i,20) * T(8,:);
end
T
for i = (22:22)
	T(i,:) = T(i,:) - T(i,22) * T(21,:);
end
T
for i = (10:22)
	T(i,:) = T(i,:) - T(i,25) * T(9,:);
end
#
T