1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! ArrayOfDoubles Tuple sketch family: cardinality estimation where each
//! retained key also carries a fixed-width array of `f64` values, summed on
//! collision.
//!
//! ```
//! # fn main() -> Result<(), apache_datasketches::SketchError> {
//! use apache_datasketches::tuple::ArrayOfDoublesSketchBuilder;
//!
//! let mut sketch = ArrayOfDoublesSketchBuilder::new().num_values(2).build()?;
//! sketch.update_u64(42, &[1.0, 2.5])?;
//! println!("estimate: {}", sketch.get_estimate());
//! # Ok(())
//! # }
//! ```
//!
//! - [`ArrayOfDoublesSketch`] / [`ArrayOfDoublesSketchBuilder`] — the
//! updatable sketch.
//! - [`CompactArrayOfDoublesSketch`] — an immutable, serializable snapshot
//! produced by `ArrayOfDoublesSketch::compact` or by a set operation's
//! result.
//! - [`ArrayOfDoublesUnion`] / [`ArrayOfDoublesUnionBuilder`] — merges
//! multiple sketches, summing values per index on collision.
//! - [`ArrayOfDoublesIntersection`] — computes the intersection of sketches
//! fed via `update`, summing values per index.
//! - [`ArrayOfDoublesAnotB`] — computes the set difference (keys in `a` but
//! not `b`), preserving `a`'s values.
//! - [`array_of_doubles_jaccard_similarity`] / [`JaccardBounds`] — estimates
//! the Jaccard index (intersection-over-union) of two sketches.
//! - [`generic`] — Tuple sketches over a summary type you define yourself,
//! for cases the fixed `f64`-array shape above does not cover.
//!
//! [`ArrayOfDoublesSketch`] and [`CompactArrayOfDoublesSketch`] can both be
//! passed interchangeably (via the sealed [`ArrayOfDoublesInput`] trait) to
//! every set operation in this module.
pub use ArrayOfDoublesAnotB;
pub use ;
pub use CompactArrayOfDoublesSketch;
pub use ArrayOfDoublesInput;
pub use ArrayOfDoublesIntersection;
pub use ;
pub use ArrayOfDoublesSketch;
pub use ;