Question

See http://en.wikipedia.org/wiki/Quotient_filter . I did not find a single implementation yet, and I'd like something to play with, the Wikipedia explanation is a little dry for my taste.

Était-ce utile?

La solution

I implemented a quotient filter in C (link). It supports the following operations;

  • Insert(qf, key)
  • May-Contain(qf, key)
  • Remove(qf, key) (with a caveat, see the documentation in qf.h)
  • Merge(qf1, qf2) -> qfout
  • Iterate(qf)

The repository contains some documentation and a fairly rigorous test suite.

Autres conseils

I implemented one in PHP for the purpose of playing around with it. It's not complete but add/contains is implemented. This is not fool proof or even bug proof.

https://github.com/dsx724/php-quotient-filter

Hope this helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top