wavelet-matrix 2.2.2__tar.gz → 2.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/.github/workflows/CI.yml +22 -26
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/Cargo.lock +19 -29
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/Cargo.toml +4 -5
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/PKG-INFO +1 -1
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/benchmarks/bench_disk_wavelet_matrix.py +11 -11
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/pyproject.toml +1 -1
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/disk_wavelet_matrix/disk_bit_vector.rs +88 -76
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/disk_wavelet_matrix/disk_wavelet_matrix.rs +57 -72
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/dynamic_wavelet_matrix/dynamic_wavelet_matrix.rs +2 -2
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/python/dynamic_wavelet_matrix.rs +61 -67
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/python/wavelet_matrix.rs +125 -106
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/wavelet_matrix/dynamic_wavelet_matrix.rs +2 -2
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/wavelet_matrix/wavelet_matrix.rs +12 -11
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/tests/test_disk_wavelet_matrix.py +1 -1
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/.gitignore +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/LICENSE +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/README.md +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/benchmarks/__init__.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/benchmarks/bench_dynamic_wavelet_matrix.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/benchmarks/bench_wavelet_matrix.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/docs/index.html +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/docs/wavelet_matrix.html +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/pdoc_templates/error.html.jinja2 +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/pdoc_templates/frame.html.jinja2 +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/pdoc_templates/index.html.jinja2 +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/pdoc_templates/module.html.jinja2 +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/disk_wavelet_matrix/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/dynamic_wavelet_matrix/dynamic_bit_vector.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/dynamic_wavelet_matrix/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/lib.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/python/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/bit_vector/bit_vector.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/bit_vector/dynamic_bit_vector.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/bit_vector/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/utils/bit_select.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/utils/bit_width.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/utils/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/wavelet_matrix/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/traits/wavelet_matrix/wavelet_matrix.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/wavelet_matrix/bit_vector.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/src/wavelet_matrix/mod.rs +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/tests/__init__.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/tests/test_dynamic_wavelet_matrix.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/tests/test_wavelet_matrix.py +0 -0
- {wavelet_matrix-2.2.2 → wavelet_matrix-2.2.5}/wavelet_matrix.pyi +0 -0
|
@@ -42,8 +42,8 @@ jobs:
|
|
|
42
42
|
- runner: ubuntu-latest
|
|
43
43
|
target: ppc64le
|
|
44
44
|
steps:
|
|
45
|
-
- uses: actions/checkout@
|
|
46
|
-
- uses: actions/setup-python@
|
|
45
|
+
- uses: actions/checkout@v7
|
|
46
|
+
- uses: actions/setup-python@v7
|
|
47
47
|
with:
|
|
48
48
|
python-version: 3.x
|
|
49
49
|
- name: Build wheels
|
|
@@ -55,7 +55,7 @@ jobs:
|
|
|
55
55
|
manylinux: auto
|
|
56
56
|
- name: Upload wheels
|
|
57
57
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
58
|
-
uses: actions/upload-artifact@
|
|
58
|
+
uses: actions/upload-artifact@v7
|
|
59
59
|
with:
|
|
60
60
|
name: wheels-linux-${{ matrix.platform.target }}
|
|
61
61
|
path: dist
|
|
@@ -75,8 +75,8 @@ jobs:
|
|
|
75
75
|
- runner: ubuntu-latest
|
|
76
76
|
target: armv7
|
|
77
77
|
steps:
|
|
78
|
-
- uses: actions/checkout@
|
|
79
|
-
- uses: actions/setup-python@
|
|
78
|
+
- uses: actions/checkout@v7
|
|
79
|
+
- uses: actions/setup-python@v7
|
|
80
80
|
with:
|
|
81
81
|
python-version: 3.x
|
|
82
82
|
- name: Build wheels
|
|
@@ -88,7 +88,7 @@ jobs:
|
|
|
88
88
|
manylinux: musllinux_1_2
|
|
89
89
|
- name: Upload wheels
|
|
90
90
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
91
|
-
uses: actions/upload-artifact@
|
|
91
|
+
uses: actions/upload-artifact@v7
|
|
92
92
|
with:
|
|
93
93
|
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
94
94
|
path: dist
|
|
@@ -104,8 +104,8 @@ jobs:
|
|
|
104
104
|
- runner: windows-latest
|
|
105
105
|
target: x86
|
|
106
106
|
steps:
|
|
107
|
-
- uses: actions/checkout@
|
|
108
|
-
- uses: actions/setup-python@
|
|
107
|
+
- uses: actions/checkout@v7
|
|
108
|
+
- uses: actions/setup-python@v7
|
|
109
109
|
with:
|
|
110
110
|
python-version: 3.x
|
|
111
111
|
architecture: ${{ matrix.platform.target }}
|
|
@@ -117,7 +117,7 @@ jobs:
|
|
|
117
117
|
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
118
118
|
- name: Upload wheels
|
|
119
119
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
120
|
-
uses: actions/upload-artifact@
|
|
120
|
+
uses: actions/upload-artifact@v7
|
|
121
121
|
with:
|
|
122
122
|
name: wheels-windows-${{ matrix.platform.target }}
|
|
123
123
|
path: dist
|
|
@@ -133,8 +133,8 @@ jobs:
|
|
|
133
133
|
- runner: macos-latest
|
|
134
134
|
target: aarch64
|
|
135
135
|
steps:
|
|
136
|
-
- uses: actions/checkout@
|
|
137
|
-
- uses: actions/setup-python@
|
|
136
|
+
- uses: actions/checkout@v7
|
|
137
|
+
- uses: actions/setup-python@v7
|
|
138
138
|
with:
|
|
139
139
|
python-version: 3.x
|
|
140
140
|
- name: Build wheels
|
|
@@ -145,7 +145,7 @@ jobs:
|
|
|
145
145
|
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
146
146
|
- name: Upload wheels
|
|
147
147
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
148
|
-
uses: actions/upload-artifact@
|
|
148
|
+
uses: actions/upload-artifact@v7
|
|
149
149
|
with:
|
|
150
150
|
name: wheels-macos-${{ matrix.platform.target }}
|
|
151
151
|
path: dist
|
|
@@ -154,8 +154,8 @@ jobs:
|
|
|
154
154
|
needs: [cargo-test, python-test]
|
|
155
155
|
runs-on: ubuntu-latest
|
|
156
156
|
steps:
|
|
157
|
-
- uses: actions/checkout@
|
|
158
|
-
- uses: actions/setup-python@
|
|
157
|
+
- uses: actions/checkout@v7
|
|
158
|
+
- uses: actions/setup-python@v7
|
|
159
159
|
with:
|
|
160
160
|
python-version: 3.x
|
|
161
161
|
- name: Build sdist
|
|
@@ -165,7 +165,7 @@ jobs:
|
|
|
165
165
|
args: --out dist
|
|
166
166
|
- name: Upload sdist
|
|
167
167
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
168
|
-
uses: actions/upload-artifact@
|
|
168
|
+
uses: actions/upload-artifact@v7
|
|
169
169
|
with:
|
|
170
170
|
name: wheels-sdist
|
|
171
171
|
path: dist
|
|
@@ -173,7 +173,7 @@ jobs:
|
|
|
173
173
|
cargo-test:
|
|
174
174
|
runs-on: ubuntu-latest
|
|
175
175
|
steps:
|
|
176
|
-
- uses: actions/checkout@
|
|
176
|
+
- uses: actions/checkout@v7
|
|
177
177
|
- uses: dtolnay/rust-toolchain@stable
|
|
178
178
|
with:
|
|
179
179
|
components: clippy
|
|
@@ -191,7 +191,7 @@ jobs:
|
|
|
191
191
|
- name: Clippy check
|
|
192
192
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
193
193
|
- name: Upload coverage reports to Codecov
|
|
194
|
-
uses: codecov/codecov-action@
|
|
194
|
+
uses: codecov/codecov-action@v7
|
|
195
195
|
with:
|
|
196
196
|
fail_ci_if_error: true
|
|
197
197
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -199,8 +199,8 @@ jobs:
|
|
|
199
199
|
python-test:
|
|
200
200
|
runs-on: ubuntu-latest
|
|
201
201
|
steps:
|
|
202
|
-
- uses: actions/checkout@
|
|
203
|
-
- uses: actions/setup-python@
|
|
202
|
+
- uses: actions/checkout@v7
|
|
203
|
+
- uses: actions/setup-python@v7
|
|
204
204
|
with:
|
|
205
205
|
python-version: 3.x
|
|
206
206
|
- name: Install packages
|
|
@@ -233,11 +233,11 @@ jobs:
|
|
|
233
233
|
- "3.12"
|
|
234
234
|
- "3.13"
|
|
235
235
|
- "3.14"
|
|
236
|
-
- "3.15
|
|
236
|
+
- "3.15-dev"
|
|
237
237
|
- "pypy3.11"
|
|
238
238
|
steps:
|
|
239
|
-
- uses: actions/checkout@
|
|
240
|
-
- uses: actions/setup-python@
|
|
239
|
+
- uses: actions/checkout@v7
|
|
240
|
+
- uses: actions/setup-python@v7
|
|
241
241
|
with:
|
|
242
242
|
python-version: ${{ matrix.python }}
|
|
243
243
|
- name: Install packages
|
|
@@ -278,10 +278,6 @@ jobs:
|
|
|
278
278
|
pattern: wheels-*
|
|
279
279
|
path: dist
|
|
280
280
|
merge-multiple: true
|
|
281
|
-
- name: Generate artifact attestation
|
|
282
|
-
uses: actions/attest-build-provenance@v3
|
|
283
|
-
with:
|
|
284
|
-
subject-path: 'dist/*'
|
|
285
281
|
- name: Publish to PyPI
|
|
286
282
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
287
283
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -10,15 +10,15 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
|
10
10
|
|
|
11
11
|
[[package]]
|
|
12
12
|
name = "bitflags"
|
|
13
|
-
version = "2.13.
|
|
13
|
+
version = "2.13.1"
|
|
14
14
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
-
checksum = "
|
|
15
|
+
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
16
16
|
|
|
17
17
|
[[package]]
|
|
18
18
|
name = "bytemuck"
|
|
19
|
-
version = "1.25.
|
|
19
|
+
version = "1.25.2"
|
|
20
20
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
-
checksum = "
|
|
21
|
+
checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"
|
|
22
22
|
|
|
23
23
|
[[package]]
|
|
24
24
|
name = "cfg-if"
|
|
@@ -53,9 +53,9 @@ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
|
|
|
53
53
|
|
|
54
54
|
[[package]]
|
|
55
55
|
name = "either"
|
|
56
|
-
version = "1.
|
|
56
|
+
version = "1.17.0"
|
|
57
57
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
58
|
-
checksum = "
|
|
58
|
+
checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
|
|
59
59
|
|
|
60
60
|
[[package]]
|
|
61
61
|
name = "errno"
|
|
@@ -69,9 +69,9 @@ dependencies = [
|
|
|
69
69
|
|
|
70
70
|
[[package]]
|
|
71
71
|
name = "fastrand"
|
|
72
|
-
version = "2.
|
|
72
|
+
version = "2.5.0"
|
|
73
73
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
-
checksum = "
|
|
74
|
+
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
75
75
|
|
|
76
76
|
[[package]]
|
|
77
77
|
name = "getrandom"
|
|
@@ -90,20 +90,11 @@ version = "0.5.0"
|
|
|
90
90
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
91
91
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
92
92
|
|
|
93
|
-
[[package]]
|
|
94
|
-
name = "itertools"
|
|
95
|
-
version = "0.15.0"
|
|
96
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
97
|
-
checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
|
|
98
|
-
dependencies = [
|
|
99
|
-
"either",
|
|
100
|
-
]
|
|
101
|
-
|
|
102
93
|
[[package]]
|
|
103
94
|
name = "libc"
|
|
104
|
-
version = "0.2.
|
|
95
|
+
version = "0.2.189"
|
|
105
96
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
|
-
checksum = "
|
|
97
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
107
98
|
|
|
108
99
|
[[package]]
|
|
109
100
|
name = "linux-raw-sys"
|
|
@@ -156,15 +147,15 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
156
147
|
|
|
157
148
|
[[package]]
|
|
158
149
|
name = "portable-atomic"
|
|
159
|
-
version = "1.
|
|
150
|
+
version = "1.14.0"
|
|
160
151
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
-
checksum = "
|
|
152
|
+
checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
|
|
162
153
|
|
|
163
154
|
[[package]]
|
|
164
155
|
name = "proc-macro2"
|
|
165
|
-
version = "1.0.
|
|
156
|
+
version = "1.0.107"
|
|
166
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
-
checksum = "
|
|
158
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
168
159
|
dependencies = [
|
|
169
160
|
"unicode-ident",
|
|
170
161
|
]
|
|
@@ -230,9 +221,9 @@ dependencies = [
|
|
|
230
221
|
|
|
231
222
|
[[package]]
|
|
232
223
|
name = "quote"
|
|
233
|
-
version = "1.0.
|
|
224
|
+
version = "1.0.47"
|
|
234
225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
235
|
-
checksum = "
|
|
226
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
236
227
|
dependencies = [
|
|
237
228
|
"proc-macro2",
|
|
238
229
|
]
|
|
@@ -278,9 +269,9 @@ dependencies = [
|
|
|
278
269
|
|
|
279
270
|
[[package]]
|
|
280
271
|
name = "syn"
|
|
281
|
-
version = "2.0.
|
|
272
|
+
version = "2.0.119"
|
|
282
273
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
283
|
-
checksum = "
|
|
274
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
284
275
|
dependencies = [
|
|
285
276
|
"proc-macro2",
|
|
286
277
|
"quote",
|
|
@@ -314,10 +305,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
314
305
|
|
|
315
306
|
[[package]]
|
|
316
307
|
name = "wavelet-matrix"
|
|
317
|
-
version = "2.2.
|
|
308
|
+
version = "2.2.5"
|
|
318
309
|
dependencies = [
|
|
319
310
|
"bytemuck",
|
|
320
|
-
"itertools",
|
|
321
311
|
"memmap2",
|
|
322
312
|
"num-bigint",
|
|
323
313
|
"num-integer",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "wavelet-matrix"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.5"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
@@ -10,10 +10,9 @@ name = "wavelet_matrix"
|
|
|
10
10
|
crate-type = ["cdylib"]
|
|
11
11
|
|
|
12
12
|
[dependencies]
|
|
13
|
-
bytemuck = "1.25.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
num-bigint = "0.4.6"
|
|
13
|
+
bytemuck = "1.25.2"
|
|
14
|
+
memmap2 = "0.9.11"
|
|
15
|
+
num-bigint = "0.4.8"
|
|
17
16
|
num-integer = "0.1.46"
|
|
18
17
|
num-traits = "0.2.19"
|
|
19
18
|
pyo3 = { version = "0.29.0", features = ["num-bigint"] }
|
|
@@ -22,39 +22,39 @@ def random_disk_wavelet_matrix(random_data: list[int]) -> WaveletMatrix:
|
|
|
22
22
|
@pytest.mark.parametrize("size", [500, 10000, 200000])
|
|
23
23
|
@pytest.mark.parametrize("max_bit", [8, 32, 128])
|
|
24
24
|
class BenchDiskWaveletMatrix:
|
|
25
|
-
def
|
|
25
|
+
def bench_disk_construction(self, benchmark, random_data):
|
|
26
26
|
"""Benchmark DiskWaveletMatrix construction"""
|
|
27
27
|
benchmark(WaveletMatrix, random_data, on_disk=True)
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def bench_disk_values(self, benchmark, random_disk_wavelet_matrix):
|
|
30
30
|
"""Benchmark DiskWaveletMatrix values retrieval"""
|
|
31
31
|
benchmark(random_disk_wavelet_matrix.values)
|
|
32
32
|
|
|
33
|
-
def
|
|
33
|
+
def bench_disk_access(self, benchmark, random_disk_wavelet_matrix, size):
|
|
34
34
|
"""Benchmark DiskWaveletMatrix access"""
|
|
35
35
|
index = random.randint(0, size - 1)
|
|
36
36
|
benchmark(random_disk_wavelet_matrix.access, index)
|
|
37
37
|
|
|
38
|
-
def
|
|
38
|
+
def bench_disk_rank(self, benchmark, random_disk_wavelet_matrix, size):
|
|
39
39
|
"""Benchmark DiskWaveletMatrix rank"""
|
|
40
40
|
value = random_disk_wavelet_matrix[random.randint(0, size - 1)]
|
|
41
41
|
end = random.randint(0, size)
|
|
42
42
|
benchmark(random_disk_wavelet_matrix.rank, value, end)
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def bench_disk_select(self, benchmark, random_disk_wavelet_matrix, size):
|
|
45
45
|
"""Benchmark DiskWaveletMatrix select"""
|
|
46
46
|
value = random_disk_wavelet_matrix[random.randint(0, size - 1)]
|
|
47
47
|
kth = random_disk_wavelet_matrix.rank(value, size)
|
|
48
48
|
benchmark(random_disk_wavelet_matrix.select, value, kth)
|
|
49
49
|
|
|
50
|
-
def
|
|
50
|
+
def bench_disk_quantile(self, benchmark, random_disk_wavelet_matrix, size):
|
|
51
51
|
"""Benchmark DiskWaveletMatrix quantile"""
|
|
52
52
|
start = size // 4
|
|
53
53
|
end = size * 3 // 4
|
|
54
54
|
kth = random.randint(1, end - start)
|
|
55
55
|
benchmark(random_disk_wavelet_matrix.quantile, start, end, kth)
|
|
56
56
|
|
|
57
|
-
def
|
|
57
|
+
def bench_disk_range_freq(self, benchmark, random_disk_wavelet_matrix, size, max_bit):
|
|
58
58
|
"""Benchmark DiskWaveletMatrix range_freq"""
|
|
59
59
|
start = size // 4
|
|
60
60
|
end = size * 3 // 4
|
|
@@ -62,28 +62,28 @@ class BenchDiskWaveletMatrix:
|
|
|
62
62
|
upper = (1 << max_bit) * 3 // 4
|
|
63
63
|
benchmark(random_disk_wavelet_matrix.range_freq, start, end, lower, upper)
|
|
64
64
|
|
|
65
|
-
def
|
|
65
|
+
def bench_disk_range_maxk(self, benchmark, random_disk_wavelet_matrix, size):
|
|
66
66
|
"""Benchmark DiskWaveletMatrix range_maxk"""
|
|
67
67
|
start = size // 4
|
|
68
68
|
end = size * 3 // 4
|
|
69
69
|
k = 10
|
|
70
70
|
benchmark(random_disk_wavelet_matrix.range_maxk, start, end, k)
|
|
71
71
|
|
|
72
|
-
def
|
|
72
|
+
def bench_disk_range_mink(self, benchmark, random_disk_wavelet_matrix, size):
|
|
73
73
|
"""Benchmark DiskWaveletMatrix range_mink"""
|
|
74
74
|
start = size // 4
|
|
75
75
|
end = size * 3 // 4
|
|
76
76
|
k = 10
|
|
77
77
|
benchmark(random_disk_wavelet_matrix.range_mink, start, end, k)
|
|
78
78
|
|
|
79
|
-
def
|
|
79
|
+
def bench_disk_prev_value(self, benchmark, random_disk_wavelet_matrix, size, max_bit):
|
|
80
80
|
"""Benchmark DiskWaveletMatrix prev_value"""
|
|
81
81
|
start = size // 4
|
|
82
82
|
end = size * 3 // 4
|
|
83
83
|
upper = 1 << (max_bit - 1)
|
|
84
84
|
benchmark(random_disk_wavelet_matrix.prev_value, start, end, upper)
|
|
85
85
|
|
|
86
|
-
def
|
|
86
|
+
def bench_disk_next_value(self, benchmark, random_disk_wavelet_matrix, size, max_bit):
|
|
87
87
|
"""Benchmark DiskWaveletMatrix next_value"""
|
|
88
88
|
start = size // 4
|
|
89
89
|
end = size * 3 // 4
|