Skip to content

Commit d70f4fc

Browse files
committed
Use double instead of T
1 parent 3c1d929 commit d70f4fc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ddsketch/include/ddsketch.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class DDSketch {
9494
*/
9595
double get_quantile(const double& rank) const;
9696

97-
vector_double get_PMF(const T* split_points, uint32_t size) const;
97+
vector_double get_PMF(const double* split_points, uint32_t size) const;
9898

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

101101

102102
bool is_empty() const;
@@ -176,7 +176,7 @@ class DDSketch {
176176

177177
double get_quantile(const double& rank, const double& count) const;
178178

179-
static inline void check_split_pints(const T* values, uint32_t size);
179+
static inline void check_split_pints(const double* values, uint32_t size);
180180
};
181181

182182
} /* namespace datasketches */

ddsketch/include/ddsketch_impl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ double DDSketch<Store, Mapping>::get_quantile(const double& rank, const double&
201201
}
202202

203203
template<class Store, class Mapping>
204-
typename DDSketch<Store, Mapping>::vector_double DDSketch<Store, Mapping>::get_CDF(const T* split_points, uint32_t size) const {
204+
typename DDSketch<Store, Mapping>::vector_double DDSketch<Store, Mapping>::get_CDF(const double* split_points, uint32_t size) const {
205205
check_split_pints(split_points, size);
206206
vector_double ranks;
207207
ranks.reserve(size + 1);
@@ -213,7 +213,7 @@ typename DDSketch<Store, Mapping>::vector_double DDSketch<Store, Mapping>::get_C
213213
}
214214

215215
template<class Store, class Mapping>
216-
typename DDSketch<Store, Mapping>::vector_double DDSketch<Store, Mapping>::get_PMF(const typename DDSketch<Store, Mapping>::T* split_points, uint32_t size) const {
216+
typename DDSketch<Store, Mapping>::vector_double DDSketch<Store, Mapping>::get_PMF(const double* split_points, uint32_t size) const {
217217
vector_double buckets = get_CDF(split_points, size);
218218
for (uint32_t i = size; i > 0; --i) {
219219
buckets[i] -= buckets[i - 1];
@@ -302,7 +302,7 @@ bool DDSketch<Store, Mapping>::operator==(const DDSketch<Store, Mapping>& other)
302302
}
303303

304304
template<class Store, class Mapping>
305-
void DDSketch<Store, Mapping>::check_split_pints(const T *items, uint32_t size) {
305+
void DDSketch<Store, Mapping>::check_split_pints(const double *items, uint32_t size) {
306306
for (uint32_t i = 0; i < size ; i++) {
307307
if (std::isnan(items[i])) {
308308
throw std::invalid_argument("Values must not be NaN");

0 commit comments

Comments
 (0)