commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
77166fa114edda698f1f3f42a682f25fa7dea059
Clément Renault
2024-06-05T17:50:36
Use the container and store is_empty methods
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 57c3ffec..559b7579 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -208,7 +208,7 @@ impl RoaringBitmap { match self.containers.binary_search_by_key(&key, |c| c.key) { Ok(loc) => { if self.contai...
3
12
12
95432ece20e966b40f86b2b4ec648fbe3b3606b2
Clément Renault
2024-06-05T14:56:39
Do the intersections on containers to ensure correct store type
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index a28c7c67..3ab1e5ad 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -37,6 +37,10 @@ impl Container { self.store.len() } + pub fn is_empty(&self) -> bool { + self.store.is_empty() + } + pub fn inse...
5
108
41
9ba1ca1dad336ea262aa0cd3e44ed044303a33b6
Clément Renault
2024-06-04T20:20:46
Prefer reading the content store by store
diff --git a/src/bitmap/ops_with_serialized.rs b/src/bitmap/ops_with_serialized.rs index 2b7c367e..ec9d31d3 100644 --- a/src/bitmap/ops_with_serialized.rs +++ b/src/bitmap/ops_with_serialized.rs @@ -51,7 +51,7 @@ impl RoaringBitmap { fn intersection_with_serialized_impl<R, A, AErr, B, BErr>( &self, - ...
1
48
27
9be1e4b1cd5abe26e1970a15d4b0e115eec44a18
Clément Renault
2024-06-05T15:33:36
First impl trying to iter on local containers
diff --git a/src/bitmap/mod.rs b/src/bitmap/mod.rs index 4aebfc37..1d481afa 100644 --- a/src/bitmap/mod.rs +++ b/src/bitmap/mod.rs @@ -12,10 +12,11 @@ mod cmp; mod inherent; mod iter; mod ops; +mod ops_with_serialized; #[cfg(feature = "serde")] mod serde; #[cfg(feature = "std")] -mod serialization; +pub(crate) mo...
3
152
6
73714f845bb7fe3243a7cc804a899ffdf5855d37
Oskar Goldhahn
2024-05-29T18:51:47
add dedicated fold and rfold impls add test for `fold` also add test for treemap use closures directly
diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs index ac85fa33..60e1cb50 100644 --- a/src/bitmap/iter.rs +++ b/src/bitmap/iter.rs @@ -46,6 +46,15 @@ impl Iterator for Iter<'_> { (usize::MAX, None) } } + + #[inline] + fn fold<B, F>(self, init: B, f: F) -> B + where + Self:...
4
132
0
ec7604f22c795e907e4d01b669e946bd6ab27972
Kirk Baird
2024-05-28T00:23:41
Resolve issues with no std
diff --git a/src/bitmap/arbitrary.rs b/src/bitmap/arbitrary.rs index 45d47540..a8ca25be 100644 --- a/src/bitmap/arbitrary.rs +++ b/src/bitmap/arbitrary.rs @@ -8,6 +8,11 @@ mod test { use proptest::collection::{vec, SizeRange}; use proptest::prelude::*; + #[cfg(not(feature = "std"))] + use alloc::boxed...
16
55
0
706e2752a4aa0ce320dfd3297296e04dfd7adef1
Clément Renault
2024-04-30T08:14:12
Bump roaring to v0.10.4
diff --git a/Cargo.toml b/Cargo.toml index a4ce43b5..ace636e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roaring" -version = "0.10.3" +version = "0.10.4" rust-version = "1.65.0" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] description = "A better c...
1
1
1
bf0cb5a4de146faf9ea6914fcbddd83bc5234b6a
Kirk Baird
2024-04-15T22:55:48
Resolve nightly clippy lints
diff --git a/tests/lib.rs b/tests/lib.rs index 5fcf4a2f..5edbcc19 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -13,11 +13,11 @@ fn smoke() { assert!(bitmap.contains(1)); assert_eq!(bitmap.len(), 1); assert!(!bitmap.is_empty()); - bitmap.insert(u32::max_value() - 2); - assert!(bitmap.contains(u32...
1
7
7
49f0e9d144cd68610ae80c44a24dd55edc2bd553
Kirk Baird
2024-04-15T22:54:29
Resolve clippy lints
diff --git a/src/bitmap/arbitrary.rs b/src/bitmap/arbitrary.rs index de4c4d27..45d47540 100644 --- a/src/bitmap/arbitrary.rs +++ b/src/bitmap/arbitrary.rs @@ -3,8 +3,6 @@ mod test { use crate::bitmap::container::Container; use crate::bitmap::store::{ArrayStore, BitmapStore, Store}; use crate::RoaringBitm...
5
0
6
0454dbb5f58578eb991a40e7d52d702d4a9b8c60
Kirk Baird
2024-04-12T02:34:22
Remove one more unused import
diff --git a/src/bitmap/store/array_store/visitor.rs b/src/bitmap/store/array_store/visitor.rs index 56a1a46b..b092e6cf 100644 --- a/src/bitmap/store/array_store/visitor.rs +++ b/src/bitmap/store/array_store/visitor.rs @@ -1,5 +1,3 @@ -use alloc::vec::Vec; - #[cfg(feature = "simd")] use crate::bitmap::store::array_st...
1
0
2
e9e066ae3cda09f11dbd5c021746921b3525d731
Kirk Baird
2024-04-12T02:32:28
Fix compiler warnings on beta
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 9116863a..552fff56 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -3,8 +3,6 @@ use core::ops::{ BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, RangeInclusive, Sub, SubAssign, }; -use alloc::vec::Vec; - ...
16
7
31
47eba81232cb9bf9289ce632a36d013cd41bc3f6
Kirk Baird
2024-04-08T01:29:01
Fix potential overflow in deserialization of Bitmap
diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs index f60bbad1..2ea63560 100644 --- a/src/bitmap/serialization.rs +++ b/src/bitmap/serialization.rs @@ -226,9 +226,11 @@ impl RoaringBitmap { let cardinality = intervals.iter().map(|[_, len]| *len as usize).sum(); ...
1
12
3
aef3e49a7928d4f6d0f6b70a0fb120ffe3f5f502
Clément Renault
2024-02-15T09:13:35
Bump version to 0.10.3
diff --git a/Cargo.toml b/Cargo.toml index 726f3d2e..a4ce43b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "roaring" -version = "0.10.2" +version = "0.10.3" rust-version = "1.65.0" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] -description = "https://ro...
1
2
2
bbf73d611e526c6b7531207d16fc504b2c6a3aa3
Clément Renault
2024-02-13T16:47:22
Refector the simd feature to use the new types
diff --git a/src/bitmap/store/array_store/vector.rs b/src/bitmap/store/array_store/vector.rs index 14f3f035..de465325 100644 --- a/src/bitmap/store/array_store/vector.rs +++ b/src/bitmap/store/array_store/vector.rs @@ -11,9 +11,9 @@ #![cfg(feature = "simd")] use super::scalar; +use core::simd::cmp::{SimdPartialEq, ...
2
39
39
842cd16829e9b02f7c145397fc76caad75a99abf
GZTime
2024-02-13T16:37:30
chore: lock dependency versions note: all tests passed
diff --git a/Cargo.toml b/Cargo.toml index 74a3fb3d..726f3d2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,9 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bytemuck = { version = "1.7", optional = true } -byteorder = { version = "1.4", optional = true } -serde = { version = "1.0", option...
1
6
6
d812e909e2dfdce262cdfb77dd7205f60cbc04b4
GZTime
2024-01-20T16:11:11
fix: byteorder when no_std
diff --git a/src/lib.rs b/src/lib.rs index 111d6b22..b44c19c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ #![warn(variant_size_differences)] #![allow(unknown_lints)] // For clippy +#[cfg(feature = "std")] extern crate byteorder; #[macro_use]
1
1
0
fbcf52c68d24dec663cb803940a2d7d2a5ab3b84
GZTime
2024-01-20T16:01:37
wip: use `#![cfg(...)]` instead of `#[cfg(...)]`
diff --git a/Cargo.toml b/Cargo.toml index 6acfbfaa..74a3fb3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,19 +16,20 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bytemuck = "1.7.3" -byteorder = { version = "1.4.3", default-features = false } -serde = { version = "1.0.139", optional = true } ...
3
12
34
0f10931f00f73ef60ae9dd7030ad7af8fdfad379
GZTime
2023-11-16T20:44:03
fix(bench): revert unexpected change
diff --git a/benchmarks/benches/datasets.rs b/benchmarks/benches/datasets.rs index 653bc574..afd2288e 100644 --- a/benchmarks/benches/datasets.rs +++ b/benchmarks/benches/datasets.rs @@ -1,7 +1,7 @@ -use core::env; -use core::fs::File; -use core::io::BufReader; -use core::path::{Path, PathBuf}; +use std::env; +use std:...
2
10
10
a8dc5f45ee4c837a3fa68f1909d9b8bc453107a2
GZTime
2023-11-16T19:08:30
chore: cargo fmt
diff --git a/src/bitmap/arbitrary.rs b/src/bitmap/arbitrary.rs index 80ff319e..de4c4d27 100644 --- a/src/bitmap/arbitrary.rs +++ b/src/bitmap/arbitrary.rs @@ -5,10 +5,10 @@ mod test { use crate::RoaringBitmap; use alloc::boxed::Box; use alloc::vec::Vec; + use core::fmt::{Debug, Formatter}; use pr...
13
18
19
0cc06e8afda419d136e010a456ca1734253b4ee3
Alexey Shekhirin
2023-11-16T16:10:19
docs: `RoaringTreemap::select` returns `None` if `n >= len()`
diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs index aad5f564..f14fa659 100644 --- a/src/treemap/inherent.rs +++ b/src/treemap/inherent.rs @@ -385,7 +385,7 @@ impl RoaringTreemap { + iter.map(|(_, bitmap)| bitmap.len()).sum::<u64>() } - /// Returns the `n`th integer in the set or ...
1
1
1
5c8d28564feb323a995fd79e45704acae828574a
Sylvain Laperche
2023-08-10T06:59:32
deps: remove retain_mut Per the crate's README: This crate has been deprecated. Rust 1.61 stabilized retain_mut for Vec and VecDeque, so you can use them directly. This crate is no longer maintained. MSRV has been bumped to 1.65 in 42ae34266e27b, we no longer need this crate.
diff --git a/Cargo.toml b/Cargo.toml index 232ba055..90fa6a87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,6 @@ license = "MIT OR Apache-2.0" [dependencies] bytemuck = "1.7.3" byteorder = "1.4.3" -retain_mut = "=0.1.7" serde = { version = "1.0.139", optional = true } [features] diff --git a/src/bitmap/m...
3
5
10
ab125190ce2c35e76949657bd2283af379074382
Kerollmops
2023-08-29T08:23:03
Make nightly clippy happy
diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs index 45badbce..aad5f564 100644 --- a/src/treemap/inherent.rs +++ b/src/treemap/inherent.rs @@ -46,7 +46,7 @@ impl RoaringTreemap { /// ``` pub fn insert(&mut self, value: u64) -> bool { let (hi, lo) = util::split(value); - self.ma...
1
5
5
b718d768610d3bca608b14fdb20cb34322e84fe9
Kerollmops
2023-07-25T14:06:22
Bump the version to 0.10.2
diff --git a/Cargo.toml b/Cargo.toml index 90b0cac2..232ba055 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roaring" -version = "0.10.1" +version = "0.10.2" rust-version = "1.65.0" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] description = "https://ro...
1
1
1
42ae34266e27b747632c56c5fbf9da4d976c590a
Kerollmops
2023-07-25T14:06:11
Bump the MSRV to 1.65.0
diff --git a/Cargo.toml b/Cargo.toml index 99fdbbf2..90b0cac2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "roaring" version = "0.10.1" -rust-version = "1.56.1" +rust-version = "1.65.0" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] description = "https...
1
1
1
16b2698a896bce0930b728acf17140c7ae3e521f
Kerollmops
2023-07-25T13:16:06
Rename the remove_front/back methods into remove_smallest/biggest
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index dee6ee1f..773f9099 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,7 +94,7 @@ impl Container { result } - pub fn remove_front(&mut self, n: u64) { + pub fn remove_smallest(&mut self, n: u64) { m...
5
60
60
d63dd699c90cd0b75dff1ce083eef8a812a89728
shimatar0
2023-07-13T16:58:18
Refactor to clearly define the method to clear the bit
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index e0f287bc..68366643 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -315,26 +315,18 @@ impl BitmapStore { return; } self.len -= clear_bits; - let min = self...
1
37
39
f7a18aa5f3f44e80fc38291b2620654d0d3a9411
shimatar0
2023-07-13T16:41:19
Fix clippy warnings
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index b50f186e..e0f287bc 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -314,7 +314,7 @@ impl BitmapStore { self.clear(); return; } - self.len -= clear_bits...
1
2
2
deaa66f32719c0750c795d8ef287cca6f9dd5eec
shimatar0
2023-07-13T16:37:16
Add clear method to avoid new allocations
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 3b6eb0c2..b50f186e 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -303,10 +303,15 @@ impl BitmapStore { &self.bits } + pub fn clear(&mut self) { + self.bits.fill(0); ...
1
7
2
d0e7322a07bf3d68369cd6bcf5a5ace62f7711b1
shimatar0
2023-07-13T16:32:44
Fix unwanted clone
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 02eace23..dee6ee1f 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -114,8 +114,7 @@ impl Container { Store::Bitmap(bits) => { if bits.len() - n <= ARRAY_LIMIT { let mut replace_a...
1
1
2
521f5a7a908195177cb7dcabaae277ef58263662
shimatar0
2023-07-13T16:28:34
Remove unwanted clone
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 298b9083..02eace23 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -99,7 +99,7 @@ impl Container { Store::Bitmap(bits) => { if bits.len() - n <= ARRAY_LIMIT { let mut replace_arr...
1
1
1
6b54277b03167342e1eb99d7386dbcade19f0bc4
shimatar0
2023-07-13T16:26:23
Fix to delete all cases when "n" exceeds the container size
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index d21ad922..2670609c 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -594,9 +594,6 @@ impl RoaringBitmap { /// rb.remove_front(2); /// assert_eq!(rb, RoaringBitmap::from_iter([7, 9])); pub fn remove_front(&mut self, mut ...
1
9
13
44c5a1926d59b1faa0dcc7822bce9997d7befecc
shimatar0
2023-07-13T16:23:57
Fix the panics and removed unnecessary comments.
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 7b94d18b..d21ad922 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -607,8 +607,7 @@ impl RoaringBitmap { true } }); - // It is checked at the beginning of the function, so it is usually n...
1
1
2
5761b1c9bc2e648be5a5d425242d808d5b266984
shimatar0
2023-07-13T16:21:39
Fix use the Vec::drain method
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 9ceea831..7b94d18b 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -610,8 +610,7 @@ impl RoaringBitmap { // It is checked at the beginning of the function, so it is usually never an Err let position = position.expec...
1
2
2
e690f2ac514de2288619cdf5df4012b9c3a81139
shimatar0
2023-07-13T16:19:30
Fix incorrect judgment condition.
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 64f4195c..9ceea831 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -600,7 +600,7 @@ impl RoaringBitmap { // remove containers up to the front of the target let position = self.containers.iter().position(|container| ...
1
2
2
f4080d9852236c6b313e4d91cea6f2a87e5644fa
shimatar0
2023-07-10T15:05:43
Rename remove_first to remove_front and remove_last to remove_back
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 7ae5b1ac..298b9083 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,7 +94,7 @@ impl Container { result } - pub fn remove_first(&mut self, n: u64) { + pub fn remove_front(&mut self, n: u64) { matc...
5
56
56
b7c5b5a2acfeb33fab85784fb38cad76a6ee3367
shimatar0
2023-07-10T14:51:50
fixe to use u64 instead of usize
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 5dba79d9..7ae5b1ac 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,12 +94,12 @@ impl Container { result } - pub fn remove_first(&mut self, n: usize) { + pub fn remove_first(&mut self, n: u64) { ...
5
30
30
5c7cb3b86317e4bcb361b57308da0766b2b55560
shimatar0
2023-07-10T14:33:46
fix test
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index bd6f8f3c..7e734685 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -589,7 +589,8 @@ impl RoaringBitmap { /// let mut rb = RoaringBitmap::from_iter([1, 5, 7, 9]); /// rb.remove_first(2); /// assert_eq!(rb, RoaringBitmap...
1
2
1
3abe4d5f1d4919761d5843a4687f56557f51f539
shimatar0
2023-05-10T16:29:47
Change the part that loops unnecessary
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 0a6ab647..519011da 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -315,6 +315,11 @@ impl BitmapStore { for index in key..BITMAP_LENGTH { let mut mask = 1; le...
1
10
0
948d588cff49c396a910f8c4a0f3b466ffe8c9e1
shimatar0
2023-05-10T16:27:51
Remove hard to follow variables
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index a7a6b094..0a6ab647 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -309,7 +309,7 @@ impl BitmapStore { *self = Self::default(); return; } - let mut rem...
1
2
4
7e3ef24078e625caf41289d738c933c33037c72f
shimatar0
2023-05-10T16:26:43
Change conditional expression
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 905fe71e..a7a6b094 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -321,8 +321,7 @@ impl BitmapStore { clear_bits -= 1; removed += 1; ...
1
2
4
8640495dbcdf0e3b000912e647c76b6e19e09746
shimatar0
2023-05-10T16:25:26
Add all bit clear
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 3c6d55e2..905fe71e 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -306,6 +306,7 @@ impl BitmapStore { /// Set N bits that are currently 1 bit from the lower bit to 0. pub fn remove_f...
1
2
0
72475321e7b1be511b2f3155e217c2c5a4b128a4
shimatar0
2023-05-10T15:36:25
Remove unnecessary if statement
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index f85cb37c..bd6f8f3c 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -606,11 +606,11 @@ impl RoaringBitmap { true } }); - if let Some(position) = position { - if position > 0 { -...
1
10
10
216bb8bdbc1334f81f95881bf7c15cf08806608b
shimatar0
2023-05-10T14:57:01
Add test to delete 0 elements
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index e0eef4dd..f85cb37c 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -819,6 +819,11 @@ mod tests { bitmap.remove_first(2); assert_eq!(bitmap.len(), 0); + bitmap = RoaringBitmap::from_iter([1, 2, 3, 7, 9, 11])...
1
20
0
43392213dbc80e08e196a4de6393b6b9a1087462
shimatar0
2023-05-09T12:33:27
Add test
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 25a76645..e0eef4dd 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -816,15 +816,18 @@ mod tests { assert_eq!(bitmap, RoaringBitmap::from_iter([7, 9, 11])); bitmap = RoaringBitmap::from_iter([1, 3]); - bitma...
1
26
3
e6442aeea8af7c1ad18b154636427c41940753dd
shimatar0
2023-05-09T12:33:13
Fix to use rposition for remove_last
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 5dd9375c..25a76645 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -632,24 +632,21 @@ impl RoaringBitmap { /// rb.remove_last(1); /// assert_eq!(rb, RoaringBitmap::from_iter([1])); pub fn remove_last(&mut self, mut n: ...
1
8
11
ca654797ff453ea5b750770eed395ff3306d9e6a
shimatar0
2023-05-09T12:31:48
Add handle of cases where the target to be deleted is larger than the length of the container
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 69605b06..5dd9375c 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -593,6 +593,9 @@ impl RoaringBitmap { /// rb.remove_first(2); /// assert_eq!(rb, RoaringBitmap::from_iter([7, 9])); pub fn remove_first(&mut self, mut ...
1
6
0
66664185e599a5b8f549941c5e1c0ceb2dba4248
shimatar0
2023-05-08T08:48:42
Fix where counts are subtracted and add test
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 9b7ecb9f..69605b06 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -842,6 +842,13 @@ mod tests { bitmap.insert_range(0..8000); bitmap.remove_first(10); assert_eq!(bitmap.len(), 7990); + + bitmap = Ro...
2
9
2
9b200fb3ce1b9d28a770b51fe0a652b3ac4220d3
shimatar0
2023-05-08T07:38:08
Fix container remove target
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 1bc3bd1f..9b7ecb9f 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -617,7 +617,17 @@ impl RoaringBitmap { } /// Removes the specified number of elements from the tail. - /// todo doc test + /// + /// # Examples +...
1
17
2
88880f8fd5ed088a9c16ab9079762db7a9dfe2ff
shimatar0
2023-05-08T05:13:23
Feat remove last
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index c2cbfa55..5dba79d9 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -108,8 +108,21 @@ impl Container { Store::Array(_) => self.store.remove_first(n), }; } - self.ensure_correct_store(); - r...
5
110
6
da127811620ef8d30b94267fa4a80751e29b9ba7
shimatar0
2023-05-08T05:12:48
Fix bit switching process of remove_first
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 3ba116b1..1cee249f 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -305,14 +305,30 @@ impl BitmapStore { /// Set N bits that are currently 1 bit from the lower bit to 0. pub fn remo...
1
20
4
cca8f22bcfa43c6e01ec99f9ef8735703facaf79
shimatar0
2023-05-07T16:16:29
Fix remove first function
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 7d9afc73..c2cbfa55 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,8 +94,20 @@ impl Container { result } - pub fn remove_first(&mut self, n: usize) -> bool { - let result = self.store.remove_first(n)...
5
45
14
0a2be31475d5c872c54d3d52881d6ff2bedd9eb4
shimatar0
2023-05-07T13:12:18
Fix process
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index ff1c7ba6..49ff86a0 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -586,33 +586,35 @@ impl RoaringBitmap { /// ```rust /// use roaring::RoaringBitmap; /// - /// let mut rb = RoaringBitmap::from_iter([1, 65535, 65536...
1
46
20
4b2384bde64412c23f36e32ff10eb5437055e647
shimatar0
2023-05-07T03:40:07
Feat remove first
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 9cbab634..7d9afc73 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,6 +94,12 @@ impl Container { result } + pub fn remove_first(&mut self, n: usize) -> bool { + let result = self.store.remove_first(n)...
5
97
0
56183149a2a201b1aaa36b936ec643decb1fde92
Kerollmops
2023-07-07T11:39:41
Deserialize run containers and convert them into bitmap/array Co-authored-by: Joseph Glanville <jpg@jpg.id.au>
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index e6d0cf84..9cbab634 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -6,7 +6,7 @@ use std::ops::{ use super::store::{self, Store}; use super::util; -const ARRAY_LIMIT: u64 = 4096; +pub const ARRAY_LIMIT: u64 = 4096; #[derive...
4
68
18
81f1f2a5d3b3d732a29568b52fc60c924c29927b
Kerollmops
2023-07-09T10:22:07
Fix clippy
diff --git a/Cargo.toml b/Cargo.toml index d4448a4d..99fdbbf2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "1.0.139", optional = true } simd = [] [dev-dependencies] -proptest = "1.0.0" +proptest = "1.2.0" serde_json = "1.0.85" bincode = "1.3.3" diff --git a/src/bitmap/arbitrary...
11
42
32
b9b3246e4b11e942f247b2091b8468eb4ffebf02
Kerollmops
2023-07-09T09:45:15
Update git2 for security reasons
diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 7e5d26e0..cdfafeda 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -11,7 +11,7 @@ roaring = { path = ".." } [dev-dependencies] once_cell = "1.9" -git2 = { version = "0.13", default-features = false, features = ["https", "vendored-ope...
1
1
1
db3df9e4b9468e0cc2e94c83f90d4c931709b268
shimatar0
2023-05-08T05:13:23
Feat remove last
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 7e2fc312..2dec2de7 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -108,8 +108,21 @@ impl Container { Store::Array(_) => self.store.remove_first(n), }; } - self.ensure_correct_store(); - r...
5
110
6
389da10f12652416bb11af8a7cd2c373d54c012e
shimatar0
2023-05-07T16:16:29
Fix remove first function
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 2f55fc7b..7e2fc312 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,8 +94,20 @@ impl Container { result } - pub fn remove_first(&mut self, n: usize) -> bool { - let result = self.store.remove_first(n)...
5
45
14
dcc5eeb01700336e75ea5ca03f8036ed38365524
shimatar0
2023-05-07T03:40:07
Feat remove first
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index e6d0cf84..2f55fc7b 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,6 +94,12 @@ impl Container { result } + pub fn remove_first(&mut self, n: usize) -> bool { + let result = self.store.remove_first(n)...
5
97
0
e365a7c2445acd3549ade21a612e27e9941b142f
saik0
2022-11-15T04:48:52
reformat benches
diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs index 88ce04c0..b5c92882 100644 --- a/benchmarks/benches/lib.rs +++ b/benchmarks/benches/lib.rs @@ -309,9 +309,7 @@ fn iteration(c: &mut Criterion) { let mut group = c.benchmark_group("iteration"); for dataset in Datasets { - group.th...
1
1
3
3bd62dad9b96dc9ced32acf04ca5ae8bdcc7d43e
saik0
2022-11-15T04:05:59
use map value iterator
diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs index bf4807df..6f13a323 100644 --- a/src/treemap/iter.rs +++ b/src/treemap/iter.rs @@ -84,7 +84,7 @@ impl<'a> Iter<'a> { impl IntoIter { fn new(map: BTreeMap<u32, RoaringBitmap>) -> IntoIter { - let size_hint = map.iter().map(|(_, r)| r.len()).sum()...
1
1
1
50aa6046c0eabf6d7e64fc4f40c35630b9eb20e3
saik0
2022-11-15T03:54:11
remove unnecessary cast to same type
diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs index 8bdf014a..88ce04c0 100644 --- a/benchmarks/benches/lib.rs +++ b/benchmarks/benches/lib.rs @@ -215,7 +215,7 @@ fn select(c: &mut Criterion) { let bitmaps = dataset .bitmaps .iter() - .map(|bitmap| (bitm...
5
7
7
15bdd5eae994986ad806333301ad837fc288e5f4
Michael Mior
2022-10-13T11:58:55
Implement From for u64 arrays in RoaringTreemap
diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs index cedece31..bf4807df 100644 --- a/src/treemap/iter.rs +++ b/src/treemap/iter.rs @@ -230,6 +230,12 @@ impl IntoIterator for RoaringTreemap { } } +impl<const N: usize> From<[u64; N]> for RoaringTreemap { + fn from(arr: [u64; N]) -> Self { + Roar...
2
15
1
e6cfac86654af70bf2cb61064a7dd45e8dcc10c3
Michael Mior
2022-10-13T11:53:38
Remove From for u32
diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs index c78da723..cc8aa656 100644 --- a/src/bitmap/iter.rs +++ b/src/bitmap/iter.rs @@ -131,14 +131,6 @@ impl IntoIterator for RoaringBitmap { } } -impl From<u32> for RoaringBitmap { - fn from(value: u32) -> RoaringBitmap { - let mut rb = RoaringBitma...
2
0
16
1dec927b6b9df6dff086de991e3ec3c99d98337b
Michael Mior
2022-10-11T23:29:06
Avoid sorting when converting from array Co-authored-by: Clément Renault <renault.cle@gmail.com>
diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs index 350fca13..c78da723 100644 --- a/src/bitmap/iter.rs +++ b/src/bitmap/iter.rs @@ -140,13 +140,8 @@ impl From<u32> for RoaringBitmap { } impl<const N: usize> From<[u32; N]> for RoaringBitmap { - fn from(mut arr: [u32; N]) -> Self { - if N == 0 { - ...
1
2
7
dc3de79e9453fd67134fbe6d95b15c36c2179f0f
Michael Mior
2022-08-03T16:09:57
Implement from for u32 and arrays
diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs index 36098729..350fca13 100644 --- a/src/bitmap/iter.rs +++ b/src/bitmap/iter.rs @@ -131,6 +131,25 @@ impl IntoIterator for RoaringBitmap { } } +impl From<u32> for RoaringBitmap { + fn from(value: u32) -> RoaringBitmap { + let mut rb = RoaringBitma...
2
36
1
da117d368418b17eac7783a98188c26177b28979
Kerollmops
2022-09-08T08:17:04
Bump version to 0.10.1
diff --git a/Cargo.toml b/Cargo.toml index 01175a20..d4448a4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roaring" -version = "0.10.0" +version = "0.10.1" rust-version = "1.56.1" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] description = "https://ro...
1
1
1
7afc35f30a142e178c4ab8bab49f05e0201394a2
Jonas Spinner
2022-09-07T16:48:29
Add additional testing for MultiOps
diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs index 1c1a6544..7fe930a6 100644 --- a/src/bitmap/ops.rs +++ b/src/bitmap/ops.rs @@ -443,6 +443,7 @@ impl BitXorAssign<&RoaringBitmap> for RoaringBitmap { mod test { use crate::{MultiOps, RoaringBitmap}; use proptest::prelude::*; + use std::convert::Infall...
1
63
12
9d2af5fa6639a95e9aec7c6939388bb0b4c314da
Jonas Spinner
2022-09-07T16:47:56
Fix MultiOps union for Result iterators
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs index 078092d2..fc721c5e 100644 --- a/src/bitmap/multiops.rs +++ b/src/bitmap/multiops.rs @@ -50,7 +50,7 @@ where type Output = Result<RoaringBitmap, E>; fn union(self) -> Self::Output { - try_multi_xor_owned(self) + try_multi_or_own...
1
1
1
8f041d2c78c3774f0d07c0dfc106ed31dd479562
Clément Renault
2022-09-01T13:03:41
Clean up the example for the MultiOps trait
diff --git a/src/lib.rs b/src/lib.rs index 9b0d892d..e87e4fdd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,15 +59,15 @@ impl Error for NonSortedIntegers {} /// use roaring::{MultiOps, RoaringBitmap}; /// /// let bitmaps = [ -/// RoaringBitmap::from_sorted_iter(0..10).unwrap(), -/// RoaringBitmap::from_sor...
1
4
4
6dd1128d025f87f647aa5b779e683287376a46fa
Clément Renault
2022-09-01T12:59:19
Fix the documentation links
diff --git a/src/bitmap/store/array_store/scalar.rs b/src/bitmap/store/array_store/scalar.rs index 55373853..455afdae 100644 --- a/src/bitmap/store/array_store/scalar.rs +++ b/src/bitmap/store/array_store/scalar.rs @@ -1,4 +1,4 @@ -//! Scalar arithmetic binary set operations on [ArrayStore]'s inner types +//! Scalar ar...
2
2
2
e2d996fa4c92a818225474f05b9a17c279aeed45
Zachary Dremann
2022-09-05T18:55:10
Fix nightly clippy finding, blocking other PRs See https://github.com/RoaringBitmap/roaring-rs/runs/8188621171?check_suite_focus=true for example
diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs index 5d8427a6..1e0c0db7 100644 --- a/src/bitmap/store/array_store/mod.rs +++ b/src/bitmap/store/array_store/mod.rs @@ -521,7 +521,7 @@ mod tests { let mut want = vec![1, 2]; want.extend(4..129); - want.ext...
1
2
2
1337e2214dfe8cd04809319b7a23014046234a64
Zachary Dremann
2022-09-05T02:00:20
Add additional testing to range operations
diff --git a/tests/range_checks.rs b/tests/range_checks.rs index f4b4d48a..7903eed2 100644 --- a/tests/range_checks.rs +++ b/tests/range_checks.rs @@ -1,30 +1,77 @@ -use proptest::array::uniform2; use proptest::collection::hash_set; use proptest::prelude::*; use roaring::RoaringBitmap; +#[test] +fn u32_max() { + ...
1
51
4
c7825f9361d79e2c909aebd9b0b328bf97c3d09a
Zachary Dremann
2022-09-02T17:29:43
More off-by-one errors in bitmap contains_range The CRoaring code uses an exclusive u32 range for the implementaiton of a bitset container's `contains_range` function. We can actually do a little better, and be exclusive only on the bit level. This has the additional benefit of never creating a zero-bit mask (which le...
diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs index 76e121e2..55a53c57 100644 --- a/src/bitmap/store/bitmap_store.rs +++ b/src/bitmap/store/bitmap_store.rs @@ -192,8 +192,15 @@ impl BitmapStore { let (start_i, start_bit) = (key(start), bit(start)); let (end_i, end_bi...
1
8
1
b3ee69f244aafbf57f18f8ac987d9475d55d7856
Zachary Dremann
2022-09-05T00:17:10
Binary search for end starting at the found start When we've found the start of a range, when looking for the end, only binary search in the range starting at the start we already found. Additonally, because the array store contains no duplicates, we can use a regular binary search for the end value, and if it's foun...
diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs index 5d8427a6..9dda5c76 100644 --- a/src/bitmap/store/array_store/mod.rs +++ b/src/bitmap/store/array_store/mod.rs @@ -48,16 +48,11 @@ impl ArrayStore { // Figure out the starting/ending position in the vec. let ...
1
10
20
71bc1f10c9318f1e48f5c985e291fc729f9d4a82
Clément Renault
2022-09-01T11:03:02
Bump version to 0.10.0
diff --git a/Cargo.toml b/Cargo.toml index 8ab436a4..01175a20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roaring" -version = "0.9.0" +version = "0.10.0" rust-version = "1.56.1" authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"] description = "https://roa...
1
1
1
737d952e901e65e759b094ee532c0c676d4dc982
Clément Renault
2022-09-01T10:08:01
Use the RoaringBitmap full constructor in the insert_range method
diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs index 82b097ca..45badbce 100644 --- a/src/treemap/inherent.rs +++ b/src/treemap/inherent.rs @@ -50,6 +50,7 @@ impl RoaringTreemap { } /// Inserts a range of values. + /// /// Returns the number of inserted values. /// /// # Exa...
1
17
10
e0ac3286d3c83c7fcf0328b5dc3b3ec56e6201d4
Clément Renault
2022-09-01T10:09:14
Introduce the RoaringTreemap full and is_full methods
diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs index 5f9fd9bd..82b097ca 100644 --- a/src/treemap/inherent.rs +++ b/src/treemap/inherent.rs @@ -1,4 +1,5 @@ use std::collections::btree_map::{BTreeMap, Entry}; +use std::iter; use std::ops::RangeBounds; use crate::RoaringBitmap; @@ -13,12 +14,24 @@ imp...
1
29
1
4d0530944acc109fca8fd9548e9ddc00e9a6cd68
Clément Renault
2022-09-01T10:08:35
Introduce the RoaringBitmap full and is_full methods
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index 2e61dc48..48fb304f 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -23,6 +23,10 @@ impl Container { pub fn new(key: u16) -> Container { Container { key, store: Store::new() } } + + pub fn full(key: u16) -> C...
4
41
1
3fe99a7867b593b153744ae7f59cb79883971626
not-jan
2022-06-28T09:47:14
Add a benchmark for RoaringTreemap::insert_range
diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs index d12d67b3..8bdf014a 100644 --- a/benchmarks/benches/lib.rs +++ b/benchmarks/benches/lib.rs @@ -8,7 +8,7 @@ use criterion::{ Throughput, }; -use roaring::{MultiOps, RoaringBitmap}; +use roaring::{MultiOps, RoaringBitmap, RoaringTreemap}; ...
1
26
1
1a27904b1c75ca892531b0b0780b20a9664214b9
not-jan
2022-06-25T23:35:39
Add tests for the naive implementation of `insert_range` for `RoaringTreemap`
diff --git a/tests/treemap_lib.rs b/tests/treemap_lib.rs index 894196de..0c302af9 100644 --- a/tests/treemap_lib.rs +++ b/tests/treemap_lib.rs @@ -13,11 +13,11 @@ fn smoke() { assert!(bitmap.contains(1)); assert_eq!(bitmap.len(), 1); assert!(!bitmap.is_empty()); - bitmap.insert(u64::max_value() - 2); ...
1
35
11
b9e5daba7e39cb036bad620e51390424285d9b5c
not-jan
2022-06-25T23:35:20
Add a naive implementation of `insert_range` for `RoaringTreemap`
diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs index 5ffb9db9..5f9fd9bd 100644 --- a/src/treemap/inherent.rs +++ b/src/treemap/inherent.rs @@ -36,6 +36,52 @@ impl RoaringTreemap { self.map.entry(hi).or_insert_with(RoaringBitmap::new).insert(lo) } + /// Inserts a range of values. + ...
1
46
0
ecacc79f8d0dac6c2396604c6f24c4df80d2d062
Zachary Dremann
2022-08-31T21:40:33
Fix range_checks proptest If there were duplicate values in the extra list to remove, removing multiple instances of the same number would _not_ decrease the range_cardinality, since the value was already removed. Changed to expect a set of extra values, rather than a vec
diff --git a/tests/range_checks.rs b/tests/range_checks.rs index 430fcdd9..f4b4d48a 100644 --- a/tests/range_checks.rs +++ b/tests/range_checks.rs @@ -1,5 +1,5 @@ use proptest::array::uniform2; -use proptest::collection::vec; +use proptest::collection::hash_set; use proptest::prelude::*; use roaring::RoaringBitmap; ...
1
2
2
c2cb09a39bfad3aac37e91828d9c82af483de2d7
Tamo
2022-08-31T09:05:46
makes the old compiler happy
diff --git a/Cargo.toml b/Cargo.toml index fdf71c03..8ab436a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ serde = { version = "1.0.139", optional = true } [features] simd = [] -serde = ["dep:serde"] [dev-dependencies] proptest = "1.0.0"
1
0
1
7adf7e2c16c645456749d6162a9624d0fd6f5971
Irevoire
2022-07-19T13:24:07
hide serde behind a feature flag + add support for the treemap
diff --git a/Cargo.toml b/Cargo.toml index 3c59f6de..c7a712cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,11 @@ license = "MIT OR Apache-2.0" bytemuck = "1.7.3" byteorder = "1.4.3" retain_mut = "=0.1.7" +serde = { version = "1.0.139", optional = true } [features] simd = [] +serde = ["dep:serde"] [de...
5
122
55
b3c4b3f9ac5ef1766ebb6b7420e792a765b07592
Irevoire
2022-07-19T10:25:47
forward the seq to the byte for the format that don't do the distinction
diff --git a/src/bitmap/mod.rs b/src/bitmap/mod.rs index 4c051e15..2b5569bd 100644 --- a/src/bitmap/mod.rs +++ b/src/bitmap/mod.rs @@ -14,6 +14,7 @@ mod iter; mod ops; mod serialization; +use serde::de::SeqAccess; use serde::de::Visitor; use serde::Deserialize; use serde::Deserializer; @@ -64,6 +65,17 @@ impl<'d...
1
12
0
e788b0b9bb9ba14412dd0dff8ea97524ff747fb1
Irevoire
2022-07-18T10:48:13
first serde support
diff --git a/src/bitmap/mod.rs b/src/bitmap/mod.rs index 8eac5b8c..4c051e15 100644 --- a/src/bitmap/mod.rs +++ b/src/bitmap/mod.rs @@ -14,6 +14,11 @@ mod iter; mod ops; mod serialization; +use serde::de::Visitor; +use serde::Deserialize; +use serde::Deserializer; +use serde::Serialize; + use self::cmp::Pairs; pub...
1
43
0
27798c0048c2a96cef599e84bca2127e72df62c4
Zachary Dremann
2022-08-30T22:17:59
Add a proptest for range contains/cardinality
diff --git a/tests/range_checks.rs b/tests/range_checks.rs index e69de29b..430fcdd9 100644 --- a/tests/range_checks.rs +++ b/tests/range_checks.rs @@ -0,0 +1,30 @@ +use proptest::array::uniform2; +use proptest::collection::vec; +use proptest::prelude::*; +use roaring::RoaringBitmap; + +proptest! { + #[test] + fn ...
1
30
0
cbd8fe9949c164b19fb52accff64b146e53468eb
Zachary Dremann
2022-08-30T22:14:03
Missed -1 When ignoring items before the range, should only remove the rank of one less than the lower bound of the range
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index d67ebf3e..6cd87c5d 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -372,7 +372,7 @@ impl RoaringBitmap { cardinality += container.len(); } if start_low != 0 { - ...
2
1
1
5cfb7061e10918d783f697c797574fdc287ea98f
Zachary Dremann
2022-08-29T04:25:43
Correct array contains_range
diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs index 02b7f41a..5d8427a6 100644 --- a/src/bitmap/store/array_store/mod.rs +++ b/src/bitmap/store/array_store/mod.rs @@ -132,9 +132,9 @@ impl ArrayStore { Err(_) => return false, }; - // If there are `ra...
1
3
3
e759e5af3a4c6c05b7921fa5fe62fdaf17111fbb
Zachary Dremann
2022-08-29T03:36:28
Implement range_cardinality function
diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs index 852c9616..d67ebf3e 100644 --- a/src/bitmap/inherent.rs +++ b/src/bitmap/inherent.rs @@ -1,3 +1,4 @@ +use std::cmp::Ordering; use std::ops::RangeBounds; use crate::RoaringBitmap; @@ -328,6 +329,71 @@ impl RoaringBitmap { } } + /// ...
1
66
0
dd05bac8a2a45b9bcd9431fcf0c5f769b4f11947
Zachary Dremann
2022-08-29T01:58:53
Add contains_range fn
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs index d260270b..2e61dc48 100644 --- a/src/bitmap/container.rs +++ b/src/bitmap/container.rs @@ -94,6 +94,14 @@ impl Container { self.store.contains(index) } + pub fn contains_range(&self, range: RangeInclusive<u16>) -> bool { + sel...
5
134
0
8f8ba583a691f248356b65b4fdbfd11e6645af3d
Zachary Dremann
2022-08-30T18:04:57
Cargo fmt
diff --git a/src/bitmap/util.rs b/src/bitmap/util.rs index 5f201b1e..d6fc7db6 100644 --- a/src/bitmap/util.rs +++ b/src/bitmap/util.rs @@ -37,8 +37,8 @@ where #[cfg(test)] mod test { - use std::ops::Bound; use super::{convert_range_to_inclusive, join, split}; + use std::ops::Bound; #[test] fn...
1
13
4
03382d7dd2981595d6ec001394cc2f3ba337f90a
Zachary Dremann
2022-08-29T14:06:49
Allow clippy warning for reversed ranges in test
diff --git a/src/bitmap/util.rs b/src/bitmap/util.rs index 9d6ae671..5f201b1e 100644 --- a/src/bitmap/util.rs +++ b/src/bitmap/util.rs @@ -65,6 +65,7 @@ mod test { } #[test] + #[allow(clippy::reversed_empty_ranges)] fn test_convert_range_to_inclusive() { assert_eq!(Some(1..=5), convert_rang...
1
1
0
4d285de884c994af0da8fbaea7f1c8c99e14b086
Zachary Dremann
2022-08-27T19:59:15
Use checked_add/sub rather than checking bounds explicitly
diff --git a/src/bitmap/util.rs b/src/bitmap/util.rs index 705ea370..9d6ae671 100644 --- a/src/bitmap/util.rs +++ b/src/bitmap/util.rs @@ -21,14 +21,12 @@ where { let start: u32 = match range.start_bound() { Bound::Included(&i) => i, - Bound::Excluded(&u32::MAX) => return None, - Bound::Exc...
1
12
5
b08393108f17fb96213626282f58e1e9c071120c
Tamo
2022-08-30T12:19:30
makes clippy happy
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs index f5750d01..078092d2 100644 --- a/src/bitmap/multiops.rs +++ b/src/bitmap/multiops.rs @@ -218,7 +218,7 @@ fn try_multi_or_owned<E>( let mut containers = if let Some(c) = start.next() { if c.is_empty() { // everything must be emp...
3
10
10
9bc19c5cd593afc4f0e686a9fa94cb7ae367555a
Tamo
2022-08-30T12:17:57
apply review comment
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs index 742c89ed..f5750d01 100644 --- a/src/bitmap/multiops.rs +++ b/src/bitmap/multiops.rs @@ -230,8 +230,12 @@ fn try_multi_or_owned<E>( } RetainMut::retain_mut(&mut containers, |container| { - container.ensure_correct_store(); - con...
1
14
6
bb4885a0285ec2f8fcdb37213a3ec118b5f7b90e
Tamo
2022-08-30T11:06:04
get rids of arbitrary
diff --git a/Cargo.toml b/Cargo.toml index ebf4eadb..3c59f6de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ simd = [] [dev-dependencies] proptest = { version = "1.0.0" } -arbitrary = { version = "1", features = ["derive"] } [profile.test] opt-level = 2
1
0
1
86ff10ba74afc830322a101be0c6789c0d4f3c3d
Tamo
2022-08-30T10:14:00
Typo Co-authored-by: Clément Renault <renault.cle@gmail.com>
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs index b61adea7..742c89ed 100644 --- a/src/bitmap/multiops.rs +++ b/src/bitmap/multiops.rs @@ -355,7 +355,7 @@ fn try_multi_xor_ref<'a, E: 'a>( Some(v) => v.containers.iter().map(Cow::Borrowed).collect(), }; - // Phase 2: Operate on the rema...
1
1
1
a10a5be6c4a28ba0225889af7613ead8164b5aca
Tamo
2022-08-30T10:12:11
merge the loops together
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs index 5643fd97..b61adea7 100644 --- a/src/bitmap/multiops.rs +++ b/src/bitmap/multiops.rs @@ -125,19 +125,13 @@ fn try_multi_and_owned<E>( let mut start = start.into_iter(); if let Some(mut lhs) = start.next() { - for rhs in start { - ...
1
5
25