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 |
|---|---|---|---|---|---|---|---|
39d3506268fbbbceaacdf87c36e67d8588003889 | Kerollmops | 2021-06-02T09:11:51 | Improve the xor ops readability by using the Pairs iterator | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 11f42a6d..a39b5ebb 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -1,10 +1,10 @@
-use std::cmp::Ordering;
use std::mem;
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Sub, SubAssign};
use retain_mut::RetainMut;
u... | 1 | 19 | 61 |
fdd0d450530930ed0e6981607ec3c9c617b837f7 | Kerollmops | 2021-06-02T08:59:49 | Introduce an enhanced version of the Pairs Iterator | diff --git a/src/bitmap/cmp.rs b/src/bitmap/cmp.rs
index 13aa53cf..ad4a7d0a 100644
--- a/src/bitmap/cmp.rs
+++ b/src/bitmap/cmp.rs
@@ -1,16 +1,11 @@
+use std::borrow::Borrow;
+use std::cmp::Ordering;
use std::iter::Peekable;
-use std::slice;
use super::container::Container;
use crate::RoaringBitmap;
-struct Pair... | 2 | 56 | 37 |
2b72832cf9fd36a70bef5c99313fa6ce35f80f89 | Clément Renault | 2021-05-28T11:27:11 | Batch all the successive and assign benchmarks | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 0e7d4a91..f953a453 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -357,13 +357,17 @@ fn successive_and(c: &mut Criterion) {
let mut group = c.benchmark_group("Successive And");
group.bench_function("Successiv... | 1 | 20 | 12 |
10c55eed73f2c49d2d07b3a80033be29fde03459 | Clément Renault | 2021-05-28T10:34:15 | Specify that Successive Owned benchmarks are large inputs | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index b3c4dfeb..0e7d4a91 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -372,7 +372,7 @@ fn successive_and(c: &mut Criterion) {
|bitmaps| {
black_box(bitmaps.into_iter().reduce(|a, b| a & b).unwra... | 1 | 2 | 2 |
ee5f8d6967e99091231cb3ea6434366617c6fc55 | Clément Renault | 2021-05-28T10:07:26 | Generate only one benchmarks report for all the from_sorted_iter numbers | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 9bd95195..b3c4dfeb 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -5,7 +5,7 @@ use std::num::ParseIntError;
use std::path::{Path, PathBuf};
use std::{fs, io};
-use criterion::{black_box, criterion_group, criterion_ma... | 1 | 9 | 12 |
775fb1907d70f1da2a88185eae49301550050e1f | Clément Renault | 2021-05-28T10:06:51 | Enable the html_reports feature of criterion | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index c5b97cc3..af6b3dcc 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -10,7 +10,7 @@ publish = false
roaring = { path = ".." }
[dev-dependencies]
-criterion = "0.3"
+criterion = { version = "0.3", features = ["html_reports"] }
quickche... | 1 | 1 | 1 |
7bfc0790a8f4d454aa17c3e35981d18117bf58fd | Clément Renault | 2021-05-28T12:57:14 | Implement clone_from on RoaringTreemap | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index fc6240c7..d8590102 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -265,3 +265,13 @@ impl Default for RoaringTreemap {
RoaringTreemap::new()
}
}
+
+impl Clone for RoaringTreemap {
+ fn clone(&self) -> Self {
+ ... | 2 | 11 | 1 |
3f8163626b0370f01e2b04c0319863957729bf30 | Clément Renault | 2021-05-28T12:56:14 | Implement clone_from on RoaringBitmap | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index 9974e842..100b96c6 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -365,6 +365,16 @@ impl Default for RoaringBitmap {
}
}
+impl Clone for RoaringBitmap {
+ fn clone(&self) -> Self {
+ RoaringBitmap { containers: sel... | 2 | 11 | 1 |
d63b2afe831c3a3618d62142747efe15cd3abd6c | Clément Renault | 2021-05-28T19:12:26 | Cargo fmt using the new config file | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 69cb254e..9bd95195 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -315,11 +315,7 @@ fn serialized_size(c: &mut Criterion) {
}
fn extract_integers<A: AsRef<str>>(content: A) -> Result<Vec<u32>, ParseIntError> {
- c... | 29 | 140 | 414 |
8200f8499093f460ec2f2e2e3abe81a3b4f97cc5 | Kerollmops | 2021-05-04T12:47:49 | Group the benchmarks to ease readability | diff --git a/benches/lib.rs b/benches/lib.rs
index 58e61384..69cb254e 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -349,7 +349,7 @@ fn from_sorted_iter(c: &mut Criterion) {
group.finish();
}
-fn successive_and_assign_ref(c: &mut Criterion) {
+fn successive_and(c: &mut Criterion) {
let files = self::... | 1 | 27 | 73 |
fb36739078e232aa8c3b10ac503db349ea14e622 | Clément Renault | 2021-05-02T14:30:54 | Introduce a successive benchmarks | diff --git a/benches/lib.rs b/benches/lib.rs
index 299ba39a..58e61384 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -1,10 +1,11 @@
mod datasets_paths;
+use std::cmp::Reverse;
use std::num::ParseIntError;
use std::path::{Path, PathBuf};
use std::{fs, io};
-use criterion::{black_box, criterion_group, criter... | 1 | 139 | 1 |
0c9ff0d8e86e8747517ee980ab10c945ed9bd1c3 | Clément Renault | 2021-05-02T13:52:27 | Introduce a from_sorted_iter benchmark | diff --git a/benches/lib.rs b/benches/lib.rs
index f5cbd5db..299ba39a 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -3,6 +3,8 @@ mod datasets_paths;
use std::num::ParseIntError;
use std::path::{Path, PathBuf};
use std::{fs, io};
+
+use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criter... | 1 | 22 | 1 |
3900a5603704fc5e8c326304f4db74273c8f9aa3 | Kerollmops | 2021-04-29T19:15:16 | Bump version to 0.7.0 | diff --git a/Cargo.toml b/Cargo.toml
index 950947b6..434b5b9b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.7"
+version = "0.7.0"
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
description = "http://roaringbitmap.org : A better c... | 1 | 1 | 1 |
d3ba299d79b8690a92083e55d5a906551f75b531 | Clément Renault | 2021-04-28T08:03:55 | Introduce a non-panicking push method
optimize push and fix correctness
min returns option | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 4c98046e..31bc628c 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -52,10 +52,16 @@ impl Container {
inserted
}
- pub fn push(&mut self, index: u16) {
+ /// Pushes `index` at the end of the container only if... | 4 | 53 | 62 |
752206da874cc5863ad4296ef01cc74eb19f5997 | Kerollmops | 2021-04-29T14:05:56 | Bump version to 0.6.7 | diff --git a/Cargo.toml b/Cargo.toml
index e1312da0..950947b6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.6"
+version = "0.6.7"
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
description = "http://roaringbitmap.org : A better c... | 1 | 1 | 1 |
6e335e89a7c567bfa7cbabb4efde997b78dc8d0d | Kerollmops | 2021-04-29T13:17:09 | Avoid using a vec in RoaringTreemap::SubAssign | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index a3773087..78cd3573 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -357,19 +357,17 @@ impl SubAssign<RoaringTreemap> for RoaringTreemap {
impl SubAssign<&RoaringTreemap> for RoaringTreemap {
/// A `difference` between two sets.
fn sub_ass... | 1 | 8 | 10 |
ce7c117c1086eeb5c3f2f2f85311ca090142a078 | Kerollmops | 2021-04-29T13:11:46 | Avoid using a vec in RoaringTreemap::BitXor | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index d20c8f90..a3773087 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -418,47 +418,37 @@ impl BitXor<&RoaringTreemap> for &RoaringTreemap {
impl BitXorAssign<RoaringTreemap> for RoaringTreemap {
/// A `symmetric difference` between two sets.
... | 1 | 12 | 22 |
5ec8f23533602fe968887059dd6e875a6fa4db6a | Kerollmops | 2021-04-29T13:07:52 | Improve the RoaringTreemap documentation | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 5920ba53..d20c8f90 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -36,7 +36,7 @@ impl RoaringTreemap {
/// ```
#[deprecated(
since = "0.6.7",
- note = "Please use the `BitOrAssign::bitor_assign` ops method instead"
+ ... | 1 | 28 | 28 |
a5d4aa841e085d43085d1de2a4ccdcd03c15d3a5 | Kerollmops | 2021-04-29T12:55:42 | Improve the RoaringBitmap documentation | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index ef03b971..11f42a6d 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -39,7 +39,7 @@ impl RoaringBitmap {
/// ```
#[deprecated(
since = "0.6.7",
- note = "Please use the `BitOrAssign::bitor_assign` ops method instead"
+ not... | 1 | 28 | 28 |
d8ea5257b0ffae74c5817f1e6c705f41189f1306 | Marin Postma | 2021-04-28T20:10:08 | fix clippy warnings | diff --git a/tests/is_disjoint.rs b/tests/is_disjoint.rs
index cf46b407..3fc9a2f7 100644
--- a/tests/is_disjoint.rs
+++ b/tests/is_disjoint.rs
@@ -5,28 +5,28 @@ use roaring::RoaringBitmap;
fn array() {
let bitmap1 = (0..2000).collect::<RoaringBitmap>();
let bitmap2 = (4000..6000).collect::<RoaringBitmap>();
... | 15 | 359 | 407 |
2d924353fd392de783f406dbed81a7d9b284e972 | Kerollmops | 2021-04-27T13:40:56 | Use the non-deprecated ops functions in the benchmarks | diff --git a/benches/lib.rs b/benches/lib.rs
index ba7218b2..dcde85ae 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -104,7 +104,7 @@ fn intersect_with(c: &mut Criterion) {
let bitmap2: RoaringBitmap = (100..200).collect();
b.iter(|| {
- bitmap1.intersect_with(black_box(&bitmap2));
+... | 1 | 3 | 3 |
7ad6842fab0dbe68ab99a86dda1ddec7ad148db8 | Kerollmops | 2021-04-27T10:01:27 | A little clippy pass | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index eac12aed..6f84e17d 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -368,6 +368,7 @@ impl BitOrAssign<&Store> for Store {
}
impl BitAndAssign<Store> for Store {
+ #[allow(clippy::suspicious_op_assign_impl)]
fn bitand_assign(&mut self,... | 1 | 2 | 0 |
afcfca061c86916165982b53e6c57612175b52d7 | Clément Renault | 2021-04-24T14:25:46 | Use the ops operators in the treemap tests | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index abffe592..5920ba53 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -16,7 +16,7 @@ impl RoaringTreemap {
/// let rb2: RoaringTreemap = (3..5).collect();
/// let rb3: RoaringTreemap = (1..5).collect();
///
- /// rb1.union_with(&rb2);... | 5 | 38 | 38 |
438469f9eae6989c34fe19810bd7f916a268a680 | Clément Renault | 2021-04-24T14:23:42 | Introduce the optimized BitXor operations on the treemap type | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 80ae3ba8..abffe592 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -145,25 +145,12 @@ impl RoaringTreemap {
///
/// assert_eq!(rb1, rb3);
/// ```
+ #[deprecated(
+ since = "0.6.7",
+ note = "Please use the `BitXorAssi... | 1 | 62 | 31 |
f52471e31840cff2d1b1be5c6039b75d5689499f | Clément Renault | 2021-04-24T13:55:21 | Introduce the optimized Sub operations on the treemap type | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index bc84dd8f..80ae3ba8 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -108,20 +108,12 @@ impl RoaringTreemap {
///
/// assert_eq!(rb1, rb3);
/// ```
+ #[deprecated(
+ since = "0.6.7",
+ note = "Please use the `SubAssign:... | 1 | 36 | 26 |
711076b9266bb49b2f87f501ec64481e1f2a2477 | Clément Renault | 2021-04-24T13:32:38 | Introduce the optimized BitAnd operations on the treemap type | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 5d57465e..bc84dd8f 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -71,25 +71,12 @@ impl RoaringTreemap {
///
/// assert_eq!(rb1, rb3);
/// ```
+ #[deprecated(
+ since = "0.6.7",
+ note = "Please use the `BitAndAssign... | 1 | 49 | 32 |
df627e0293b9cb0574dd8ee3e0cea3474b526305 | Clément Renault | 2021-04-24T09:53:54 | Introduce the optimized BitOr operations on the treemap type | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 02312631..5d57465e 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -1,4 +1,5 @@
use std::collections::btree_map::Entry;
+use std::mem;
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Sub, SubAssign};
use crate::Ro... | 1 | 53 | 24 |
83aa429d2d5d77610575cad65a0bcfd8c6c5a84f | Clément Renault | 2021-04-24T09:22:27 | Use the ops operators in the bitmap tests | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 08ebd8c1..ef03b971 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -19,7 +19,7 @@ impl RoaringBitmap {
/// let rb2: RoaringBitmap = (3..5).collect();
/// let rb3: RoaringBitmap = (1..5).collect();
///
- /// rb1.union_with(&rb2);
+ /... | 5 | 38 | 38 |
455e0b97ff93a8bff3091ea7eb677893b00ad936 | Clément Renault | 2021-04-23T12:37:54 | Remove the internal raw operation methods | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 861df142..4c98046e 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -92,38 +92,6 @@ impl Container {
self.len <= other.len && self.store.is_subset(&other.store)
}
- #[deprecated(
- since = "0.6.7",
- ... | 2 | 0 | 64 |
c6b144ae184e51340a5e58b590c6f7ec596dc3c3 | Kerollmops | 2021-04-22T15:51:48 | Introduce the optimized BitXorAssign operations | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 1886ff16..861df142 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -1,4 +1,4 @@
-use std::ops::{BitAndAssign, BitOrAssign, SubAssign};
+use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, SubAssign};
use std::{fmt, ops::Rang... | 3 | 205 | 73 |
daf20e8232cafc354b62c1932427e74a9490d566 | Kerollmops | 2021-04-22T14:17:00 | Introduce the optimized Sub operations | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 79788c34..1886ff16 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -1,4 +1,4 @@
-use std::ops::{BitAndAssign, BitOrAssign};
+use std::ops::{BitAndAssign, BitOrAssign, SubAssign};
use std::{fmt, ops::Range};
use super::store::... | 3 | 58 | 50 |
a40e16dacdf328e217ecbc0dfd7d1a29f60e62bf | Kerollmops | 2021-04-22T13:33:32 | Introduce the optimized BitAnd operations | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 5841c190..79788c34 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -1,4 +1,4 @@
-use std::ops::BitOrAssign;
+use std::ops::{BitAndAssign, BitOrAssign};
use std::{fmt, ops::Range};
use super::store::{self, Store};
@@ -105,9 +1... | 3 | 120 | 63 |
e0c08e32f572fc21211942921c22161717e61eff | Clément Renault | 2021-04-24T09:55:30 | Introduce the optimized BitOr operations | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 7f60e9d0..5841c190 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -1,3 +1,4 @@
+use std::ops::BitOrAssign;
use std::{fmt, ops::Range};
use super::store::{self, Store};
@@ -93,17 +94,15 @@ impl Container {
#[deprecated... | 3 | 146 | 95 |
824a58f2f4713b777193665afa60e2f0733b078d | Kerollmops | 2021-04-22T08:58:45 | Document the ops traits set operations equivalence | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 1c1c4e65..6da33d19 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -189,6 +189,7 @@ impl RoaringBitmap {
impl BitOr<RoaringBitmap> for RoaringBitmap {
type Output = RoaringBitmap;
+ /// This is equivalent to an `union` between both maps.
... | 1 | 39 | 15 |
141158b4ae57240f4088dde12ce14b119ec40dd4 | Kerollmops | 2021-04-22T08:52:49 | Mark the raw ops methods as deprecated | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 89b97156..7f60e9d0 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -91,24 +91,40 @@ impl Container {
self.len <= other.len && self.store.is_subset(&other.store)
}
+ #[deprecated(
+ since = "0.6.7",
+ ... | 3 | 48 | 0 |
b791d7852b3137f38daebeea06fcdb03b37ad981 | Clément Renault | 2021-04-21T09:07:50 | Add my nickname in the authors section | diff --git a/Cargo.toml b/Cargo.toml
index 334ff50e..e1312da0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
version = "0.6.6"
-authors = ["Wim Looman <wim@nemo157.com>"]
+authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
description = "http://roari... | 1 | 1 | 1 |
cccf8f3a9e1cabb53e870853becfebe93db44322 | Clément Renault | 2021-04-21T09:07:14 | Bump version to 0.6.6 | diff --git a/Cargo.toml b/Cargo.toml
index 1147cf97..334ff50e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.5"
+version = "0.6.6"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
7adbc2f8356f01b32e808cdd533d62458fdb08f7 | Kerollmops | 2021-04-20T13:47:05 | Use the smallest vec when intersecting two Store arrays | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index dc46ae14..46d7e68a 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -1,7 +1,6 @@
use std::cmp::Ordering::{Equal, Greater, Less};
-use std::slice;
-use std::vec;
use std::{borrow::Borrow, ops::Range};
+use std::{mem, slice, vec};
const BITMAP... | 1 | 13 | 10 |
3ac1a2c25716c54ce3d965dcc6670bc7f981f4d2 | Kerollmops | 2021-04-20T09:54:33 | Optimize the BitOr/Assign Bitmap operators | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 468c69c1..6fb915c3 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -171,47 +171,61 @@ impl RoaringBitmap {
}
impl BitOr<RoaringBitmap> for RoaringBitmap {
- type Output = crate::RoaringBitmap;
+ type Output = RoaringBitmap;
- fn bitor(mut... | 1 | 31 | 17 |
0ed658298d3ed56e42e92904364d302254d8ebb0 | Kerollmops | 2021-04-20T09:46:13 | Optimize the BitAnd/Assign Bitmap operators | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index faf85cb4..468c69c1 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -217,47 +217,61 @@ impl<'a> BitOrAssign<&'a RoaringBitmap> for RoaringBitmap {
}
impl BitAnd<RoaringBitmap> for RoaringBitmap {
- type Output = crate::RoaringBitmap;
-
- fn bit... | 1 | 32 | 18 |
5fe5a0556a0b92eba6ea252cc94c13e681274d27 | Pen Tree | 2021-04-12T05:50:38 | remove redundant slicing | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index d72ef201..1501d697 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -408,7 +408,7 @@ mod tests {
// Assert all values in the range are present
for i in r.clone() {
- assert!(b.contains(i as u32), format!... | 5 | 16 | 16 |
5b4f30ea8a52c3e291e7ecf278f9656c7f0594ae | Clément Renault | 2021-02-20T19:21:11 | Bump version to 0.6.5 | diff --git a/Cargo.toml b/Cargo.toml
index 0235b7f6..1147cf97 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.4"
+version = "0.6.5"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
e6287737b2b8d1b3bb2bb46598ddef96f9543f51 | Clément Renault | 2021-02-20T17:24:18 | Use some unsafe for the merge_arrays function | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index c91dfdec..dc46ae14 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -296,17 +296,19 @@ impl Store {
let mut i = 0;
let mut j = 0;
while i < arr1.len() && j < arr2.len() {
- ... | 1 | 6 | 4 |
6bfeb0c07a01c3b14361ad65f834e5a495684ddf | Clément Renault | 2021-02-20T09:33:58 | Limit the number of reallocation when merging two arrays | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 11d9362d..c91dfdec 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -289,7 +289,8 @@ impl Store {
match (self, other) {
(&mut Array(ref mut vec1), &Array(ref vec2)) => {
fn merge_arrays(arr1: &[u16], arr2: &... | 1 | 2 | 1 |
db5dd73c1d8bfa6fb60299ad5236524c67952445 | Clément Renault | 2021-02-20T19:03:19 | Allocate new Vec when we do an union between two arrays | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index db5bec23..11d9362d 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -288,20 +288,39 @@ impl Store {
pub fn union_with(&mut self, other: &Self) {
match (self, other) {
(&mut Array(ref mut vec1), &Array(ref vec2)) => {
- ... | 1 | 30 | 11 |
1a1ea62ff7cc48d12ad6bf12eede707d29ce41a1 | Clément Renault | 2021-02-20T18:45:41 | Use the retain_mut external library | diff --git a/Cargo.toml b/Cargo.toml
index 3064638d..0235b7f6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,6 +20,7 @@ travis-ci = { repository = "Nemo157/roaring-rs" }
[dependencies]
bytemuck = "1.5.1"
byteorder = "1.0"
+retain_mut = "0.1.2"
[dev-dependencies]
criterion = "0.3"
diff --git a/src/bitmap/ops.rs ... | 3 | 5 | 25 |
be53167216982f7cc9a200dfc0b771af42640b1a | Clément Renault | 2021-02-20T16:16:57 | Improve the RoaringBitmap deserialize_from method | diff --git a/Cargo.toml b/Cargo.toml
index c52b7171..3064638d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,6 +18,7 @@ license = "MIT/Apache-2.0"
travis-ci = { repository = "Nemo157/roaring-rs" }
[dependencies]
+bytemuck = "1.5.1"
byteorder = "1.0"
[dev-dependencies]
diff --git a/src/bitmap/serialization.rs b... | 2 | 7 | 7 |
b610b431b6d55c23f64f2e4ce2dc1e990b27542f | Clément Renault | 2021-01-23T10:15:10 | Bump version to 0.6.4 | diff --git a/Cargo.toml b/Cargo.toml
index ee78fa30..c52b7171 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.3"
+version = "0.6.4"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
543fa6cb8316179b4a19d0bb6978d1304819a28a | Clément Renault | 2021-01-23T10:10:20 | Use retain instead of Vec remove in Bitmap difference_with | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 776ec54b..b05c612e 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -113,23 +113,15 @@ impl RoaringBitmap {
/// assert_eq!(rb1, rb3);
/// ```
pub fn difference_with(&mut self, other: &RoaringBitmap) {
- let mut index = 0;
- w... | 1 | 6 | 14 |
5d7b3e9bf46fa0f21e680bc0df98314df93082e9 | Clément Renault | 2021-01-23T10:10:44 | Use retain instead of Vec remove in Bitmap intersect_with | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 31e7da9a..776ec54b 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -1,6 +1,6 @@
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Sub, SubAssign};
-use crate::RoaringBitmap;
+use crate::{retain_mut, RoaringBitmap};
imp... | 1 | 7 | 15 |
ac67892adae87de336fac692a512236628c99195 | Clément Renault | 2021-01-21T18:20:47 | Introduce a retain_mut function | diff --git a/src/lib.rs b/src/lib.rs
index ddfff074..01d03c7f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,3 +21,25 @@ pub mod treemap;
pub use bitmap::RoaringBitmap;
pub use treemap::RoaringTreemap;
+
+fn retain_mut<T, F>(vec: &mut Vec<T>, mut f: F)
+where
+ F: FnMut(&mut T) -> bool,
+{
+ let len = vec.le... | 1 | 22 | 0 |
40d1c8aef0b6a9dea3d2e78aac971e5768e472b7 | Clément Renault | 2021-01-20T12:59:28 | Bump version to 0.6.3 | diff --git a/Cargo.toml b/Cargo.toml
index f4a977b4..ee78fa30 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.2"
+version = "0.6.3"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
7be13bd9b39c17f6816473d475e79a67d6bc70de | Clément Renault | 2021-01-19T18:07:53 | Do a clippy pass | diff --git a/src/bitmap/cmp.rs b/src/bitmap/cmp.rs
index 746ac5c2..908453b7 100644
--- a/src/bitmap/cmp.rs
+++ b/src/bitmap/cmp.rs
@@ -118,7 +118,7 @@ impl<'a> Iterator for Pairs<'a> {
Right,
Both,
None,
- };
+ }
let which = match (self.0.peek(), self.1.peek... | 2 | 2 | 2 |
374a9157952e4dadcab13fd6f56e984c961eceeb | Clément Renault | 2021-01-19T18:00:27 | Do an rustfmt pass | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 42747732..db5bec23 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -325,7 +325,11 @@ impl Store {
(&mut Array(ref mut vec1), &Array(ref vec2)) => {
let mut i = 0;
vec1.retain(|x| {
- ... | 1 | 10 | 2 |
50e9cf743d637fa10ed13d0d3d08a15030865294 | Kerollmops | 2021-01-19T15:18:32 | Uses retain instead of remove for array array differences | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 456e8140..42747732 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -348,24 +348,11 @@ impl Store {
pub fn difference_with(&mut self, other: &Self) {
match (self, other) {
(&mut Array(ref mut vec1), &Array(ref vec2)) =>... | 1 | 5 | 18 |
f7fa07aaf94f647a4334a6d9ee913a097005ad52 | Kerollmops | 2021-01-19T15:15:47 | Uses retain instead of remove for bitmap array differences | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 97d6377b..456e8140 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -378,11 +378,7 @@ impl Store {
}
}
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
- for i in (0..vec.len()).rev() {... | 1 | 1 | 5 |
a2b3f9273e2d41bbc32284e114bc7a30a059e331 | Kerollmops | 2021-01-18T21:01:42 | Uses retain instead of remove for array array intersects | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index a395d918..97d6377b 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -323,23 +323,11 @@ impl Store {
pub fn intersect_with(&mut self, other: &Self) {
match (self, other) {
(&mut Array(ref mut vec1), &Array(ref vec2)) => ... | 1 | 5 | 17 |
3122475b9c8fffeb4d19e54f533b9eadb7864389 | Clément Renault | 2021-01-18T18:41:27 | Uses retain instead of remove for array bitmap intersects | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 2bf6cf83..a395d918 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -347,11 +347,7 @@ impl Store {
}
}
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
- for i in (0..(vec.len())).rev()... | 1 | 1 | 5 |
10676c6847ee5197b584c296ba0f3de529b579a4 | Artem Vorotnikov | 2021-01-05T14:49:10 | More tests | diff --git a/tests/treemap_serialization.rs b/tests/treemap_serialization.rs
index f08c7171..271673a9 100644
--- a/tests/treemap_serialization.rs
+++ b/tests/treemap_serialization.rs
@@ -1,7 +1,11 @@
use roaring::RoaringTreemap;
use std::iter::FromIterator;
-fn serialize_deserialize(dataset: Vec<u64>) {
+fn seriali... | 1 | 35 | 3 |
56994a03d56b92cf654354fc51a88248aa370093 | Artem Vorotnikov | 2021-01-03T20:48:06 | Treemap serialization | diff --git a/src/treemap/mod.rs b/src/treemap/mod.rs
index 806738b9..da28ca05 100644
--- a/src/treemap/mod.rs
+++ b/src/treemap/mod.rs
@@ -10,6 +10,7 @@ mod cmp;
mod inherent;
mod iter;
mod ops;
+mod serialization;
pub use self::iter::{IntoIter, Iter};
diff --git a/src/treemap/serialization.rs b/src/treemap/ser... | 3 | 109 | 0 |
dba9e2a71f2d8dc98259d47b1329abbd21b061bb | Clément Renault | 2020-12-06T14:09:13 | Update version to 0.6.2 | diff --git a/Cargo.toml b/Cargo.toml
index 2e340d2f..f4a977b4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.1"
+version = "0.6.2"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
4077d19f9966bab3f10c65e4e5b120eee17e07a9 | Dom | 2020-12-06T10:22:23 | fix: use Treemap instead of Bitmap | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 217002c7..022d8bdb 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -135,7 +135,7 @@ impl RoaringTreemap {
/// use roaring::RoaringTreemap;
/// use std::iter::FromIterator;
///
- /// let bitmap = (1..3).collect::<RoaringBitmap>(... | 1 | 3 | 3 |
0fc7a106a6a5e38ac33cc313a9bf400890841ee8 | Dom | 2020-12-06T10:06:41 | refactor: fix all clippy-on-beta lints
So despite #78 passing CI and being merged, the PR for #76 failed on
more `from_iter()` that were not a problem before!
This PR fixes all the lints shown when running:
cargo +beta clippy --all-targets -- -D warnings | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 457f3627..217002c7 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -135,7 +135,7 @@ impl RoaringTreemap {
/// use roaring::RoaringTreemap;
/// use std::iter::FromIterator;
///
- /// let bitmap = RoaringTreemap::from_iter(1..3);... | 13 | 208 | 238 |
03023f7509789b7f69f5c93961a13474aa5a40d1 | Dom | 2020-12-05T12:10:40 | refactor: fix clippy lints | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index eba81a3d..2bf6cf83 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -610,6 +610,7 @@ mod tests {
}
#[test]
+ #[allow(clippy::reversed_empty_ranges)]
fn test_array_insert_invalid_range() {
let mut store = Store::Array(... | 1 | 2 | 0 |
a68d24f68d4335739de64e7691c676a3b22547c3 | Dom | 2020-12-03T14:34:34 | refactor: fix clippy lints | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index e50aabe9..89b97156 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -41,10 +41,8 @@ impl Container {
pub fn insert_range(&mut self, range: Range<u16>) -> u64 {
// If the range is larger than the array limit, skip pop... | 2 | 3 | 5 |
094b73187bda120f9f68e5a01ffc15f9d7c22ced | Dom | 2020-12-02T22:49:18 | refactor: clone range
Clone the range for use in the vec.splice() iterator argument rather than
destructuring. | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 64761832..5637c4b7 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -51,18 +51,16 @@ impl Store {
match *self {
Array(ref mut vec) => {
- let (range_start, range_end) = (range.start, range.end);
-
... | 1 | 4 | 6 |
8f8dbe1e8904b66d056a68a28e339596e4348d0d | Dom | 2020-11-29T15:29:49 | style: use unwrap_or_else | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 54b5d15a..64761832 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -54,8 +54,8 @@ impl Store {
let (range_start, range_end) = (range.start, range.end);
// Figure out the starting/ending position in the vec
- ... | 1 | 2 | 10 |
fa549f6f481227a8d69197114864c29d3dc1ab01 | Dom | 2020-11-29T14:05:02 | docs(insert_range): docs with example | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index 43e26ab7..d72ef201 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -43,6 +43,27 @@ impl RoaringBitmap {
container.insert(index)
}
+ /// Inserts a range of values from the set specific as [start..end). Returns
+ ... | 1 | 21 | 0 |
2b1d7f89333592113625a3851004054a15c8d9f2 | Dom | 2020-11-29T09:11:47 | perf(container): use bitmap for large ranges
Instead of populating the array with the range values and then converting the
(potentially large) resulting array into a bitmap, populate a bitmap directly
if the range exceeds the array limit. | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 62e976ce..e50aabe9 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -39,6 +39,14 @@ impl Container {
}
pub fn insert_range(&mut self, range: Range<u16>) -> u64 {
+ // If the range is larger than the array limit,... | 1 | 8 | 0 |
2c7609106c77d655023cac91d67a74c522db0fc4 | Dom | 2020-11-29T08:57:01 | test(bench): add insert_range benchmarks
insert_range/from_empty_10
time: [189.24 ns 192.40 ns 195.47 ns]
thrpt: [51.158 Melem/s 51.974 Melem/s 52.844 Melem/s]
insert_range/pre_populated_10
time: [176.58 ns 178.94 ns 181.23 ns]
thrpt: [55.178 Melem/s 55.884 Melem/s 56.631 Melem/s]
... | diff --git a/benches/lib.rs b/benches/lib.rs
index d7c8a7f0..ba7218b2 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -206,6 +206,30 @@ fn remove_range_bitmap(c: &mut Criterion) {
});
}
+fn insert_range_bitmap(c: &mut Criterion) {
+ for &size in &[10, 100, 1_000, 5_000, 10_000, 20_000] {
+ let mut... | 1 | 25 | 0 |
3d736f4ce4888df2c38c0b68e94aafc4208a2f95 | Dom | 2020-11-28T17:17:49 | feat(insert_range): optimised insert for ranges
Adds an optimised insert path for consecutive values (the Range rust
type).
The `insert_range()` function accepts `Range<u64>` for operating on u32
values to maintain parity with `remove_range()`, supporting inclusive
u32 ranges.
Inserting the range 0..1000, `insert_ra... | diff --git a/Cargo.toml b/Cargo.toml
index 118fef79..2e340d2f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,6 +22,8 @@ byteorder = "1.0"
[dev-dependencies]
criterion = "0.3"
+quickcheck = "0.9"
+quickcheck_macros = "0.9"
[[bench]]
name = "lib"
diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
ind... | 4 | 360 | 3 |
51b4f9dd749d56a821a76d1abb98a7fbf1fca1dd | Dom | 2020-12-04T21:54:20 | test: use collect() over from_iter()
Change all calls to from_iter() into calls to collect().
Closes #77. | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index 49e6daf1..4f705d64 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -90,7 +90,7 @@ impl RoaringBitmap {
/// use roaring::RoaringBitmap;
/// use std::iter::FromIterator;
///
- /// let bitmap = RoaringBitmap::from_iter(1..3);
+ ///... | 14 | 117 | 117 |
b3d62c70709ab6b282f6c71b34fc8a3637d6126d | detailyang | 2020-11-09T15:44:54 | chore:apply cargo fmt
Signed-off-by: detailyang <detailyang@gmail.com> | diff --git a/tests/serialization.rs b/tests/serialization.rs
index a88b6ab4..37c7ed18 100644
--- a/tests/serialization.rs
+++ b/tests/serialization.rs
@@ -74,7 +74,6 @@ fn test_bitmap_boundary() {
assert_eq!(original, new);
}
-
#[test]
fn test_bitmap_high16bits() {
let mut bitmap = RoaringBitmap::new(); | 1 | 0 | 1 |
6ad7af0da80670f2e39e1ca114968b4503098a4f | detailyang | 2020-11-09T09:52:19 | chroe:update tests/serialization.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/tests/serialization.rs b/tests/serialization.rs
index 56367bd2..a88b6ab4 100644
--- a/tests/serialization.rs
+++ b/tests/serialization.rs
@@ -78,7 +78,7 @@ fn test_bitmap_boundary() {
#[test]
fn test_bitmap_high16bits() {
let mut bitmap = RoaringBitmap::new();
- for i in 0..1<<16 {
+ for i in ... | 1 | 1 | 1 |
facce17e6599eb49bcf45cf9550d458f3be61a49 | detailyang | 2020-11-06T03:56:05 | tests:add high16bits serialization tests
Signed-off-by: detailyang <detailyang@gmail.com> | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 94292cbe..ef76bd72 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -130,7 +130,7 @@ impl RoaringBitmap {
}
};
- if size > u32::max_value() as usize {
+ if size > u16::max_valu... | 2 | 18 | 1 |
6d5343e0aa48c34735fb552cf05c57a8ff2a2bad | detailyang | 2020-11-05T07:09:50 | bugfix:deserialize:cotainers max len should be u32 | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 3ecff394..94292cbe 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -130,7 +130,7 @@ impl RoaringBitmap {
}
};
- if size > u16::max_value() as usize {
+ if size > u32::max_valu... | 1 | 1 | 1 |
db182320bf7ec34da2602497c556032f0a45953f | Joseph Glanville | 2020-11-01T12:20:44 | Add remove_range benchmark that triggers bitmap to array conversion | diff --git a/benches/lib.rs b/benches/lib.rs
index ac08e5c5..d7c8a7f0 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -184,7 +184,7 @@ fn remove(c: &mut Criterion) {
}
fn remove_range_bitmap(c: &mut Criterion) {
- c.bench_function("remove_range", |b| {
+ c.bench_function("remove_range 1", |b| {
l... | 1 | 11 | 1 |
12e047f9985cb9bb37af65cc0239fb7d0cdea92c | Franklyn D'souza | 2020-10-21T19:27:52 | even better implementation from the original project | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 0ced37c7..d834c190 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -203,7 +203,7 @@ impl Store {
for (index, mut bit) in bits.iter().cloned().enumerate() {
while bit != 0 {
vec.push(... | 1 | 1 | 1 |
29721ea55eb4d143631a4812319c979836e67624 | Franklyn D'souza | 2020-10-21T16:58:05 | use trailing zeros to skip over empty bits | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 86ab10c8..0ced37c7 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -200,11 +200,10 @@ impl Store {
Array(..) => panic!("Cannot convert array to array"),
Bitmap(ref bits) => {
let mut vec = Vec::new();
-... | 1 | 4 | 5 |
c3d5b29c28dc94eaeb2e2fb732cb681af31437cc | Tommaso Fontana | 2020-10-29T19:41:30 | Update src/treemap/iter.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 5f565f8f..093efe41 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -242,7 +242,7 @@ impl RoaringTreemap {
}
/// Extend the set with a sorted iterator.
- /// All value of the iterator **must** be strictly bigger than the max elemen... | 1 | 1 | 1 |
dc2151c2fc2bb0d43ace788bf722dc0032e30361 | Tommaso Fontana | 2020-10-29T19:41:24 | Update src/treemap/iter.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 10a3a8b2..5f565f8f 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -222,8 +222,7 @@ impl Extend<u64> for RoaringTreemap {
}
impl RoaringTreemap {
- /// Create the set from a sorted iterator.
- /// The value **must** be strictly sorted.... | 1 | 1 | 2 |
eb937e77e6c9c435402a527f47058fd15ac42a91 | Tommaso Fontana | 2020-10-29T19:41:17 | Update src/treemap/inherent.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index 1184cd11..c334bb8f 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -42,7 +42,7 @@ impl RoaringTreemap {
}
/// Adds a value to the set.
- /// The value **must** be strictly bigger than the maximum value in the set.
... | 1 | 1 | 1 |
2633f302131e51a256774857ee31add0943ac73a | Tommaso Fontana | 2020-10-29T19:41:10 | Update src/bitmap/iter.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index f4890180..49e6daf1 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -137,8 +137,7 @@ impl Extend<u32> for RoaringBitmap {
}
impl RoaringBitmap {
- /// Create the set from a sorted iterator.
- /// The value **must** be strictly sorted.
+ ... | 1 | 1 | 2 |
9ad4a1b7e3919ba5f79228c3d293a0840c328cae | Tommaso Fontana | 2020-10-29T19:41:00 | Update src/bitmap/inherent.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index e0dce710..a8076d2f 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -44,7 +44,7 @@ impl RoaringBitmap {
}
/// Adds a value to the set.
- /// The value **must** be bigger or equal to the maximum value in the set.
+ //... | 1 | 1 | 1 |
4cdf66fe127f50862174e788d9e8a58850fcaeb3 | Tommaso Fontana | 2020-10-29T17:33:30 | Update src/bitmap/store.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index c04a3027..86ab10c8 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -44,8 +44,9 @@ impl Store {
}
/// Push the value that must be the new max of the set.
+ ///
/// This function returns whether the value is equal to the
- /... | 1 | 2 | 1 |
91a46950d860e5627d3c5765d67b14b6f257156c | Tommaso Fontana | 2020-10-27T08:14:46 | Update src/bitmap/inherent.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index c86b86c8..e0dce710 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -44,8 +44,7 @@ impl RoaringBitmap {
}
/// Adds a value to the set.
- /// The value **must** be bigger than the maximum value in the set
- /// but du... | 1 | 1 | 2 |
3ffd070902082c4f8c6b3a712b846328fefb9bfe | zom | 2020-10-27T08:14:20 | formatted the code | diff --git a/tests/push.rs b/tests/push.rs
index ed506c56..46943262 100644
--- a/tests/push.rs
+++ b/tests/push.rs
@@ -1,34 +1,38 @@
extern crate roaring;
-use std::iter::FromIterator;
use roaring::{RoaringBitmap, RoaringTreemap};
+use std::iter::FromIterator;
/// macro created to reduce code duplication
macro_ru... | 1 | 20 | 16 |
8bbca352f1393a08b8a6acc012c220477e0b2cd3 | zom | 2020-10-27T08:10:55 | fixed a bug and improved documentation and test | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 5476215b..a06d2edf 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -38,13 +38,10 @@ impl Container {
}
}
- pub fn push(&mut self, index: u16) -> bool {
+ pub fn push(&mut self, index: u16) {
if self... | 7 | 48 | 23 |
81ff08bcba026e7737756183a6a1c371a0889f85 | zom | 2020-10-26T18:37:28 | fixed bittreemap | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index 5e1f7fde..71e030e8 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -56,7 +56,7 @@ impl RoaringTreemap {
///
/// assert_eq!(rb.iter().collect::<Vec<u64>>(), vec![1, 3, 5]);
/// ```
- pub fn push(&mut self, value:... | 1 | 1 | 1 |
7ac6c74d3aa4b132f4fa9a86d7520dc44d4fe767 | zom | 2020-10-26T18:36:46 | fixed len error and now push returns a bool like insert | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index bd155c42..5476215b 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -38,10 +38,14 @@ impl Container {
}
}
- pub fn push(&mut self, index: u16) {
- self.store.push(index);
- self.len += 1;
- ... | 3 | 20 | 8 |
0688d481d8aece1e7eec578788ce26fd7bfd6ce0 | zom | 2020-10-26T17:08:35 | formatted the code | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index 268bec58..5e1f7fde 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -56,7 +56,7 @@ impl RoaringTreemap {
///
/// assert_eq!(rb.iter().collect::<Vec<u64>>(), vec![1, 3, 5]);
/// ```
- pub fn push(&mut self, value:... | 1 | 1 | 1 |
47c09550d5f47009d329f63a7a3b0140ec08fd8b | zom | 2020-10-26T17:02:48 | formatted the code | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 4d3cf976..6c293a1d 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -46,10 +46,10 @@ impl Store {
pub fn push(&mut self, index: u16) {
match *self {
Array(ref mut vec) => {
- if vec.is_empty() || vec.last... | 1 | 2 | 2 |
6ebe23b55a08b459a5e23893364aad53d2ec3832 | Tommaso Fontana | 2020-10-26T16:52:35 | Update src/bitmap/store.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 4d3cf976..0e71cbfd 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -46,7 +46,7 @@ impl Store {
pub fn push(&mut self, index: u16) {
match *self {
Array(ref mut vec) => {
- if vec.is_empty() || vec.last()... | 1 | 1 | 1 |
d9f0de7f71e8e090648111ed8b3b7d4f64ded610 | zom | 2020-10-26T16:43:06 | changed push so that we don't crash on duplicates in push | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index 57b6cba2..9e7aef97 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -74,7 +74,7 @@ impl RoaringBitmap {
}
let last = self.containers.last_mut().unwrap();
assert!(last.key <= key);
- assert!(last.len =... | 2 | 6 | 2 |
7681f19955e871bc278bd785465d7dffaddf532d | zom | 2020-10-26T15:42:23 | extended the tests | diff --git a/tests/push.rs b/tests/push.rs
index ffe5d216..8a3af949 100644
--- a/tests/push.rs
+++ b/tests/push.rs
@@ -3,7 +3,7 @@ use roaring::{RoaringBitmap, RoaringTreemap};
#[test]
fn append() {
- let values = (0..10u32).map(|x| 13 * x).collect::<Vec<u32>>();
+ let values = (0..1_000_000u32).map(|x| 13 * ... | 1 | 2 | 2 |
67395d4e98fe91b62f7103ed39da6f0a817f3831 | zom | 2020-10-26T15:39:43 | implemneted the methods also for the RoaringTreemap | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index 96397d72..268bec58 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -41,6 +41,29 @@ impl RoaringTreemap {
.insert(lo)
}
+ /// Adds a value to the set.
+ /// The value **must** be strictly bigger than the ... | 3 | 75 | 1 |
d44dfd643d6eb0e8efb420f12fa3d42f2b703b1b | zom | 2020-10-26T15:34:35 | formatted the code (missed one file before) | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index 24f9e6c5..25d970e5 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -139,14 +139,14 @@ impl Extend<u32> for RoaringBitmap {
impl RoaringBitmap {
/// Create the set from a sorted iterator.
/// The value **must** be strictly sorted.
- ///... | 1 | 4 | 4 |
2cd8375f2029f7bd4aea968ca754dd2d5f27377c | zom | 2020-10-26T15:29:11 | formatted the code | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 3f739337..bd155c42 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -38,7 +38,7 @@ impl Container {
}
}
- pub fn push(&mut self, index: u16){
+ pub fn push(&mut self, index: u16) {
self.store.push(in... | 3 | 10 | 10 |
d235ea2cc51ac0f8cffe5dd543dd77320e38ddfb | zom | 2020-10-26T15:27:10 | added documentation | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 8287f1a7..3f739337 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -39,7 +39,7 @@ impl Container {
}
pub fn push(&mut self, index: u16){
- self.store.push(index);
+ self.store.push(index);
self.l... | 4 | 45 | 4 |
e2f8a08231fe15953ed64a8ce24246ee93e3f88c | zom | 2020-10-26T12:20:52 | added from_sorted_iter | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index a37dc24e..e63f371d 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -137,6 +137,12 @@ impl Extend<u32> for RoaringBitmap {
}
impl RoaringBitmap {
+ pub fn from_sorted_iter<I: IntoIterator<Item = u32>>(iterator: I) -> RoaringBitmap {
+ l... | 1 | 6 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.