This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch array_tuple_sketch in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit 9cf52d5200dd383730e27ab5552a2e9b5b00ba30 Author: AlexanderSaydakov <[email protected]> AuthorDate: Thu Oct 26 17:43:24 2023 -0700 doxygen fixes --- theta/include/theta_a_not_b.hpp | 5 ++++- tuple/include/array_tuple_a_not_b.hpp | 13 +++++++++++++ tuple/include/array_tuple_intersection.hpp | 14 ++++++++++++++ tuple/include/array_tuple_sketch.hpp | 9 ++++----- tuple/include/tuple_a_not_b.hpp | 10 +++++++++- 5 files changed, 44 insertions(+), 7 deletions(-) diff --git a/theta/include/theta_a_not_b.hpp b/theta/include/theta_a_not_b.hpp index 0ca5c7e..f017994 100644 --- a/theta/include/theta_a_not_b.hpp +++ b/theta/include/theta_a_not_b.hpp @@ -46,7 +46,10 @@ public: /** * Computes the a-not-b set operation given two sketches. - * @return the result of a-not-b + * @param a sketch A + * @param b sketch B + * @param ordered optional flag to specify if ordered sketch should be produced + * @return the result of a-not-b as a compact sketch */ template<typename FwdSketch, typename Sketch> CompactSketch compute(FwdSketch&& a, const Sketch& b, bool ordered = true) const; diff --git a/tuple/include/array_tuple_a_not_b.hpp b/tuple/include/array_tuple_a_not_b.hpp index 70c5df3..6007cca 100644 --- a/tuple/include/array_tuple_a_not_b.hpp +++ b/tuple/include/array_tuple_a_not_b.hpp @@ -28,14 +28,27 @@ namespace datasketches { +/// array tuple A-not-B template<typename Array, typename Allocator = typename Array::allocator_type> class array_tuple_a_not_b: tuple_a_not_b<Array, Allocator> { public: using Base = tuple_a_not_b<Array, Allocator>; using CompactSketch = compact_array_tuple_sketch<Array, Allocator>; + /** + * Constructor + * @param seed for the hash function that was used to create the sketch + * @param allocator to use for allocating and deallocating memory + */ explicit array_tuple_a_not_b(uint64_t seed = DEFAULT_SEED, const Allocator& allocator = Allocator()); + /** + * Computes the a-not-b set operation given two sketches. + * @param a sketch A + * @param b sketch B + * @param ordered optional flag to specify if ordered sketch should be produced + * @return the result of a-not-b as a compact sketch + */ template<typename FwdSketch, typename Sketch> CompactSketch compute(FwdSketch&& a, const Sketch& b, bool ordered = true) const; }; diff --git a/tuple/include/array_tuple_intersection.hpp b/tuple/include/array_tuple_intersection.hpp index af8768f..e7e25dd 100644 --- a/tuple/include/array_tuple_intersection.hpp +++ b/tuple/include/array_tuple_intersection.hpp @@ -28,6 +28,7 @@ namespace datasketches { +/// array tuple intersection template< typename Array, typename Policy, @@ -39,8 +40,21 @@ public: using CompactSketch = compact_array_tuple_sketch<Array, Allocator>; using resize_factor = theta_constants::resize_factor; + /** + * Constructor + * @param seed for the hash function that was used to create the sketch + * @param policy user-defined way of combining Summary during intersection + * @param allocator to use for allocating and deallocating memory + */ explicit array_tuple_intersection(uint64_t seed = DEFAULT_SEED, const Policy& policy = Policy(), const Allocator& allocator = Allocator()); + /** + * Produces a copy of the current state of the intersection. + * If update() was not called, the state is the infinite "universe", + * which is considered an undefined state, and throws an exception. + * @param ordered optional flag to specify if ordered sketch should be produced + * @return the result of the intersection as a compact sketch + */ CompactSketch get_result(bool ordered = true) const; }; diff --git a/tuple/include/array_tuple_sketch.hpp b/tuple/include/array_tuple_sketch.hpp index 39aebc6..5b66f04 100644 --- a/tuple/include/array_tuple_sketch.hpp +++ b/tuple/include/array_tuple_sketch.hpp @@ -28,11 +28,6 @@ namespace datasketches { -// This is a wrapper around tuple sketch to match the functionality and serialization format of ArrayOfDoublesSketch in Java. -// For this the sketch must be configured with array<double> or std::vector<double>. -// This is a more generic implementation for any integral type (serialization assumes contiguous array size_of(T) * num_values). -// A set of type definitions for the ArrayOfDoubles equivalent is provided in a separate file array_of_doubles_sketch.hpp. - // This simple array is faster than std::vector and should be sufficient for this application template<typename T, typename Allocator = std::allocator<T>> class array { @@ -116,6 +111,10 @@ template<typename Array, typename Allocator> class compact_array_tuple_sketch; /** * Update array tuple sketch. + * This is a wrapper around tuple sketch to match the functionality and serialization format of ArrayOfDoublesSketch in Java. + * For this the sketch must be configured with array<double> or std::vector<double>. + * This is a more generic implementation for any integral type (serialization assumes contiguous array size_of(T) * num_values). + * A set of type definitions for the ArrayOfDoubles* equivalent is provided in a separate file array_of_doubles_sketch.hpp. * There is no constructor. Use builder instead. */ template< diff --git a/tuple/include/tuple_a_not_b.hpp b/tuple/include/tuple_a_not_b.hpp index 5c258fb..edcf812 100644 --- a/tuple/include/tuple_a_not_b.hpp +++ b/tuple/include/tuple_a_not_b.hpp @@ -37,11 +37,19 @@ public: using AllocEntry = typename std::allocator_traits<Allocator>::template rebind_alloc<Entry>; using State = theta_set_difference_base<Entry, ExtractKey, CompactSketch, AllocEntry>; + /** + * Constructor + * @param seed for the hash function that was used to create the sketch + * @param allocator to use for allocating and deallocating memory + */ explicit tuple_a_not_b(uint64_t seed = DEFAULT_SEED, const Allocator& allocator = Allocator()); /** * Computes the a-not-b set operation given two sketches. - * @return the result of a-not-b + * @param a sketch A + * @param b sketch B + * @param ordered optional flag to specify if ordered sketch should be produced + * @return the result of a-not-b as a compact sketch */ template<typename FwdSketch, typename Sketch> CompactSketch compute(FwdSketch&& a, const Sketch& b, bool ordered = true) const; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
