-
Notifications
You must be signed in to change notification settings - Fork 0
/
sort.h
68 lines (64 loc) · 2.6 KB
/
sort.h
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
enum {
NCOLUMN_BREAKS = 11,
};
// column break points
short SORT_BREAK_POINTS[NCOLUMN_BREAKS] = {
5, 87, 170, 358, 567, 720, 850, 997, 1120, 1275, 1600,
};
// relative row that the pixel comes from
short SORT_FIRST[NDETECTORS][NCOLUMN_BREAKS] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{+8, +8, +8, 0, 0, 0, 0, 0, 0, 0, 0},
{+8, -1, -1, +7, 0, 0, 0, 0, 0, 0, 0},
{-2, +7, +7, -1, +6, 0, 0, 0, 0, 0, 0},
{+7, -2, -2, +6, -1, +5, 0, 0, 0, 0, 0},
{-3, +6, +6, -2, +5, -1, +4, 0, 0, 0, 0},
{+6, -3, -3, +5, -2, +4, -1, +3, 0, 0, 0},
{-4, +5, +5, -3, +4, -2, +3, -1, +2, 0, 0},
{+5, -4, -4, +4, -3, +3, -2, +2, -1, +1, 0},
};
// relative row that the pixel comes from
short SORT_MID[NDETECTORS][NCOLUMN_BREAKS] = {
{-5, +4, +4, -4, +3, -3, +2, -2, +1, -1, 0},
{+4, -5, -5, +3, -4, +2, -3, +1, -2, 0, 0},
{-6, +3, +3, -5, +2, -4, +1, -3, 0, 0, 0},
{+3, -6, -6, +2, -5, +1, -4, 0, 0, 0, 0},
{-7, +2, +2, -6, +1, -5, 0, 0, 0, 0, 0},
{+11, -7, -7, +1, -6, 0, 0, 0, 0, 0, 0},
{+1, +1, +1, -7, 0, 0, 0, 0, 0, 0, 0},
{-9, +9, -8, 0, 0, 0, 0, 0, 0, 0, 0},
{+9, -9, +8, 0, 0, 0, 0, 0, 0, 0, 0},
{-1, -1, -1, +7, 0, 0, 0, 0, 0, 0, 0},
{-11, +7, +7, -1, +6, 0, 0, 0, 0, 0, 0},
{+7, -2, -2, +6, -1, +5, 0, 0, 0, 0, 0},
{-3, +6, +6, -2, +5, -1, +4, 0, 0, 0, 0},
{+6, -3, -3, +5, -2, +4, -1, +3, 0, 0, 0},
{-4, +5, +5, -3, +4, -2, +3, -1, +2, 0, 0},
{+5, -4, -4, +4, -3, +3, -2, +2, -1, +1, 0},
};
// relative row that the pixel comes from
short SORT_LAST[NDETECTORS][NCOLUMN_BREAKS] = {
{-5, +4, +4, -4, +3, -3, +2, -2, +1, -1, 0},
{+4, -5, -5, +3, -4, +2, -3, +1, -2, 0, 0},
{-6, +3, +3, -5, +2, -4, +1, -3, 0, 0, 0},
{+3, -6, -6, +2, -5, +1, -4, 0, 0, 0, 0},
{-7, +2, +2, -6, +1, -5, 0, 0, 0, 0, 0},
{+2, -7, -7, +1, -6, 0, 0, 0, 0, 0, 0},
{-8, +1, +1, -7, 0, 0, 0, 0, 0, 0, 0},
{-8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
};