Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73976 - in sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html: . reference reference/hash
From: cpp.cabrera_at_[hidden]
Date: 2011-08-20 22:27:03


Author: alejandro
Date: 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
New Revision: 73976
URL: http://svn.boost.org/trac/boost/changeset/73976

Log:
New!:

  - reference/functions.html: complete function reference.
    * Removed function reference from individual class reference
      sections to reduce redundancy.
  - reference/extenders.html: describes the creation of extension
    function objects and provided options.
  - Added class references for:
    * dynamic_counting_bloom_filter
    * twohash_basic_bloom_filter
    * twohash_dynamic_basic_bloom_filter
    * twohash_counting_bloom_filter
    * twohash_dynamic_counting_bloom_filter

Updated:

  - Updated all documenation navigation links to include
    new files.
  - Tutorial: added paragraph explaining that counting Bloom
    filters do not have a union/intersect operation.

Fixes:

    - reference/hash/default.html: boost_hash Seed -> Seed = 0.

Renamed:
    - reference/bloom.html -> reference/basic_bloom_filter.html
    - reference/counting_bloom.html -> reference/counting_bloom_filter.html
    - reference/dynamic_bloom.html -> reference/dynamic_basic_bloom_filter.html
Added:
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/.gitignore (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/basic_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_basic_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_counting_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/extenders.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/functions.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/ref_skeleton.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_basic_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_counting_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_basic_bloom_filter.html (contents, props changed)
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_counting_bloom_filter.html (contents, props changed)
Removed:
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom.html
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html
Text files modified:
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/index.html | 2
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference.html | 50 ++++++++++++++++++++++-----------------
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/default.html | 6 ++--
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/murmurhash3.html | 6 ++--
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/testing.html | 4 +-
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/tutorial.html | 14 ++++++++--
   6 files changed, 48 insertions(+), 34 deletions(-)

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-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -70,7 +70,7 @@
 
     <div>
       <p>
- Last revised: <time datetime="2011-07-24">July 24, 2011</time>.
+ Last revised: <time datetime="2011-08-19">August 19, 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-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -30,7 +30,7 @@
       <a accesskey="h" href="index.html">
         <img src="../../../../doc/src/images/home.png" alt="Home"/>
       </a>
- <a accesskey="n" href="reference/bloom.html">
+ <a accesskey="n" href="reference/basic_bloom_filter.html">
         <img src="../../../../doc/src/images/next.png" alt="Next"/>
       </a>
     </div>
@@ -40,33 +40,39 @@
     <div class="toc">
       <h3>Classes</h3>
       <ul>
- <li>basic_bloom_filter</li>
- <li>dynamic_basic_bloom_filter</li>
- <li>counting_bloom_filter</li>
+ <li><a href="reference/basic_bloom_filter.html">
+ basic_bloom_filter</a></li>
+ <li><a href="reference/dynamic_basic_bloom_filter.html">
+ dynamic_basic_bloom_filter</a></li>
+ <li><a href="reference/counting_bloom_filter.html">
+ counting_bloom_filter</a></li>
+ <li><a href="reference/dynamic_counting_bloom_filter.html">
+ dynamic_counting_bloom_filter</a></li>
+ <li><a href="reference/twohash_basic_bloom_filter.html">
+ twohash_basic_bloom_filter</a></li>
+ <li><a href="reference/twohash_dynamic_basic_bloom_filter.html">
+ twohash_dynamic_basic_bloom_filter</a></li>
+ <li><a href="reference/twohash_counting_bloom_filter.html">
+ twohash_counting_bloom_filter</a></li>
+ <li><a href="reference/twohash_dynamic_counting_bloom_filter.html">
+ twohash_dynamic_counting_bloom_filter</a></li>
       </ul>
       <h3>Hashers</h3>
       <ul>
- <li>boost_hash (default hasher)</li>
- <li>murmurhash3</li>
+ <li><a href="reference/hash/default.html">
+ boost_hash (default hasher)</a></li>
+ <li><a href="reference/hash/murmurhash3.html">
+ murmurhash3</a></li>
+ </ul>
+ <h3>The Rest</h3>
+ <ul>
+ <li>Extenders</li>
+ <li>Functions</li>
       </ul>
     </div>
 
- <p>
- In the following sections, when describing complexity, the variables n and k will be used as follows:
- </p>
- <ul>
- <li>n - the number of bits or bins in the Bloom filter.</li>
- <li>n - the number of elements to be inserted/removed from a range operation.</li>
- <li>k - the number of hash functions a Bloom filter contains.</li>
- </ul>
-
- <p>
- The meaning of the variable <em>n</em> will depend on the context. If
- the context involves an insertion, construction, or removal, the meaning
- is the second version.
- </p>
-
     <hr/>
+
     <div class="spirit-nav">
       <a accesskey="p" href="tut/tips.html">
         <img src="../../../../doc/src/images/prev.png" alt="Prev"/>
@@ -74,7 +80,7 @@
       <a accesskey="h" href="index.html">
         <img src="../../../../doc/src/images/home.png" alt="Home"/>
       </a>
- <a accesskey="n" href="reference/bloom.html">
+ <a accesskey="n" href="reference/basic_bloom_filter.html">
         <img src="../../../../doc/src/images/next.png" alt="Next"/>
       </a>
     </div>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/.gitignore
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/.gitignore 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1 @@
+ref_skeletion.html

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/basic_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/basic_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,159 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="../reference.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_basic_bloom_filter.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> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">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>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt; &gt; &gt;
+ <code class="c_keyword">class</code> <code class="c_type">basic_bloom_filter</code> {
+
+ <code class="c_comment">//* exported typedefs</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_namespace">std</code>::<code class="c_type">bitset</code>&lt;<code class="c_id">Size</code>&gt; <code class="c_type">bitset_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">basic_bloom_filter</code>&lt;<code class="c_type">T</code>, Size, <code class="c_type">HashFunctions</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">basic_bloom_filter</code>();
+ <code class="c_func">basic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std</code>::<code class="c_type">initializer_list</code>&lt;<code class="c_type">T</code>&gt;&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">basic_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_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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bitset_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
+
+ <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">basic_bloom_filter</code>&amp;);
+
+ <code class="c_comment">//* union assign/intersect assign</code>
+ <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp;);
+ <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">basic_bloom_filter</code>
+ <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">basic_bloom_filter</code>
+ <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">bool</code>
+ <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code>
+ <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">basic_bloom_filter</code>&amp; <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:
+ </p>
+ <ul>
+ <li>element removal is not needed</li>
+ <li>the storage required is less than the size of the stack</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <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>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="../reference.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/bloom.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
+++ (empty file)
@@ -1,462 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css"
- href="../../../../../doc/src/boostbook.css"/>
- <link rel="stylesheet" type="text/css" href="../style/my.css"/>
-
- <title>Boost.BloomFilter</title>
- </head>
-
- <body>
- <div class="header">
- <img src="../../../../../boost.png" width="277" height="86"
- alt="Boost C++ Libraries"/>
- <p>
- Home
- Libraries
- People
- FAQ
- More
- </p>
- </div>
-
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="../reference.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <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> &lt;<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>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>, 3&gt; &gt; &gt;
- <code class="c_keyword">class</code> <code class="c_type">basic_bloom_filter</code> {
- <code class="c_comment">// exported typedefs</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_namespace">std::</code><code class="c_type">bitset</code>&lt;Size&gt; <code class="c_type">bitset_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">basic_bloom_filter</code>&lt;<code class="c_type">T</code>, Size, <code class="c_type">HashFunctions</code>&gt; <code class="c_type">this_type</code>;
-
- <code class="c_comment">// constructors</code>
- <code class="c_func">basic_bloom_filter</code>();
- <code class="c_func">basic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer_list</code>&lt;<code class="c_type">T</code>&gt;&amp;); <code class="c_comment">// requires C++11</code>
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_func">basic_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_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>;
- <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
-
- <code class="c_comment">// data structures core ops</code>
- <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
-
- <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">basic_bloom_filter</code>&amp;);
-
- <code class="c_comment">// union assign/intersect assign</code>
- <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp;);
- <code class="c_type">basic_bloom_filter</code>&amp; <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&amp;);
- };
-
- <code class="c_comment">// union</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;
- <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">// intersect</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;
- <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">// equality</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">bool</code>
- <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">bool</code>
- <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter</code>&lt;<code class="c_type">T, Size, HashFunctions</code>&gt;&amp; <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:
- </p>
- <ul>
- <li>element removal is not needed</li>
- <li>the number of insertions can be reliably upper-bounded ahead of time</li>
- <li>storage requirements are strict</li>
- </ul>
-
- <h3>Template Parameters Reference</h3>
- <div class="template_ref">
- <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>
- </dl>
- </div>
-
- <div class="toc">
- <h3>Function Reference</h3>
- <ul>
- <li>basic_bloom_filter()</li>
- <li>basic_bloom_filter(start, end)</li>
- <li>basic_bloom_filter(initializer_list)</li>
- <li>bit_capacity()</li>
- <li>num_hash_functions()</li>
- <li>false_positive_rate()</li>
- <li>empty()</li>
- <li>count()</li>
- <li>insert(T)</li>
- <li>insert(start, end)</li>
- <li>probably_contains(T)</li>
- <li>clear()</li>
- <li>swap(bloom)</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>
-
- <br/>
-
- <a name="default_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">basic_bloom_filter</code>();</div>
- <dl>
- <dt>Description</dt>
- <dd>Constructs a basic_bloom_filter object with all bits set to 0.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="range_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">basic_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 basic_bloom_filter by inserting all the elements in the range (start, end).</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>, such that n=distance(start, end).</dd>
- </dl>
- </div>
-
- <a name="ilist_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">basic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer</code>&lt;<code class="c_type">T</code>&gt;&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Constructs a basic_bloom_filter by inserting all elements in the initializer list.</dd>
- <dt>Warning</dt>
- <dd>Only available in C++11-supporting compilers.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>, such that n=size(init_list).</dd>
- </dl>
- </div>
-
- <a name="bit_capacity"></a>
- <div class="func_ref">
- <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>
- <dt>Returns</dt>
- <dd>Value of template parameter Size.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
-
- <a name="num_hash_functions"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code><code class="c_func"> num_hash_functions</code>()<code class="c_keyword"> const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of hash functions used by the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>mpl::size&lt;HashFunctions&gt;.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="false_positive_rate"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">double </code><code class="c_func">false_positive_rate</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the current false positive rate based upon the number of hash functions used (k), the number of bits available (m), and the number of bits set (n).</dd>
- <dt>Returns</dt>
- <dd>A double precision value calculated as (1 - e^(k*n/m))^k.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="empty"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <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>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.count().</dd>
- </dl>
- </div>
-
- <a name="count"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">count</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bits currently set in the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>std::bitset.count().</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.count().</dd>
- </dl>
- </div>
-
- <a name="insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Inserts an element into the Bloom filter.</dd>
- <dt>Post-condition</dt>
- <dd>At least 1 bit and at most num_hash_functions() bits of the Bloom filter will have been set.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>, such that k=num_hash_functions()</dd>
- </dl>
- </div>
-
- <a name="range_insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</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>Inserts all elements in range (start, end).</dd>
- <dt>Post-condition</dt>
- <dd>At least n bits and at most (n * num_hash_functions()) bits of the Bloom filter will have been set, where n = distance(start, end).</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>, as above.</dd>
- </dl>
- </div>
-
- <a name="probably_contains"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>) <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Queries an element in the Bloom filter, checking each hash function value against the set bits.</dd>
- <dt>Returns</dt>
- <dd>True if all hash functions agree with the bitset; false otherwise.</dd>
- <dt>Warning</dt>
- <dd>It may return a false positive if there are hash collisions - this means that depending on the Size of the Bloom filter and the hash functions used, there is a probability that the Bloom filter will return true even though the element was never inserted.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="clear"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">clear</code>();</div>
- <dl>
- <dt>Description</dt>
- <dd>Sets all bits in the Bloom filter to 0, effectively canceling all insertions.</dd>
- <dt>Post-condition</dt>
- <dd>this->count() == 0</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.clear().</dd>
- </dl>
- </div>
-
- <a name="swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits in this Bloom filter with the argument Bloom filter.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="union_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">basic_bloom_filter&amp;</code> <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs a union.</dd>
- <dt>Returns</dt>
- <dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
- <dt>Post-condition</dt>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be greater than or equal to the number of bits set before the operation.</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator|=</dd>
- </dl>
- </div>
-
- <a name="intersect_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">basic_bloom_filter&amp;</code> <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs an intersection.</dd>
- <dt>Returns</dt>
- <dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
- <dt>Post-condition</dt>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be less than or equal to the number of bits set before the operation.</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator&amp;=</dd>
- </dl>
- </div>
-
- <a name="union"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">basic_bloom_filter&amp;</code> <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs a union.</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>
- <dd>The number of bits set in the new filter will be greater than or equal to the number of bits set in max(lhs.count(), rhs.count()).</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator|</dd>
- </dl>
- </div>
-
- <a name="intersect"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">basic_bloom_filter&amp;</code> <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs an intersection.</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>
- <dd>The number of bits set in the new filter will be less than or equal to the number of bits set in min(lhs.count(), rhs.count()).</dd>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator&amp;</dd>
- </dl>
- </div>
-
- <a name="global_swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&amp;, <code class="c_type">basic_bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits between the argument Bloom filters.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="operator_equality"></a>
- <div class="func_ref">
- <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">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</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>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator==</dd>
- </dl>
- </div>
-
- <a name="operator_inequality"></a>
- <div class="func_ref">
- <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">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</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>
- <dt>Complexity</dt>
- <dd>Dependent on the implementation of std::bitset.operator!=</dd>
- </dl>
- </div>
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="../reference.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <a accesskey="n" href="dynamic_bloom.html">
- <img src="../../../../../doc/src/images/next.png" alt="Next"/>
- </a>
- </div>
-
- <div>
- <p class="copyright">
- Copyright &#169; 2011
- <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
- </p>
-
- <p class="copyright">
- Distributed under the Boost Software License, Version 1.0. (See
- accompanying file
- LICENSE_1_0.txt or
- copy at
- http://www.boost.org/LICENSE_1_0.txt)
- </p>
- </div>
-
- </body>
-</html>

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
+++ (empty file)
@@ -1,624 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css"
- href="../../../../../doc/src/boostbook.css"/>
- <link rel="stylesheet" type="text/css" href="../style/my.css"/>
-
- <title>Boost.BloomFilter</title>
- </head>
-
- <body>
- <div class="header">
- <img src="../../../../../boost.png" width="277" height="86"
- alt="Boost C++ Libraries"/>
- <p>
- Home
- Libraries
- People
- FAQ
- More
- </p>
- </div>
-
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="dynamic_bloom.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <a accesskey="n" href="hash/default.html">
- <img src="../../../../../doc/src/images/next.png" alt="Next"/>
- </a>
- </div>
-
- <h1>Counting Bloom Filter</h1>
- <div class="listing">
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</code> = 4,
- <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code> = <code class="c_namespace">mpl::</code><code class="c_type">vector</code>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>, 0&gt; &gt;,
- <code class="c_keyword">typename</code> <code class="c_type">Block</code> = size_t&gt;
- <code class="c_keyword">class</code> <code class="c_type">counting_bloom_filter</code> {
-
- <code class="c_comment">// restrictions on template parameters</code>
- <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost::</code>is_integral&lt;<code class="c_type">Block</code>&gt;::value == true);
- <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost::</code>is_unsigned&lt;<code class="c_type">Block</code>&gt;::value == true);
- <code class="c_keyword">static_assert</code>( BitsPerBin > 0 );
- <code class="c_keyword">static_assert</code>( (<code class="c_type">BitsPerBin</code> &lt; (<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) ) );
- <code class="c_keyword">static_assert</code>( ((<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) % <code class="c_type">BitsPerBin</code>) == 0);
-
- <code class="c_comment">// exported typedefs</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">counting_bloom_filter</code>&lt;<code class="c_type">T</code>, NumBins, BitsPerBin, <code class="c_type">HashFunctions</code>, <code class="c_type">Block</code>&gt; <code class="c_type">this_type</code>;
-
- <code class="c_keyword">typedef</code> <code class="c_namespace">boost::</code><code class="c_type">array</code>&lt;<code class="c_type">Block</code>, array_size&gt; <code class="c_type">bucket_type</code>;
- <code class="c_keyword">typedef</code> <code class="c_type">bucket_type::iterator bucket_iterator</code>;
- <code class="c_keyword">typedef</code> <code class="c_type">bucket_type::const_iterator bucket_const_iterator</code>;
-
- <code class="c_comment">//! constructors</code>
- <code class="c_func">counting_bloom_filter</code>();
- <code class="c_func">counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer_list</code>&lt;<code class="c_type">T</code>&gt;&amp;); <code class="c_comment">// requires C++11</code>
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_func">counting_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">num_bins</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">bits_per_bin</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">bins_per_slot</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">mask</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">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>;
- <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
-
- <code class="c_comment">//! data structures core ops</code>
- <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
-
- <code class="c_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_type">void</code> <code class="c_func">remove</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">//! 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">counting_bloom_filter</code>&amp;);
-
- <code class="c_comment">//! union assign/intersect assign</code>
- <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_func">experimental_union_assign</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp;);
- <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_func">experimental_intersect_assign</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp;);
- };
-
- <code class="c_comment">//! union</code>
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</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>&gt;
- <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;
- <code class="c_func">experimental_union</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">//! intersect</code>
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</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>&gt;
- <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;
- <code class="c_func">experimental_intersect</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</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>&gt;
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">// equality</code>
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</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>&gt;
- <code class="c_type">bool</code>
- <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
- <code class="c_type">size_t</code> <code class="c_type">NumBins</code>,
- <code class="c_type">size_t</code> <code class="c_type">BitsPerBin</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>&gt;
- <code class="c_type">bool</code>
- <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&lt;<code class="c_type">T, NumBins, BitsPerBin, HashFunctions, Block</code>&gt;&amp; <code class="c_id">rhs</code>);
- </div>
- <p>
- The compile-time counting Bloom filter class. Allows for customizing the number
- of bins used, as well as the bits used per bin. Even the granularity of bit
- operations can be modified via the Block parameter. Best used when:
- </p>
- <ul>
- <li>element removal is needed</li>
- <li>the number of insertions can be reliably upper-bounded ahead of time</li>
- <li>storage requirements are strict: e.g., less than or equal to 1MB</li>
- </ul>
-
- <h3>Template Parameters Reference</h3>
- <div class="template_ref">
- <dl>
- <dt>T</dt>
- <dd>The type used for all Bloom filter operations.</dd>
- <dt>NumBins</dt>
- <dd>A bin is used to store an occurrence of a single hashed element.
- This parameter sets the number of bins used.</dd>
- <dt>BitsPerBin</dt>
- <dd>The number of bits used for each bin.</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>
- <dt>Block</dt>
- <dd>An implementation detail - determines the granularity of the
- bit operations. Smaller types reduce fragmentation. Larger types
- improve throughput.</dd>
- </dl>
- </div>
-
- <div class="toc">
- <h3>Function Reference</h3>
- <ul>
- <li>counting_bloom_filter()</li>
- <li>counting_bloom_filter(start, end)</li>
- <li>counting_bloom_filter(initializer_list)</li>
- <li>num_bins()</li>
- <li>bits_per_bin()</li>
- <li>bins_per_slot()</li>
- <li>mask()</li>
- <li>bit_capacity()</li>
- <li>num_hash_functions()</li>
- <li>false_positive_rate()</li>
- <li>empty()</li>
- <li>count()</li>
- <li>insert(T)</li>
- <li>insert(start, end)</li>
- <li>remove(T)</li>
- <li>remove(start, end)</li>
- <li>probably_contains(T)</li>
- <li>clear()</li>
- <li>swap(bloom)</li>
- <li>experimental_union_assign(bloom)</li>
- <li>experimental_intersect_assign(bloom)</li>
- <li>experimental_union(bloom, bloom)</li>
- <li>experimental_intersect(bloom, bloom)</li>
- <li>swap(bloom, bloom)</li>
- <li>operator==(bloom, bloom)</li>
- <li>operator!=(bloom, bloom)</li>
- </ul>
- </div>
-
- <br/>
-
- <a name="default_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">counting_bloom_filter</code>();</div>
- <dl>
- <dt>Description</dt>
- <dd>Constructs a counting_bloom_filter object with all bits set to 0.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="range_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">counting_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 counting_bloom_filter by inserting all the elements in the range (start, end).</dd>
- <dt>Throws</dt>
- <dd>May throw bin_overflow exception if an insertion makes the value of
- a bin greater than 2**BitsPerBin</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>.</dd>
- </dl>
- </div>
-
- <a name="ilist_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer</code>&lt;<code class="c_type">T</code>&gt;&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Constructs a counting_bloom_filter by inserting all elements in the initializer list.</dd>
- <dt>Warning</dt>
- <dd>Only available in C++11-supporting compilers.</dd>
- <dt>Throws</dt>
- <dd>May throw bin_overflow exception if an insertion makes the value of
- a bin greater than 2**BitsPerBin</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>.</dd>
- </dl>
- </div>
-
- <a name="num_bins"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">num_bins</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bins allocated for this Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>Value of template parameter NumBins.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="bits_per_bin"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">bits_per_bin</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bits used per bin.</dd>
- <dt>Returns</dt>
- <dd>Value of template parameter BitsPerBin.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="bins_per_slot"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">bins_per_slot</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bins that fit in a single slot of the
- data structure's internal storage.</dd>
- <dt>Returns</dt>
- <dd>sizeof(Block) * 8 / BitsPerBin</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="mask"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">mask</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the mask used internally to extract a bin from a slot.</dd>
- <dt>Returns</dt>
- <dd>static_cast&lt;Block&gt;(0 - 1) &gt;&gt; (sizeof(Block)*8 - BitsPerBin).</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="bit_capacity"></a>
- <div class="func_ref">
- <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>
- <dt>Returns</dt>
- <dd>Value of template parameter Size.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="num_hash_functions"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code><code class="c_func"> num_hash_functions</code>()<code class="c_keyword"> const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of hash functions used by the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>mpl::size&lt;HashFunctions&gt;.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="false_positive_rate"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">double </code><code class="c_func">false_positive_rate</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the current false positive rate based upon the number of hash functions used (k), the number of bits available (m), and the number of bits set (n).</dd>
- <dt>Returns</dt>
- <dd>A double precision value calculated as (1 - e^(k*n/m))^k.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="empty"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns true if no elements have been inserted into the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>this->count() == 0</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="count"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">count</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bins contaning a set bit.</dd>
- <dt>Returns</dt>
- <dd>The number of bins that have an element in them. Note that this is
- different than the number of insertions committed.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Inserts an element into the Bloom filter.</dd>
- <dt>Post-condition</dt>
- <dd>At least 1 bit and at most num_hash_functions() bits of the Bloom filter will have been set.</dd>
- <dt>Throws</dt>
- <dd>May throw bin_overflow exception if an insertion makes the value of
- a bin greater than 2**BitsPerBin</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="range_insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</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>Inserts all elements in range (start, end).</dd>
- <dt>Post-condition</dt>
- <dd>At least n bits and at most (n * num_hash_functions()) bits of the Bloom filter will have been set, where n = distance(start, end).</dd>
- <dt>Throws</dt>
- <dd>May throw bin_overflow exception if an insertion makes the value of
- a bin greater than 2**BitsPerBin</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>.</dd>
- </dl>
- </div>
-
- <a name="remove"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Removes an element into the Bloom filter.</dd>
- <dt>Post-condition</dt>
- <dd>At least 1 bit and at most num_hash_functions() bits of the Bloom filter will have been set.</dd>
- <dt>Throws</dt>
- <dd>May throw bin_underflow exception if a removal makes the value of
- a bin less than 0.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="range_remove"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">remove</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>Removes all elements in range (start, end).</dd>
- <dt>Post-condition</dt>
- <dd>At least n bits and at most (n * num_hash_functions()) bits of the Bloom filter will have been set, where n = distance(start, end).</dd>
- <dt>Throws</dt>
- <dd>May throw bin_underflow exception if a removal makes the value of
- a bin less than 0.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>.</dd>
- </dl>
- </div>
-
- <a name="probably_contains"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>) <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Queries an element in the Bloom filter, checking each hash function value against the set bits.</dd>
- <dt>Returns</dt>
- <dd>True if all hash functions agree with the bitset; false otherwise.</dd>
- <dt>Warning</dt>
- <dd>It may return a false positive if there are hash collisions - this means that depending on the Size of the Bloom filter and the hash functions used, there is a probability that the Bloom filter will return true even though the element was never inserted.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="clear"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">clear</code>();</div>
- <dl>
- <dt>Description</dt>
- <dd>Sets all bits in the Bloom filter to 0, effectively canceling all insertions.</dd>
- <dt>Post-condition</dt>
- <dd>this->count() == 0</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">counting_bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits in this Bloom filter with the argument Bloom filter.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="union_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">counting_bloom_filter&amp;</code> <code class="c_func">experimental_union_assign</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs a union on a per-slot basis.</dd>
- <dt>Returns</dt>
- <dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
- <dt>Post-condition</dt>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be greater than or equal to the number of bits set before the operation.</dd>
- <dt>Warning</dt>
- <dd>This operation is only an approximation. The resulting Bloom filter
- may have very high bin values. See regression suite for details.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="intersect_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">counting_bloom_filter&amp;</code> <code class="c_func">experimental_intersect_assign</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs an intersection on a per-slot basis.</dd>
- <dt>Returns</dt>
- <dd>Returns a reference to <code class="c_keyword">this</code>.</dd>
- <dt>Post-condition</dt>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be less than or equal to the number of bits set before the operation.</dd>
- <dt>Warning</dt>
- <dd>This operation is only an approximation. The resulting Bloom filter
- may have false negatives. See regression suite for details.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="union"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">counting_bloom_filter&amp;</code> <code class="c_func">experimental_union</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs a union on a per-slot basis.</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>
- <dd>The number of bits set in the new filter will be greater than or equal to the number of bits set in max(lhs.count(), rhs.count()).</dd>
- <dt>Warning</dt>
- <dd>This operation is only an approximation. The resulting Bloom filter
- may have very high bin values. See regression suite for details.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="intersect"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">counting_bloom_filter&amp;</code> <code class="c_func">experimental_intersect</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Performs an intersection on a per-bin basis.</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>
- <dd>The number of bits set in the new filter will be less than or equal to the number of bits set in min(lhs.count(), rhs.count()).</dd>
- <dt>Warning</dt>
- <dd>This operation is only an approximation. The resulting Bloom filter
- may have false negatives. See regression suite for details.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="global_swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">counting_bloom_filter</code>&amp;, <code class="c_type">counting_bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits between the argument Bloom filters.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="operator_equality"></a>
- <div class="func_ref">
- <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">counting_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</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>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
-
- <a name="operator_inequality"></a>
- <div class="func_ref">
- <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">counting_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter&amp;</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>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span>.</dd>
- </dl>
- </div>
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="dynamic_bloom.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <a accesskey="n" href="hash/default.html">
- <img src="../../../../../doc/src/images/next.png" alt="Next"/>
- </a>
- </div>
-
- <div>
- <p class="copyright">
- Copyright &#169; 2011
- <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
- </p>
-
- <p class="copyright">
- Distributed under the Boost Software License, Version 1.0. (See
- accompanying file
- LICENSE_1_0.txt or
- copy at
- http://www.boost.org/LICENSE_1_0.txt)
- </p>
- </div>
-
- </body>
-</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/counting_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Counting Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">NumBins</code>,
+ <code class="c_type">size_t</code> <code class="c_id">BitsPerBin</code> = 4,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code> = <code class="c_namespace">mpl</code>::<code class="c_type">vector</code>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt; &gt;,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = size_t&gt;
+ <code class="c_keyword">class</code> <code class="c_type">counting_bloom_filter</code> {
+
+ <code class="c_comment">//* restrictions on template parameters</code>
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_integral</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_keyword">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_unsigned</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_keyword">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_id">BitsPerBin</code> > 0 );
+ <code class="c_keyword">static_assert</code>( (<code class="c_id">BitsPerBin</code> &lt; (<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) ) );
+ <code class="c_keyword">static_assert</code>( ((<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) % <code class="c_id">BitsPerBin</code>) == 0);
+
+ <code class="c_comment">//* exported typedefs</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">counting_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_id">NumBins</code>, <code class="c_id">BitsPerBin</code>, <code class="c_type">HashFunctions</code>, <code class="c_type">Block</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_comment">// array_size = (NumBins * BitsPerBin) / (sizeof(Block) * 8) + 1</code>
+ <code class="c_keyword">typedef</code> <code class="c_namespace">boost</code>::<code class="c_type">array</code>&lt;<code class="c_type">Block</code>, array_size&gt; <code class="c_type">bucket_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">iterator bucket_iterator</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">const_iterator bucket_const_iterator</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">counting_bloom_filter</code>();
+ <code class="c_func">counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer_list</code>&lt;<code class="c_type">T</code>&gt;&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">counting_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">num_bins</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">bits_per_bin</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">bins_per_slot</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">mask</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">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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bucket_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
+
+ <code class="c_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">remove</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">//* 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">counting_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_type">bool</code>
+ <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code>
+ <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ </div>
+ <p>
+ The compile-time counting Bloom filter class. Allows for customizing the number
+ of bins used, as well as the bits used per bin. Even the granularity of bit
+ operations can be modified via the Block parameter. Best used when:
+ </p>
+ <ul>
+ <li>element removal is needed</li>
+ <li>the storage required is less than the size of the stack</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>NumBins</dt>
+ <dd>A bin is used to store an occurrence of a single hashed element.
+ This parameter sets the number of bins used.</dd>
+ <dt>BitsPerBin</dt>
+ <dd>The number of bits used for each bin.</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>
+ <dt>Block</dt>
+ <dd>An implementation detail - determines the granularity of the
+ bit operations. Smaller types reduce fragmentation. Larger types
+ improve throughput.</dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_basic_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_basic_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Dynamic Basic Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<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>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt; &gt;,
+ <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>&lt;<code class="c_type">Block</code>&gt; &gt;
+ <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_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_keyword">typedef</code> <code class="c_type">dynamic_bitset</code>&lt;<code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">bitset_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_type">HashFunctions</code>, <code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_comment">//* constructors</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>);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <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_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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bitset_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
+
+ <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">dynamic_bloom_filter</code>&amp;);
+ <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">dynamic_bloom_filter</code>&amp; <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp;);
+ <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</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>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">dynamic_bloom_filter</code>
+ <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_id">rhs</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>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_id">rhs</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>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
+ </div>
+ <p>
+ The dynamic basic Bloom filter data structure. Allows setting of type and hash functions at compile-time. This structure is best used when:
+ </p>
+ <ul>
+ <li>element removal is not needed</li>
+ <li>storage space requirements might exceed stack space</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</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>
+ <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>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_bloom.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
+++ (empty file)
@@ -1,545 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css"
- href="../../../../../doc/src/boostbook.css"/>
- <link rel="stylesheet" type="text/css" href="../style/my.css"/>
-
- <title>Boost.BloomFilter</title>
- </head>
-
- <body>
- <div class="header">
- <img src="../../../../../boost.png" width="277" height="86"
- alt="Boost C++ Libraries"/>
- <p>
- Home
- Libraries
- People
- FAQ
- More
- </p>
- </div>
-
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="bloom.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <a accesskey="n" href="counting_bloom.html">
- <img src="../../../../../doc/src/images/next.png" alt="Next"/>
- </a>
- </div>
-
- <h1>Basic Dynamic Bloom Filter</h1>
- <div class="listing">
- <code class="c_keyword">template</code> &lt;<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>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>, 3&gt; &gt;,
- <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>&lt;<code class="c_type">Block</code>&gt; &gt;
- <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_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_keyword">typedef</code> <code class="c_type">dynamic_bitset</code>&lt;<code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">bitset_type</code>;
- <code class="c_keyword">typedef</code> <code class="c_type">dynamic_bloom_filter</code>&lt<code class="c_type">T</code>, <code class="c_type">HashFunctions</code>, <code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">this_type</code>;
-
- <code class="c_comment">// constructors</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>);
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <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_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>;
- <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
-
- <code class="c_comment">// data structures core ops</code>
- <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
-
- &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
- <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;) <code class="c_keyword">const</code>;
-
- <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">dynamic_bloom_filter</code>&amp;);
- <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">dynamic_bloom_filter</code>&amp; <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp;);
- <code class="c_type">dynamic_bloom_filter</code>&amp; <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&amp;);
- };
-
- <code class="c_comment">// union</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;
- <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">// intersect</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;
- <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_comment">// global swap</code>
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <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>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- <code class="c_keyword">template</code> &lt;<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>&gt;
- <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>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">lhs</code>,
- <code class="c_keyword">const</code> <code class="c_type">dynamic_bloom_filter</code>&lt;<code class="c_type">T, HashFunctions, Block, Allocator</code>&gt;&amp; <code class="c_id">rhs</code>);
-
- </div>
- <p>
- The dynamic basic Bloom filter data structure. Allows setting of type and hash functions at compile-time. This structure is best used when:
- </p>
- <ul>
- <li>element removal is not needed</li>
- <li>the number of insertions <strong>cannot</strong> be reliably upper-bounded ahead of time</li>
- <li>the Bloom filter will be larger than stack space allows</li>
- </ul>
-
- <h3>Template Parameters Reference</h3>
- <div class="template_ref">
- <dl>
- <dt>T</dt>
- <dd>The type used for all Bloom filter operations.</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>
- <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>
-
- <div class="toc">
- <h3>Function Reference</h3>
- <ul>
- <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>
- <li>empty()</li>
- <li>count()</li>
- <li>insert(T)</li>
- <li>insert(start, end)</li>
- <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>
-
- <br/>
-
- <a name="default_constructor"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_func">dynamic_bloom_filter</code>();</div>
- <dl>
- <dt>Description</dt>
- <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>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html">
- boost::dynamic_bitset()</a>.</dd>
- </dl>
- </div>
-
- <a name="capacity_constructor"></a>
- <div class="func_ref">
- <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 dynamic_bloom_filter with all bits set to 0 and bit_capacity set to capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html">
- boost::dynamic_bitset(size_t)</a>.</dd>
- </dl>
- </div>
-
- <a name="range_constructor"></a>
- <div class="func_ref">
- <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 dynamic_bloom_filter by inserting all the elements in the range (start, end).</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n)</span> and depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html">
- boost::dynamic_bitset</a>.</dd>
- </dl>
- </div>
-
- <a name="bit_capacity"></a>
- <div class="func_ref">
- <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>
- <dt>Returns</dt>
- <dd>this->bits.size()</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
-
- <a name="num_hash_functions"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code><code class="c_func"> num_hash_functions</code>()<code class="c_keyword"> const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of hash functions used by the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>mpl::size&lt;HashFunctions&gt;.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="false_positive_rate"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">double </code><code class="c_func">false_positive_rate</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the current false positive rate based upon the number of hash functions used (k), the number of bits available (m), and the number of bits set (n).</dd>
- <dt>Returns</dt>
- <dd>A double precision value calculated as (1 - e^(k*n/m))^k.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="empty"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns true if no elements have been inserted into the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>this->bits.count() == 0</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html">
- boost::dynamic_bitset.empty()</a>.</dd>
- </dl>
- </div>
-
- <a name="count"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">count</code>() <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Returns the number of bits currently set in the Bloom filter.</dd>
- <dt>Returns</dt>
- <dd>this->bits.count().</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html">
- boost::dynamic_bitset.count()</a>.</dd>
- </dl>
- </div>
-
- <a name="insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
- <dl>
- <dt>Description</dt>
- <dd>Inserts an element into the Bloom filter.</dd>
- <dt>Post-condition</dt>
- <dd>At least 1 bit and at most num_hash_functions() bits of the Bloom filter will have been set.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="range_insert"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</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>Inserts all elements in range (start, end).</dd>
- <dt>Post-condition</dt>
- <dd>At least n bits and at most (n * num_hash_functions()) bits of the Bloom filter will have been set, where n = distance(start, end).</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(n*k)</span>.</dd>
- </dl>
- </div>
-
- <a name="probably_contains"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>) <code class="c_keyword">const</code>;</div>
- <dl>
- <dt>Description</dt>
- <dd>Queries an element in the Bloom filter, checking each hash function value against the set bits.</dd>
- <dt>Returns</dt>
- <dd>True if all hash functions agree with the bitset; false otherwise.</dd>
- <dt>Warning</dt>
- <dd>It may return a false positive if there are hash collisions - this means that depending on the Size of the Bloom filter and the hash functions used, there is a probability that the Bloom filter will return true even though the element was never inserted.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(k)</span>.</dd>
- </dl>
- </div>
-
- <a name="clear"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">clear</code>();</div>
- <dl>
- <dt>Description</dt>
- <dd>Sets all bits in the Bloom filter to 0, effectively canceling all insertions.</dd>
- <dt>Post-condition</dt>
- <dd>this->count() == 0</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.clear()</a>.</dd>
- </dl>
- </div>
-
- <a name="swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits and the bit capacity in this Bloom filter with the argument Bloom filter.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span>.</dd>
- </dl>
- </div>
-
- <a name="resize"></a>
- <div class="func_ref">
- <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>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.resize()</a>.</dd>
- </dl>
- </div>
-
- <a name="union_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bloom_filter&amp;</code> <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code>);</div>
- <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>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be greater than or equal to the number of bits set before the operation.</dd>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator|=()</a>.</dd>
- </dl>
- </div>
-
- <a name="intersect_assign"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bloom_filter&amp;</code> <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code>);</div>
- <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>
- <dd>The number of bits set in <code class="c_keyword">this</code> will be less than or equal to the number of bits set before the operation.</dd>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator&amp;=()</a>.</dd>
- </dl>
- </div>
-
- <a name="union"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bloom_filter&amp;</code> <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <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>
- <dd>The number of bits set in the new filter will be greater than or equal to the number of bits set in max(lhs.count(), rhs.count()).</dd>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator|()</a>.</dd>
- </dl>
- </div>
-
- <a name="intersect"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">bloom_filter&amp;</code> <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</code> <code class="c_id">rhs</code>);</div>
- <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>
- <dd>The number of bits set in the new filter will be less than or equal to the number of bits set in min(lhs.count(), rhs.count()).</dd>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator&amp;()</a>.</dd>
- </dl>
- </div>
-
- <a name="global_swap"></a>
- <div class="func_ref">
- <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">bloom_filter</code>&amp;, <code class="c_type">bloom_filter</code>&amp;);</div>
- <dl>
- <dt>Description</dt>
- <dd>Swaps the bits and the bit capacity between the argument Bloom filters.</dd>
- <dt>Complexity</dt>
- <dd><span class="complexity">O(1)</span></dd>
- </dl>
- </div>
-
- <a name="operator_equality"></a>
- <div class="func_ref">
- <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&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</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>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator==()</a>.</dd>
- </dl>
- </div>
-
- <a name="operator_inequality"></a>
- <div class="func_ref">
- <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&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">bloom_filter&amp;</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>
- <dt>Throws</dt>
- <dd>incompatible_size exception if the argument Bloom filters
- have a different bit_capacity.</dd>
- <dt>Complexity</dt>
- <dd>Depends on the implementation of
- <a href="http://www.boost.org/doc/libs/1_47_0/libs/dynamic_bitset/dynamic_bitset.html#member-functions">
- boost::dynamic_bitset.operator!=()</a>.</dd>
- </dl>
- </div>
- <hr/>
-
- <div class="spirit-nav">
- <a accesskey="p" href="bloom.html">
- <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
- </a>
- <a accesskey="u" href="../reference.html">
- <img src="../../../../../doc/src/images/up.png" alt="Up"/>
- </a>
- <a accesskey="h" href="../index.html">
- <img src="../../../../../doc/src/images/home.png" alt="Home"/>
- </a>
- <a accesskey="n" href="counting_bloom.html">
- <img src="../../../../../doc/src/images/next.png" alt="Next"/>
- </a>
- </div>
-
- <div>
- <p class="copyright">
- Copyright &#169; 2011
- <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
- </p>
-
- <p class="copyright">
- Distributed under the Boost Software License, Version 1.0. (See
- accompanying file
- LICENSE_1_0.txt or
- copy at
- http://www.boost.org/LICENSE_1_0.txt)
- </p>
- </div>
-
- </body>
-</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_counting_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/dynamic_counting_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Dynamic Counting Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt; <code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">BitsPerBin</code> = 4,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunctions</code> = <code class="c_namespace">mpl</code>::<code class="c_type">vector</code>&lt;<code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt; &gt;,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = <code class="c_type">size_t</code>,
+ <code class="c_keyword">class</code> <code class="c_type">Allocator</code> = <code class="c_namespace">std</code>::<code class="c_type">allocator</code>&lt;<code class="c_type">Block</code>&gt; &gt;
+ <code class="c_keyword">class</code> <code class="c_type">dynamic_counting_bloom_filter</code> {
+
+ <code class="c_comment">//* restrictions on template parameters</code>
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_integral</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_keyword">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_unsigned</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_keyword">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_id">BitsPerBin</code> > 0 );
+ <code class="c_keyword">static_assert</code>( (<code class="c_id">BitsPerBin</code> &lt; (<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) ) );
+ <code class="c_keyword">static_assert</code>( ((<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) % <code class="c_id">BitsPerBin</code>) == 0);
+
+ <code class="c_comment">//* exported typedefs</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_keyword">typedef</code> <code class="c_type">dynamic_counting_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_id">BitsPerBin</code>, <code class="c_type">HashFunctions</code>,
+ <code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_keyword">typedef</code> <code class="c_namespace">std</code>::<code class="c_type">vector</code>&lt;<code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">bucket_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type::iterator bucket_iterator</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type::const_iterator bucket_const_iterator</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">dynamic_counting_bloom_filter</code>();
+ <code class="c_func">dynamic_counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">num_bins</code>);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">dynamic_counting_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_type">size_t</code> <code class="c_func">num_bins</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">bits_per_bin</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">bins_per_slot</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">mask</code>();
+ <code class="c_func">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_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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bucket_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_id">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_id">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">remove</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_id">T</code>&amp;);
+
+ <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">dynamic_counting_bloom_filter</code>&amp;);
+
+ <code class="c_comment">//* equality</code>
+ <code class="c_keyword">friend bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;);
+
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;,
+ <code class="c_keyword">const</code> <code class="c_type">dynamic_counting_bloom_filter</code>&amp;);
+
+ <code class="c_keyword">void</code> <code class="c_func">swap</code>(<code class="c_type">dynamic_counting_bloom_filter</code>&amp;,
+ <code class="c_type">dynamic_counting_bloom_filter</code>&amp;);
+ </div>
+ <p>
+ The dynamic counting Bloom filter supports insertion, deletion, and
+ query operations. The following is a list of reasons to use this
+ filter over the others:
+ </p>
+ <ul>
+ <li>Element removal is necessary</li>
+ <li>Storage requirements are larger than the stack</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>BitsPerBin</dt>
+ <dd>The number of bits used for each bin.</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>
+ <dt>Block</dt>
+ <dd>An implementation detail - determines the granularity of the
+ bit operations. Smaller types reduce fragmentation. Larger types
+ improve throughput.</dd>
+ <dt>Allocator</dt>
+ <dd>Memory allocator - passed to the std::vector.</dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/extenders.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/extenders.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="hash/murmurhash3.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="functions.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Extenders</h1>
+ <div class="listing">
+
+ <code class="c_comment">// returns the value squared</code>
+ <code class="c_keyword">struct</code> <code class="c_type">square</code> {
+ <code class="c_type">size_t</code> <code class="c_func">operator()</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code>);
+ };
+
+ <code class="c_comment">// returns the value cubed</code>
+ <code class="c_keyword">struct</code> <code class="c_type">cube</code> {
+ <code class="c_type">size_t</code> <code class="c_func">operator()</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code>);
+ };
+
+ <code class="c_comment">// returns the value raised to the fourth power</code>
+ <code class="c_keyword">struct</code> <code class="c_type">fourth</code> {
+ <code class="c_type">size_t</code> <code class="c_func">operator()</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code>);
+ };
+
+ <code class="c_comment">// ignores the value, returns zero</code>
+ <code class="c_keyword">struct</code> <code class="c_type">zero</code> {
+ <code class="c_type">size_t</code> <code class="c_func">operator()</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code>);
+ };
+
+ </div>
+ <p>
+ Extenders are used with Bloom filters implemented using the
+ two-hashing technique. Extenders allow for extended double hashing
+ schemes to be supported. An object conforming to the extender
+ requirements must:
+ </p>
+ <ul>
+ <li>Must be a callable (overload operator())</li>
+ <li>Return an integral value</li>
+ <li>Take an integral value</li>
+ </ul>
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="hash/murmurhash3.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="functions.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/functions.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/functions.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,567 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="extenders.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="../testing.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Function Reference</h1>
+
+ <div class="toc">
+ <ul>
+ <li>Default Constructor</li>
+ <li>Capacity Constructor</li>
+ <li>Initializer List Constructor</li>
+ <li>Range Constructor</li>
+ <li>bit_capacity()</li>
+ <li>num_hash_functions()</li>
+ <li>num_bins()</li>
+ <li>bits_per_bin()</li>
+ <li>bins_per_slot()</li>
+ <li>mask()</li>
+ <li>false_positive_rate()</li>
+ <li>count()</li>
+ <li>empty()</li>
+ <li>data()</li>
+ <li>Insert</li>
+ <li>Range Insert</li>
+ <li>Remove</li>
+ <li>Range Remove</li>
+ <li>probably_contains()</li>
+ <li>clear()</li>
+ <li>resize()</li>
+ <li>Member Swap</li>
+ <li>Operator: Union Assign</li>
+ <li>Operator: Intersect Assign</li>
+ <li>Operator: Equality</li>
+ <li>Operator: Inequality</li>
+ <li>Operator: Union</li>
+ <li>Operator: Intersect</li>
+ <li>Global Swap</li>
+ </ul>
+ </div>
+
+ <br/>
+
+ <p>
+ When describing complexity, the variables m, n, and k will be used as follows:
+ </p>
+ <ul>
+ <li>m - the number of bits (basic) or bins (counting) in the Bloom filter.</li>
+ <li>n - the number of elements to be inserted/removed for a range operation.</li>
+ <li>k - the number of hash functions a Bloom filter executes.</li>
+ </ul>
+
+ <a name="default_constructor"></a>
+ <div class="func_ref">
+ <div class="ref_listing">
+ <code class="c_func">*_bloom_filter</code>();
+ </div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Constructs a Bloom filter object with all bits set to 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="capacity_constructor"></a>
+ <div class="func_ref">
+ <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 with all bits set to 0 and bit_capacity set to capacity.</dd>
+ <dt>Appearing In</dt>
+ <dd>Dynamic Bloom filter classes.</dd>
+ <dt>Complexity</dt>
+ <dd>Depends on the underlying storage used -
+ expect <span class="complexity">O(m)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="range_constructor"></a>
+ <div class="func_ref">
+ <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>
+ <dl>
+ <dt>Description</dt>
+ <dd>Constructs a Bloom filter by inserting all the elements in the
+ range (start, end). The number of bits/bins allocated for this Bloom filter
+ will be 4 times the size of the range.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(n)</span>, such that n=distance(start, end).</dd>
+ </dl>
+ </div>
+
+ <a name="ilist_constructor"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_func">*_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std::initializer</code>&lt;<code class="c_type">T</code>&gt;&amp;);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Constructs a Bloom filter by inserting all elements in the
+ initializer list. Not available for dynamic Bloom filters.</dd>
+ <dt>Warning</dt>
+ <dd>Only available in C++11-supporting compilers.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(n)</span>, such that n=size(init_list).</dd>
+ </dl>
+ </div>
+
+ <a name="num_bins"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">num_bins</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the number of bins allocated for this Bloom filter.</dd>
+ <dt>Returns</dt>
+ <dd>Value of template parameter NumBins.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="bits_per_bin"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">bits_per_bin</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the number of bits used per bin.</dd>
+ <dt>Returns</dt>
+ <dd>Value of template parameter BitsPerBin.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="bins_per_slot"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">bins_per_slot</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the number of bins that fit in a single slot of the
+ data structure's internal storage.</dd>
+ <dt>Returns</dt>
+ <dd><code>sizeof(Block) * 8 / BitsPerBin</code></dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="mask"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">mask</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the mask used internally to extract a bin from a slot.</dd>
+ <dt>Returns</dt>
+ <dd><code>static_cast&lt;Block&gt;(0 - 1) &gt;&gt; (sizeof(Block)*8 - BitsPerBin)</code></dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="bit_capacity"></a>
+ <div class="func_ref">
+ <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. For stack-allocated Bloom filters,
+ this will return a template parameter (static constexpr).
+ For heap allocated Bloom filters, this will return a value
+ determined by the underlying storage structure.
+ For basic Bloom filters, the bit capacity is determined
+ by the Size parameter. For counting Bloom filters,
+ the the bit capacity is determined by the number
+ of bins multiplied by the bits per bin.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="num_hash_functions"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code><code class="c_func"> num_hash_functions</code>()<code class="c_keyword"> const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the number of hash functions used by
+ the Bloom filter. For two-hash Bloom filters, this
+ returns the template parameter HashValues. For the
+ others, it returns the size of the mpl::vector
+ HashFunctions.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="false_positive_rate"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">double </code><code class="c_func">false_positive_rate</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the current false positive rate based upon the number of hash functions used (k),
+ the number of bits available (m), and the number of bits set (n).</dd>
+ <dt>Returns</dt>
+ <dd>A double precision value calculated as (1 - e^(k*n/m))^k.</dd>
+ <dt>Complexity</dt>
+ <dd>Determined by the count() operation.</dd>
+ </dl>
+ </div>
+
+ <a name="empty"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns true if no elements have been inserted into the Bloom filter.</dd>
+ <dt>Returns</dt>
+ <dd>count() == 0</dd>
+ <dt>Complexity</dt>
+ <dd>Dependent on the implementation of count().</dd>
+ </dl>
+ </div>
+
+ <a name="count"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">size_t</code> <code class="c_func">count</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Returns the number of elements inserted into the Bloom filter.
+ For basic Bloom filters, this is the number of bits set. For
+ counting Bloom filters, this is the number of bins with at least
+ one bit set.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="data"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_keyword">const</code> <code class="c_type">bitset_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Grants access to Bloom filter storage.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span></dd>
+ </dl>
+ </div>
+
+ <a name="insert"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Inserts an element into the Bloom filter.</dd>
+ <dt>Post-condition (basic Bloom filters)</dt>
+ <dd>At least 1 bit and at most k
+ bits of the Bloom filter will have been set.</dd>
+ <dt>Post-condition (counting Bloom filters)</dt>
+ <dd>At least 1 bin and at most k bins
+ will have been incremented.</dd>
+ <dt>Throws (counting Bloom filters)</dt>
+ <dd>Will throw bin_overflow exception if an insertion makes the value of
+ a bin reach 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(k)</span></dd>
+ </dl>
+ </div>
+
+ <a name="range_insert"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">insert</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>Inserts all elements in range (start, end).</dd>
+ <dt>Post-condition (basic Bloom filters)</dt>
+ <dd>At least n bits and at most n * k
+ bits of the Bloom filter will have been set.</dd>
+ <dt>Post-condition (counting Bloom filters)</dt>
+ <dd>At least n bins and at most n * k bins
+ will have been incremented.</dd>
+ <dt>Throws (counting Bloom filters)</dt>
+ <dd>Will throw bin_overflow exception if an insertion makes the value of
+ a bin 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(n*k)</span></dd>
+ </dl>
+ </div>
+
+ <a name="remove"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Removes an element from the Bloom filter.</dd>
+ <dt>Post-condition (basic Bloom filters)</dt>
+ <dd>At least 1 bit and at most k
+ bits of the Bloom filter will have been unset.</dd>
+ <dt>Post-condition (counting Bloom filters)</dt>
+ <dd>At least 1 bin and at most k bins
+ will have been decremented.</dd>
+ <dt>Throws</dt>
+ <dd>Will throw bin_underflow exception if a removal makes the value of
+ a bin less than 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(k)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="range_remove"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">remove</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>Removes all elements in range (start, end).</dd>
+ <dt>Post-condition (basic Bloom filters)</dt>
+ <dd>At least n bits and at most n * k
+ bits of the Bloom filter will have been unset.</dd>
+ <dt>Post-condition (counting Bloom filters)</dt>
+ <dd>At least n bins and at most n * k bins
+ will have been decremented.</dd>
+ <dt>Throws</dt>
+ <dd>May throw bin_underflow exception if a removal makes the value of
+ a bin less than 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(n*k)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="probably_contains"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>) <code class="c_keyword">const</code>;</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Queries an element in the Bloom filter, checking each hash function value against the set bits.</dd>
+ <dt>Returns</dt>
+ <dd>True if all hash functions agree with the bitset; false otherwise.</dd>
+ <dt>Warning</dt>
+ <dd>It may return a false positive if there are hash collisions - this
+ means that depending on the Size of the Bloom filter and the hash
+ functions used, there is a probability that the Bloom filter will
+ return true even though the element was never inserted.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(k)</span>.</dd>
+ </dl>
+ </div>
+
+ <a name="clear"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">clear</code>();</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Sets all bits in the Bloom filter to 0, effectively canceling
+ all insertions.</dd>
+ <dt>Post-condition</dt>
+ <dd>this->count() == 0</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="resize"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">resize</code>();</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Available only for heap-allocated Bloom filters.
+ Resizes the data structure, changing either the number of
+ bits or the number of bins.</dd>
+ <dt>Warning</dt>
+ <dd>A clear must be performed in the process.
+ All insertions will be lost.</dd>
+ <dt>Post-condition</dt>
+ <dd>this->count() == 0</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="member_swap"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&amp;);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Swaps the state of this Bloom filter with the argument Bloom filter.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span></dd>
+ </dl>
+ </div>
+
+ <a name="union_assign"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">*_bloom_filter&amp;</code> <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">*_bloom_filter&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Performs a union as follows: this = union(this, other).</dd>
+ <dt>Pre-condition (dynamic Bloom filters)</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
+ <dt>Post-condition</dt>
+ <dd>The number of bits set in <code class="c_keyword">this</code>
+ will be greater than or equal to the number of bits set before the operation.</dd>
+ <dt>Throws (dynamic Bloom filters)</dt>
+ <dd>incompatible_size exception if the argument Bloom filters
+ have a different bit_capacity or num_bins.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="intersect_assign"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">*_bloom_filter&amp;</code> <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">*_bloom_filter&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Performs an intersection as follows: this = intersect(this, other).</dd>
+ <dt>Pre-condition (dynamic Bloom filters)</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
+ <dt>Post-condition</dt>
+ <dd>The number of bits set in <code class="c_keyword">this</code>
+ will be less than or equal to the number of bits set before the operation.</dd>
+ <dt>Throws (dynamic Bloom filters)</dt>
+ <dd>incompatible_size exception if the argument Bloom filters
+ have a different bit_capacity or num_bins.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="union"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><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&amp;</code>, <code class="c_keyword">const</code> <code class="c_type">*_bloom_filter&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Performs a union as follows: result = union(lhs, rhs).</dd>
+ <dt>Pre-condition (dynamic Bloom filters)</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
+ <dt>Post-condition</dt>
+ <dd>The number of bits set in <code class="c_keyword">this</code>
+ will be greater than or equal to the number of bits set before the operation.</dd>
+ <dt>Throws (dynamic Bloom filters)</dt>
+ <dd>incompatible_size exception if the argument Bloom filters
+ have a different bit_capacity or num_bins.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="intersect"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">*_bloom_filter&amp;</code> <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">*_bloom_filter&amp;</code>, <code class="c_keyword">const</code> <code class="c_type">*_bloom_filter&amp;</code>);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Performs an intersection as follows: result = intersect(lhs, rhs).</dd>
+ <dt>Pre-condition (dynamic Bloom filters)</dt>
+ <dd>The bit capacity of the two Bloom filters must match.</dd>
+ <dt>Post-condition</dt>
+ <dd>The number of bits set in <code class="c_keyword">this</code>
+ will be less than or equal to the number of bits set before the operation.</dd>
+ <dt>Throws (dynamic Bloom filters)</dt>
+ <dd>incompatible_size exception if the argument Bloom filters
+ have a different bit_capacity or num_bins.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="op_equality"></a>
+ <div class="func_ref">
+ <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">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</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>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="op_inequality"></a>
+ <div class="func_ref">
+ <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">basic_bloom_filter&amp;</code> <code class="c_id">lhs</code>, <code class="c_keyword">const</code> <code class="c_type">basic_bloom_filter&amp;</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>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(m)</span></dd>
+ </dl>
+ </div>
+
+ <a name="global_swap"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">basic_bloom_filter</code>&amp;, <code class="c_type">basic_bloom_filter</code>&amp;);</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Swaps the state between the argument Bloom filters.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="extenders.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="../testing.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</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-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -24,7 +24,7 @@
 
     <hr/>
     <div class="spirit-nav">
