You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2022/04/01 23:37:19 UTC

[GitHub] [datasketches-java] AlexanderSaydakov edited a comment on pull request #390: Direct kll double

AlexanderSaydakov edited a comment on pull request #390:
URL: https://github.com/apache/datasketches-java/pull/390#issuecomment-1086408390


   I find the class hierarchy problematic.
   The common base class of direct and heap subclasses is KllSketch, which is not quite usable.
   I would think that there must be a polymorphic base for both direct and heap subclasses.
   Consider this pseudocode:
   
   DoublesSketch s = new HeapDoublesSketch(); // or Direct
   s.update(1.0);
   // given a serialized sketch in a chunk of memory we could either heapify and merge
   s.merge(HeapDoublesSketch.heapify(mem));
   // or wrap and merge
   s.merge(DirectDoublesSketch.wrap(mem));
   
   Same for floats.
   I don't think it is possible now.
   


-- 
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: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org