AlexanderSaydakov commented on code in PR #428:
URL: https://github.com/apache/datasketches-cpp/pull/428#discussion_r1536547886
##########
tdigest/include/tdigest_impl.hpp:
##########
@@ -282,68 +275,76 @@ double tdigest<T, A>::weighted_average(double x1, double
w1, double x2, double w
}
template<typename T, typename A>
-void tdigest<T, A>::serialize(std::ostream& os) const {
- const_cast<tdigest*>(this)->merge_buffered(); // side effect
+void tdigest<T, A>::serialize(std::ostream& os, bool with_buffer) const {
+ if (!with_buffer) const_cast<tdigest*>(this)->compress(); // side effect
write(os, is_empty() || is_single_value() ? PREAMBLE_LONGS_EMPTY_OR_SINGLE :
PREAMBLE_LONGS_MULTIPLE);
Review Comment:
right
--
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]