MaheshGPai commented on code in PR #458:
URL: https://github.com/apache/datasketches-cpp/pull/458#discussion_r2140107956


##########
tdigest/include/tdigest_impl.hpp:
##########
@@ -627,6 +627,65 @@ void tdigest<T, A>::check_split_points(const T* values, 
uint32_t size) {
   }
 }
 
+template <typename T, typename A>
+typename tdigest<T, A>::const_iterator tdigest<T, A>::begin() const {
+  return tdigest<T, A>::const_iterator(*this, false);
+}
+
+template <typename T, typename A>
+  typename tdigest<T, A>::const_iterator tdigest<T, A>::end() const {
+  return tdigest::const_iterator(*this, true);
+}
+
+template<typename T, typename A>
+tdigest<T, A>::const_iterator::const_iterator(const tdigest& tdigest_, const 
bool is_end):
+  centroids_()

Review Comment:
   Fixed



##########
tdigest/include/tdigest_impl.hpp:
##########
@@ -627,6 +627,65 @@ void tdigest<T, A>::check_split_points(const T* values, 
uint32_t size) {
   }
 }
 
+template <typename T, typename A>
+typename tdigest<T, A>::const_iterator tdigest<T, A>::begin() const {
+  return tdigest<T, A>::const_iterator(*this, false);
+}
+
+template <typename T, typename A>
+  typename tdigest<T, A>::const_iterator tdigest<T, A>::end() const {
+  return tdigest::const_iterator(*this, true);
+}
+
+template<typename T, typename A>
+tdigest<T, A>::const_iterator::const_iterator(const tdigest& tdigest_, const 
bool is_end):
+  centroids_()
+{
+  // Create a copy of the tdigest to generate the centroids after processing 
the buffered values
+  tdigest tmp(tdigest_);

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to