tisonkun commented on PR #23:
URL: https://github.com/apache/datasketches-rust/pull/23#issuecomment-3667543564

   > > any reason we must use an integer for weight?
   > 
   > the total weight is the number of input items. weight of a centroid is the 
number of items this centroid represents.
   
   Yes. I mean, is there some downside if I'm using f64 (double) here? Because 
to support type generic over f32/f64 like what datasketches-cpp's tdigest<T>, 
reducing type combo into one generic type would help.
   
   It's quite wordy to implement something like below in Rust:
   
   ```cpp
   using W = typename std::conditional<std::is_same<T, double>::value, 
uint64_t, uint32_t>::type;
   ```


-- 
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