Documentation
¶
Index ¶
- Constants
- Variables
- func GetBytes(key interface{}) ([]byte, error)
- type HyperLogLog
- func (h *HyperLogLog) Add(data []byte)
- func (h *HyperLogLog) AddAny(data any) error
- func (h *HyperLogLog) Count() uint64
- func (h *HyperLogLog) IntersectionCount(h2 *HyperLogLog) (uint64, error)
- func (h *HyperLogLog) ToBytes() []byte
- func (h *HyperLogLog) Union(h2 *HyperLogLog) (*HyperLogLog, error)
- func (h *HyperLogLog) UnionCount(h2 *HyperLogLog) (uint64, error)
Constants ¶
View Source
const ( DefaultLog2m = 31 DefaultRegwidth = 8 )
Variables ¶
View Source
var DefaultSettings = hll.Settings{ Log2m: DefaultLog2m, Regwidth: DefaultRegwidth, ExplicitThreshold: hll.AutoExplicitThreshold, SparseEnabled: true, }
Functions ¶
Types ¶
type HyperLogLog ¶
func FromBytes ¶
func FromBytes(raw []byte) (*HyperLogLog, error)
func New ¶
func New() (*HyperLogLog, error)
func (*HyperLogLog) Add ¶
func (h *HyperLogLog) Add(data []byte)
func (*HyperLogLog) AddAny ¶
func (h *HyperLogLog) AddAny(data any) error
func (*HyperLogLog) Count ¶
func (h *HyperLogLog) Count() uint64
func (*HyperLogLog) IntersectionCount ¶
func (h *HyperLogLog) IntersectionCount(h2 *HyperLogLog) (uint64, error)
func (*HyperLogLog) ToBytes ¶
func (h *HyperLogLog) ToBytes() []byte
func (*HyperLogLog) Union ¶
func (h *HyperLogLog) Union(h2 *HyperLogLog) (*HyperLogLog, error)
func (*HyperLogLog) UnionCount ¶
func (h *HyperLogLog) UnionCount(h2 *HyperLogLog) (uint64, error)
Click to show internal directories.
Click to hide internal directories.