org.elasticsearch.common.bloom
Class BloomFilterFactory

java.lang.Object
  extended by org.elasticsearch.common.bloom.BloomFilterFactory

public class BloomFilterFactory
extends Object


Constructor Summary
BloomFilterFactory()
           
 
Method Summary
static BloomFilter getFilter(long numElements, double maxFalsePosProbability)
           
static BloomFilter getFilter(long numElements, int targetBucketsPerElem)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BloomFilterFactory

public BloomFilterFactory()
Method Detail

getFilter

public static BloomFilter getFilter(long numElements,
                                    int targetBucketsPerElem)
Returns:
A BloomFilter with the lowest practical false positive probability for the given number of elements.

getFilter

public static BloomFilter getFilter(long numElements,
                                    double maxFalsePosProbability)
Returns:
The smallest BloomFilter that can provide the given false positive probability rate for the given number of elements.

Asserts that the given probability can be satisfied using this filter.


main

public static void main(String[] args)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException


Copyright © 2009-2012. All Rights Reserved.