apache / datasketches-cpp

Core C++ Sketch Library
https://datasketches.apache.org
Apache License 2.0
225 stars 71 forks source link

theta union get_result() fix #357

Closed AlexanderSaydakov closed 1 year ago

AlexanderSaydakov commented 1 year ago

fixes #356

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4683376611


Totals Coverage Status
Change from base Build 4631768738: 0.0%
Covered Lines: 5072
Relevant Lines: 5228

💛 - Coveralls
AlexanderSaydakov commented 1 year ago

The essence of the fix is line 68: if(uniontheta >= table.theta) as opposed to if(uniontheta >= theta). The rest is for clarity (slightly rearranged flow in get_result) and efficiency (std::min instead of conditions).