File: test_makeCappedVolumeBox.R

package info (click to toggle)
r-bioc-delayedarray 0.24.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,480 kB
  • sloc: ansic: 727; makefile: 2
file content (200 lines) | stat: -rw-r--r-- 7,719 bytes parent folder | download | duplicates (3)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#setAutoRealizationBackend("RleArray")
#setAutoRealizationBackend("HDF5Array")

test_make_capped_volume_hypercube_box <- function()
{
    make_capped_volume_hypercube_box <-
        DelayedArray:::.make_capped_volume_hypercube_box

    refdim <- c(15L, 10L, 5L, 8L, 10L)

    target <- c( 3L,  3L, 3L, 3L,  3L)
    current <- make_capped_volume_hypercube_box(243L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(323L, refdim)
    checkIdentical(target, current)

    target <- c( 3L,  3L, 3L, 4L,  3L)
    current <- make_capped_volume_hypercube_box(324L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(431L, refdim)
    checkIdentical(target, current)

    target <- c( 3L,  4L, 3L, 4L,  3L)
    current <- make_capped_volume_hypercube_box(432L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(575L, refdim)
    checkIdentical(target, current)

    target <- c( 3L,  4L, 3L, 4L,  4L)
    current <- make_capped_volume_hypercube_box(576L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(767L, refdim)
    checkIdentical(target, current)

    target <- c( 4L,  4L, 3L, 4L,  4L)
    current <- make_capped_volume_hypercube_box(768L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(1023L, refdim)
    checkIdentical(target, current)

    target <- c( 4L,  4L, 4L, 4L,  4L)
    current <- make_capped_volume_hypercube_box(1024L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(1279L, refdim)
    checkIdentical(target, current)

    target <- c( 4L,  4L, 5L, 4L,  4L)
    current <- make_capped_volume_hypercube_box(1280L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(1599L, refdim)
    checkIdentical(target, current)

    target <- c( 4L,  5L, 5L, 4L,  4L)
    current <- make_capped_volume_hypercube_box(1600L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(1999L, refdim)
    checkIdentical(target, current)

    target <- c( 4L,  5L, 5L, 4L,  5L)
    current <- make_capped_volume_hypercube_box(2000L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(2499L, refdim)
    checkIdentical(target, current)

    target <- c( 5L,  5L, 5L, 4L,  5L)
    current <- make_capped_volume_hypercube_box(2500L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(3124L, refdim)
    checkIdentical(target, current)

    target <- c( 5L,  5L, 5L, 5L,  5L)
    current <- make_capped_volume_hypercube_box(3125L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(3749L, refdim)
    checkIdentical(target, current)

    target <- c( 6L,  5L, 5L, 5L,  5L)
    current <- make_capped_volume_hypercube_box(3750L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(4499L, refdim)
    checkIdentical(target, current)

    target <- c( 6L,  6L, 5L, 5L,  5L)
    current <- make_capped_volume_hypercube_box(4500L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(5399L, refdim)
    checkIdentical(target, current)

    target <- c( 6L,  6L, 5L, 6L,  5L)
    current <- make_capped_volume_hypercube_box(5400L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(6479L, refdim)
    checkIdentical(target, current)

    target <- c( 6L,  6L, 5L, 6L,  6L)
    current <- make_capped_volume_hypercube_box(6480L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(7559L, refdim)
    checkIdentical(target, current)

    target <- c( 7L,  6L, 5L, 6L,  6L)
    current <- make_capped_volume_hypercube_box(7560L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(8819L, refdim)
    checkIdentical(target, current)

    target <- c( 7L,  7L, 5L, 6L,  6L)
    current <- make_capped_volume_hypercube_box(8820L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(10289L, refdim)
    checkIdentical(target, current)

    target <- c( 7L,  7L, 5L, 7L,  6L)
    current <- make_capped_volume_hypercube_box(10290L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(12004L, refdim)
    checkIdentical(target, current)

    target <- c( 7L,  7L, 5L, 7L,  7L)
    current <- make_capped_volume_hypercube_box(12005L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(13719L, refdim)
    checkIdentical(target, current)

    target <- c( 7L,  7L, 5L, 8L,  7L)
    current <- make_capped_volume_hypercube_box(13720L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(15679L, refdim)
    checkIdentical(target, current)

    target <- c( 8L,  7L, 5L, 8L,  7L)
    current <- make_capped_volume_hypercube_box(15680L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(17919L, refdim)
    checkIdentical(target, current)

    target <- c( 8L,  8L, 5L, 8L,  7L)
    current <- make_capped_volume_hypercube_box(17920L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(20479L, refdim)
    checkIdentical(target, current)

    target <- c( 8L,  8L, 5L, 8L,  8L)
    current <- make_capped_volume_hypercube_box(20480L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(23039L, refdim)
    checkIdentical(target, current)

    target <- c( 9L,  8L, 5L, 8L,  8L)
    current <- make_capped_volume_hypercube_box(23040L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(25919L, refdim)
    checkIdentical(target, current)

    target <- c( 9L,  9L, 5L, 8L,  8L)
    current <- make_capped_volume_hypercube_box(25920L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(29159L, refdim)
    checkIdentical(target, current)

    target <- c( 9L,  9L, 5L, 8L,  9L)
    current <- make_capped_volume_hypercube_box(29160L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(32399L, refdim)
    checkIdentical(target, current)

    target <- c( 9L, 10L, 5L, 8L,  9L)
    current <- make_capped_volume_hypercube_box(32400L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(35999L, refdim)
    checkIdentical(target, current)

    target <- c( 9L, 10L, 5L, 8L, 10L)
    current <- make_capped_volume_hypercube_box(36000L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(39999L, refdim)
    checkIdentical(target, current)

    target <- c( 10L, 10L, 5L, 8L, 10L)
    current <- make_capped_volume_hypercube_box(40000L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(43999L, refdim)
    checkIdentical(target, current)

    target <- c( 11L, 10L, 5L, 8L, 10L)
    current <- make_capped_volume_hypercube_box(44000L, refdim)
    checkIdentical(target, current)
    current <- make_capped_volume_hypercube_box(47999L, refdim)
    checkIdentical(target, current)

    refvol <- as.integer(prod(refdim))

    target <- c( 14L, 10L, 5L, 8L, 10L)
    current <- make_capped_volume_hypercube_box(refvol-1L, refdim)
    checkIdentical(target, current)

    current <- make_capped_volume_hypercube_box(refvol, refdim)
    checkIdentical(refdim, current)
}