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 |
|---|---|---|---|---|---|---|---|
857c991f4af707bcce363ec71d3497d05bc3805c | zom | 2020-10-26T12:17:24 | implemented append | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index e80cdef2..8287f1a7 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -38,6 +38,12 @@ impl Container {
}
}
+ pub fn push(&mut self, index: u16){
+ self.store.push(index);
+ self.len += 1;
+ sel... | 5 | 57 | 0 |
67784ad109cafbbb5104d3b76a0511875ab1c997 | Clément Renault | 2020-09-13T16:32:16 | Implement the run run difference_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 949aff54..930ba83a 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -674,13 +674,17 @@ impl Store {
this.remove_range(iv.start as u32, iv.end as u32 + 1);
}
}
- // TODO(jpg) difference... | 1 | 6 | 2 |
9744f12a9f0a829b57aa75fef11ba45a4db3c8df | Clément Renault | 2020-09-13T14:57:54 | Implement the array run is_subset operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index ad628596..949aff54 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -324,8 +324,7 @@ impl Store {
}
}
(&Array(ref vec), store @ &Bitmap(..)) => vec.iter().all(|&i| store.contains(i)),
- // TOD... | 1 | 1 | 2 |
c762f938a6bbec52f6d38f42f504b913c95315db | Clément Renault | 2020-09-13T14:36:47 | Mark array run symmetric_difference_with operation as unimplemented | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 18d18ff8..ad628596 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -720,7 +720,7 @@ impl Store {
*this = new;
}
// TODO(jpg) symmetric_difference_with array, run
- (&mut Array(ref mut _vec), ... | 1 | 1 | 1 |
3c99804e0758798e84a3cf2f2fdc1306b1fca542 | Clément Renault | 2020-09-13T16:07:05 | Implement the run array difference_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 97121c0b..18d18ff8 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -661,7 +661,7 @@ impl Store {
vec.retain(|i| !run.contains(*i));
}
(ref mut this @ &mut Bitmap(..), &Array(ref vec2)) => {
- ... | 1 | 6 | 2 |
07d0fcc36ae31659740678b273bae3afa12a3eda | Clément Renault | 2020-09-13T13:35:40 | Clippy and fmt pass | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 02e8b142..97121c0b 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -1,6 +1,6 @@
use std::borrow::Borrow;
use std::cmp::Ordering::{self, Equal, Greater, Less};
-use std::{cmp, fmt, vec, slice};
+use std::{cmp, fmt, slice, vec};
use self::Sto... | 1 | 53 | 35 |
183c1bbb76ad8351f1089abfd219bcb55d906baa | Clément Renault | 2020-09-13T12:58:45 | Implement the bitmap run difference_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index f80d22ab..02e8b142 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -652,9 +652,11 @@ impl Store {
*index1 &= !*index2;
}
}
- // TODO(jpg) difference_with bitmap, run
- (ref... | 1 | 5 | 3 |
3a9eefdecb5503dd1b96ceb2fd226517b010423b | Clément Renault | 2020-09-13T13:30:47 | Implement the array run difference_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 8981c1e7..f80d22ab 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -639,9 +639,9 @@ impl Store {
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
vec.retain(|i| !store.contains(*i));
}
- /... | 1 | 3 | 3 |
c77c0f867469838288f78acf3a8f91542494725b | Clément Renault | 2020-09-13T13:30:24 | Simplify the array bitmap difference_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 2ebf6106..8981c1e7 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -637,11 +637,7 @@ impl Store {
}
}
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
- for i in (0..vec.len()).rev() {... | 1 | 1 | 5 |
cb69d80b5073729066a6d8e586c02a496e7d00d9 | Clément Renault | 2020-09-13T11:20:55 | Implement the run run is_disjoint operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 36bcede0..2ebf6106 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -272,7 +272,29 @@ impl Store {
vec.iter().all(|&i| !store.contains(i))
}
// TODO(jpg) is_disjoint
- (&Run(ref _intervals1), ... | 1 | 23 | 1 |
d7bcad321b41c392acc12d29b20de2954c6777bc | Clément Renault | 2020-09-12T17:50:34 | Implement the run array and array run is_disjoint operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index d0677162..36bcede0 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -273,8 +273,8 @@ impl Store {
}
// TODO(jpg) is_disjoint
(&Run(ref _intervals1), &Run(ref _intervals2)) => unimplemented!(),
- (... | 1 | 2 | 2 |
924d4dbeea361174ffc20705b78c710c74919850 | Clément Renault | 2020-09-12T17:47:58 | Implement the remove_range operation for the run store type | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 9566d8db..d0677162 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -199,8 +199,44 @@ impl Store {
bits[end_key] &= !(!0u64).wrapping_shr(64 - end_bit);
u64::from(removed)
}
- // TODO(jpg)... | 1 | 38 | 2 |
4ae8986a9cec36239c99dea5e29ff57b03b32af1 | Clément Renault | 2020-09-12T16:33:19 | Simplify the run run intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 94e1559c..9566d8db 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -521,26 +521,23 @@ impl Store {
let (mut i1, mut i2) = (intervals1.iter(), intervals2.iter());
let (mut iv1, mut iv2) = (i1.next(), i2.next())... | 1 | 12 | 15 |
9612ae98ffe8b0e193d533a71548e7210aafdd9e | Clément Renault | 2020-09-12T09:33:27 | Implement the run bitmap intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 515b7889..94e1559c 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -545,13 +545,17 @@ impl Store {
}
*intervals1 = merged;
- },
+ }
(this @ &mut Run(..), &Array(..)) => {
... | 1 | 7 | 3 |
9af436678706efc495d543a71a5ccd9fd70f11a3 | Clément Renault | 2020-09-12T09:33:12 | Implement the bitmap run intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 6ad93793..515b7889 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -512,8 +512,10 @@ impl Store {
new.intersect_with(this);
*this = new;
}
- // TODO(jpg) intersect_with bitmap, run
- ... | 1 | 4 | 2 |
0a664836772ba30a58ae1224c6169c560f524367 | Clément Renault | 2020-09-12T09:26:44 | Implement the run run intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index fd94b1e1..6ad93793 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -514,8 +514,36 @@ impl Store {
}
// TODO(jpg) intersect_with bitmap, run
(_this @ &mut Bitmap(..), &Run(..)) => unimplemented!(),
- ... | 1 | 30 | 2 |
613163fc0c0547231b8e9cacf0f90d944c17dfb5 | Clément Renault | 2020-09-12T09:08:23 | Implement the bitmap run union_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 618eccc0..fd94b1e1 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -411,8 +411,8 @@ impl Store {
*this = this.to_bitmap();
this.union_with(other);
}
- (this @ &mut Array(..), run @ &Run(.... | 1 | 6 | 4 |
fe8a4ab7137f2102e822279c03bb65166c85d278 | Clément Renault | 2020-09-12T09:01:50 | Implement the array run union_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 5f94cb19..618eccc0 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -411,8 +411,11 @@ impl Store {
*this = this.to_bitmap();
this.union_with(other);
}
- // TODO(jpg) union_with array, run
... | 1 | 7 | 4 |
0ded0285a08e8aa433e8d83e8e6a1274957274dc | Clément Renault | 2020-09-12T08:57:08 | Implement the run array union_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index d6ed9327..5f94cb19 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -458,7 +458,11 @@ impl Store {
*intervals1 = merged;
},
- (&mut Run(ref mut _intervals), &Array(ref _vec)) => unimplemented!(),
+ ... | 1 | 5 | 1 |
d658f2851f5c05cce422268968637ea2ad9bffd6 | Clément Renault | 2020-09-11T18:38:58 | Implement the run run union_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 4c125105..d6ed9327 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -1,7 +1,6 @@
use std::borrow::Borrow;
use std::cmp::Ordering::{self, Equal, Greater, Less};
-use std::vec;
-use std::{fmt, slice};
+use std::{cmp, fmt, vec, slice};
use self... | 1 | 34 | 4 |
a62fc7d059ed0d9cfea273f9f4b3c26a3e4e818a | Clément Renault | 2020-09-11T16:57:04 | Implement the run array intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 38c974d3..4c125105 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -477,7 +477,11 @@ impl Store {
(_this @ &mut Bitmap(..), &Run(..)) => unimplemented!(),
// TODO(jpg) intersect_with run, *
(&mut Run(ref mu... | 1 | 5 | 1 |
9321618e732ff287a7dc3e10b2bfbe22f25c9efd | Clément Renault | 2020-09-11T16:19:52 | Implement the array run intersect_with operation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index ee65b61b..38c974d3 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -460,8 +460,9 @@ impl Store {
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
vec.retain(|i| store.contains(*i));
}
- //... | 1 | 3 | 2 |
e605f640b18eded117810ca9cd950778a6e491e4 | Clément Renault | 2020-09-11T16:18:12 | Rework the array bitmap intersect_with using Vec::retain | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 31fcc90c..ee65b61b 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -458,11 +458,7 @@ impl Store {
}
}
(&mut Array(ref mut vec), store @ &Bitmap(..)) => {
- for i in (0..(vec.len())).rev()... | 1 | 1 | 5 |
2068bb6809c17c47052d26d1e1e29f26695b8906 | Clément Renault | 2020-09-11T16:01:14 | Fix the to_array/bitmap impl for runs, the end bound is inclusive | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 6d99eb9b..31fcc90c 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -300,11 +300,7 @@ impl Store {
Array(vec)
}
Run(ref intervals) => Array(
- intervals
- .iter()
- ... | 1 | 2 | 6 |
3124aa4d5a259dd205b6c7c1423a8ff1192f2022 | Clément Renault | 2020-09-11T15:58:04 | Fix some bugs in the run container implementation | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 1e21a1d7..6d99eb9b 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -1,5 +1,5 @@
use std::borrow::Borrow;
-use std::cmp::Ordering::{Equal, Greater, Less};
+use std::cmp::Ordering::{self, Equal, Greater, Less};
use std::vec;
use std::{fmt, slic... | 1 | 22 | 10 |
38f4f6550066ae82f638c014c6b20261e638edae | Wim Looman | 2020-09-10T16:10:57 | Update version to 0.6.1 | diff --git a/Cargo.toml b/Cargo.toml
index b71db96e..118fef79 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.6.0"
+version = "0.6.1"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 2 | 2 |
c5298652dca01ca79b67fb30cc10c61ada0eea05 | Wim Looman | 2020-09-10T16:10:15 | Add tests for both sides of container type boundary conditions | diff --git a/tests/serialization.rs b/tests/serialization.rs
index 2de797d3..bb20b4f8 100644
--- a/tests/serialization.rs
+++ b/tests/serialization.rs
@@ -60,6 +60,20 @@ fn test_array() {
assert_eq!(original, new);
}
+#[test]
+fn test_array_boundary() {
+ let original = RoaringBitmap::from_iter(1000..5096);
... | 1 | 14 | 0 |
0e1218cb7cedf545eac45952ac4f60fb6a9f3b80 | Daniel Lemire | 2020-09-09T17:51:47 | Bug fix. | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 98610b5c..3ecff394 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -153,7 +153,7 @@ impl RoaringBitmap {
let key = description_bytes.read_u16::<LittleEndian>()?;
let len = u64::from(descr... | 1 | 1 | 1 |
6c1b644d5981d165dfd92f875df19ed9119abd61 | Kerollmops | 2020-09-09T16:34:18 | Introduce a test that highlight a serialization bug | diff --git a/tests/serialization.rs b/tests/serialization.rs
index d8f28593..41ef226e 100644
--- a/tests/serialization.rs
+++ b/tests/serialization.rs
@@ -87,3 +87,11 @@ fn test_mixed() {
let new = serialize_and_deserialize(&original);
assert_eq!(original, new);
}
+
+#[test]
+fn test_strange() {
+ const A... | 1 | 8 | 0 |
9c8d669e5b1ab04c31d4c7ed471974ff55da9501 | Joseph Glanville | 2020-03-23T20:16:29 | Add additional benchmarks
Incorporate benchmarks from https://github.com/saulius/croaring-rs/blob/master/benches
Closes #8 | diff --git a/benches/lib.rs b/benches/lib.rs
index 709e3836..ac08e5c5 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -12,20 +12,139 @@ fn create(c: &mut Criterion) {
}
fn insert(c: &mut Criterion) {
- c.bench_function("insert 1", |b| {
+ c.bench_function("create & insert 1", |b| {
b.iter(|| {
... | 1 | 238 | 11 |
b2e19c0478fb18a3970fa4caac3a088e63563576 | Nassor Paulino da Silva | 2019-11-24T20:04:43 | fix clippy complain | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 924da854..e93c8ad5 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -334,8 +334,8 @@ impl Store {
},
}
}
- if current2.is_some() {
- vec1.push(*curre... | 1 | 2 | 2 |
42ec354b8381683a5ac11385ec1f5a0b2250c2fa | Nassor Paulino da Silva | 2019-11-24T19:27:29 | better benchmarks using criterion crate | diff --git a/Cargo.toml b/Cargo.toml
index 7174349a..b71db96e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,7 @@ repository = "https://github.com/Nemo157/roaring-rs"
readme = "README.md"
keywords = ["roaring", "data-structure", "bitmap"]
categories = ["data-structures"]
+edition = "2018"
license = "MIT/Ap... | 2 | 63 | 54 |
26399e490932dacb2a84ce77df22cedb38e81f33 | Nassor Paulino da Silva | 2019-11-24T19:26:35 | 2018 edition modules | diff --git a/src/bitmap/cmp.rs b/src/bitmap/cmp.rs
index 09f89772..04cf708b 100644
--- a/src/bitmap/cmp.rs
+++ b/src/bitmap/cmp.rs
@@ -1,7 +1,7 @@
use std::slice;
use std::iter::Peekable;
-use RoaringBitmap;
+use crate::RoaringBitmap;
use super::container::Container;
struct Pairs<'a>(Peekable<slice::Iter<'a, Co... | 12 | 33 | 33 |
6c581eed9f1104b336056af5290eb9195ab66a0d | Nassor Paulino da Silva | 2019-11-24T19:04:55 | Removing deprecated `try!` in favor of `?` | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 1101d470..fb6e831d 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -60,17 +60,17 @@ impl RoaringBitmap {
/// assert_eq!(rb1, rb2);
/// ```
pub fn serialize_into<W: io::Write>(&self, mut writer: W) -... | 1 | 15 | 15 |
01228cb500aaeffb0309afe4f8d26566b006ecf0 | Pen Tree | 2019-08-30T14:03:26 | Remove unnecessary lifetime bound | diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs
index 83e3c514..924da854 100644
--- a/src/bitmap/store.rs
+++ b/src/bitmap/store.rs
@@ -2,7 +2,6 @@ use std::slice;
use std::vec;
use std::borrow::Borrow;
use std::cmp::Ordering::{ Equal, Less, Greater };
-use std::marker::PhantomData;
const BITMAP_LENGTH: us... | 1 | 6 | 9 |
45dc4eca5c2c37c5b0fd51c59dfc424f06f79002 | Wim Looman | 2019-08-20T18:38:19 | Bump version to 0.6.0 | diff --git a/Cargo.toml b/Cargo.toml
index aad64f11..7174349a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.5.2"
+version = "0.6.0"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
f2ea202a0dfcb0a2d65a06e5623ce8543facc725 | Wim Looman | 2019-08-20T17:12:41 | Fix clippy lints | diff --git a/src/bitmap/util.rs b/src/bitmap/util.rs
index 962cec39..5b9d872f 100644
--- a/src/bitmap/util.rs
+++ b/src/bitmap/util.rs
@@ -14,25 +14,25 @@ mod test {
#[test]
fn test_split_u32() {
- assert_eq!((0x0000u16, 0x0000u16), split(0x00000000u32));
- assert_eq!((0x0000u16, 0x0001u16), s... | 23 | 125 | 123 |
39d8a4f6de36e7b0ca5e4b8b0ed31e0a6a329031 | Wim Looman | 2019-08-20T16:33:16 | Fix size_hint not being updated correctly | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index c3e4105c..4be13022 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -43,7 +43,7 @@ impl<'a> Iterator for Iter<'a> {
type Item = u32;
fn next(&mut self) -> Option<u32> {
- self.size_hint.saturating_sub(1);
+ self.size_hint = ... | 4 | 60 | 32 |
dfb293caa5ee419f4af60ad33012a26e6a0f568d | messense | 2019-05-05T04:58:44 | Bump byteorder version to 1.x | diff --git a/Cargo.toml b/Cargo.toml
index 173c7c91..aad64f11 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,4 +17,4 @@ license = "MIT/Apache-2.0"
travis-ci = { repository = "Nemo157/roaring-rs" }
[dependencies]
-byteorder = "0.5.3"
+byteorder = "1.0" | 1 | 1 | 1 |
18343c29e9a1f96564a8caaf385fbba59e9b9f2e | Wim Looman | 2017-04-08T20:45:24 | Bump version to 0.5.2 | diff --git a/Cargo.toml b/Cargo.toml
index d715e72b..173c7c91 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.5.1"
+version = "0.5.2"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
adbbf6fd7a5efca3d2b5867eebafa9d02b96d061 | arthurprs | 2017-04-08T18:17:48 | Add remove_range() | diff --git a/benches/lib.rs b/benches/lib.rs
index e5a07f5f..0e305815 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -64,6 +64,9 @@ fn is_subset_4(b: &mut Bencher) {
fn remove_range_bitmap(b: &mut Bencher) {
let mut sub: RoaringBitmap = (0..65536).collect();
b.iter(|| {
+ // carefully delete part... | 1 | 3 | 0 |
f10d72e035467530082af6eeeae060f9766f96b2 | arthurprs | 2017-04-08T18:17:48 | Add remove_range() | diff --git a/benches/lib.rs b/benches/lib.rs
index 618f9e72..e5a07f5f 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -59,3 +59,12 @@ fn is_subset_4(b: &mut Bencher) {
let sup: RoaringBitmap = (0..65536).collect();
b.iter(|| test::black_box(sub.is_subset(&sup)))
}
+
+#[bench]
+fn remove_range_bitmap(b: &... | 7 | 272 | 6 |
79d17bb3d748a0a80153acf1a3b61c0eaad2db3a | Wim Looman | 2017-04-07T16:40:46 | Add categories and badges for crates.io | diff --git a/Cargo.toml b/Cargo.toml
index 370fe6b8..d715e72b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,8 +9,12 @@ repository = "https://github.com/Nemo157/roaring-rs"
readme = "README.md"
keywords = ["roaring", "data-structure", "bitmap"]
+categories = ["data-structures"]
license = "MIT/Apache-2.0"
+[bad... | 1 | 4 | 0 |
3dc37d1f4d57145b2a8de6a9ec092d4b6614b0c7 | Wim Looman | 2017-04-07T16:35:42 | Bump to version 0.5.1 | diff --git a/Cargo.toml b/Cargo.toml
index 335c1b9f..370fe6b8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.5.0"
+version = "0.5.1"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
7a0534f6c215de2231d2b7d756fa88593916b2f0 | Wim Looman | 2017-04-07T16:35:26 | Fix missed RoaringBitmap -> RoaringTreemap in the docs | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 0f2a4a7c..ce669c2a 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -125,7 +125,7 @@ impl Iterator for IntoIter {
}
impl RoaringTreemap {
- /// Iterator over each value stored in the RoaringBitmap, guarantees values are ordered by
+ ///... | 1 | 1 | 1 |
3434296ec0b88131408a0d20c54e7b4865b143d7 | Wim Looman | 2017-04-07T16:31:22 | Add example for RoaringBitmap::serialized_size | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index fd7dc799..8fd1dbab 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -13,6 +13,19 @@ const SERIAL_COOKIE: u16 = 12347;
impl RoaringBitmap {
/// Return the size in bytes of the serialized output.
/// This ... | 1 | 13 | 0 |
c9f371c26dafaf59faf2cfa9e07fe88fc9679c58 | arthurprs | 2017-04-06T18:06:28 | bitmaps() and from_bitmaps() | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index e313ed59..0f2a4a7c 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -144,6 +144,46 @@ impl RoaringTreemap {
pub fn iter(&self) -> Iter {
Iter::new(&self.map)
}
+
+ /// Iterator over pairs of partition number and the correspo... | 2 | 70 | 0 |
8ce5b7585cfb511c52616d6db52a55842a808cad | arthurprs | 2017-04-06T18:04:22 | Add serialized_size() | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 6a66a735..fd7dc799 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -11,6 +11,24 @@ const SERIAL_COOKIE: u16 = 12347;
// const NO_OFFSET_THRESHOLD: u8 = 4;
impl RoaringBitmap {
+ /// Return the size in bytes... | 2 | 19 | 0 |
c240ca7640a6871c79f2a4a2efd278f15d5b20de | Wim Looman | 2017-03-12T11:09:13 | Bump version to 0.5 | diff --git a/Cargo.toml b/Cargo.toml
index 65badc0e..335c1b9f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.4.2"
+version = "0.5.0"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implemen... | 1 | 1 | 1 |
6c01e0950295d2f50713908663b69bdcf3d1ab9b | Wim Looman | 2017-03-12T11:04:30 | Rearrange modules
Move RoaringBitmap into its own module.
Rename roaring_treemap module to treemap.
Expose Iter/IntoIter from submodules (fixes #40). | diff --git a/src/cmp.rs b/src/bitmap/cmp.rs
similarity index 99%
rename from src/cmp.rs
rename to src/bitmap/cmp.rs
index 9b495163..09f89772 100644
--- a/src/cmp.rs
+++ b/src/bitmap/cmp.rs
@@ -2,7 +2,7 @@ use std::slice;
use std::iter::Peekable;
use RoaringBitmap;
-use container::Container;
+use super::container::C... | 18 | 53 | 48 |
c932f59ddb98197b3e279a20e97a42df182c1225 | Brian Vincent | 2017-03-10T03:12:53 | RoaringTreemap fixes.
Fix some documentation, the fmt string format, and make iterators
public. | diff --git a/src/lib.rs b/src/lib.rs
index 275ad108..f1387c4c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -26,10 +26,12 @@ mod iter;
mod ops;
mod cmp;
mod serialization;
-mod roaring_treemap;
pub use iter::Iter;
+/// A compressed bitmap with u64 values. Implemented as a `BTreeMap` of `RoaringBitmap`s.
+pub mod... | 4 | 8 | 8 |
6928635b990a8ecfb125b43e173c3092ee1b5890 | Brian Vincent | 2017-03-09T05:55:47 | Fix bug in RoaringTreemap max() | diff --git a/src/roaring_treemap/inherent.rs b/src/roaring_treemap/inherent.rs
index a987908b..21553ad8 100644
--- a/src/roaring_treemap/inherent.rs
+++ b/src/roaring_treemap/inherent.rs
@@ -179,7 +179,7 @@ impl RoaringTreemap {
.iter()
.rev()
.filter(|&(_, rb)| rb.max().is_some()... | 2 | 25 | 1 |
8df9332493594146183d8f4130e971cf4191411d | Brian Vincent | 2017-03-08T06:28:01 | WIP roaring64 support | diff --git a/src/lib.rs b/src/lib.rs
index c19d4c8a..2e41495f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,7 +10,7 @@
#![warn(missing_docs)]
#![warn(variant_size_differences)]
-#![allow(unknown_lints)] // For clippy
+// For clippy
extern crate byteorder;
@@ -26,6 +26,7 @@ mod iter;
mod ops;
mod cmp;
mod ... | 5 | 442 | 1 |
65a981b8e84470cf404d55d27aa801490813d844 | Wim Looman | 2016-12-30T14:11:48 | Workaround bug in rust 1.11.0
https://users.rust-lang.org/t/are-there-known-bug-lists-for-stable-releases/8612/2 | diff --git a/tests/serialization.rs b/tests/serialization.rs
index 71dfe09c..66dbc668 100644
--- a/tests/serialization.rs
+++ b/tests/serialization.rs
@@ -23,7 +23,7 @@ fn serialize_and_deserialize(bitmap: &RoaringBitmap) -> RoaringBitmap {
#[test]
fn test_deserialize_from_provided_data() {
assert_eq!(
- ... | 1 | 1 | 1 |
c9dc9d998a07f525526bf8988466bb5e75d7be68 | Wim Looman | 2016-12-30T11:44:12 | Implement into_iter on RoaringBitmap | diff --git a/src/container.rs b/src/container.rs
index 2168bab6..7d8c7549 100644
--- a/src/container.rs
+++ b/src/container.rs
@@ -52,13 +52,6 @@ impl Container {
self.store.contains(index)
}
- pub fn iter(&self) -> Iter {
- Iter {
- key: self.key,
- inner: self.store.ite... | 5 | 133 | 70 |
0b5fac750d2aa87b85a89b74aeac2a2bd161b449 | Wim Looman | 2016-12-30T10:33:49 | Use flatmap for iter instead of re-implementing it | diff --git a/src/container.rs b/src/container.rs
index 2f54ae61..2168bab6 100644
--- a/src/container.rs
+++ b/src/container.rs
@@ -1,5 +1,6 @@
use std::fmt;
+use util;
use store::{ self, Store };
const ARRAY_LIMIT: u64 = 4096;
@@ -110,10 +111,19 @@ impl Container {
}
}
+impl<'a> IntoIterator for &'a Cont... | 2 | 25 | 48 |
dd5edc31215304438a54750db5a155604865f681 | Wim Looman | 2016-12-30T10:09:48 | Remove FromIterator<&u32>/Extend<&u32>, can just use cloned instead | diff --git a/src/iter.rs b/src/iter.rs
index 3bc0051b..67bd2287 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -110,14 +110,6 @@ impl FromIterator<u32> for RoaringBitmap {
}
}
-impl<'a> FromIterator<&'a u32> for RoaringBitmap {
- fn from_iter<I: IntoIterator<Item = &'a u32>>(iterator: I) -> RoaringBitmap {
- ... | 1 | 0 | 16 |
76cf6bcc46dc1c32fdc890117332482f4608a661 | Wim Looman | 2016-12-30T10:09:04 | Remove Self return types for better docs | diff --git a/src/inherent.rs b/src/inherent.rs
index 8c6b8fa2..a5e779cb 100644
--- a/src/inherent.rs
+++ b/src/inherent.rs
@@ -12,7 +12,7 @@ impl RoaringBitmap {
/// use roaring::RoaringBitmap;
/// let mut rb = RoaringBitmap::new();
/// ```
- pub fn new() -> Self {
+ pub fn new() -> RoaringBitmap {... | 2 | 3 | 3 |
278d5c5ae94e744c62708ccd0224f9edb50ba53c | Wim Looman | 2016-12-30T10:05:27 | Improve description, remove extraneous homepage link | diff --git a/Cargo.toml b/Cargo.toml
index 715ddc4a..65badc0e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,12 +1,10 @@
[package]
-
name = "roaring"
version = "0.4.2"
authors = ["Wim Looman <wim@nemo157.com>"]
-description = "http://roaringbitmap.org for http://www.rust-lang.org"
+description = "http://roaringbitm... | 1 | 1 | 3 |
c1c0b53d4f560b6d17dd51d07a9a44401418ddb7 | Wim Looman | 2016-12-28T18:31:53 | Remove unused dependency | diff --git a/Cargo.toml b/Cargo.toml
index 5ab5f52e..715ddc4a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,5 +15,4 @@ keywords = ["roaring", "data-structure", "bitmap"]
license = "MIT/Apache-2.0"
[dependencies]
-num = "0.1.36"
byteorder = "0.5.3" | 1 | 0 | 1 |
ba098fe6023f7a4a967f8d410169d4058b9ec7bf | Wim Looman | 2016-12-28T17:35:13 | Move inherent impls around for better docs | diff --git a/src/inherent.rs b/src/inherent.rs
new file mode 100644
index 00000000..8c6b8fa2
--- /dev/null
+++ b/src/inherent.rs
@@ -0,0 +1,196 @@
+use RoaringBitmap;
+
+use util;
+use container::Container;
+
+impl RoaringBitmap {
+ /// Creates an empty `RoaringBitmap`.
+ ///
+ /// # Examples
+ ///
+ ///... | 2 | 204 | 169 |
6b837bb9b44df3f5873e8784ebb1c551cd5ef488 | Wim Looman | 2016-12-28T17:28:32 | Remove unnecessary type annotations | diff --git a/src/cmp.rs b/src/cmp.rs
index 1d358862..9b495163 100644
--- a/src/cmp.rs
+++ b/src/cmp.rs
@@ -19,8 +19,8 @@ impl RoaringBitmap {
/// ```rust
/// use roaring::RoaringBitmap;
///
- /// let mut rb1: RoaringBitmap = RoaringBitmap::new();
- /// let mut rb2: RoaringBitmap = RoaringBitmap::ne... | 3 | 14 | 14 |
6a61e8f1e23c10c9ce1ee578053839c1f5a48951 | Wim Looman | 2016-12-28T17:25:47 | Use sized array for bitmap store | diff --git a/src/store.rs b/src/store.rs
index 452e8176..144ad773 100644
--- a/src/store.rs
+++ b/src/store.rs
@@ -4,7 +4,7 @@ use std::cmp::Ordering::{ Equal, Less, Greater };
use self::Store::{ Array, Bitmap };
pub enum Store {
Array(Vec<u16>),
- Bitmap(Box<[u64]>),
+ Bitmap(Box<[u64; 1024]>),
}
pub ... | 1 | 11 | 12 |
b796d9310cd84694c6dc6a8bd2ab3a7741e3f41a | Wim Looman | 2016-12-26T21:44:56 | Implement assignment operators
fixes #28 | diff --git a/src/ops.rs b/src/ops.rs
index f16f4d58..26e370bb 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -1,4 +1,9 @@
-use std::ops::{ BitXor, BitAnd, BitOr, Sub };
+use std::ops::{
+ BitAnd, BitAndAssign,
+ BitOr, BitOrAssign,
+ BitXor, BitXorAssign,
+ Sub, SubAssign
+};
use num::traits::Zero;
@@ -35... | 2 | 114 | 32 |
3279f36172238c84816f04981409193656fa0e95 | Wim Looman | 2016-12-26T21:30:58 | Use same order for all operations | diff --git a/src/ops.rs b/src/ops.rs
index e78d7c29..f16f4d58 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -193,6 +193,15 @@ impl<Size: ExtInt + Halveable> BitOr<RoaringBitmap<Size>> for RoaringBitmap<Size
}
}
+impl<'a, Size: ExtInt + Halveable> BitOr<&'a RoaringBitmap<Size>> for RoaringBitmap<Size> {
+ type ... | 1 | 17 | 9 |
cd4716080ec31202346a1684597bae8e0f71e519 | Wim Looman | 2016-12-26T21:29:43 | Move documentation on bit operators to the method equivalents
fixes #25 (by deleting it)
improves #26 slightly | diff --git a/src/ops.rs b/src/ops.rs
index 0096d9bb..e78d7c29 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -21,6 +21,20 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
///
/// assert_eq!(rb1, rb3);
/// ```
+ ///
+ /// Can also be done via the `BitOr` operator.
+ ///
+ /// ```rust
+ ... | 1 | 56 | 225 |
70fd2b27ba4e949d4ac2d1c8a17fa7b256dd1c57 | Wim Looman | 2016-12-26T21:15:46 | binary_search_by -> binary_search_by_key and simplify some operators | diff --git a/src/lib.rs b/src/lib.rs
index 852748bb..6db01c0c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -79,7 +79,7 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
/// ```
pub fn insert(&mut self, value: Size) -> bool {
let (key, index) = value.split();
- let container = match self.c... | 2 | 25 | 41 |
0af8414965039d50ea1569aa1056a329dab735e7 | Wim Looman | 2016-12-26T21:05:18 | Don't need to have Iter::new public | diff --git a/src/iter.rs b/src/iter.rs
index e6f52d9b..42b85f67 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -20,8 +20,7 @@ pub struct Iter<'a, Size: ExtInt + Halveable + 'a> where <Size as Halveable>::Ha
}
impl<'a, Size: ExtInt + Halveable> Iter<'a, Size> {
- #[doc(hidden)] // TODO: pub(crate)
- pub fn new(... | 1 | 1 | 2 |
329c924a2862ef21154159a60eea5d6a253e3a6f | Wim Looman | 2016-12-26T21:00:21 | Drop is_subset_opt, only slightly faster so not really worth the extra code | diff --git a/benches/lib.rs b/benches/lib.rs
index 74b4f00b..6d71d721 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -59,30 +59,3 @@ fn is_subset_4(b: &mut Bencher) {
let sup: RoaringBitmap<u32> = (0..65536).collect();
b.iter(|| test::black_box(sub.is_subset(&sup)))
}
-
-#[bench]
-fn is_subset_opt(b: &m... | 3 | 0 | 65 |
66b47a1705e159e89c40e3669c7104a0d971aa61 | Wim Looman | 2016-12-26T20:41:48 | Remove most inlines | diff --git a/src/cmp.rs b/src/cmp.rs
index 66827497..99c361a7 100644
--- a/src/cmp.rs
+++ b/src/cmp.rs
@@ -36,7 +36,6 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
/// assert_eq!(rb1.is_disjoint(&rb2), false);
///
/// ```
- #[inline]
pub fn is_disjoint(&self, other: &Self) -> bool {
... | 7 | 11 | 70 |
44a476ab5288c640c5b40608e14d8993a148dad4 | Wim Looman | 2016-12-26T20:41:39 | Remove key/len accessors | diff --git a/src/cmp.rs b/src/cmp.rs
index be5d9aca..66827497 100644
--- a/src/cmp.rs
+++ b/src/cmp.rs
@@ -90,7 +90,7 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
loop {
let tc = &tv[ti];
let oc = &ov[oi];
- match tc.key().cmp(&oc.key()) {
+ match tc.k... | 6 | 25 | 35 |
dfc95986ed72e9f265dd00b8abf7fd39375d3768 | Wim Looman | 2016-12-26T20:29:24 | Simplify iterating over containers with peekable | diff --git a/src/cmp.rs b/src/cmp.rs
index a4833aa2..be5d9aca 100644
--- a/src/cmp.rs
+++ b/src/cmp.rs
@@ -1,22 +1,19 @@
use std::slice;
use std::cmp::Ordering;
+use std::iter::Peekable;
use RoaringBitmap;
use util::{ ExtInt, Halveable };
use container::Container;
type HalfContainer<Size> = Container<<Size as... | 1 | 19 | 43 |
5ff1390b4be9c642ae72a9353561d942c7ec9775 | Wim Looman | 2016-12-26T20:20:28 | Remove stupid into_iter implementation | diff --git a/src/iter.rs b/src/iter.rs
index acabccae..c62ec689 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -95,15 +95,6 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
}
}
-impl<Size: ExtInt + Halveable> IntoIterator for RoaringBitmap<Size> {
- type Item = Size;
- type IntoIter = <Vec<Size> as ... | 1 | 0 | 9 |
4f0be80f6d853072e49860e2cd885f1f4fb15781 | Wim Looman | 2016-12-26T20:16:16 | Remove the weird other iterators | diff --git a/src/lib.rs b/src/lib.rs
index 77e31d2a..5208f80b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -20,7 +20,6 @@ mod iter;
mod store;
mod container;
mod util;
-mod other_iter;
mod serialization;
mod fmt;
mod cmp;
@@ -31,7 +30,6 @@ use util::{ Halveable, ExtInt };
use container::Container;
pub use iter... | 3 | 0 | 333 |
400a96530a329718d13a5c3be49b900667707cc9 | Wim Looman | 2016-12-24T11:05:02 | Add docs, fix clippy's nits | diff --git a/src/lib.rs b/src/lib.rs
index 81ca5855..1ab38684 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -489,10 +489,47 @@ impl<Size: ExtInt + Halveable> RoaringBitmap<Size> {
}
impl RoaringBitmap<u32> {
+ /// Serialize this bitmap into [the standard Roaring on-disk format][format].
+ /// This is compatible... | 2 | 57 | 22 |
d57b60d2b6d95b11678cf2a03227e398cd3af65c | Wim Looman | 2016-12-24T10:55:53 | Implement serialization | diff --git a/src/serialization.rs b/src/serialization.rs
index b1c8e8aa..49bff209 100644
--- a/src/serialization.rs
+++ b/src/serialization.rs
@@ -1,5 +1,5 @@
use std::io;
-use byteorder::{ LittleEndian, ReadBytesExt };
+use byteorder::{ LittleEndian, ReadBytesExt, WriteBytesExt };
use RoaringBitmap as RB;
use sto... | 2 | 40 | 4 |
40a21d57fa4785cd209c2dc862e622aebbecb1c2 | Wim Looman | 2016-12-24T10:42:47 | Add deserialization | diff --git a/Cargo.toml b/Cargo.toml
index 866febbe..5ab5f52e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,3 +16,4 @@ license = "MIT/Apache-2.0"
[dependencies]
num = "0.1.36"
+byteorder = "0.5.3"
diff --git a/src/container.rs b/src/container.rs
index b972557a..7c9736ad 100644
--- a/src/container.rs
+++ b/src/con... | 5 | 84 | 14 |
e542b90957ed2a53d24490b018f65ac699ee6783 | Wim Looman | 2016-12-24T09:26:08 | Inline some more stuff for performance | diff --git a/src/store.rs b/src/store.rs
index 0580c8a9..990e950b 100644
--- a/src/store.rs
+++ b/src/store.rs
@@ -413,7 +413,7 @@ impl<'a, Size: ExtInt> Iterator for BitmapIter<'a, Size> {
loop {
if self.key == self.bits.len() {
return None;
- } else if (self.bits[self... | 2 | 14 | 1 |
4a085618c87b99ec92fa69275075e8a74a2995cb | Wim Looman | 2016-12-20T20:27:58 | Add a more optimized version of union_with between arrays | diff --git a/src/imp.rs b/src/imp.rs
index 50140a1d..cefb7041 100644
--- a/src/imp.rs
+++ b/src/imp.rs
@@ -152,7 +152,7 @@ pub fn union_with<Size: ExtInt + Halveable>(this: &mut RB<Size>, other: &RB<Size
for container in &other.containers {
let key = container.key();
match this.containers.binary_... | 2 | 19 | 3 |
11010e8e31e5e1e08f875b76f3add450c0679b86 | Wim Looman | 2016-12-20T19:11:29 | Use unboxed container iterator | diff --git a/src/container.rs b/src/container.rs
index ec75cce0..b972557a 100644
--- a/src/container.rs
+++ b/src/container.rs
@@ -3,6 +3,7 @@ use std::fmt::{ Debug, Formatter, Result };
use num::traits::{ One };
use util::{ self, ExtInt };
+use store;
use store::Store::{ self, Array, Bitmap };
#[derive(Partial... | 3 | 64 | 40 |
d04fc1efeeb79db41d34cfc087abb20570b68650 | Wim Looman | 2016-12-19T20:07:14 | Add some nominal types to simplify iteration signatures | diff --git a/src/iter.rs b/src/iter.rs
index 1e598d9f..566683be 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -1,37 +1,54 @@
use std::slice;
-use util::{ Either, ExtInt, Halveable };
-use util::Either::{ Left, Right };
+use util::{ ExtInt, Halveable };
use container::{ Container };
+type HalfContainer<Size> = Con... | 2 | 35 | 20 |
a71b8c27beaf89f0ae412ef8d4dd1e2e719a8341 | Wim Looman | 2016-12-19T20:03:10 | Fix some simple issues found by clippy | diff --git a/benches/lib.rs b/benches/lib.rs
index ceb81b59..74b4f00b 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -10,8 +10,7 @@ use roaring::RoaringBitmap;
#[bench]
fn create(b: &mut Bencher) {
b.iter(|| {
- let bitmap: RoaringBitmap<u32> = RoaringBitmap::new();
- bitmap
+ RoaringBi... | 5 | 29 | 30 |
387773940dc76571b96095dfcabd50ea2f12ecf1 | Wim Looman | 2016-12-19T19:30:55 | impl IntoIterator for &RoaringBitmap | diff --git a/src/lib.rs b/src/lib.rs
index d4b38edb..cc9ece77 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -492,6 +492,15 @@ impl<Size: ExtInt + Halveable> IntoIterator for RoaringBitmap<Size> {
}
}
+impl<'a, Size: ExtInt + Halveable> IntoIterator for &'a RoaringBitmap<Size> {
+ type Item = Size;
+ type In... | 2 | 13 | 4 |
f0a6eed9203fef495d683c0f5bf3307d00d41fd5 | Wim Looman | 2016-12-19T19:27:14 | Convert .collect to ::from_iter and remove extraneous type annotations in tests | diff --git a/tests/clone.rs b/tests/clone.rs
index 57694497..832282f6 100644
--- a/tests/clone.rs
+++ b/tests/clone.rs
@@ -1,9 +1,11 @@
extern crate roaring;
use roaring::RoaringBitmap;
+use std::iter::FromIterator;
+
#[test]
fn array() {
- let original: RoaringBitmap<u32> = (0..2000u32).collect();
+ let or... | 12 | 235 | 215 |
8d42910a9e157e2bbd11df44037c1912f4de6f5e | Wim Looman | 2016-12-19T20:33:46 | Version 0.4.2 | diff --git a/Cargo.toml b/Cargo.toml
index 3cf0f739..866febbe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
-version = "0.4.1"
+version = "0.4.2"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org for http://www.rust-lang.org" | 1 | 1 | 1 |
15d4e9d9eb958a4da9793e7214a084e527a09730 | Wim Looman | 2016-12-19T20:33:34 | Add specific version of num to satisfy crates.io | diff --git a/Cargo.toml b/Cargo.toml
index c0cd2da5..3cf0f739 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,4 +15,4 @@ keywords = ["roaring", "data-structure", "bitmap"]
license = "MIT/Apache-2.0"
[dependencies]
-num = "*"
+num = "0.1.36" | 1 | 1 | 1 |
205a56395b2b3fba74aa9481e8b4f5c04a0870f0 | Wim Looman | 2016-12-19T20:18:35 | Version 0.4.1 | diff --git a/Cargo.toml b/Cargo.toml
index 1432a0de..c0cd2da5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
-version = "0.4.0"
+version = "0.4.1"
authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org for http://www.rust-lang.org" | 1 | 1 | 1 |
70befae74e4072178a1735bba128b638b1976186 | Wim Looman | 2016-12-19T19:05:26 | Remove empty containers while performing intersection
Fixes #18 | diff --git a/src/imp.rs b/src/imp.rs
index d22bc4cd..c3645ab1 100644
--- a/src/imp.rs
+++ b/src/imp.rs
@@ -167,7 +167,11 @@ pub fn intersect_with<Size: ExtInt + Halveable>(this: &mut RB<Size>, other: &RB<
},
Ok(loc) => {
this.containers[index].intersect_with(&other.containers[... | 1 | 5 | 1 |
2f2af814741b6e037f512679657e6ccc2d464efb | Wim Looman | 2016-12-19T18:49:58 | Add tests for empty results of binary operations
intersect_with::no_intersection fails due to #18 | diff --git a/tests/difference_with.rs b/tests/difference_with.rs
index 402791d5..5c12f95e 100644
--- a/tests/difference_with.rs
+++ b/tests/difference_with.rs
@@ -12,6 +12,16 @@ fn array() {
assert_eq!(bitmap1, bitmap3);
}
+#[test]
+fn no_difference() {
+ let mut bitmap1: RoaringBitmap<u32> = (1..3u32).colle... | 3 | 30 | 0 |
3d3039acb837ecdffb18b8270a446288030943f4 | Yang | 2016-04-11T05:03:12 | add Halvable/ExtInt impl for usize | diff --git a/src/util.rs b/src/util.rs
index cd1ee427..3ce7cfd4 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -21,6 +21,21 @@ pub trait ExtInt:
PrimInt + Num<FromStrRadixErr=ParseIntError>
+ To64 + From + BitLength + Debug { }
+#[cfg(target_pointer_width = "32")]
+impl Halveable for usize {
+ type HalfSi... | 1 | 72 | 0 |
a5683ab5158e8fee107826d3beaac22cade523cc | Wim Looman | 2015-11-05T20:53:17 | Fix difference_with removing a container | diff --git a/src/imp.rs b/src/imp.rs
index be9df0cc..d22bc4cd 100644
--- a/src/imp.rs
+++ b/src/imp.rs
@@ -175,16 +175,21 @@ pub fn intersect_with<Size: ExtInt + Halveable>(this: &mut RB<Size>, other: &RB<
#[inline]
pub fn difference_with<Size: ExtInt + Halveable>(this: &mut RB<Size>, other: &RB<Size>) {
- for i... | 1 | 7 | 2 |
c3d5399b0fa65334501355f6461fd7d624d2d692 | Wim Looman | 2015-11-05T20:52:54 | Add test for when difference_with removes a container | diff --git a/tests/difference_with.rs b/tests/difference_with.rs
index cdf97d0c..402791d5 100644
--- a/tests/difference_with.rs
+++ b/tests/difference_with.rs
@@ -78,6 +78,17 @@ fn arrays() {
assert_eq!(bitmap1, bitmap3);
}
+#[test]
+fn arrays_removing_one_whole_container() {
+ let mut bitmap1: RoaringBitmap... | 1 | 11 | 0 |
9dc4863d4f97f619a0c131bcc21b2bd58c156af4 | Wim Looman | 2015-11-05T14:20:02 | Fix my email address | diff --git a/Cargo.toml b/Cargo.toml
index 541d52d6..ff12a4c2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
name = "roaring"
version = "0.3.2"
-authors = ["Wim Looman <!@nemo157.com>"]
+authors = ["Wim Looman <wim@nemo157.com>"]
description = "http://roaringbitmap.org for http://www.rust-lang.org"
do... | 1 | 1 | 1 |
29bff97d4028554a494d0166ba59b4592a3ce465 | Wim Looman | 2015-11-03T13:03:36 | Add size_hint implementation and tests, fixes #7 | diff --git a/src/iter.rs b/src/iter.rs
index 0cb2de7d..1e598d9f 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -49,6 +49,16 @@ impl<'a, Size: ExtInt + Halveable + 'a> Iterator for Iter<'a, Size> where <Size
},
}
}
+
+ fn size_hint(&self) -> (usize, Option<usize>) {
+ let next = self.... | 3 | 68 | 0 |
32d5d360a15211553ffc9951abc646e3f354328f | llogiq | 2015-09-01T14:22:07 | fixed error in is_subset I introduced prior :-/ | diff --git a/src/imp.rs b/src/imp.rs
index 9b213d54..be9df0cc 100644
--- a/src/imp.rs
+++ b/src/imp.rs
@@ -87,7 +87,7 @@ pub fn is_disjoint<Size: ExtInt + Halveable>(this: &RB<Size>, other: &RB<Size>)
pub fn is_subset<Size: ExtInt + Halveable>(this: &RB<Size>, other: &RB<Size>) -> bool {
for pair in pairs(this, o... | 1 | 1 | 1 |
bf02f102f9df5332fd28c422a7e4383de7617805 | llogiq | 2015-08-31T13:18:38 | some code improvements following clippy's suggestions | diff --git a/src/imp.rs b/src/imp.rs
index c34e668b..9b213d54 100644
--- a/src/imp.rs
+++ b/src/imp.rs
@@ -85,11 +85,14 @@ pub fn is_disjoint<Size: ExtInt + Halveable>(this: &RB<Size>, other: &RB<Size>)
}
pub fn is_subset<Size: ExtInt + Halveable>(this: &RB<Size>, other: &RB<Size>) -> bool {
- pairs(this, other)... | 2 | 40 | 37 |
b6b4e6dddae94f8cafe64042b511c26167c26396 | llogiq | 2015-07-31T06:05:16 | converted tabs to spaces | diff --git a/benches/lib.rs b/benches/lib.rs
index 1e7ea65f..ceb81b59 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -36,54 +36,54 @@ fn insert2(b: &mut Bencher) {
#[bench]
fn is_subset(b: &mut Bencher) {
- let bitmap: RoaringBitmap<u32> = (1..250).collect();
- b.iter(|| test::black_box(bitmap.is_subset(&bitma... | 3 | 46 | 46 |
0ede2f4526e70605e565994c39686ce8242870a0 | llogiq | 2015-07-30T14:19:19 | added is_subset_opt | diff --git a/benches/lib.rs b/benches/lib.rs
index 5632c203..1e7ea65f 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -3,7 +3,6 @@
extern crate test;
extern crate roaring;
-use std::{ u32 };
use test::Bencher;
use roaring::RoaringBitmap;
@@ -11,7 +10,7 @@ use roaring::RoaringBitmap;
#[bench]
fn create(b: ... | 4 | 97 | 2 |
804539b9c4390ade2500217745edadc0687cdf95 | Wim Looman | 2015-04-29T13:09:36 | Bump version to 0.3.2 | diff --git a/Cargo.toml b/Cargo.toml
index e1482479..541d52d6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Wim Looman <!@nemo157.com>"]
description = "http://roaringbitmap.org for http://www.rust-lang.org" | 1 | 1 | 1 |
a7211a88acea211037d19d7b572e6abdce37211f | Wim Looman | 2015-04-29T12:51:18 | Bump version to 0.3.1 | diff --git a/Cargo.toml b/Cargo.toml
index 59ac41eb..dc033364 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
-version = "0.2.2"
+version = "0.3.1"
authors = ["Wim Looman <ghostunderscore@gmail.com>"]
description = "http://roaringbitmap.org for http://www.rust-lang.org" | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.