- <a accesskey="p" href="../counting_bloom.html">
+ <a accesskey="p" href="../twohash_dynamic_counting_bloom_filter.html">
         <img src="../../../../../../doc/src/images/prev.png" alt="Prev"/>
       </a>
       <a accesskey="u" href="../../reference.html">
@@ -40,7 +40,7 @@
 
     <h1 class="title">Default Hash Function</h1>
     <div class="listing">
- <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size</code>&gt;
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>, <code class="c_type">size_t</code> <code class="c_id">Size = 0</code>&gt;
       <code class="c_keyword">struct</code> <code class="c_type">boost_hash</code> {
         <code class="c_type">size_t</code> <code class="c_func">operator</code>()(<code class="c_keyword">const</code> <code class="c_type">T&amp;</code>) const;
       };
@@ -51,7 +51,7 @@
 
     <hr/>
     <div class="spirit-nav">
- <a accesskey="p" href="../counting_bloom.html">
+ <a accesskey="p" href="../twohash_dynamic_counting_bloom_filter.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/murmurhash3.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/murmurhash3.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/hash/murmurhash3.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -33,7 +33,7 @@
       <a accesskey="h" href="../../index.html">
         <img src="../../../../../../doc/src/images/home.png" alt="Home"/>
       </a>
- <a accesskey="n" href="../../testing.html">
+ <a accesskey="n" href="../extenders.html">
         <img src="../../../../../../doc/src/images/next.png" alt="Next"/>
       </a>
     </div>
