Commit 7cd7b84
committed
Normalize the left tail of TDigestDouble.getRank()
The left tail branch returned the interpolated weight without dividing by
centroidsWeight_, unlike the mirror-image right tail branch and the reference
implementation. Reachable via heapify() when the first centroid has weight
greater than 1, making getRank() exceed its documented [0, 1] range.1 parent d5cce9b commit 7cd7b84
2 files changed
Lines changed: 22 additions & 1 deletion
File tree
- src
- main/java/org/apache/datasketches/tdigest
- test/java/org/apache/datasketches/tdigest
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
239 | 259 | | |
240 | 260 | | |
241 | 261 | | |
| |||
0 commit comments