Skip to content

Commit e70e46f

Browse files
committed
Fix constructor
1 parent 708f27f commit e70e46f

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

ddsketch/include/ddsketch.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,12 @@ namespace datasketches {
3434
template<store_concept Store, class Mapping>
3535
class DDSketch {
3636
public:
37-
// TODO
38-
// DDSketch() = default;
39-
// template<auto... Args>
40-
// explicit DDSketch(const double& relative_accuracy):
41-
// positive_store(store_factory<Store>::new_store(Args...)),
42-
// negative_store(store_factory<Store>::new_store(Args...)),
43-
// index_mapping(Mapping(relative_accuracy)) {}
37+
explicit DDSketch(const double& relative_accuracy);
4438

4539
DDSketch(const Store& positive_store, const Store& negative_store, const Mapping& mapping, const double& zero_count = 0.0, const double& min_indexed_value = 0.0);
4640

4741
explicit DDSketch(const Mapping& index_mapping);
4842

49-
explicit DDSketch(double relative_accuracy);
50-
5143
void update(const double&value, const double& count = 1.0);
5244

5345
template<store_concept OtherStore>

ddsketch/include/ddsketch_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
namespace datasketches {
2828

2929
template<store_concept Store, class Mapping>
30-
DDSketch<Store, Mapping>::DDSketch(double relative_accuracy): DDSketch(Mapping(relative_accuracy)) {}
30+
DDSketch<Store, Mapping>::DDSketch(const double& relative_accuracy): DDSketch(Mapping(relative_accuracy)) {}
3131

3232
template<store_concept Store, class Mapping>
3333
DDSketch<Store, Mapping>::DDSketch(const Mapping& index_mapping):

ddsketch/test/DDSketchTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ TEST_CASE("quantile", "[ddsketch]") {
577577
ddsketch.update(val);
578578
}
579579

580+
DDSketch<CollapsingLowestDenseStore<8, A>, LinearlyInterpolatedMapping> sk(0.01);
581+
580582
// std::cout << ddsketch.get_quantile(0.5) << std::endl;
581583
// std::cout << ddsketch.get_rank(4) << std::endl;
582584
}

0 commit comments

Comments
 (0)