Skip to content

An implementation of the CVM algorithm for the distinct elements problem.

License

Notifications You must be signed in to change notification settings

tristanisham/f0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

f0

An implementation of the CVM algorithm for the distinct elements (f0) problem.

This package implements the CVM algoritm in pure Go. CVM is an algorithm for the distinct elements problem. When you're trying to find the unique elements in a slice, but the slice exceeds the amount of available memory, use f0 to estimate the number of unique elements in said slice.

f0.Estimate(mySlice, 0.01, 0.001) // 329.4221234

More Reading

Contributing

I NEED tests. The problem with this algorithm is that I need large sets of comparable elements to test f0 on. Currently (below v1), there is no guarentee the algorithm will work correctly. After we've developed a large and robust test suite and can establish the algorithm is behaving as expected, this library will be promoted to v1 and maintained.

The Bible is included for testing purposes. There's no copyright in the Kingdom of Heaven.

About

An implementation of the CVM algorithm for the distinct elements problem.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages