Skip to content

Commit eecb9cc

Browse files
committed
Minor fixes
1 parent 1fb5938 commit eecb9cc

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

ddsketch/include/ddsketch.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DDSketch {
9696

9797
vector_double get_PMF(const T* split_points, uint32_t size) const;
9898

99-
vector_double get_CDF(const T* split_pints, uint32_t size) const;
99+
vector_double get_CDF(const T* split_points, uint32_t size) const;
100100

101101

102102
bool is_empty() const;

ddsketch/include/ddsketch_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ double DDSketch<Store, Mapping>::get_rank(const double &item) const {
146146
double rank = 0.0;
147147

148148
if (!negative_store.is_empty()) {
149-
for (auto it = negative_store.rbegin(); it != negative_store.rend() && index_mapping.value((*it).get_index()) <= item; ++it) {
149+
for (auto it = negative_store.rbegin(); it != negative_store.rend() && -index_mapping.value((*it).get_index()) <= item; ++it) {
150150
rank += (*it).get_count();
151151
}
152152
}

ddsketch/include/log_like_index_mapping.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ class LogLikeIndexMapping : public IndexMapping<Derived> {
9797
*/
9898
void serialize(std::ostream& os) const;
9999

100+
int get_serialized_size_bytes() const {
101+
return 16;
102+
}
103+
100104
template<class A = std::allocator<char>>
101105
string<A> to_string() const;
102106

0 commit comments

Comments
 (0)