|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Bloom-Filter/blib/html/site/lib/Bloom/Filter.html |
<dd> <p>Create a brand new instance. Allowable params are <a href=``#error_rate''><code>error_rate</code></a>, <a href=``#capacity''><code>capacity</code></a>.</p> </dd> </li> <dt><strong><a name=``init'' class=``item''>init</a></strong>
<dd> <p>Calculates the best number of hash functions and optimum filter length, creates some random salts, and generates a blank bit vector. Called automatically by constructor.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``accessors''>ACCESSOR/a</h1> <dl> <dt><strong><a name=``capacity'' class=``item''>capacity</a></strong>
<dd> <p>Returns the total capacity of the Bloom filter</p> </dd> </li> <dt><strong><a name=``error_rate'' class=``item''>error_rate</a></strong>
<dd> <p>Returns the configured maximum error rate</p> </dd> </li> <dt><strong><a name=``length'' class=``item''>length</a></strong>
<dd> <p>Returns the length of the Bloom filter in bits</p> </dd> </li> <dt><strong><a name=``key_count'' class=``item''>key_count</a></strong>
<dd> <p>Returns the number of items currently stored in the filter</p> </dd> </li> <dt><strong><a name=``on_bits'' class=``item''>on_bits</a></strong>
<dd> <p>Returns the number of 'on' bits in the filter</p> </dd> </li> <dt><strong><a name=``salts'' class=``item''>salts</a></strong>
<dd> <p>Returns the list of salts used to create the hash functions</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``public_methods''>PUBLIC METHOD/a</h1> <dl> <dt><strong><a name=``add_keys'' class=``item''>add @KEY/a</strong>
<dd> <p>Adds the list of keys to the filter. Will fail, return <a href=``../../../lib/pods/perlfunc.html#undef''><code>undef</code></a> and complain if the number of keys in the filter exceeds the configured capacity.</p> </dd> </li> <dt><strong><a name=``check_keys'' class=``item''>check @KEY/a</strong>
<dd> <p>Checks the provided key list against the Bloom filter, and returns a list of equivalent length, with true or false values depending on whether there was a match.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``internal_methods''>INTERNAL METHOD/a</h1> <dl> <dt><strong><a name=``calculate_shortest_filter_length_capacity_err_rate'' class=``item''>_calculate_shortest_filter_length CAPACITY ERR_RAT&_calculate_shortest_filter_length CAPACITY ERR_RAT;/a></strong>
<dd> <p>Given a desired error rate and maximum capacity, returns the optimum combination of vector length (in bits) and number of hash functions to use in building the filter, where "optimum" means shortest vector length.</p> </dd> </li> <dt><strong><a name=``_get_cells'' class=``item''>_get_cells KEY</a></strong>
<dd> <p>Given a key, hashes it using the list of salts and returns an array of cell indexes corresponding to the key.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``author''>AUTHOR</a></h1> <p>Maciej Ceglowski <<a href=``mailto:maciej@ceglowski.com''>maciej@ceglowski.com></p> <p> </p> <hr /> <h1><a name=``changelog''>CHANGELOG</a></h1> <p>Feb 2007 big speedup by Dmitriy Ryaboy <<a href=``mailto:dmitriy.ryaboy@ask.com''>dmitriy.ryaboy@ask.com> (thanks!)</p> <p> </p> <hr /> <h1><a name=``copyright_and_license''>COPYRIGHT AND LICENS©RIGHT AND LICENS;/a></h1> <p>(c) 2004 Maciej Ceglowski</p> <p>This is free software, distributed under version 2 of the GNU Public License (GPL).</p>
</body>
</html>
|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Bloom-Filter/blib/html/site/lib/Bloom/Filter.html |