Skip to content

Commit 3e99a5f

Browse files
committed
Refactoring
1 parent c99ac30 commit 3e99a5f

5 files changed

Lines changed: 82 additions & 171 deletions

File tree

ddsketch/include/collapsing_highest_dense_store_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ typename CollapsingHighestDenseStore<Allocator>::size_type CollapsingHighestDens
7777

7878
template <typename Allocator>
7979
void CollapsingHighestDenseStore<Allocator>::adjust(size_type new_min_index, size_type new_max_index) {
80-
if (new_max_index - new_min_index + 1 > this->bins.size()) {
80+
if (new_max_index - new_min_index + 1 > static_cast<int>(this->bins.size())) {
8181
// The range of indices is too wide, buckets of lowest indices need to be collapsed.
8282
new_max_index = new_min_index + this->bins.size() - 1;
8383

ddsketch/include/collapsing_lowest_dense_store_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ typename CollapsingLowestDenseStore<Allocator>::size_type CollapsingLowestDenseS
7676

7777
template <typename Allocator>
7878
void CollapsingLowestDenseStore<Allocator>::adjust(size_type new_min_index, size_type new_max_index) {
79-
if (new_max_index - new_min_index + 1 > this->bins.size()) {
79+
if (new_max_index - new_min_index + 1 > static_cast<int>(this->bins.size())) {
8080
// The range of indices is too wide, buckets of lowest indices need to be collapsed.
8181
new_min_index = new_max_index - this->bins.size() + 1;
8282

ddsketch/test/DDSketchTest.cpp

Lines changed: 55 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -16,110 +16,6 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
// #include <iostream>
20-
//
21-
// #include <catch2/catch.hpp>
22-
//
23-
// #include "collapsing_highest_dense_store.hpp"
24-
// #include "collapsing_lowest_dense_store.hpp"
25-
// #include "dense_store.hpp"
26-
// #include "index_mapping.hpp"
27-
// #include "sparse_store.hpp"
28-
// #include "unbounded_size_dense_store.hpp"
29-
// #include"ddsketch.hpp"
30-
// #include "logarithmic_mapping.hpp"
31-
// #include "linearly_interpolated_mapping.hpp"
32-
33-
// #include <catch2/catch.hpp>
34-
// #include <vector>
35-
// #include <random>
36-
// #include <algorithm>
37-
// #include <cmath>
38-
// #include <stdexcept>
39-
//
40-
// #include "ddsketch.hpp"
41-
// #include "index_mapping.hpp"
42-
// #include "logarithmic_mapping.hpp"
43-
// #include "linearly_interpolated_mapping.hpp"
44-
// #include "quadratically_interpolated_mapping.hpp"
45-
// #include "quartically_interpolated_mapping.hpp"
46-
// #include "unbounded_size_dense_store.hpp"
47-
// #include "collapsing_highest_dense_store.hpp"
48-
// #include "collapsing_lowest_dense_store.hpp"
49-
// #include "sparse_store.hpp"
50-
// namespace datasketches {
51-
// using A = std::allocator<double>;
52-
// TEST_CASE("ddsketch", "[ddsketch]") {
53-
// std::cout << "ddsketch test" << std::endl;
54-
//
55-
// CollapsingHighestDenseStore<std::allocator<uint64_t>> store_hi(1024);
56-
// store_hi.merge(store_hi);
57-
//
58-
// CollapsingLowestDenseStore<std::allocator<uint64_t>> store_lo(1024);
59-
// store_lo.merge(store_lo);
60-
//
61-
// store_hi.merge(store_lo);
62-
// store_lo.merge(store_hi);
63-
//
64-
// store_lo.add(1, 1);
65-
// store_lo.add(12, 2);
66-
// store_lo.add(23, 3);
67-
//
68-
// // std::cout << "ciao" << std::endl;
69-
// // store_hi.merge(store_lo);
70-
// // for (const Bin& bin : store_hi) {
71-
// // std::cout << bin.toString() << std::endl;
72-
// // }
73-
//
74-
// // UnboundedSizeDenseStore<std::allocator<uint64_t>> unbounded_store;
75-
// // unbounded_store.add(34, 4);
76-
// // unbounded_store.merge(unbounded_store);
77-
// //
78-
// // store_lo.merge(unbounded_store);
79-
// // unbounded_store.merge(store_lo);
80-
// //
81-
// // store_hi.merge(unbounded_store);
82-
// // unbounded_store.merge(store_hi);
83-
// // SparseStore<std::allocator<double>> ss;
84-
// }
85-
//
86-
// template<store_concept Store, class Mapping>
87-
// void test_adding(DDSketch<Store, Mapping>& sketch, const double& values...) {
88-
//
89-
// }
90-
//
91-
// TEST_CASE("test empty", "[ddsketch]") {
92-
// LogarithmicMapping mapping(0.01);
93-
// DDSketch<UnboundedSizeDenseStore<A>, decltype(mapping)> sketch(mapping);
94-
//
95-
// sketch.update(20.0, 2);
96-
// sketch.update(10.0);
97-
// LinearlyInterpolatedMapping linear(0.01);
98-
// DDSketch<UnboundedSizeDenseStore<A>, decltype(mapping)> sketch2(mapping);
99-
// sketch2.update(10.0);
100-
//
101-
// sketch2.update(20.0, 2);
102-
//
103-
// }
104-
105-
/*
106-
* Licensed to the Apache Software Foundation (ASF) under one
107-
* or more contributor license agreements. See the NOTICE file
108-
* distributed with this work for additional information
109-
* regarding copyright ownership. The ASF licenses this file
110-
* to you under the Apache License, Version 2.0 (the
111-
* "License"); you may not use this file except in compliance
112-
* with the License. You may obtain a copy of the License at
113-
*
114-
* http://www.apache.org/licenses/LICENSE-2.0
115-
*
116-
* Unless required by applicable law or agreed to in writing,
117-
* software distributed under the License is distributed on an
118-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
119-
* KIND, either express or implied. See the License for the
120-
* specific language governing permissions and limitations
121-
* under the License.
122-
*/
12319

12420
#include <catch2/catch.hpp>
12521
#include <vector>
@@ -239,13 +135,20 @@ void test_merging(SketchType& sketch, const std::vector<std::vector<double>>& va
239135
assert_encodes(sketch, all_values, relative_accuracy);
240136
}
241137

242-
// Test Cases
138+
using DDSketchUnboundedStoreTestCase = std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>;
243139

140+
template<int N>
141+
using DDSketchCollapsingHighestStoreTestCase = std::pair<store_factory<CollapsingHighestDenseStore<A>, N>, LogarithmicMapping>;
142+
143+
template<int N>
144+
using DDSketchCollapsingLowestStoreTestCase = std::pair<store_factory<CollapsingLowestDenseStore<A>, N>, LogarithmicMapping>;
145+
146+
using DDSketchSparseStoreTestCase = std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>;
244147
TEMPLATE_TEST_CASE("DDSketch empty test", "[ddsketch]",
245-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
246-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
247-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
248-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
148+
DDSketchUnboundedStoreTestCase,
149+
DDSketchCollapsingHighestStoreTestCase<128>,
150+
DDSketchCollapsingLowestStoreTestCase<128>,
151+
DDSketchSparseStoreTestCase
249152
) {
250153
auto positive_store = *TestType::first_type::new_store();
251154
auto negative_store = *TestType::first_type::new_store();
@@ -263,10 +166,10 @@ TEMPLATE_TEST_CASE("DDSketch empty test", "[ddsketch]",
263166
}
264167

265168
TEMPLATE_TEST_CASE("DDSketch exception test", "[ddsketch]",
266-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
267-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
268-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
269-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
169+
DDSketchUnboundedStoreTestCase,
170+
DDSketchCollapsingHighestStoreTestCase<128>,
171+
DDSketchCollapsingLowestStoreTestCase<128>,
172+
DDSketchSparseStoreTestCase
270173
) {
271174
auto positive_store = *TestType::first_type::new_store();
272175
auto negative_store = *TestType::first_type::new_store();
@@ -285,10 +188,10 @@ TEMPLATE_TEST_CASE("DDSketch exception test", "[ddsketch]",
285188
}
286189

287190
TEMPLATE_TEST_CASE("DDSketch clear test", "[ddsketch]",
288-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
289-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
290-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
291-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
191+
DDSketchUnboundedStoreTestCase,
192+
DDSketchCollapsingHighestStoreTestCase<128>,
193+
DDSketchCollapsingLowestStoreTestCase<128>,
194+
DDSketchSparseStoreTestCase
292195
) {
293196
auto positive_store = *TestType::first_type::new_store();
294197
auto negative_store = *TestType::first_type::new_store();
@@ -306,10 +209,10 @@ TEMPLATE_TEST_CASE("DDSketch clear test", "[ddsketch]",
306209
}
307210

308211
TEMPLATE_TEST_CASE("DDSketch constant test", "[ddsketch]",
309-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
310-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
311-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
312-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
212+
DDSketchUnboundedStoreTestCase,
213+
DDSketchCollapsingHighestStoreTestCase<128>,
214+
DDSketchCollapsingLowestStoreTestCase<128>,
215+
DDSketchSparseStoreTestCase
313216
){
314217
auto positive_store = *TestType::first_type::new_store();
315218
auto negative_store = *TestType::first_type::new_store();
@@ -329,10 +232,10 @@ TEMPLATE_TEST_CASE("DDSketch constant test", "[ddsketch]",
329232
}
330233

331234
TEMPLATE_TEST_CASE("DDSketch negative constants test", "[ddsketch]",
332-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
333-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
334-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
335-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
235+
DDSketchUnboundedStoreTestCase,
236+
DDSketchCollapsingHighestStoreTestCase<128>,
237+
DDSketchCollapsingLowestStoreTestCase<128>,
238+
DDSketchSparseStoreTestCase
336239
) {
337240
auto positive_store = *TestType::first_type::new_store();
338241
auto negative_store = *TestType::first_type::new_store();
@@ -352,10 +255,10 @@ TEMPLATE_TEST_CASE("DDSketch negative constants test", "[ddsketch]",
352255
}
353256
}
354257
TEMPLATE_TEST_CASE("DDSketch mixed positive negative test", "[ddsketch]",
355-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
356-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 128>, LogarithmicMapping>),
357-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 128>, LogarithmicMapping>),
358-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
258+
DDSketchUnboundedStoreTestCase,
259+
DDSketchCollapsingHighestStoreTestCase<128>,
260+
DDSketchCollapsingLowestStoreTestCase<128>,
261+
DDSketchSparseStoreTestCase
359262
) {
360263
auto positive_store = *TestType::first_type::new_store();
361264
auto negative_store = *TestType::first_type::new_store();
@@ -380,10 +283,10 @@ TEMPLATE_TEST_CASE("DDSketch mixed positive negative test", "[ddsketch]",
380283
}
381284
}
382285
TEMPLATE_TEST_CASE("DDSketch with zeros test", "[ddsketch]",
383-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
384-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 4096>, LogarithmicMapping>),
286+
DDSketchUnboundedStoreTestCase,
287+
DDSketchCollapsingHighestStoreTestCase<4096>,
385288
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 4096>, LogarithmicMapping>),
386-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
289+
DDSketchSparseStoreTestCase
387290
) {
388291
auto positive_store = *TestType::first_type::new_store();
389292
auto negative_store = *TestType::first_type::new_store();
@@ -414,8 +317,8 @@ TEMPLATE_TEST_CASE("DDSketch with zeros test", "[ddsketch]",
414317
}
415318

416319
TEMPLATE_TEST_CASE("DDSketch linear sequences test", "[ddsketch]",
417-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
418-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
320+
DDSketchUnboundedStoreTestCase,
321+
DDSketchSparseStoreTestCase
419322
) {
420323
auto positive_store = *TestType::first_type::new_store();
421324
auto negative_store = *TestType::first_type::new_store();
@@ -458,8 +361,8 @@ TEMPLATE_TEST_CASE("DDSketch linear sequences test", "[ddsketch]",
458361
}
459362

460363
TEMPLATE_TEST_CASE("DDSketch exponential sequence test", "[ddsketch]",
461-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
462-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
364+
DDSketchUnboundedStoreTestCase,
365+
DDSketchSparseStoreTestCase
463366
) {
464367
auto positive_store = *TestType::first_type::new_store();
465368
auto negative_store = *TestType::first_type::new_store();
@@ -495,10 +398,10 @@ TEMPLATE_TEST_CASE("DDSketch exponential sequence test", "[ddsketch]",
495398
}
496399

497400
TEMPLATE_TEST_CASE("DDSketch merging test", "[ddsketch]",
498-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
499-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 4096>, LogarithmicMapping>),
500-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 4096>, LogarithmicMapping>),
501-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
401+
DDSketchUnboundedStoreTestCase,
402+
DDSketchCollapsingHighestStoreTestCase<4096>,
403+
DDSketchCollapsingLowestStoreTestCase<4096>,
404+
DDSketchSparseStoreTestCase
502405
) {
503406
auto positive_store = *TestType::first_type::new_store();
504407
auto negative_store = *TestType::first_type::new_store();
@@ -523,10 +426,10 @@ TEMPLATE_TEST_CASE("DDSketch merging test", "[ddsketch]",
523426
}
524427

525428
TEMPLATE_TEST_CASE("DDSketch different mappings", "[ddsketch]",
526-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
527-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 4096>, LogarithmicMapping>),
528-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 4096>, LogarithmicMapping>),
529-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
429+
DDSketchUnboundedStoreTestCase,
430+
DDSketchCollapsingHighestStoreTestCase<4096>,
431+
DDSketchCollapsingLowestStoreTestCase<4096>,
432+
DDSketchSparseStoreTestCase
530433
) {
531434
auto positive_store = *TestType::first_type::new_store();
532435
auto negative_store = *TestType::first_type::new_store();
@@ -539,10 +442,10 @@ TEMPLATE_TEST_CASE("DDSketch different mappings", "[ddsketch]",
539442
}
540443

541444
TEMPLATE_TEST_CASE("DDSketch add random test", "[ddsketch][random]",
542-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
543-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 4096>, LogarithmicMapping>),
544-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 4096>, LogarithmicMapping>),
545-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
445+
DDSketchUnboundedStoreTestCase,
446+
DDSketchCollapsingHighestStoreTestCase<4096>,
447+
DDSketchCollapsingLowestStoreTestCase<4096>,
448+
DDSketchSparseStoreTestCase
546449
) {
547450
auto positive_store = *TestType::first_type::new_store();
548451
auto negative_store = *TestType::first_type::new_store();
@@ -572,10 +475,10 @@ TEMPLATE_TEST_CASE("DDSketch add random test", "[ddsketch][random]",
572475
}
573476

574477
TEMPLATE_TEST_CASE("DDSketch merging random test", "[ddsketch][random]",
575-
(std::pair<store_factory<UnboundedSizeDenseStore<A>>, LogarithmicMapping>),
576-
(std::pair<store_factory<CollapsingHighestDenseStore<A>, 4096>, LogarithmicMapping>),
577-
(std::pair<store_factory<CollapsingLowestDenseStore<A>, 4096>, LogarithmicMapping>),
578-
(std::pair<store_factory<SparseStore<A>>, LogarithmicMapping>)
478+
DDSketchUnboundedStoreTestCase,
479+
DDSketchCollapsingHighestStoreTestCase<4096>,
480+
DDSketchCollapsingLowestStoreTestCase<4096>,
481+
DDSketchSparseStoreTestCase
579482
) {
580483
auto positive_store = *TestType::first_type::new_store();
581484
auto negative_store = *TestType::first_type::new_store();

ddsketch/test/IndexMappingTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ constexpr double max_tested_relative_accuracy = 1 - 1e-3;
3232
// For more precise testing
3333
//constexpr double multiplier = 1 + std::numbers::sqrt2 * 1e-1;
3434
// For faster testing
35-
constexpr double multiplier = 1 + std::numbers::sqrt2 * 1e2;
35+
constexpr double multiplier = 1 + std::numbers::sqrt2 * 1e6;
3636
constexpr double floating_point_acceptable_error = 1e-10;
3737

3838
void assert_relative_accuracy(const double& expected, const double& actual, const double& relative_accuracy) {

ddsketch/test/StoreTest.cpp

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ int random_index() {
124124
}
125125

126126
double random_count() {
127-
double max = 10.;
128127
std::random_device rd;
129128
std::mt19937_64 rng(rd());
130129
std::uniform_real_distribution<double> distribution(0., 1.);
@@ -196,15 +195,24 @@ void test_store(StoreType& store, const std::vector<Bin>& normalized_bins) {
196195
test_copy<StoreType>(store, normalized_bins);
197196
}
198197

198+
template<int N>
199+
using CollapsingLowestStoreTestCase = store_factory<CollapsingLowestDenseStore<A>, N>;
200+
201+
template<int N>
202+
using CollapsingHighestStoreTestCase = store_factory<CollapsingHighestDenseStore<A>, N>;
203+
204+
using SparseStoreTestCase = store_factory<SparseStore<A>>;
205+
using UnboundedStoreSizeTestCase = store_factory<UnboundedSizeDenseStore<A>>;
206+
199207
TEMPLATE_TEST_CASE("store test empty", "[storetest]",
200-
(store_factory<CollapsingLowestDenseStore<A>, 8>),
201-
(store_factory<CollapsingLowestDenseStore<A>, 128>),
202-
(store_factory<CollapsingLowestDenseStore<A>, 1024>),
203-
(store_factory<CollapsingHighestDenseStore<A>, 8>),
204-
(store_factory<CollapsingHighestDenseStore<A>, 128>),
205-
(store_factory<CollapsingHighestDenseStore<A>, 1024>),
206-
(store_factory<SparseStore<A>>),
207-
(store_factory<UnboundedSizeDenseStore<A>>)
208+
CollapsingLowestStoreTestCase<8>,
209+
CollapsingLowestStoreTestCase<128>,
210+
CollapsingLowestStoreTestCase<1024>,
211+
CollapsingHighestStoreTestCase<8>,
212+
CollapsingHighestStoreTestCase<128>,
213+
CollapsingHighestStoreTestCase<1024>,
214+
SparseStoreTestCase,
215+
UnboundedStoreSizeTestCase
208216
) {
209217
auto store = TestType::new_store();
210218
std::vector<Bin> empty_bins{};
@@ -464,13 +472,13 @@ TEMPLATE_TEST_CASE("test cross merge", "[storetest]",
464472
>;
465473

466474
std::vector<std::pair<StoreVariant, std::function<std::vector<Bin>(std::vector<Bin>&)>>> dense_stores;
467-
dense_stores.push_back({store_factory<CollapsingLowestDenseStore<A>, 8>::new_store(), collapsing_lowest_bins<8>::collapse});
468-
dense_stores.push_back({store_factory<CollapsingLowestDenseStore<A>, 128>::new_store(), collapsing_lowest_bins<128>::collapse});
469-
dense_stores.push_back({store_factory<CollapsingLowestDenseStore<A>, 1024>::new_store(), collapsing_lowest_bins<1024>::collapse});
470-
dense_stores.push_back({store_factory<CollapsingHighestDenseStore<A>, 8>::new_store(), collapsing_highest_bins<8>::collapse});
471-
dense_stores.push_back({store_factory<CollapsingHighestDenseStore<A>, 128>::new_store(), collapsing_highest_bins<128>::collapse});
472-
dense_stores.push_back({store_factory<CollapsingHighestDenseStore<A>, 1024>::new_store(), collapsing_highest_bins<1024>::collapse});
473-
dense_stores.push_back({store_factory<UnboundedSizeDenseStore<A>>::new_store(), noops_collapsing_bins::collapse});
475+
dense_stores.emplace_back(store_factory<CollapsingLowestDenseStore<A>, 8>::new_store(), collapsing_lowest_bins<8>::collapse);
476+
dense_stores.emplace_back(store_factory<CollapsingLowestDenseStore<A>, 128>::new_store(), collapsing_lowest_bins<128>::collapse);
477+
dense_stores.emplace_back(store_factory<CollapsingLowestDenseStore<A>, 1024>::new_store(), collapsing_lowest_bins<1024>::collapse);
478+
dense_stores.emplace_back(store_factory<CollapsingHighestDenseStore<A>, 8>::new_store(), collapsing_highest_bins<8>::collapse);
479+
dense_stores.emplace_back(store_factory<CollapsingHighestDenseStore<A>, 128>::new_store(), collapsing_highest_bins<128>::collapse);
480+
dense_stores.emplace_back(store_factory<CollapsingHighestDenseStore<A>, 1024>::new_store(), collapsing_highest_bins<1024>::collapse);
481+
dense_stores.emplace_back(store_factory<UnboundedSizeDenseStore<A>>::new_store(), noops_collapsing_bins::collapse);
474482

475483
std::vector<int> indexes{-1000, -1, 0, 1, 1000};
476484
std::vector<double> counts{0, 1, 2, 4, 5, 10, 20, 100, 1000, 10000};

0 commit comments

Comments
 (0)