Rust implementation of the CVM algorithm for counting distinct elements in a stream
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #4 from urschrei/shugel/push-proktvpxvozq

Update version, edition, and MSRV

+4 -3
+3 -2
Cargo.toml
··· 7 7 documentation = "https://docs.rs/cvmcount" 8 8 keywords = ["CVM", "count-distinct", "estimation", "treap"] 9 9 categories = ["algorithms", ] 10 + rust-version = "1.85" 10 11 11 - version = "0.3.1" 12 - edition = "2021" 12 + version = "0.4.0" 13 + edition = "2024" 13 14 14 15 [dependencies] 15 16 rand = "0.8.5"
+1 -1
src/treap.rs
··· 84 84 85 85 /// Insert a key with a random priority 86 86 pub fn insert<R: Rng>(&mut self, key: T, rng: &mut R) { 87 - let priority = rng.gen(); 87 + let priority = rng.r#gen(); 88 88 self.root = Self::insert_node(self.root.take(), key, priority); 89 89 self.size += 1; 90 90 }