@@ -58,7 +58,7 @@
 
     <hr/>
     <div class="spirit-nav">
- <a accesskey="p" href="../dynamic_bloom.html">
+ <a accesskey="p" href="default.html">
         <img src="../../../../../../doc/src/images/prev.png" alt="Prev"/>
       </a>
       <a accesskey="u" href="../../reference.html">
@@ -67,7 +67,7 @@
       <a accesskey="h" href="../../index.html">
         <img src="../../../../../../doc/src/images/home.png" alt="Home"/>
       </a>
- <a accesskey="n" href="../../testing.html">
+ <a accesskey="n" href="../extenders.html">
         <img src="../../../../../../doc/src/images/next.png" alt="Next"/>
       </a>
     </div>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/ref_skeleton.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/ref_skeleton.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="../reference.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_bloom.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>==X== Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt; &gt;
+ <code class="c_keyword">class</code> <code class="c_type">==X==_bloom_filter</code> {
+ <code class="c_comment">//* exported typedefs</code>
+
+ <code class="c_comment">//* constructors</code>
+
+ <code class="c_comment">//* data structure metadata query functions</code>
+
+ <code class="c_comment">//* data structures core ops</code>
+
+ <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">basic_bloom_filter</code>&amp;);
+
+ <code class="c_comment">//* equality</code>
+ </div>
+ <p>
+ == DESCRIPTION ==
+ </p>
+ <ul>
+ <li>==IDEAL USE CASES</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ </dl>
+ </div>
+
+ <div class="toc">
+ <h3>Function Reference</h3>
+ <ul>
+ <li>basic_bloom_filter()</li>
+ <li>basic_bloom_filter(start, end)</li>
+ <li>basic_bloom_filter(initializer_list)</li>
+ <li>bit_capacity()</li>
+ <li>num_hash_functions()</li>
+ <li>false_positive_rate()</li>
+ <li>empty()</li>
+ <li>count()</li>
+ <li>insert(T)</li>
+ <li>insert(start, end)</li>
+ <li>probably_contains(T)</li>
+ <li>clear()</li>
+ <li>swap(bloom)</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>
+
+ <br/>
+
+ <a name="default_constructor"></a>
+ <div class="func_ref">
+ <div class="ref_listing"><code class="c_func">basic_bloom_filter</code>();</div>
+ <dl>
+ <dt>Description</dt>
+ <dd>Constructs a basic_bloom_filter object with all bits set to 0.</dd>
+ <dt>Complexity</dt>
+ <dd><span class="complexity">O(1)</span>.</dd>
+ </dl>
+ </div>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="../reference.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="dynamic_bloom.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_basic_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_basic_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Two-hash Basic Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">Size</code>,
+ <code class="c_type">size_t</code> <code class="c_id">HashValues</code> = 2,
+ <code class="c_type">size_t</code> <code class="c_id">ExpectedInsertionCount</code> = 0,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction1</code> = <code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction2</code> = <code class="c_type">murmurhash3</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_keyword">class</code> <code class="c_type">ExtensionFunction</code> = <code class="c_namespace">detail</code>::<code class="c_type">square</code>&gt;
+ <code class="c_keyword">class</code> <code class="c_type">twohash_basic_bloom_filter</code> {
+ <code class="c_comment">//* exported typedefs</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_namespace">std</code>::<code class="c_type">bitset&lt;Size&gt; bitset_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction1 hash_function1_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction2 hash_function2_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">ExtensionFunction extension_function_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">twohash_basic_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_id">Size</code>, <code class="c_id">HashValues</code>,
+ <code class="c_id">ExpectedInsertionCount</code>,
+ <code class="c_type">HashFunction1</code>, <code class="c_type">HashFunction2</code>,
+ <code class="c_type">ExtensionFunction</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">twohash_basic_bloom_filter</code>();
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">twohash_basic_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">twohash_basic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std</code>::<code class="c_type">initializer_list</code>&lt;<code class="c_type">T</code>&gt;&amp;);
+
+ <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">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">num_hash_functions</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">expected_insertion_count</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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bitset_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <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">twohash_basic_bloom_filter</code>&amp;);
+
+ <code class="c_comment">//* union/intersect </code>
+ <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp;);
+ <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_func">operator</code>&amp;=(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">twohash_basic_bloom_filter</code> <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">twohash_basic_bloom_filter</code> <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">twohash_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ </div>
+ <p>
+ A basic, stack-allocated Bloom filter implemented using the
+ two-hash technique.
+ It is best used when:
+ </p>
+ <ul>
+ <li>Storage requirements do not exceed stack space.</li>
+ <li>You wish to generate many hash functions conveniently.</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>Size</dt>
+ <dd>The number of bits to use for storage.</dd>
+ <dt>HashValues</dt>
+ <dd>The number of hash values to generate.</dd>
+ <dt>ExpectedInsertionCount</dt>
+ <dd>Currently unused. See here.</dd>
+ <dt>HashFunction1</dt>
+ <dd>The first hash function used to generate hash values.</dd>
+ <dt>HashFunction2</dt>
+ <dd>The second hash function used to generate hash values.</dd>
+ <dt>ExtensionFunction</dt>
+ <dd>A function that modifies hash values generated additively.</dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_counting_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_counting_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,198 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Twohash Counting Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">NumBins</code>,
+ <code class="c_type">size_t</code> <code class="c_id">BitsPerBin</code> = 4,
+ <code class="c_type">size_t</code> <code class="c_id">HashValues</code> = 2,
+ <code class="c_type">size_t</code> <code class="c_id">ExpectedInsertionCount</code> = 0,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction1</code> = <code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction2</code> = <code class="c_type">murmurhash3</code>&lt;<code class="c_type">T</code>&lt;,
+ <code class="c_keyword">class</code> <code class="c_type">ExtensionFunction</code> = <code class="c_namespace">detail</code>::<code class="c_type">square</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = <code class="c_type">size_t</code>&gt;
+ <code class="c_keyword">class</code> <code class="c_type">twohash_counting_bloom_filter</code> {
+
+ <code class="c_comment">//* template restrictions</code>
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_integral</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_str">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_unsigned</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_str">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_id">BitsPerBin</code> &gt; 0);
+ <code class="c_keyword">static_assert</code>( (<code class="c_id">BitsPerBin</code> &lt; (<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) ) );
+ <code class="c_keyword">static_assert</code>( ((<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) % <code class="c_id">BitsPerBin</code>) == 0);
+
+ <code class="c_comment">//* exported typedefs</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">HashFunction1 hash_function1_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction2 hash_function2_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">ExtensionFunction extension_function_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">twohash_counting_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_id">NumBins</code>, <code class="c_id">BitsPerBin</code>, <code class="c_id">HashValues</code>,
+ <code class="c_id">ExpectedInsertionCount</code>,
+ <code class="c_type">HashFunction1</code>, <code class="c_type">HashFunction2</code>,
+ <code class="c_type">ExtensionFunction</code>, <code class="c_type">Block</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_comment">// array_size = (NumBins * BitsPerBin) / (sizeof(Block) * 8) + 1</code>
+ <code class="c_keyword">typedef</code> <code class="c_namespace">boost</code>::<code class="c_type">array</code>&lt;<code class="c_type">Block</code>, <code class="c_id">array_size</code>&gt; <code class="c_type">bucket_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">iterator bucket_iterator</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">const_iterator bucket_const_iterator</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">twohash_counting_bloom_filter</code>();
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">twohash_counting_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">twohash_counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_namespace">std</code>::<code class="c_type">initializer_list</code>&amp;);
+
+ <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">num_bins</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">bits_per_bin</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">expected_insertion_count</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">bins_per_slot</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">mask</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">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">num_hash_functions</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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bucket_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">remove</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <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">twohash_counting_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">twohash_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ </div>
+ <p>
+ A counting Bloom filter implemented using the
+ two-hash technique.
+ It is best used when:
+ </p>
+ <ul>
+ <li>Storage requirements do not exceed stack space.</li>
+ <li>You wish to generate many hash values convieniently.</li>
+ <li>Element removal is necessary.</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>NumBins</dt>
+ <dd>The number of bins to use for storage.</dd>
+ <dt>BitsPerBin</dt>
+ <dd>The number of bits to use per bin.</dd>
+ <dt>HashValues</dt>
+ <dd>The number of hash values to generate.</dd>
+ <dt>ExpectedInsertionCount</dt>
+ <dd>Currently unused. See here.</dd>
+ <dt>HashFunction1</dt>
+ <dd>The first hash function used to generate hash values.</dd>
+ <dt>HashFunction2</dt>
+ <dd>The second hash function used to generate hash values.</dd>
+ <dt>ExtensionFunction</dt>
+ <dd>A function that modifies hash values generated additively.</dd>
+ <dt>Block</dt>
+ <dd>Used to determine the granularity of bit operations.</dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_dynamic_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_basic_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_basic_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,189 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Two-hash Dynamic Basic Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">HashValues</code> = 2,
+ <code class="c_type">size_t</code> <code class="c_id">ExpectedInsertionCount</code> = 0,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction1</code> = <code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_type">class</code> <code class="c_type">HashFunction2</code> = <code class="c_type">murmurhash3</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_keyword">class</code> <code class="c_type">ExtensionFunction</code> = <code class="c_namespace">detail</code>::<code class="c_type">square</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = <code class="c_type">size_t</code>,
+ <code class="c_keyword">class</code> <code class="c_type">Allocator</code> = <code class="c_namespace">std</code>::<code class="c_type">allocator</code>&lt;<code class="c_type">Block</code>&gt; &gt;
+ <code class="c_keyword">class</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code> {
+
+ <code class="c_comment">//* exported typedefs</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">Block block_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">Allocator allocator_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_namespace">boost</code>::<code class="c_type">dynamic_bitset</code>&lt;<code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">bitset_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction1 hash_function1_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction2 hash_function2_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">ExtensionFunction extension_function_type</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">twohash_dynamic_basic_bloom_filter</code>();
+ <code class="c_keyword">explicit</code> <code class="c_func">twohash_dynamic_basic_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">size</code>);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">twohash_dynamic_basic_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_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">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">expected_insertion_count</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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bitset_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputInterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">bool</code> <code class="c_func">probably_contains</code>() <code class="c_keyword">const</code>;
+
+ <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">twohash_dynamic_basic_bloom_filter</code>&amp;);
+
+ <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp;
+ <code class="c_func">operator|=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp;
+ <code class="c_func">operator&amp;=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp;
+ <code class="c_func">operator|</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp;
+ <code class="c_func">operator&amp;</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_basic_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ </div>
+ <p>
+ A basic, heap-allocated Bloom filter implemented using the
+ two-hash technique.
+ It is best used when:
+ </p>
+ <ul>
+ <li>Storage requirements exceed stack space.</li>
+ <li>You wish to generate many hash values conveniently.</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>HashValues</dt>
+ <dd>The number of hash values to generate.</dd>
+ <dt>ExpectedInsertionCount</dt>
+ <dd>Currently unused. See here.</dd>
+ <dt>HashFunction1</dt>
+ <dd>The first hash function used to generate hash values.</dd>
+ <dt>HashFunction2</dt>
+ <dd>The second hash function used to generate hash values.</dd>
+ <dt>ExtensionFunction</dt>
+ <dd>A function that modifies hash values generated additively.</dd>
+ <dt>Block</dt>
+ <dd>Used internally by the
+ <a href="http://www.boost.org/doc/libs/release/libs/dynamic_bitset/dynamic_bitset.html">
+ boost::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">
+ boost::dynamic_bitset</a></dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_basic_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="twohash_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</html>

Added: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_counting_bloom_filter.html
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/reference/twohash_dynamic_counting_bloom_filter.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -0,0 +1,199 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css"
+ href="../../../../../doc/src/boostbook.css"/>
+ <link rel="stylesheet" type="text/css" href="../style/my.css"/>
+
+ <title>Boost.BloomFilter</title>
+ </head>
+
+ <body>
+ <div class="header">
+ <img src="../../../../../boost.png" width="277" height="86"
+ alt="Boost C++ Libraries"/>
+ <p>
+ Home
+ Libraries
+ People
+ FAQ
+ More
+ </p>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="hash/default.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <h1>Twohash Dynamic Counting Bloom Filter</h1>
+ <div class="listing">
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">T</code>,
+ <code class="c_type">size_t</code> <code class="c_id">BitsPerBin</code> = 4,
+ <code class="c_type">size_t</code> <code class="c_id">HashValues</code> = 2,
+ <code class="c_type">size_t</code> <code class="c_id">ExpectedInsertionCount</code> = 0,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction1</code> = <code class="c_type">boost_hash</code>&lt;<code class="c_type">T</code>&gt;,
+ <code class="c_keyword">class</code> <code class="c_type">HashFunction2</code> = <code class="c_type">murmurhash3</code>&lt;<code class="c_type">T</code>&lt;,
+ <code class="c_keyword">class</code> <code class="c_type">ExtensionFunction</code> = <code class="c_namespace">detail</code>::<code class="c_type">square</code>,
+ <code class="c_keyword">typename</code> <code class="c_type">Block</code> = <code class="c_type">size_t</code>,
+ <code class="c_keyword">class</code> <code class="c_type">Allocator</code> = <code class="c_namespace">std</code>::<code class="c_type">allocator</code>&lt;<code class="c_type">Block</code>&gt; &gt;
+ <code class="c_keyword">class</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code> {
+
+ <code class="c_comment">//* template restrictions</code>
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_integral</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_str">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_namespace">boost</code>::<code class="c_namespace">is_unsigned</code>&lt;<code class="c_type">Block</code>&gt;::value == <code class="c_str">true</code>);
+ <code class="c_keyword">static_assert</code>( <code class="c_id">BitsPerBin</code> &gt; 0);
+ <code class="c_keyword">static_assert</code>( (<code class="c_id">BitsPerBin</code> &lt; (<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) ) );
+ <code class="c_keyword">static_assert</code>( ((<code class="c_keyword">sizeof</code>(<code class="c_type">Block</code>) * 8) % <code class="c_id">BitsPerBin</code>) == 0);
+
+ <code class="c_comment">//* exported typedefs</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">HashFunction1 hash_function1_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">HashFunction2 hash_function2_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">ExtensionFunction extension_function_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">Allocator allocator_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&lt;<code class="c_type">T</code>, <code class="c_id">BitsPerBin</code>, <code class="c_id">HashValues</code>,
+ <code class="c_id">ExpectedInsertionCount</code>,
+ <code class="c_type">HashFunction1</code>, <code class="c_type">HashFunction2</code>,
+ <code class="c_type">ExtensionFunction</code>, <code class="c_type">Block</code>,
+ <code class="c_type">Allocator</code>&gt; <code class="c_type">this_type</code>;
+
+ <code class="c_keyword">typedef</code> <code class="c_namespace">std</code>::<code class="c_type">vector</code>&lt;<code class="c_type">Block</code>, <code class="c_type">Allocator</code>&gt; <code class="c_type">bucket_type</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">iterator bucket_iterator</code>;
+ <code class="c_keyword">typedef</code> <code class="c_type">bucket_type</code>::<code class="c_type">const_iterator bucket_const_iterator</code>;
+
+ <code class="c_comment">//* constructors</code>
+ <code class="c_func">twohash_dynamic_counting_bloom_filter</code>();
+ <code class="c_keyword">explicit</code> <code class="c_func">twohash_dynamic_counting_bloom_filter</code>(<code class="c_keyword">const</code> <code class="c_type">size_t</code> <code class="c_id">num_bins</code>);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_func">twohash_dynamic_counting_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_type">size_t</code> <code class="c_func">num_bins</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">bits_per_bin</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">expected_insertion_count</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">bins_per_slot</code>();
+ <code class="c_keyword">static constexpr</code> <code class="c_type">size_t</code> <code class="c_func">mask</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_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>;
+ <code class="c_type">bool</code> <code class="c_func">empty</code>() <code class="c_keyword">const</code>;
+ <code class="c_keyword">const</code> <code class="c_type">bucket_type</code>&amp; <code class="c_func">data</code>() <code class="c_keyword">const</code>;
+
+ <code class="c_comment">//* data structures core ops</code>
+ <code class="c_type">void</code> <code class="c_func">insert</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">insert</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_type">void</code> <code class="c_func">remove</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <code class="c_keyword">template</code> &lt;<code class="c_keyword">typename</code> <code class="c_type">InputIterator</code>&gt;
+ <code class="c_type">void</code> <code class="c_func">remove</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_type">bool</code> <code class="c_func">probably_contains</code>(<code class="c_keyword">const</code> <code class="c_type">T</code>&amp;);
+
+ <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">twohash_dynamic_counting_bloom_filter</code>&amp;);
+ };
+
+ <code class="c_comment">//* global ops</code>
+ <code class="c_type">bool</code> <code class="c_func">operator==</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+ <code class="c_type">bool</code> <code class="c_func">operator!=</code>(<code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_keyword">const</code> <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ <code class="c_type">void</code> <code class="c_func">swap</code>(<code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">lhs</code>,
+ <code class="c_type">twohash_dynamic_counting_bloom_filter</code>&amp; <code class="c_id">rhs</code>);
+
+ </div>
+ <p>
+ A heap-allocated counting Bloom filter implemented using the
+ two-hash technique.
+ It is best used when:
+ </p>
+ <ul>
+ <li>Storage requirements may exceed stack space.</li>
+ <li>You wish to generate many hash values convieniently.</li>
+ <li>Element removal is necessary.</li>
+ </ul>
+
+ <h3>Template Parameters Reference</h3>
+ <div class="template_ref">
+ <dl>
+ <dt>T</dt>
+ <dd>The type used for all Bloom filter operations.</dd>
+ <dt>BitsPerBin</dt>
+ <dd>The number of bits to use per bin.</dd>
+ <dt>HashValues</dt>
+ <dd>The number of hash values to generate.</dd>
+ <dt>ExpectedInsertionCount</dt>
+ <dd>Currently unused. See here.</dd>
+ <dt>HashFunction1</dt>
+ <dd>The first hash function used to generate hash values.</dd>
+ <dt>HashFunction2</dt>
+ <dd>The second hash function used to generate hash values.</dd>
+ <dt>ExtensionFunction</dt>
+ <dd>A function that modifies hash values generated additively.</dd>
+ <dt>Block</dt>
+ <dd>Used to determine the granularity of bit operations.</dd>
+ <dt>Allocator</dt>
+ <dd>Memory allocator - passed to the std::vector.</dd>
+ </dl>
+ </div>
+
+ <hr/>
+
+ <div class="spirit-nav">
+ <a accesskey="p" href="twohash_dynamic_counting_bloom_filter.html">
+ <img src="../../../../../doc/src/images/prev.png" alt="Prev"/>
+ </a>
+ <a accesskey="u" href="../reference.html">
+ <img src="../../../../../doc/src/images/up.png" alt="Up"/>
+ </a>
+ <a accesskey="h" href="../index.html">
+ <img src="../../../../../doc/src/images/home.png" alt="Home"/>
+ </a>
+ <a accesskey="n" href="hash/default.html">
+ <img src="../../../../../doc/src/images/next.png" alt="Next"/>
+ </a>
+ </div>
+
+ <div>
+ <p class="copyright">
+ Copyright &#169; 2011
+ <a href="mailto:cpp.cabrera_at_[hidden]">Alejandro Cabrera</a>
+ </p>
+
+ <p class="copyright">
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file
+ LICENSE_1_0.txt or
+ copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </div>
+
+ </body>
+</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-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -24,7 +24,7 @@
 
     <hr/>
     <div class="spirit-nav">
- <a accesskey="p" href="reference/hash/murmurhash3.html">
+ <a accesskey="p" href="reference/functions.html">
         <img src="../../../../doc/src/images/prev.png" alt="Prev"/>
       </a>
       <a accesskey="h" href="index.html">
@@ -54,7 +54,7 @@
 
     <hr/>
     <div class="spirit-nav">
- <a accesskey="p" href="reference/hash/murmurhash3.html">
+ <a accesskey="p" href="reference/functions.html">
         <img src="../../../../doc/src/images/prev.png" alt="Prev"/>
       </a>
       <a accesskey="h" href="index.html">

Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/tutorial.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/tutorial.html (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/doc/html/tutorial.html 2011-08-20 22:27:00 EDT (Sat, 20 Aug 2011)
@@ -48,6 +48,7 @@
         <li>Querying Elements</li>
         <li>Removing Elements</li>
         <li>Intersections and Unions</li>
+ <li>Double-Hashing Schemes and Two-Hash Bloom Filters</li>
         <li>Tips & Best Practices</li>
       </ul>
     </div>
@@ -67,13 +68,20 @@
       Bloom filters also support the intersect and union operations.
       The intersection of two Bloom filters represents the elements
       that are in both bloom filters. The union of two Bloom filters
- represents the elements that are in either Bloom filter.
+ represents the elements that are in either Bloom filter. Counting
+ bloom filters do not support union and intersection operations.
     </p>
 
     <h3>Types of Bloom Filters Provided</h3>
     <ul>
- <li>Basic Bloom filter (basic_bloom_filter, dynamic_bloom_filter)</li>
- <li>Counting Bloom filter (counting_bloom_filter)</li>
+ <li>Basic Bloom filter (basic_bloom_filter,
+ dynamic_bloom_filter)</li>
+ <li>Counting Bloom filter (counting_bloom_filter,
+ dynamic_counting_bloom_filter)</li>
+ <li>Twohash basic Bloom filter (twohash_basic_bloom_filter,
+ twohash_dynamic_bloom_filter)</li>
+ <li>Twohash counting Bloom filter (twohash_counting_bloom_filter,
+ twohash_dynamic_counting_bloom_filter)</li>
     </ul>
 
     <hr/>


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