freakyzoidberg opened a new pull request, #1:
URL: https://github.com/apache/datasketches-go/pull/1

   Add a Go implementation of HyperLogLog
   
   This currently expose publicaly the following interface
   
   HyperLogLog
   
        // HLL target size
        tgt4 := hll.TgtHllType_HLL_4
        tgt6 := hll.TgtHllType_HLL_6
        tgt8 := hll.TgtHllType_HLL_8
   
        // HLL Sketch
        sketch, err := hll.NewHllSketchDefault(12)
        sketch, err = hll.NewHllSketch(12, hll.TgtHllType_HLL_4)
   
        sketch.GetLgConfigK()
        sketch.GetTgtHllType()
        sketch.GetCurMode()
        sketch.IsEmpty()
        sketch.IsEstimationMode()
        sketch.GetSerializationVersion()
   
        sketch.Reset()
   
        sketch.UpdateInt64(1)
        sketch.UpdateUInt64(1)
        sketch.UpdateSlice([]byte{1})
        sketch.UpdateString("1")
   
        compactSlice, err := sketch.ToCompactSlice()
        updatableSlice, err := sketch.ToUpdatableSlice()
   
        sketch.GetUpdatableSerializationBytes()
   
        sketch.GetEstimate()
        sketch.GetHipEstimate()
        sketch.GetCompositeEstimate()
   
        ub, err := sketch.GetUpperBound(1)
        lb, err := sketch.GetLowerBound(1)
   
        sk2 := sketch.Copy()
        sk2_8 := sketch.CopyAs(hll.TgtHllType_HLL_8)
   
   
   
   And Union
   
        unio, _ := hll.NewUnionWithDefault()
        unio, _ = hll.NewUnion(12)
   
        unio.GetLgConfigK()
        unio.GetTgtHllType()
        unio.GetCurMode()
        unio.IsEmpty()
   
        unio.Reset()
   
        unio.UpdateSketch(sketch)
   
        unio.UpdateInt64(1)
        unio.UpdateUInt64(1)
        unio.UpdateSlice([]byte{1})
        unio.UpdateString("1")
   
        compactUnioSlice, err := unio.ToCompactSlice()
        updatableUnioSlice, err := unio.ToUpdatableSlice()
   
        unio.GetUpdatableSerializationBytes()
   
        unio.GetEstimate()
        unio.GetHipEstimate()
        unio.GetCompositeEstimate()
   
        ub, err = unio.GetUpperBound(1)
        lb, err = unio.GetLowerBound(1)
   
        sk3, err := unio.GetResult(hll.TgtHllType_HLL_4)


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