This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch tuple_filter in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit cb1cdc4c0eaeaeb98e0ff38df21446a69eb5dd66 Author: AlexanderSaydakov <[email protected]> AuthorDate: Thu May 9 21:04:44 2024 -0700 documentation --- tuple/include/tuple_filter.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tuple/include/tuple_filter.hpp b/tuple/include/tuple_filter.hpp index 0cf396f..3f601f5 100644 --- a/tuple/include/tuple_filter.hpp +++ b/tuple/include/tuple_filter.hpp @@ -24,6 +24,9 @@ namespace datasketches { +/** + * Filter entries in a Tuple sketch according to a predicate. + */ template<typename Summary, typename Allocator = std::allocator<Summary>> class tuple_filter { public: @@ -31,8 +34,19 @@ public: using CompactSketch = compact_tuple_sketch<Summary, Allocator>; using AllocEntry = typename std::allocator_traits<Allocator>::template rebind_alloc<Entry>; + /** + * Constructor + * @param allocator to use for allocating and deallocating memory + */ explicit tuple_filter(const Allocator& allocator = Allocator()); + /** + * Produces a Compact Tuple sketch from a given sketch (Update or Compact) + * by applying a given predicate to each entry. + * @param sketch input sketch + * @param predicate should return true for the entries to keep + * @return compact sketch with the entries retained according to the predicate + */ template<typename Sketch, typename Predicate> CompactSketch compute(const Sketch& sketch, const Predicate& predicate) const; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
