|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72842 - in sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html: . reference reference/hash
From: cpp.cabrera_at_[hidden]
Date: 2011-07-02 04:03:35
Author: alejandro
Date: 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
New Revision: 72842
URL: http://svn.boost.org/trac/boost/changeset/72842
Log:
Updated documentation to include complete reference for dynamic_bloom_filter.
Added:
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html
- copied, changed from r72841, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html
Text files modified:
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/history.html | 29 ++++++
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/index.html | 2
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference.html | 7 +
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html | 83 +++++++++++++-----
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html | 182 ++++++++++++++++++++++++++++-----------
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/default.html | 4
sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/testing.html | 7
7 files changed, 228 insertions(+), 86 deletions(-)
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/history.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/history.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/history.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -36,6 +36,34 @@
</div>
<h1 class="title">Version history</h1>
+ <h3>v1.9 (July 2nd)</h3>
+ <p>
+ Big version jump. The dynamic Bloom filter is completed ahead of schedule. All that's left to do is a few documentation updates.
+ </p>
+ <ul>
+ <li><strong>New!</strong>
+ <ul>
+ <li>Dynamic Bloom filter completed.</li>
+ <li>Counting Bloom filter interface added to repository.</li>
+ </ul>
+ </li>
+ <li><strong>Test Changes</strong>
+ <ul>
+ <li>Added regression suite for dynamic Bloom filter</li>
+ <li>Added fail tests for dynamic Bloom filter intersection and union</li>
+ </ul>
+ </li>
+ <li><strong>API Changes</strong>
+ <ul>
+ <li>Added operator== and operator != to basic Bloom filter.</li>
+ <li>Implemented all methods for dynamic Bloom filter.</li>
+ </ul>
+ </li>
+ </ul>
+ <p>
+ Version 2.0 is expected to arrive by July 4th with the introduction of a solid interface for the counting Bloom filter as well as up to date documentation.
+ </p>
+
<h3>v1.3 (June 24th)</h3>
<ul>
<li><strong>Test Changes</strong>
@@ -60,7 +88,6 @@
</li>
</ul>
- <h1 class="title">Version history</h1>
<h3>v1.1 (June 21st)</h3>
<ul>
<li><strong>API Changes</strong>
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/index.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/index.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/index.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -72,7 +72,7 @@
<div>
<p>
- Last revised: <time datetime="2011-06-24">June 24, 2011</time>.
+ Last revised: <time datetime="2011-07-02">July 2, 2011</time>.
</p>
<p class="copyright">
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -38,8 +38,13 @@
<h2 class="title">Reference</h2>
<div class="toc">
+ <h3>Classes</h3>
+ <ul>
+ <li>bloom_filter</li>
+ <li>dynamic_bloom_filter</li>
+ </ul>
+ <h3>Hashers</h3>
<ul>
- <li>class bloom_filter</li>
<li>boost_hash (default hasher)</li>
</ul>
</div>
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -34,20 +34,21 @@
<a accesskey="h" href="../index.html">
<img src="../../../../../doc/src/images/home.png" alt="Home"/>
</a>
- <a accesskey="n" href="hash/default.html">
+ <a accesskey="n" href="dynamic_bloom.html">
<img src="../../../../../doc/src/images/next.png" alt="Next"/>
</a>
</div>
<h1>Basic Bloom Filter</h1>
<div class="listing">
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>,
- <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code> = <code class="c_namespace">mpl::vector</code><<code class="c_type">boost_hash</code><<code class="c_id">T, 3</code>> > >
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code> = <code class="c_namespace">mpl::</code><code class="c_type">vector</code><<code class="c_type">boost_hash</code><<code class="c_type">T</code>, 3> > >
<code class="c_keyword">class</code> <code class="c_id">bloom_filter</code> {
<code class="c_comment">// exported typedefs</code>
- <code class="c_keyword">typedef</code> <code class="c_id">T value_type</code>;
- <code class="c_keyword">typedef</code> <code class="c_id">T key_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">T value_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">T key_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunctions hash_function_type</code>;
<code class="c_comment">// constructors</code>
<code class="c_func">bloom_filter</code>();
@@ -81,23 +82,36 @@
};
<code class="c_comment">// union</code>
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>
- <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>>
+ <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>
+ <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
<code class="c_comment">// intersect</code>
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>
- <code class="c_func">operator&</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>>
+ <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>
+ <code class="c_func">operator&</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>>
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
+ <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_comment">// equality</code>
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>>
+ <code class="c_type">bool</code>
+ <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_type">Size</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>>
+ <code class="c_type">bool</code>
+ <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_type">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
</div>
<p>
The basic Bloom filter data structure. Supports insertion and query. Allows setting of bit capacity, type, and hash functions at compile-time. This structure is best used when:
@@ -108,7 +122,7 @@
<li>storage requirements are strict</li>
</ul>
- <h2> Template Parameters Reference</h2>
+ <h2>Template Parameters Reference</h2>
<dl>
<dt>T</dt>
<dd>The type used for all Bloom filter operations.</dd>
@@ -139,6 +153,8 @@
<li>operator|(bloom, bloom)</li>
<li>operator&(bloom, bloom)</li>
<li>swap(bloom, bloom)</li>
+ <li>operator==(bloom, bloom)</li>
+ <li>operator!=(bloom, bloom)</li>
</ul>
</div>
@@ -345,6 +361,27 @@
</dl>
</div>
+ <div class="func_ref">
+ <a name="operator_equality"></a>
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">rhs</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Compares the bits of the argument Bloom filters for equality.</dd>
+ <dt>Returns</dt>
+ <dd>True if the bits match, false otherwise.</dd>
+ </dl>
+ </div>
+
+ <div class="func_ref">
+ <a name="operator_inequality"></a>
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">rhs</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Compares the bits of the argument Bloom filters for equality.</dd>
+ <dt>Returns</dt>
+ <dd>True if the bits don't match, false otherwise.</dd>
+ </dl>
+ </div>
<hr/>
<div class="spirit-nav">
@@ -357,7 +394,7 @@
<a accesskey="h" href="../index.html">
<img src="../../../../../doc/src/images/home.png" alt="Home"/>
</a>
- <a accesskey="n" href="hash/default.html">
+ <a accesskey="n" href="dynamic_bloom.html">
<img src="../../../../../doc/src/images/next.png" alt="Next"/>
</a>
</div>
Copied: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html (from r72841, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html)
==============================================================================
--- /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -25,7 +25,7 @@
<hr/>
<div class="spirit-nav">
- <a accesskey="p" href="../reference.html">
+ <a accesskey="p" href="bloom.html">
<img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
</a>
<a accesskey="u" href="../reference.html">
@@ -39,25 +39,29 @@
</a>
</div>
- <h1>Basic Bloom Filter</h1>
+ <h1>Basic Dynamic Bloom Filter</h1>
<div class="listing">
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>,
- <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code> = <code class="c_namespace">mpl::vector</code><<code class="c_type">boost_hash</code><<code class="c_id">T, 3</code>> > >
- <code class="c_keyword">class</code> <code class="c_id">bloom_filter</code> {
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code> = <code class="c_namespace">mpl::</code><code class="c_type">vector</code><<code class="c_type">boost_hash</code><<code class="c_type">T</code>, 3> >,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = <code class="c_type">size_t</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code> = <code class="c_namespace">std::</code><code class="c_type">allocator</code><<code class="c_type">Block</code>> >
+ <code class="c_keyword">class</code> <code class="c_type">dynamic_bloom_filter</code> {
<code class="c_comment">// exported typedefs</code>
- <code class="c_keyword">typedef</code> <code class="c_id">T value_type</code>;
- <code class="c_keyword">typedef</code> <code class="c_id">T key_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">T value_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">T key_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunctions hash_function_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">Block block_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">Allocator allocator_type</code>;
<code class="c_comment">// constructors</code>
- <code class="c_func">bloom_filter</code>();
- <code class="c_func">bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer_list</code><<code class="c_type">T</code>>&); <code class="c_comment">// requires C++11</code>
+ <code class="c_func">dynamic_bloom_filter</code>();
+ <code class="c_keyword">explicit</code> <code class="c_func">dynamic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">bit_capacity</code>);
<<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>>
- <code class="c_func">bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">start</code>, <code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">end</code>);
+ <code class="c_func">dynamic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">start</code>, <code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">end</code>);
<code class="c_comment">// data structure metadata query functions</code>
- <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">bit_capacity</code>() <code class="c_keyword">const</code>;
+ <code class="c_type">size_t</code> <code class="c_func">bit_capacity</code>() <code class="c_keyword">const</code>;
<code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">num_hash_functions</code>() <code class="c_keyword">const</code>;
<code class="c_type">double</code> <code class="c_func">false_positive_rate</code>() <code class="c_keyword">const</code>;
<code class="c_type">size_t</code> <code class="c_func">count</code>() <code class="c_keyword">const</code>;
@@ -73,31 +77,54 @@
<code class="c_comment">// auxilliary ops</code>
<code class="c_type">void</code> <code class="c_func">clear</code>();
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code>&);
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">dynamic_bloom_filter</code>&);
+ <code class="c_type">void</code> <code class="c_func">resize</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">new_capacity</code>);
<code class="c_comment">// union assign/intersect assign</code>
- <code class="c_type">bloom_filter</code>& <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code>&);
- <code class="c_type">bloom_filter</code>& <code class="c_func">operator&=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code>&);
+ <code class="c_type">dynamic_bloom_filter</code>& <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&);
+ <code class="c_type">dynamic_bloom_filter</code>& <code class="c_func">operator&=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&);
};
<code class="c_comment">// union</code>
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>
- <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code>>
+ <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>
+ <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">rhs</code>);
<code class="c_comment">// intersect</code>
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>
- <code class="c_func">operator&</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_id">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>,
- <code class="c_keyword">class</code> <code class="c_id">HashFunctions</code>>
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">lhs</code>,
- <code class="c_type">bloom_filter</code><<code class="c_id">T, Size, HashFunctions</code>>& <code class="c_id">rhs</code>);
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code>>
+ <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>
+ <code class="c_func">operator&</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_comment">// global swap</code>
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code>>
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">lhs</code>,
+ <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code>>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">rhs</code>);
+
+ <code class="c_keyword">template</code> <<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Allocator</code>>
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code><<code class="c_type">T, HashFunctions, Block, Allocator</code>>& <code class="c_id">rhs</code>);
+
</div>
<p>
The basic Bloom filter data structure. Supports insertion and query. Allows setting of bit capacity, type, and hash functions at compile-time. This structure is best used when:
@@ -108,22 +135,26 @@
<li>storage requirements are strict</li>
</ul>
- <h2> Template Parameters Reference</h2>
+ <h2>Template Parameters Reference</h2>
<dl>
<dt>T</dt>
<dd>The type used for all Bloom filter operations.</dd>
- <dt>Size</dt>
- <dd>The size in bits of the underlying std::bitset used by the Bloom filter.</dd>
<dt>HashFunctions</dt>
- <dd>The set of hash functions used by the Bloom filter. Currently required to be an mpl::vector of Hashers.</dd>
+ <dd>The set of hash functions used by the Bloom filter. Currently required to be an mpl::vector of Hashers.</dd>
+ <dt>Block</dt>
+ <dd>Used internally by the <a href="http://www.boost.org/doc/libs/release/libs/dynamic_bitset/dynamic_bitset.html">
+ dynamic bitset</a>.</dd>
+ <dt>Allocator</dt>
+ <dd>Used internally by the <a href="http://www.boost.org/doc/libs/release/libs/dynamic_bitset/dynamic_bitset.html">
+ dynamic bitset</a>.</dd>
</dl>
<div class="toc">
<p>Function Reference</p>
<ul>
- <li>bloom_filter()</li>
- <li>bloom_filter(start, end)</li>
- <li>bloom_filter(initializer_list)</li>
+ <li>dynamic_bloom_filter()</li>
+ <li>dynamic_bloom_filter(capacity)</li>
+ <li>dynamic_bloom_filter(start, end)</li>
<li>bit_capacity()</li>
<li>num_hash_functions()</li>
<li>false_positive_rate()</li>
@@ -134,11 +165,14 @@
<li>probably_contains(T)</li>
<li>clear()</li>
<li>swap(bloom)</li>
+ <li>resize(new_capacity)</li>
<li>operator|=(bloom)</li>
<li>operator&=(bloom)</li>
<li>operator|(bloom, bloom)</li>
<li>operator&(bloom, bloom)</li>
<li>swap(bloom, bloom)</li>
+ <li>operator==(bloom, bloom)</li>
+ <li>operator!=(bloom, bloom)</li>
</ul>
</div>
@@ -146,30 +180,30 @@
<div class="func_ref">
<a name="default_constructor"></a>
- <div class="ref_listing"><code class="c_func">bloom_filter</code>();</div>
+ <div class="ref_listing"><code class="c_func">dynamic_bloom_filter</code>();</div>
<dl>
<dt>Description</dt>
- <dd>Constructs a bloom_filter object with all bits set to 0.</dd>
+ <dd>Constructs a dynamic_bloom_filter object with all bits set to 0 and a default size determined by the underlying dynamic bitset.</dd>
+ <dt>Warning</dt>
+ <dd>Be sure to set the capacity using resize().</dd>
</dl>
</div>
<div class="func_ref">
- <a name="range_constructor"></a>
- <div class="ref_listing"><code class="c_func">bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">start</code>, <code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">end</code>);</div>
+ <a name="capacity_constructor"></a>
+ <div class="ref_listing"><code class="c_func">dynamic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">capacity</code>);</div>
<dl>
<dt>Description</dt>
- <dd>Constructs a bloom_filter by inserting all the elements in the range (start, end).</dd>
+ <dd>Constructs a dynamic_bloom_filter with all bits set to 0 and bit_capacity set to capacity.</dd>
</dl>
</div>
<div class="func_ref">
- <a name="ilist_constructor"></a>
- <div class="ref_listing"><code class="c_func">bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer</code><<code class="c_type">T</code>>&);</div>
+ <a name="range_constructor"></a>
+ <div class="ref_listing"><code class="c_func">dynamic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">start</code>, <code class="c_keyword">const</code> <code class="c_type">InputIterator</code> <code class="c_id">end</code>);</div>
<dl>
<dt>Description</dt>
- <dd>Constructs a bloom_filter by inserting all elements in the initializer list.</dd>
- <dt>Warning</dt>
- <dd>Only available in C++11-supporting compilers.</dd>
+ <dd>Constructs a dynamic_bloom_filter by inserting all the elements in the range (start, end).</dd>
</dl>
</div>
@@ -178,9 +212,9 @@
<div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">bit_capacity</code>() <code class="c_keyword">const</code>;</div>
<dl>
<dt>Description</dt>
- <dd>Returns the number of bits used internally by the Bloom filter..</dd>
+ <dd>Returns the number of bits used internally by the Bloom filter.</dd>
<dt>Returns</dt>
- <dd>Value of template parameter Size.</dd>
+ <dd>this->bits.size()</dd>
</dl>
</div>
@@ -214,7 +248,7 @@
<dt>Description</dt>
<dd>Returns true if no elements have been inserted into the Bloom filter.</dd>
<dt>Returns</dt>
- <dd>std::bitset.count() == 0</dd>
+ <dd>this->bits.count() == 0</dd>
</dl>
</div>
@@ -225,7 +259,7 @@
<dt>Description</dt>
<dd>Returns the number of bits currently set in the Bloom filter.</dd>
<dt>Returns</dt>
- <dd>std::bitset.count().</dd>
+ <dd>this->bits.count().</dd>
</dl>
</div>
@@ -280,7 +314,18 @@
<div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code>&);</div>
<dl>
<dt>Description</dt>
- <dd>Swaps the bits in this Bloom filter with the argument Bloom filter.</dd>
+ <dd>Swaps the bits and the bit capacity in this Bloom filter with the argument Bloom filter.</dd>
+ </dl>
+ </div>
+
+ <div class="func_ref">
+ <a name="resize"></a>
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">resize</code>(<code class="c_type">size_t</code> <code class="c_id">new_capacity</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Changes the capacity of the Bloom filter to new_capacity.</dd>
+ <dt>Warning</dt>
+ <dd>All bits are set to 0 (all inserts are lost) - resize wisely.</dd>
</dl>
</div>
@@ -290,6 +335,8 @@
<dl>
<dt>Description</dt>
<dd>Performs a union.</dd>
+ <dt>Pre-condition</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
<dt>Returns</dt>
<dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
<dt>Post-condition</dt>
@@ -303,6 +350,8 @@
<dl>
<dt>Description</dt>
<dd>Performs an intersection.</dd>
+ <dt>Pre-condition</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
<dt>Returns</dt>
<dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
<dt>Post-condition</dt>
@@ -316,6 +365,8 @@
<dl>
<dt>Description</dt>
<dd>Performs a union.</dd>
+ <dt>Pre-condition</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
<dt>Returns</dt>
<dd>Returns a new, stack-allocated Bloom filter that is the result of performing a union between the lhs and the rhs.</dd>
<dt>Post-condition</dt>
@@ -329,6 +380,8 @@
<dl>
<dt>Description</dt>
<dd>Performs an intersection.</dd>
+ <dt>Pre-condition</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
<dt>Returns</dt>
<dd>Returns a new, stack-allocated Bloom filter that is the result of performing an intersect between the lhs and the rhs.</dd>
<dt>Post-condition</dt>
@@ -341,14 +394,35 @@
<div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code>&, <code class="c_type">bloom_filter</code>&);</div>
<dl>
<dt>Description</dt>
- <dd>Swaps the bits between the argument Bloom filters.</dd>
+ <dd>Swaps the bits and the bit capacity between the argument Bloom filters.</dd>
</dl>
</div>
+ <div class="func_ref">
+ <a name="operator_equality"></a>
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">rhs</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Compares the bits of the argument Bloom filters for equality.</dd>
+ <dt>Returns</dt>
+ <dd>True if the bits match, false otherwise.</dd>
+ </dl>
+ </div>
+
+ <div class="func_ref">
+ <a name="operator_inequality"></a>
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&</code> <code class="c_id">rhs</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Compares the bits of the argument Bloom filters for equality.</dd>
+ <dt>Returns</dt>
+ <dd>True if the bits don't match, false otherwise.</dd>
+ </dl>
+ </div>
<hr/>
<div class="spirit-nav">
- <a accesskey="p" href="../reference.html">
+ <a accesskey="p" href="bloom.html">
<img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
</a>
<a accesskey="u" href="../reference.html">
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/default.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/default.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/default.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -24,7 +24,7 @@
<hr/>
<div class="spirit-nav">
- <a accesskey="p" href="../bloom.html">
+ <a accesskey="p" href="../dynamic_bloom.html">
<img src="../../../../../../doc/src/images/prev.png" alt="Prev"/>
</a>
<a accesskey="u" href="../../reference.html">
@@ -51,7 +51,7 @@
<hr/>
<div class="spirit-nav">
- <a accesskey="p" href="../bloom.html">
+ <a accesskey="p" href="../dynamic_bloom.html">
<img src="../../../../../../doc/src/images/prev.png" alt="Prev"/>
</a>
<a accesskey="u" href="../../reference.html">
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/testing.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/testing.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/testing.html 2011-07-02 04:03:34 EDT (Sat, 02 Jul 2011)
@@ -41,12 +41,11 @@
</p>
<p>
- Testing is performed as a series of test cases that evaluate the functionality of a test element. The current state of testing is as follows:
+ Testing is performed as a series of test cases that evaluate the functionality of a test element. The naming convention isn't fleshed out yet. However, all tests expected to pass are named *-pass.*. All tests expected to fail are named *-fail.*. Tests are also named to help identify which class they are testing. The current state of testing is as follows:
</p>
<ul>
- <li>A single test file</li>
- <li>Covers all operations of Bloom filter class</li>
- <li>Covers construction using single and multiple HashFn parameters.</li>
+ <li>A regression suite per class covering each function and constructor</li>
+ <li>A series of failing test suites that check for classes doing the right thing when pre-conditions on usage aren't met.</li>
</ul>
<p>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk