This is an automated email from the ASF dual-hosted git repository.

placave pushed a commit to branch get-num-retained-sorted-view
in repository https://gitbox.apache.org/repos/asf/datasketches-go.git

commit fa452177d8954c3a37dfd97d6b8ceb0bd3e4fc8b
Author: Pierre Lacave <[email protected]>
AuthorDate: Thu Apr 4 12:10:14 2024 +0200

    Add getNumRetained to SortedView.
---
 kll/items_sketch_sorted_view.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kll/items_sketch_sorted_view.go b/kll/items_sketch_sorted_view.go
index 7b118fd..2112ef9 100644
--- a/kll/items_sketch_sorted_view.go
+++ b/kll/items_sketch_sorted_view.go
@@ -159,6 +159,10 @@ func (s *ItemsSketchSortedView[C]) getQuantileIndex(rank 
float64, inclusive bool
        return index
 }
 
+func (s *ItemsSketchSortedView[C]) GetNumRetained() int {
+       return len(s.quantiles)
+}
+
 func (s *ItemsSketchSortedView[C]) GetPartitionBoundaries(numEquallySized int, 
inclusive bool) (*ItemsSketchPartitionBoundaries[C], error) {
        if s.totalN == 0 {
                return nil, errors.New("empty sketch")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to