Algorithm 1 False Reduction. | |
Input:
Output:
| |
1: for do |
|
2: for do | |
▹ Excepting the last two clips |
|
3: if matrix[i, j] ≠ matrix[i, ] then | |
4: if count(matrix[i, j] in matrix[i, to ]) > 1 then | |
5: matrix[i, ] ← not matrix[i, ] | |
6: end if | |
7: end if | |
8: end for | |
▹ Recheck the first two clips |
|
9: if matrix[i, 0 to 2] is not identical then | |
10: if matrix[i, 1] is not in matrix[i, 2 to 4] then | |
11: matrix[i, 1] ← not matrix[i, 1] | |
12: end if | |
13: if matrix[i, 0] not in matrix[i, 1 to 3] then | |
14: matrix[i, 0] ← not matrix[i, 0] | |
15: end if | |
16: end if | |
▹ For the last two clips |
|
17: if matrix[i, ] ≠ matrix[i, ] then | |
18: if matrix[i, ] ≠ matrix[i, ] then | |
19: matrix[i, ] ← not matrix[i, ] | |
20: end if | |
21: end if | |
22: if matrix[i, ] ≠ matrix[i, ] then | |
23: if matrix[i, ] = matrix[i, ] then | |
24: matrix[i, ] ← not matrix[i, ] | |
25: end if | |
26: end if | |
27: if matrix[i, ] = matrix[i, ] then | |
28: if matrix[i, ] not in matrix[i, to ] then | |
29: matrix[i, ] ← not matrix[i, ] | |
30: matrix[i, ] ← not matrix[i, ] | |
31: end if | |
32: end if | |
33: end for | |
34: |