文件名称:BloomFilter
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2016-11-03
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- 李**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
如需要判断一个元素是不是在一个集合中,我们通常做法是把所有元素保存下来,然后通过比较知道它是不是在集合内,链表、树都是基于这种思路,当集合内元素个数的变大,我们需要的空间和时间都线性变大,检索速度也越来越慢。 Bloom filter 采用的是哈希函数的方法,将一个元素映射到一个 m 长度的阵列上的一个点,当这个点是 1 时,那么这个元素在集合内,反之则不在集合内。这个方法的缺点就是当检测的元素很多的时候可能有冲突,解决方法就是使用 k 个哈希 函数对应 k 个点,如果所有点都是 1 的话,那么元素在集合内,如果有 0 的话,元素则不在集合内。-
Such as the need to determine an element is not in a collection, we usually practice is to save all the elements, and then by comparing it is not in the collection, linked list, the tree is based on this idea, when the number of elements within the collection Larger, we need the space and time are linearly larger, more and more slow retri speed. Bloom filter uses a hash function to map an element to a point on an array of length m. When the point is 1, then the element is within the set, and vice versa. The disadvantage of this method is that when the detection of many elements may have a conflict, the solution is to use k hash function corresponding to k points, if all points are 1, then the element in the set, if 0, then the element Is not in the collection.
Such as the need to determine an element is not in a collection, we usually practice is to save all the elements, and then by comparing it is not in the collection, linked list, the tree is based on this idea, when the number of elements within the collection Larger, we need the space and time are linearly larger, more and more slow retri speed. Bloom filter uses a hash function to map an element to a point on an array of length m. When the point is 1, then the element is within the set, and vice versa. The disadvantage of this method is that when the detection of many elements may have a conflict, the solution is to use k hash function corresponding to k points, if all points are 1, then the element in the set, if 0, then the element Is not in the collection.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
BloomFilter\.classpath
...........\.project
...........\.settings\org.eclipse.jdt.core.prefs
...........\bin\BloomFilter$SimpleHash.class
...........\...\BloomFilter.class
...........\...\Test.class
...........\src\BloomFilter.java
...........\...\Test.java
...........\.settings
...........\bin
...........\src
BloomFilter