ZENOTME commented on PR #45:
URL: https://github.com/apache/datasketches-rust/pull/45#issuecomment-3699372217
> Since it's not a 1:1 mapping, may you describe the concept and struct
mapping details?
In C++ and Java, the class hierarchy of the theta sketch looks like this:
```
- ThetaSketch
|--- UpdateThetaSketch (extend with update method)
|--- In Java, it has more implementation classes
|--- CompactThetaSketch (extend with serialize/deserialize method)
|--- ...
```
In Rust it doesn't have inheritance. So we only have two types:
```
- ThetaSketch: mutable
- CompactThetaSketch: mutable
```
For implementation, in C++, `update_theta_sketch_alloc` uses
`theta_update_sketch_base` as a hash table. I don't know why it's called
`xxx_base`, it looks like it doesn't have inheritance. And that's why I refer
to this class and rename it as `ThetaHashTable`.
For implementation in Java, it has more than one implementation inheriting
from UpdateThetaSketch: DirectQuickSelectSketch,
ConcurrentDirectQuickSelectSketch, and HeapAlphaSketch... There are different
ways to abstract the implementation: ThetaSketch<T> or wrap it as Box<dyn xxx>
internally.
--
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]