reservoir-QR.c
1.18 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
if (N >= 1) {
S1(0);
if (N == 1) {
for (int c1 = 0; c1 < M; c1 += 1)
S2(0, c1);
S3(0);
for (int c1 = 0; c1 < M; c1 += 1)
S4(0, c1);
S10(0);
S5(0);
} else {
for (int c1 = 0; c1 < M; c1 += 1)
S2(0, c1);
S3(0);
for (int c1 = 0; c1 < M; c1 += 1)
S4(0, c1);
S10(0);
S1(1);
S5(0);
}
for (int c0 = 2; c0 < N; c0 += 1) {
for (int c1 = c0 - 1; c1 < N; c1 += 1) {
S6(c0 - 2, c1);
for (int c2 = c0 - 2; c2 < M; c2 += 1)
S7(c0 - 2, c1, c2);
S8(c0 - 2, c1);
for (int c2 = c0 - 2; c2 < M; c2 += 1)
S9(c0 - 2, c1, c2);
}
for (int c1 = c0 - 1; c1 < M; c1 += 1)
S2(c0 - 1, c1);
S3(c0 - 1);
for (int c1 = c0 - 1; c1 < M; c1 += 1)
S4(c0 - 1, c1);
S10(c0 - 1);
S1(c0);
S5(c0 - 1);
}
if (N >= 2) {
S6(N - 2, N - 1);
for (int c2 = N - 2; c2 < M; c2 += 1)
S7(N - 2, N - 1, c2);
S8(N - 2, N - 1);
for (int c2 = N - 2; c2 < M; c2 += 1)
S9(N - 2, N - 1, c2);
for (int c1 = N - 1; c1 < M; c1 += 1)
S2(N - 1, c1);
S3(N - 1);
for (int c1 = N - 1; c1 < M; c1 += 1)
S4(N - 1, c1);
S10(N - 1);
S5(N - 1);
}
}