Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLogBeta ¶
type LogLogBeta [m]uint8
LogLogBeta is a sketch for cardinality estimation based on LogLog counting
func Unmarshal ¶
func Unmarshal(bytes []byte) (*LogLogBeta, error)
Unmarshal returns a LogLogBeta for given bytes
func (*LogLogBeta) Add ¶
func (llb *LogLogBeta) Add(value []byte)
Add inserts a value into the sketch
func (*LogLogBeta) AddHash ¶
func (llb *LogLogBeta) AddHash(x uint64)
AddHash takes in a "hashed" value (bring your own hashing)
func (*LogLogBeta) Cardinality ¶
func (llb *LogLogBeta) Cardinality() uint64
Cardinality returns the number of unique elements added to the sketch
func (*LogLogBeta) Marshal ¶
func (llb *LogLogBeta) Marshal() []byte
Marshal returns a byte slice representation
func (*LogLogBeta) Merge ¶
func (llb *LogLogBeta) Merge(other *LogLogBeta)
Merge takes another LogLogBeta and combines it with llb one, making llb the union of both.
Click to show internal directories.
Click to hide internal directories.