Skip to content

Commit acb806d

Browse files
documentation improvements
1 parent 0393cf2 commit acb806d

3 files changed

Lines changed: 37 additions & 5 deletions

File tree

kll/include/kll_sketch.hpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class kll_sketch {
167167
public:
168168
using value_type = T;
169169
using comparator = C;
170+
using allocator_type = A;
170171
using vector_u32 = std::vector<uint32_t, typename std::allocator_traits<A>::template rebind_alloc<uint32_t>>;
171172
using vector_double = typename quantiles_sorted_view<T, C, A>::vector_double;
172173

@@ -176,11 +177,41 @@ class kll_sketch {
176177
*/
177178
using quantile_return_type = typename quantiles_sorted_view<T, C, A>::quantile_return_type;
178179

180+
/**
181+
* Constructor
182+
* @param k affects the size of the sketch and its estimation error
183+
* @param comparator strict weak ordering function (see C++ named requirements: Compare)
184+
* @param allocator used by this sketch to allocate memory
185+
*/
179186
explicit kll_sketch(uint16_t k = kll_constants::DEFAULT_K, const C& comparator = C(), const A& allocator = A());
187+
188+
/**
189+
* Copy constructor
190+
* @param other sketch to be copied
191+
*/
180192
kll_sketch(const kll_sketch& other);
193+
194+
/**
195+
* Move constructor
196+
* @param other sketch to be moved
197+
*/
181198
kll_sketch(kll_sketch&& other) noexcept;
199+
200+
182201
~kll_sketch();
202+
203+
/**
204+
* Copy assignment
205+
* @param other sketch to be copied
206+
* @return reference to this sketch
207+
*/
183208
kll_sketch& operator=(const kll_sketch& other);
209+
210+
/**
211+
* Move assignment
212+
* @param other sketch to be moved
213+
* @return reference to this sketch
214+
*/
184215
kll_sketch& operator=(kll_sketch&& other);
185216

186217
/*

quantiles/include/quantiles_sketch.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ class quantiles_sketch {
160160

161161
/**
162162
* Constructor
163-
* @param k
164-
* @param comparator
165-
* @param allocator
163+
* @param k affects the size of the sketch and its estimation error
164+
* @param comparator strict weak ordering function (see C++ named requirements: Compare)
165+
* @param allocator used to allocate memory
166166
*/
167167
explicit quantiles_sketch(uint16_t k = quantiles_constants::DEFAULT_K,
168168
const Comparator& comparator = Comparator(), const Allocator& allocator = Allocator());

req/include/req_sketch.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class req_sketch {
8080
public:
8181
using value_type = T;
8282
using comparator = Comparator;
83+
using allocator_type = Allocator;
8384
using Compactor = req_compactor<T, Comparator, Allocator>;
8485
using AllocCompactor = typename std::allocator_traits<Allocator>::template rebind_alloc<Compactor>;
8586
using vector_double = typename quantiles_sorted_view<T, Comparator, Allocator>::vector_double;
@@ -96,8 +97,8 @@ class req_sketch {
9697
* Value of 12 roughly corresponds to 1% relative error guarantee at 95% confidence.
9798
* @param hra if true, the default, the high ranks are prioritized for better
9899
* accuracy. Otherwise the low ranks are prioritized for better accuracy.
99-
* @param comparator instance for use by this sketch instance
100-
* @param allocator instance for use by this sketch instance
100+
* @param comparator strict weak ordering function (see C++ named requirements: Compare)
101+
* @param allocator used by this sketch to allocate memory
101102
*/
102103
explicit req_sketch(uint16_t k, bool hra = true, const Comparator& comparator = Comparator(),
103104
const Allocator& allocator = Allocator());

0 commit comments

Comments
 (0)