tisonkun commented on code in PR #271:
URL: https://github.com/apache/datasketches-rust/pull/271#discussion_r3920174620
##########
datasketches/src/bloom/sketch.rs:
##########
@@ -251,13 +251,17 @@ impl BloomFilter {
Ok(())
}
- /// Inverts all bits in the filter.
+ /// Consumes the filter and inverts all its bits, returning a read-only
inverted view.
///
/// This approximately inverts the notion of set membership. After
inversion, neither the
/// no-false-negative nor the false-positive guarantee holds: inserted
items may return
- /// `false` from [`contains()`](Self::contains), and
[`is_empty()`](Self::is_empty),
- /// [`bits_used()`](Self::bits_used), and
[`load_factor()`](Self::load_factor) describe the
- /// raw bit state rather than the inserted items.
+ /// `false` from [`contains()`](BloomFilterInvertedView::contains), and
metadata methods
+ /// describe the raw inverted bit state.
+ ///
+ /// Updates are disallowed on an inverted view to prevent unsound filter
states. An inverted
+ /// view can be converted back into an updatable [`BloomFilter`] via
+ /// [`invert()`](BloomFilterInvertedView::invert) or
+ /// [`into_filter()`](BloomFilterInvertedView::into_filter).
Review Comment:
I think this can be a document of `BloomFilterInvertedView` rather than
details on the method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]