Giter Site home page Giter Site logo

studybloom's Introduction

studybloom

布隆过滤器是1970由布隆提出的。它实际上是一个很长的二进制向量和一系列随机映射函数。 布隆过滤器可以用于检索一个元素是否在一个集合中。它的优点是空间效率和查询时间都远远超过一般的算法, 缺点是有一定的误识别率和删除困难。

引用链接:[布隆过滤器][1] [1]:http://zh.wikipedia.org/wiki/%E5%B8%83%E9%9A%86%E8%BF%87%E6%BB%A4%E5%99%A8

这个工程的目的是我个人学习布隆过滤器的一些代码和笔记的积累。想通过各个语言实现布隆过滤器的方式来进行学习。 会有以下语言设计:

  • Java
  • C++

算法原理

根据吴军博士的 《数学之美》 描述,假定我们存储一亿个电子邮件地址,我们先建立一个二进制的数组,然后将这个二进制的数组中的值都置为0,对于每一个email地址, 我们用8个不同的随机数产生器(F1,F2....,F8)产生八个信息指纹(f1,f2,....,f8).再用一个随机数产生器G把这八个信息指纹映射到1到十六亿的 八个自然数g1,g2,...,g8,现在我们把这八个位置二进制全部设置为1,当我们对这一亿个 email 地址都进行这样的处理后。一 个针对这些 email 地址的布隆过滤器就建成了。

studybloom's People

Contributors

willam2004 avatar

Watchers

James Cloos avatar  avatar

Forkers

i17c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.