Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72180 - in sandbox/bloom_filter: branches/prototype branches/prototype/include branches/prototype/lib/murmurhash3 branches/prototype/test branches/v1.0 branches/v1.0/boost branches/v1.0/boost/bloom_filter branches/v1.0/boost/bloom_filter/detail branches/v1.0/libs branches/v1.0/libs/bloom_filter branches/v1.0/libs/bloom_filter/doc branches/v1.0/libs/bloom_filter/test trunk trunk/boost trunk/boost/bloom_filter trunk/boost/bloom_filter/detail trunk/include trunk/lib trunk/lib/murmurhash3 trunk/libs/bloom_filter/doc trunk/libs/bloom_filter/test trunk/test
From: cpp.cabrera_at_[hidden]
Date: 2011-05-26 09:17:53


Author: alejandro
Date: 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
New Revision: 72180
URL: http://svn.boost.org/trac/boost/changeset/72180

Log:
Reorganization. Moved old code to branch v1.0. Moved current code to trunk.
Added:
   sandbox/bloom_filter/branches/v1.0/
   sandbox/bloom_filter/branches/v1.0/boost/
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter.hpp
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/bloom_filter.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/bloom_filter.hpp
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/detail/
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/detail/default_hash.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/detail/default_hash.hpp
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/detail/internals.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/detail/internals.hpp
   sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/static_bloom_filter.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/static_bloom_filter.hpp
   sandbox/bloom_filter/branches/v1.0/libs/
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/doc/
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/doc/bloom_filter.rst (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/bloom_filter.rst
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/doc/index.html (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/index.html
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/Jamfile.v2 (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_equality_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_equality_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp
   sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_test.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_test.cpp
   sandbox/bloom_filter/trunk/README (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/README
   sandbox/bloom_filter/trunk/include/
   sandbox/bloom_filter/trunk/include/bloom.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/include/bloom.hpp
   sandbox/bloom_filter/trunk/include/hash.hpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/include/hash.hpp
   sandbox/bloom_filter/trunk/lib/
   sandbox/bloom_filter/trunk/lib/murmurhash3/
   sandbox/bloom_filter/trunk/lib/murmurhash3/MurmurHash3.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.cpp
   sandbox/bloom_filter/trunk/lib/murmurhash3/MurmurHash3.h (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.h
   sandbox/bloom_filter/trunk/test/
   sandbox/bloom_filter/trunk/test/makefile
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/test/makefile
   sandbox/bloom_filter/trunk/test/test_bloom.cpp (contents, props changed)
      - copied, changed from r71995, /sandbox/bloom_filter/branches/prototype/test/test_bloom.cpp
Removed:
   sandbox/bloom_filter/branches/prototype/README
   sandbox/bloom_filter/branches/prototype/include/bloom.hpp
   sandbox/bloom_filter/branches/prototype/include/hash.hpp
   sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.cpp
   sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.h
   sandbox/bloom_filter/branches/prototype/test/makefile
   sandbox/bloom_filter/branches/prototype/test/test_bloom.cpp
   sandbox/bloom_filter/trunk/boost/bloom_filter.hpp
   sandbox/bloom_filter/trunk/boost/bloom_filter/bloom_filter.hpp
   sandbox/bloom_filter/trunk/boost/bloom_filter/detail/default_hash.hpp
   sandbox/bloom_filter/trunk/boost/bloom_filter/detail/internals.hpp
   sandbox/bloom_filter/trunk/boost/bloom_filter/static_bloom_filter.hpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/bloom_filter.rst
   sandbox/bloom_filter/trunk/libs/bloom_filter/doc/index.html
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_equality_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp
   sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_test.cpp

Deleted: sandbox/bloom_filter/branches/prototype/README
==============================================================================
--- sandbox/bloom_filter/branches/prototype/README 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,14 +0,0 @@
-This prototype uses the public domain library MurmurHash3 to get its
-work done.
-
-To build:
-$> make
-
-To clean:
-$> make clean
-
-To run:
-$> ./test_bloom
-
--Alejandro Cabrera
-

Deleted: sandbox/bloom_filter/branches/prototype/include/bloom.hpp
==============================================================================
--- sandbox/bloom_filter/branches/prototype/include/bloom.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,121 +0,0 @@
-#ifndef _BLOOM_HPP
-#define _BLOOM_HPP 1
-/**
- * \author Alejandro Cabrera
- * \brief A generic Bloom filter providing compile-time unrolling
- * of hash function application.
- */
-#include <boost/config.hpp>
-#include <bitset>
-#include <tuple>
-#include "hash.hpp"
-
-template <size_t N,
- typename T,
- size_t Size,
- class HashFunctions>
-struct apply_hash
-{
- static void insert(const T& t, std::bitset<Size>& _bits) {
- typedef typename std::tuple_element<N, HashFunctions>::type Hash;
- _bits[Hash::hash(t) % Size] = true;
- apply_hash<N-1, T, Size, HashFunctions>::insert(t, _bits);
- }
-
- static bool contains(const T& t, const std::bitset<Size>& _bits) {
- typedef typename std::tuple_element<N, HashFunctions>::type Hash;
- return (_bits[Hash::hash(t) % Size] &&
- apply_hash<N-1, T, Size, HashFunctions>::contains(t, _bits));
- }
-};
-
-/**
- * \todo: clean up tuples here, as well
- */
-template <typename T,
- size_t Size,
- class HashFunctions>
-struct apply_hash<0, T, Size, HashFunctions>
-{
- static void insert(const T& t, std::bitset<Size>& _bits) {
- typedef typename std::tuple_element<0, HashFunctions>::type Hash;
- _bits[Hash::hash(t) % Size] = true;
- }
-
- static bool contains(const T& t, const std::bitset<Size>& _bits) {
- typedef typename std::tuple_element<0, HashFunctions>::type Hash;
- return (_bits[Hash::hash(t) % Size]);
- }
-};
-
-/**
- * \todo: clean-up use of tuple here. Not all compilers support std::tuple
- */
-template <typename T,
- size_t Size,
- class HashFunctions = std::tuple<MurmurHash3<T, 3>,
- MurmurHash3<T, 5>,
- MurmurHash3<T, 7> > >
-class bloom_filter {
- typedef std::bitset<Size> Bitset;
-
-public:
- bloom_filter() {}
-
- // \todo: need to add compiler check for constexpr
- BOOST_CONSTEXPR size_t size() const {
- return Size;
- }
-
- void insert(const T& t) {
- static const unsigned size = std::tuple_size<HashFunctions>::value - 1;
- apply_hash<size, T, Size, HashFunctions>::insert(t, bits);
- }
-
- bool contains(const T& t) const {
- static const unsigned size = std::tuple_size<HashFunctions>::value - 1;
- return apply_hash<size, T, Size, HashFunctions>::contains(t, bits);
- }
-
- bool operator[](const T& t) const {
- return this->contains(t);
- }
-
- void clear() {
- this->bits.reset();
- }
-
- // \todo: need to add compiler check for rvalue references
- bloom_filter(const bloom_filter&&);
- bloom_filter& operator=(const bloom_filter&& other);
-
- bloom_filter& operator|=(const bloom_filter& rhs) {
- this->bits |= rhs.bits;
- }
-
- bloom_filter& operator&=(const bloom_filter& rhs) {
- this->bits &= rhs.bits;
- }
-
- template<class _T, size_t _Size, class _HashFunctions>
- friend bloom_filter<_T, _Size, _HashFunctions>&
- operator|(const bloom_filter<_T, _Size, _HashFunctions>& lhs,
- const bloom_filter<_T, _Size, _HashFunctions>& rhs)
- {
- bloom_filter<_T, _Size, _HashFunctions> ret = lhs;
- return (ret |= rhs);
- }
-
- template<class _T, size_t _Size, class _HashFunctions>
- friend bloom_filter<_T, _Size, _HashFunctions>&
- operator&(const bloom_filter<_T, _Size, _HashFunctions>& lhs,
- const bloom_filter<_T, _Size, _HashFunctions>& rhs)
- {
- bloom_filter<_T, _Size, _HashFunctions> ret = lhs;
- return (ret &= rhs);
- }
-
-private:
- std::bitset<Size> bits;
-};
-#endif

Deleted: sandbox/bloom_filter/branches/prototype/include/hash.hpp
==============================================================================
--- sandbox/bloom_filter/branches/prototype/include/hash.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,104 +0,0 @@
-#ifndef _HASH_HPP_
-#define _HASH_HPP_ 1
-/**
- * \author Alejandro Cabrera
- * \brief An alternative implentation of murmurhash3 for users
- * not wishing to rely on the public domain Murmurhash3.
- * \todo Hash many more collisions than public domain version of murmurhash3.
- * \todo Provide 64-bit implementation of murmurhash3.
- */
-#include <cstdint>
-
-template <typename UnsignedIntT>
-inline UnsignedIntT rotl(const UnsignedIntT x, uint8_t r)
-{
- return (x << r) | (x >> (sizeof(UnsignedIntT) * 4 - r));
-}
-
-inline uint32_t rotl32(const uint32_t x, uint8_t r)
-{
- return rotl<uint32_t>(x,r);
-}
-
-inline uint64_t rotl64(const uint64_t x, uint8_t r)
-{
- return rotl<uint64_t>(x,r);
-}
-
-template <typename UnsignedIntT>
-inline UnsignedIntT get_block(const UnsignedIntT * p, const int i)
-{
- return p[i];
-}
-
-inline uint32_t fmix(uint32_t h)
-{
- h ^= h >> 16;
- h *= 0x85ebca6b;
- h ^= h >> 13;
- h *= 0xc2b2ae35;
- h ^= h >> 16;
-
- return h;
-}
-
-void murmurhash3(const void *const key, const int len,
- const uint32_t seed, void *out)
-{
- static const uint32_t c1 = 0xcc9e2d51;
- static const uint32_t c2 = 0x1b873593;
-
- const uint8_t *const data = static_cast<const uint8_t *const>(key);
-
- uint32_t h1 = seed;
- const uint32_t *const blocks =
- reinterpret_cast<const uint32_t *const >(data + len);
-
- for (int i = -(len/4); i; ++i) {
- uint32_t k1 = blocks[i];
-
- k1 *= c1;
- k1 = rotl32(k1, 15);
- k1 *= c2;
-
- h1 ^= k1;
- h1 = rotl32(h1, 13);
- h1 = h1*5 + 0xe6546b64;
- }
-
- const uint8_t *const tail =
- static_cast<const uint8_t *const>(data + len);
-
- uint32_t k1 = 0;
-
- switch (len & 3) {
- case 3:
- k1 ^= tail[2] << 16;
- case 2:
- k1 ^= tail[1] << 8;
- case 1:
- k1 ^= tail[0];
- k1 *= c1;
- k1 = rotl32(k1, 16);
- k1 *= c2;
- h1 ^= k1;
- }
-
- h1 ^= len;
- h1 = fmix(h1);
-
- *static_cast<uint32_t *>(out) = h1;
-}
-
-template <typename T, size_t Seed>
-struct MurmurHash3 {
- static size_t hash(const T& t) {
- size_t out = 0;
- murmurhash3(static_cast<const void *const>(&t),
- sizeof(t),
- Seed,
- &out);
- return out;
- }
-};
-#endif

Deleted: sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.cpp
==============================================================================
--- sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,335 +0,0 @@
-//-----------------------------------------------------------------------------
-// MurmurHash3 was written by Austin Appleby, and is placed in the public
-// domain. The author hereby disclaims copyright to this source code.
-
-// Note - The x86 and x64 versions do _not_ produce the same results, as the
-// algorithms are optimized for their respective platforms. You can still
-// compile and run any of them on any platform, but your performance with the
-// non-native version will be less than optimal.
-
-#include "MurmurHash3.h"
-
-//-----------------------------------------------------------------------------
-// Platform-specific functions and macros
-
-// Microsoft Visual Studio
-
-#if defined(_MSC_VER)
-
-#define FORCE_INLINE __forceinline
-
-#include <stdlib.h>
-
-#define ROTL32(x,y) _rotl(x,y)
-#define ROTL64(x,y) _rotl64(x,y)
-
-#define BIG_CONSTANT(x) (x)
-
-// Other compilers
-
-#else // defined(_MSC_VER)
-
-#define FORCE_INLINE __attribute__((always_inline))
-
-inline uint32_t rotl32 ( uint32_t x, int8_t r )
-{
- return (x << r) | (x >> (32 - r));
-}
-
-inline uint64_t rotl64 ( uint64_t x, int8_t r )
-{
- return (x << r) | (x >> (64 - r));
-}
-
-#define ROTL32(x,y) rotl32(x,y)
-#define ROTL64(x,y) rotl64(x,y)
-
-#define BIG_CONSTANT(x) (x##LLU)
-
-#endif // !defined(_MSC_VER)
-
-//-----------------------------------------------------------------------------
-// Block read - if your platform needs to do endian-swapping or can only
-// handle aligned reads, do the conversion here
-
-FORCE_INLINE uint32_t getblock ( const uint32_t * p, int i )
-{
- return p[i];
-}
-
-FORCE_INLINE uint64_t getblock ( const uint64_t * p, int i )
-{
- return p[i];
-}
-
-//-----------------------------------------------------------------------------
-// Finalization mix - force all bits of a hash block to avalanche
-
-FORCE_INLINE uint32_t fmix ( uint32_t h )
-{
- h ^= h >> 16;
- h *= 0x85ebca6b;
- h ^= h >> 13;
- h *= 0xc2b2ae35;
- h ^= h >> 16;
-
- return h;
-}
-
-//----------
-
-FORCE_INLINE uint64_t fmix ( uint64_t k )
-{
- k ^= k >> 33;
- k *= BIG_CONSTANT(0xff51afd7ed558ccd);
- k ^= k >> 33;
- k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53);
- k ^= k >> 33;
-
- return k;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_32 ( const void * key, int len,
- uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 4;
-
- uint32_t h1 = seed;
-
- uint32_t c1 = 0xcc9e2d51;
- uint32_t c2 = 0x1b873593;
-
- //----------
- // body
-
- const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);
-
- for(int i = -nblocks; i; i++)
- {
- uint32_t k1 = getblock(blocks,i);
-
- k1 *= c1;
- k1 = ROTL32(k1,15);
- k1 *= c2;
-
- h1 ^= k1;
- h1 = ROTL32(h1,13);
- h1 = h1*5+0xe6546b64;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*4);
-
- uint32_t k1 = 0;
-
- switch(len & 3)
- {
- case 3: k1 ^= tail[2] << 16;
- case 2: k1 ^= tail[1] << 8;
- case 1: k1 ^= tail[0];
- k1 *= c1; k1 = ROTL32(k1,16); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len;
-
- h1 = fmix(h1);
-
- *(uint32_t*)out = h1;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_128 ( const void * key, const int len,
- uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 16;
-
- uint32_t h1 = seed;
- uint32_t h2 = seed;
- uint32_t h3 = seed;
- uint32_t h4 = seed;
-
- uint32_t c1 = 0x239b961b;
- uint32_t c2 = 0xab0e9789;
- uint32_t c3 = 0x38b34ae5;
- uint32_t c4 = 0xa1e38b93;
-
- //----------
- // body
-
- const uint32_t * blocks = (const uint32_t *)(data + nblocks*16);
-
- for(int i = -nblocks; i; i++)
- {
- uint32_t k1 = getblock(blocks,i*4+0);
- uint32_t k2 = getblock(blocks,i*4+1);
- uint32_t k3 = getblock(blocks,i*4+2);
- uint32_t k4 = getblock(blocks,i*4+3);
-
- k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
-
- h1 = ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b;
-
- k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2;
-
- h2 = ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747;
-
- k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3;
-
- h3 = ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35;
-
- k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4;
-
- h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*16);
-
- uint32_t k1 = 0;
- uint32_t k2 = 0;
- uint32_t k3 = 0;
- uint32_t k4 = 0;
-
- switch(len & 15)
- {
- case 15: k4 ^= tail[14] << 16;
- case 14: k4 ^= tail[13] << 8;
- case 13: k4 ^= tail[12] << 0;
- k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4;
-
- case 12: k3 ^= tail[11] << 24;
- case 11: k3 ^= tail[10] << 16;
- case 10: k3 ^= tail[ 9] << 8;
- case 9: k3 ^= tail[ 8] << 0;
- k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3;
-
- case 8: k2 ^= tail[ 7] << 24;
- case 7: k2 ^= tail[ 6] << 16;
- case 6: k2 ^= tail[ 5] << 8;
- case 5: k2 ^= tail[ 4] << 0;
- k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2;
-
- case 4: k1 ^= tail[ 3] << 24;
- case 3: k1 ^= tail[ 2] << 16;
- case 2: k1 ^= tail[ 1] << 8;
- case 1: k1 ^= tail[ 0] << 0;
- k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len;
-
- h1 += h2; h1 += h3; h1 += h4;
- h2 += h1; h3 += h1; h4 += h1;
-
- h1 = fmix(h1);
- h2 = fmix(h2);
- h3 = fmix(h3);
- h4 = fmix(h4);
-
- h1 += h2; h1 += h3; h1 += h4;
- h2 += h1; h3 += h1; h4 += h1;
-
- ((uint32_t*)out)[0] = h1;
- ((uint32_t*)out)[1] = h2;
- ((uint32_t*)out)[2] = h3;
- ((uint32_t*)out)[3] = h4;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x64_128 ( const void * key, const int len,
- const uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 16;
-
- uint64_t h1 = seed;
- uint64_t h2 = seed;
-
- uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
- uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
-
- //----------
- // body
-
- const uint64_t * blocks = (const uint64_t *)(data);
-
- for(int i = 0; i < nblocks; i++)
- {
- uint64_t k1 = getblock(blocks,i*2+0);
- uint64_t k2 = getblock(blocks,i*2+1);
-
- k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1;
-
- h1 = ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729;
-
- k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2;
-
- h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*16);
-
- uint64_t k1 = 0;
- uint64_t k2 = 0;
-
- switch(len & 15)
- {
- case 15: k2 ^= uint64_t(tail[14]) << 48;
- case 14: k2 ^= uint64_t(tail[13]) << 40;
- case 13: k2 ^= uint64_t(tail[12]) << 32;
- case 12: k2 ^= uint64_t(tail[11]) << 24;
- case 11: k2 ^= uint64_t(tail[10]) << 16;
- case 10: k2 ^= uint64_t(tail[ 9]) << 8;
- case 9: k2 ^= uint64_t(tail[ 8]) << 0;
- k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2;
-
- case 8: k1 ^= uint64_t(tail[ 7]) << 56;
- case 7: k1 ^= uint64_t(tail[ 6]) << 48;
- case 6: k1 ^= uint64_t(tail[ 5]) << 40;
- case 5: k1 ^= uint64_t(tail[ 4]) << 32;
- case 4: k1 ^= uint64_t(tail[ 3]) << 24;
- case 3: k1 ^= uint64_t(tail[ 2]) << 16;
- case 2: k1 ^= uint64_t(tail[ 1]) << 8;
- case 1: k1 ^= uint64_t(tail[ 0]) << 0;
- k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len; h2 ^= len;
-
- h1 += h2;
- h2 += h1;
-
- h1 = fmix(h1);
- h2 = fmix(h2);
-
- h1 += h2;
- h2 += h1;
-
- ((uint64_t*)out)[0] = h1;
- ((uint64_t*)out)[1] = h2;
-}
-
-//-----------------------------------------------------------------------------
-

Deleted: sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.h
==============================================================================
--- sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.h 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,37 +0,0 @@
-//-----------------------------------------------------------------------------
-// MurmurHash3 was written by Austin Appleby, and is placed in the public
-// domain. The author hereby disclaims copyright to this source code.
-
-#ifndef _MURMURHASH3_H_
-#define _MURMURHASH3_H_
-
-//-----------------------------------------------------------------------------
-// Platform-specific functions and macros
-
-// Microsoft Visual Studio
-
-#if defined(_MSC_VER)
-
-typedef unsigned char uint8_t;
-typedef unsigned long uint32_t;
-typedef unsigned __int64 uint64_t;
-
-// Other compilers
-
-#else // defined(_MSC_VER)
-
-#include <stdint.h>
-
-#endif // !defined(_MSC_VER)
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out );
-
-void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out );
-
-void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out );
-
-//-----------------------------------------------------------------------------
-
-#endif // _MURMURHASH3_H_

Deleted: sandbox/bloom_filter/branches/prototype/test/makefile
==============================================================================
--- sandbox/bloom_filter/branches/prototype/test/makefile 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,14 +0,0 @@
-CXXFLAGS := -Wall -Wextra -pedantic -std=c++0x -O3 -g
-ST_LIBS := ../lib/murmurhash3/MurmurHash3.o
-INCLUDE_DIR := ../include
-INCLUDES := $(INCLUDE_DIR)/bloom.hpp $(INCLUDE_DIR)/hash.hpp
-all : test_bloom
-
-%.o : %.cpp $(INCLUDES)
- $(CXX) $(CXXFLAGS) -c $<
-
-test_bloom : test_bloom.o $(INCLUDES)
- $(CXX) $(CXXFLAGS) -o $@ $< $(ST_LIBS)
-
-clean:
- rm -f *.o test_bloom

Deleted: sandbox/bloom_filter/branches/prototype/test/test_bloom.cpp
==============================================================================
--- sandbox/bloom_filter/branches/prototype/test/test_bloom.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,48 +0,0 @@
-#include <iostream>
-#include "../lib/murmurhash3/MurmurHash3.h"
-#include "../include/bloom.hpp"
-
-typedef int BloomType;
-
-template <typename T, size_t Seed>
-struct OHash {
- static size_t hash(const T& t) {
- size_t out = 0;
- MurmurHash3_x86_32(static_cast<const void *const>(&t),
- sizeof(t),
- Seed,
- &out);
- return out;
- }
-};
-
-typedef std::tuple<OHash<BloomType, 2>,
- OHash<BloomType, 3>,
- OHash<BloomType, 5>,
- OHash<BloomType, 7>,
- OHash<BloomType, 11>,
- OHash<BloomType, 13>,
- OHash<BloomType, 17>,
- OHash<BloomType, 19>> EightHashFunctions_O;
-
-//typedef std::tuple<MurmurHash3<BloomType, 19>> SingleHashFunction;
-
-int main()
-{
- static const BloomType INSERT_VAL = 100;
- static const size_t SEARCH_SPACE = 10000000;
- static const size_t FILTER_SIZE = 64;
- size_t collisions = 0;
- bloom_filter<BloomType, FILTER_SIZE, EightHashFunctions_O> bloom;
-
- std::cout << "bloom size " << sizeof(bloom) << std::endl;
- bloom.insert(INSERT_VAL);
- for (size_t i = 0; i < SEARCH_SPACE; ++i) {
- if (bloom[i] && i != INSERT_VAL) ++collisions;
- }
-
- std::cout << collisions << " collisions" << std::endl;
- bloom.clear();
-
- return 0;
-}

Copied: sandbox/bloom_filter/branches/v1.0/boost/bloom_filter.hpp (from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter.hpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/bloom_filter.hpp (from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/bloom_filter.hpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/detail/default_hash.hpp (from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/detail/default_hash.hpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/detail/internals.hpp (from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/detail/internals.hpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/boost/bloom_filter/static_bloom_filter.hpp (from r71995, /sandbox/bloom_filter/trunk/boost/bloom_filter/static_bloom_filter.hpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/doc/bloom_filter.rst (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/bloom_filter.rst)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/doc/index.html (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/doc/index.html)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/Jamfile.v2 (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_equality_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_equality_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/branches/v1.0/libs/bloom_filter/test/static_bloom_filter_test.cpp (from r71995, /sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_test.cpp)
==============================================================================

Copied: sandbox/bloom_filter/trunk/README (from r71995, /sandbox/bloom_filter/branches/prototype/README)
==============================================================================

Deleted: sandbox/bloom_filter/trunk/boost/bloom_filter.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,13 +0,0 @@
-#ifndef BOOST_BLOOM_FILTER_20090609_0
-#define BOOST_BLOOM_FILTER_20090609_0
-
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter/static_bloom_filter.hpp>
-#include <boost/bloom_filter/bloom_filter.hpp>
-
-#endif
-

Deleted: sandbox/bloom_filter/trunk/boost/bloom_filter/bloom_filter.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/bloom_filter.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,110 +0,0 @@
-#ifndef BLOOM_FILTER_20090610_0
-#define BLOOM_FILTER_20090610_0
-
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/dynamic_bitset.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_const.hpp>
-
-#include <boost/fusion/algorithm/iteration/for_each.hpp>
-#include <boost/fusion/include/for_each.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/include/vector.hpp>
-#include <boost/bloom_filter/detail/internals.hpp>
-
-namespace boost {
-
- namespace bloom_filters {
-
- template <
- class Input,
- class HashFunctions = fusion::vector<
- detail::default_hash<0>,
- detail::default_hash<1>,
- detail::default_hash<2>
- >,
- class Block = unsigned char,
- class Allocator = std::allocator<unsigned char>
- >
- struct bloom_filter : protected detail::internals<Input, dynamic_bitset<Block,Allocator> > {
- public:
- typedef dynamic_bitset<Block, Allocator> bitset_type;
-
- private:
- bitset_type bit_set;
- HashFunctions hash_functions;
-
- typedef typename add_reference<typename add_const<Input>::type>::type const_ref;
- typedef detail::internals<Input, dynamic_bitset<Block,Allocator> > base;
-
- public:
- bloom_filter(
- size_t size,
- HashFunctions const & functions = HashFunctions())
- : bit_set(size, 0), hash_functions(functions)
- {}
-
- bloom_filter(bloom_filter const & other)
- : bit_set(other.bit_set), hash_functions(other.hash_functions)
- {}
-
- bloom_filter & operator= (bloom_filter rhs) {
- return rhs.swap(*this);
- }
-
- bloom_filter & swap(bloom_filter & other) {
- using std::swap;
- swap(bit_set, other.bit_set);
- swap(hash_functions, other.hash_functions);
- return *this;
- }
-
- void insert(const_ref input) {
- using fusion::for_each;
- typedef typename base::insert_impl inserter;
- for_each(
- hash_functions,
- inserter(bit_set, input)
- );
- }
-
- bool contains(const_ref input) const {
- using fusion::for_each;
- typedef typename base::contains_impl contains_checker;
- bool found = true;
- for_each(
- hash_functions,
- contains_checker(bit_set, input, found)
- );
- return found;
- }
-
- bool operator==(bloom_filter const & other) const {
- return bit_set == other.bit_set;
- }
-
- bool operator!=(bloom_filter const & other) const {
- return !(*this == other);
- }
- };
-
- template <class Input, class HashFunctions, class Block, class Allocator>
- inline void swap(
- bloom_filter<Input, HashFunctions, Block, Allocator> & left,
- bloom_filter<Input, HashFunctions, Block, Allocator> & right
- ) {
- left.swap(right);
- }
-
- } // namespace bloom_filters
-
- using bloom_filters::bloom_filter;
-
-} // namespace boost
-
-#endif
-

Deleted: sandbox/bloom_filter/trunk/boost/bloom_filter/detail/default_hash.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/detail/default_hash.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,32 +0,0 @@
-#ifndef BOOST_BLOOM_FILTER_DETAIL_DEFAULT_HASH_20090609_0
-#define BOOST_BLOOM_FILTER_DETAIL_DEFAULT_HASH_20090609_0
-
-#include <string>
-#include <boost/functional/hash.hpp>
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/add_reference.hpp>
-
-namespace boost {
-
- namespace bloom_filters {
-
- namespace detail {
-
- template <size_t Seed = 0>
- struct default_hash {
- template <class T>
- size_t operator() (T const & input) const {
- size_t seed = Seed;
- hash_combine(seed, input);
- return seed;
- }
- };
-
- } // namespace detail
-
- } // namespace bloom_filters
-
-} // namespace boost
-
-#endif
-

Deleted: sandbox/bloom_filter/trunk/boost/bloom_filter/detail/internals.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/detail/internals.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,57 +0,0 @@
-#ifndef BLOOM_FILTER_INTERNALS_20090610_0
-#define BLOOM_FILTER_INTERNALS_20090610_0
-
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_const.hpp>
-
-namespace boost {
-
- namespace bloom_filters {
-
- namespace detail {
-
- template <class Input, class BitSet>
- class internals {
- protected:
- typedef BitSet bitset_type;
- typedef typename add_reference<typename add_const<Input>::type>::type const_ref;
-
- struct insert_impl {
- bitset_type & bit_set_;
- const_ref input_;
- insert_impl(bitset_type & bit_set, const_ref input)
- : bit_set_(bit_set), input_(input)
- {}
- template <class F>
- void operator()(F const & f) const {
- bit_set_[f(input_) % bit_set_.size()] = true;
- }
- };
-
- struct contains_impl {
- bitset_type const & bit_set_;
- const_ref input_;
- bool & result_;
- contains_impl(bitset_type const & bit_set, const_ref input, bool & result)
- : bit_set_(bit_set), input_(input), result_(result)
- {}
- template <class F>
- void operator()(F const & f) const {
- result_ = result_ && bit_set_[f(input_) % bit_set_.size()];
- }
- };
-
- };
-
- } // namespace detail
-
- } // namespace bloom_filters
-
-} // namespace boost
-
-#endif

Deleted: sandbox/bloom_filter/trunk/boost/bloom_filter/static_bloom_filter.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/static_bloom_filter.hpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,137 +0,0 @@
-#ifndef STATIC_BLOOM_FILTER_20090608_0
-#define STATIC_BLOOM_FILTER_20090608_0
-
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <bitset>
-#include <boost/array.hpp>
-#include <boost/function.hpp>
-
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/include/vector.hpp>
-#include <boost/fusion/algorithm/iteration/for_each.hpp>
-#include <boost/fusion/include/for_each.hpp>
-#include <boost/bloom_filter/detail/default_hash.hpp>
-#include <boost/bloom_filter/detail/internals.hpp>
-
-namespace boost {
-
- namespace bloom_filters {
-
- template <
- class Input,
- size_t M,
- class HashFunctions = fusion::vector<
- detail::default_hash<0>,
- detail::default_hash<1>,
- detail::default_hash<2>
- >
- >
- struct static_bloom_filter : protected detail::internals<Input, std::bitset<M> > {
- public:
- typedef std::bitset<M> bitset_type;
-
- private:
- bitset_type bit_set;
- HashFunctions hash_functions;
-
- typedef typename add_reference<typename add_const<Input>::type>::type const_ref;
- typedef detail::internals<Input, std::bitset<M> > base;
-
- struct insert_impl {
- bitset_type & bit_set_;
- };
-
- public:
- static size_t const size = M;
- typedef Input element_type;
-
- static_bloom_filter(
- bitset_type const & initial_state = bitset_type(),
- HashFunctions const & hash_functions = HashFunctions())
- : bit_set(initial_state), hash_functions(hash_functions)
- {}
-
- explicit static_bloom_filter(
- HashFunctions const & hash_functions
- )
- : bit_set(), hash_functions(hash_functions)
- {}
-
- static_bloom_filter(static_bloom_filter const & other) :
- bit_set(other.bit_set), hash_functions(other.hash_functions) {}
-
- static_bloom_filter & operator=(static_bloom_filter rhs) {
- rhs.swap(*this);
- return *this;
- }
-
- static_bloom_filter & swap(static_bloom_filter & other) {
- using std::swap;
- swap(bit_set, other.bit_set);
- swap(hash_functions, other.hash_functions);
- return *this;
- }
-
- void insert(const_ref input) {
- using fusion::for_each;
- typedef typename base::insert_impl inserter;
- for_each(
- hash_functions,
- inserter(bit_set, input)
- );
- }
-
- bool contains(const_ref input) const {
- using fusion::for_each;
- typedef typename base::contains_impl contains_checker;
- bool found = true;
- for_each(
- hash_functions,
- contains_checker(bit_set, input, found)
- );
- return found;
- }
-
- bool operator[](const_ref input) const {
- return contains(input);
- }
-
- static_bloom_filter & clear() {
- bit_set.reset();
- return *this;
- }
-
- bitset_type const & state() const {
- return bit_set;
- }
-
- bool operator== (static_bloom_filter const & other) const {
- return bit_set == other.bit_set;
- }
-
- bool operator!= (static_bloom_filter const & other) const {
- return !(*this == other);
- }
- };
-
- template <class Input, size_t M, class HashFunctions>
- inline void swap(
- static_bloom_filter<Input, M, HashFunctions> & left,
- static_bloom_filter<Input, M, HashFunctions> & right) {
- left.swap(right);
- }
-
- } // namespce bloom_filters
-
- using bloom_filters::static_bloom_filter;
-
-} // namespace boost
-
-#endif
-

Copied: sandbox/bloom_filter/trunk/include/bloom.hpp (from r71995, /sandbox/bloom_filter/branches/prototype/include/bloom.hpp)
==============================================================================

Copied: sandbox/bloom_filter/trunk/include/hash.hpp (from r71995, /sandbox/bloom_filter/branches/prototype/include/hash.hpp)
==============================================================================

Copied: sandbox/bloom_filter/trunk/lib/murmurhash3/MurmurHash3.cpp (from r71995, /sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.cpp)
==============================================================================

Copied: sandbox/bloom_filter/trunk/lib/murmurhash3/MurmurHash3.h (from r71995, /sandbox/bloom_filter/branches/prototype/lib/murmurhash3/MurmurHash3.h)
==============================================================================

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/bloom_filter.rst
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/bloom_filter.rst 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,116 +0,0 @@
-:Authors:
- Dean Michael Berris <mikhailberis_at_[hidden]>
-
-:Version:
- 0.1 of 2009/06/08
-
-:License:
- Distributed under the Boost Software License
- (See accompanying LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-
-==================
-Boost.Bloom_filter
-==================
-
-From http://en.wikipedia.org/wiki/Bloom_filter ::
-
- A Bloom Filter is a space-efficient probabilistic data structure
- that is used to test whether an element is a member of a set. False
- positives are possible but false negatives are not. Elements can be
- added to the set, but not removed. The more that are added to the
- set, the larger the probability of false positives.
-
-Boost.Bloom_filter is a generic implementation of a Bloom Filter that uses
-a variable number of bits to represent a generic bloom filter that takes a
-configurable input type and a configurable number of hash functions. Bloom
-Filters work by using multiple hash functions to determine the membership
-of an element in the represented set.
-
-For instance, we can use a Bloom Filter to maintain a set of URLs that have
-been cached by a caching web proxy. Instead of storing every possible URL,
-we use a Bloom Filter to mark certain parts of a bit field as '1' for every
-location that a set of hash functions returns. As an example, consider the
-empty 32-bit bitset representing a Bloom Filter below::
-
- 00000000000000000000000000000000
-
-From here, we then have for instance three (3) hash functions that when we
-feed a URL will return numbers from [0..31]. Let's say when we hash the
-string 'http://www.boost.org' we get the three indexes ``(0,9,15)``. Our
-bitset will then look like::
-
- 10000000010000010000000000000000
-
-To find out whether we've encountered a certain URL before, we simply pass
-the URL to the same three hash functions. If we see that all the positions
-returned by the three hash functions are all ``1``, then we might have seen
-the URL before -- this is called a false positive. In the case of a caching
-web proxy this shouldn't be a problem because if it really hasn't gotten it
-yet, it's just going to fetch it again accordingly (and update the Bloom
-Filter after that). This matters when you have a hierarchical network of
-web cache proxies that need to know where a page may have been cached before.
-Sharing these bloom filters across the nodes of the network allows for
-optimizing for the case when you may have already cached a page before.
-
-This also applies when writing distributed filesystems where you may have a
-system of multi-layer caches. Sharing the bloom filters of the pages that may
-have already been accessed (read) by nearby storage/retrieval nodes that have
-these pages cached minimizes the number of times a page that has already been
-retrieved before will have to be retrieved again across the network. In these
-situations you may be able to tolerate false positives but would rather not
-have false negatives -- meaning data you haven't ever accessed before would
-not be available in the caches and therefore will need to be fetched again.
-
-Synopsis
---------
-
-A `bloom_filter` is a template class which takes three parameters:
-
-Input
- The type of the elements contained in a bloom filter.
-M
- The number of bits contained by the internal bitset.
-K
- The number of hash functions used by the bloom filter.
-
-To use a `bloom_filter` that maintains a set of integers using 256 bits and
-two hash functions, we could have the following code listing::
-
- #include <boost/bloom_filter.hpp>
-
- ...
-
- using boost::bloom_filter;
- using boost::array;
- using boost::function;
-
- ...
-
- array<function<size_t(int)>, 2> hash_array;
- hash_array[0] = hash1;
- hash_array[1] = hash2;
- bloom_filter<int, 256, 2> integers(hash_array);
-
-Here we first create a Boost.Array of two Boost.Functions that we then use
-to construct the `bloom_filter`. In this code listing we are then able to
-insert new integers into the set by simply doing::
-
- integers.insert(1);
- integers.insert(7);
- integers.insert(5);
-
-We are also then able to check whether certain integers are part of the set.
-Remember that in Bloom Filters, there is a possibility of getting false
-positives::
-
- integers.contains(1); // should be true
- integers.contains(9); // may be true or false
- integers[5]; // should be true
-
-Reference
----------
-
-* Bloom Filter (Wikipedia Entry) http://en.wikipedia.org/wiki/Bloom_filter
-
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/doc/index.html
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/doc/index.html 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,407 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
-<title></title>
-<meta name="authors" content="Dean Michael Berris &lt;mikhailberis&#64;gmail.com&gt;" />
-<style type="text/css">
-
-/*
-:Author: David Goodger (goodger_at_[hidden])
-:Id: $Id: html4css1.css 5196 2007-06-03 20:25:28Z wiemann $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0 }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
-
-.last, .with-subtitle {
- margin-bottom: 0 ! important }
-
-.hidden {
- display: none }
-
-a.toc-backref {
- text-decoration: none ;
- color: black }
-
-blockquote.epigraph {
- margin: 2em 5em ; }
-
-dl.docutils dd {
- margin-bottom: 0.5em }
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
- font-weight: bold }
-*/
-
-div.abstract {
- margin: 2em 5em }
-
-div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
-*/
-
-div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
-
-div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
-
-div.figure {
- margin-left: 2em ;
- margin-right: 2em }
-
-div.footer, div.header {
- clear: both;
- font-size: smaller }
-
-div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
-
-div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
-
-div.sidebar {
- margin: 0 0 0.5em 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
-
-div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
-
-div.system-messages {
- margin: 5em }
-
-div.system-messages h1 {
- color: red }
-
-div.system-message {
- border: medium outset ;
- padding: 1em }
-
-div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
-
-div.topic {
- margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
-
-h1.title {
- text-align: center }
-
-h2.subtitle {
- text-align: center }
-
-hr.docutils {
- width: 75% }
-
-img.align-left {
- clear: left }
-
-img.align-right {
- clear: right }
-
-ol.simple, ul.simple {
- margin-bottom: 1em }
-
-ol.arabic {
- list-style: decimal }
-
-ol.loweralpha {
- list-style: lower-alpha }
-
-ol.upperalpha {
- list-style: upper-alpha }
-
-ol.lowerroman {
- list-style: lower-roman }
-
-ol.upperroman {
- list-style: upper-roman }
-
-p.attribution {
- text-align: right ;
- margin-left: 50% }
-
-p.caption {
- font-style: italic }
-
-p.credits {
- font-style: italic ;
- font-size: smaller }
-
-p.label {
- white-space: nowrap }
-
-p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
-
-p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
-
-p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
-
-p.topic-title {
- font-weight: bold }
-
-pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font-family: serif ;
- font-size: 100% }
-
-pre.literal-block, pre.doctest-block {
- margin-left: 2em ;
- margin-right: 2em }
-
-span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
-
-span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
-
-span.interpreted {
- font-family: sans-serif }
-
-span.option {
- white-space: nowrap }
-
-span.pre {
- white-space: pre }
-
-span.problematic {
- color: red }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
-
-table.docinfo {
- margin: 2em 4em }
-
-table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
-
-table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
-
-ul.auto-toc {
- list-style-type: none }
-
-</style>
-</head>
-<body>
-<div class="document">
-
-<table class="docinfo" frame="void" rules="none">
-<col class="docinfo-name" />
-<col class="docinfo-content" />
-<tbody valign="top">
-<tr><th class="docinfo-name">Authors:</th>
-<td>Dean Michael Berris &lt;mikhailberis&#64;gmail.com&gt;</td></tr>
-<tr><th class="docinfo-name">Version:</th>
-<td>0.1 of 2009/06/08</td></tr>
-<tr class="field"><th class="docinfo-name">License:</th><td class="field-body">Distributed under the Boost Software License
-(See accompanying LICENSE_1_0.txt or copy at
-<a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</td>
-</tr>
-</tbody>
-</table>
-<div class="section" id="boost-bloom-filter">
-<h1>Boost.Bloom_filter</h1>
-<p>From <a class="reference external" href="
http://en.wikipedia.org/wiki/Bloom_filter">http://en.wikipedia.org/wiki/Bloom_filter></p>
-<pre class="literal-block">
-A Bloom Filter is a space-efficient probabilistic data structure
-that is used to test whether an element is a member of a set. False
-positives are possible but false negatives are not. Elements can be
-added to the set, but not removed. The more that are added to the
-set, the larger the probability of false positives.
-</pre>
-<p>Boost.Bloom_filter is a generic implementation of a Bloom Filter that uses
-a variable number of bits to represent a generic bloom filter that takes a
-configurable input type and a configurable number of hash functions. Bloom
-Filters work by using multiple hash functions to determine the membership
-of an element in the represented set.</p>
-<p>For instance, we can use a Bloom Filter to maintain a set of URLs that have
-been cached by a caching web proxy. Instead of storing every possible URL,
-we use a Bloom Filter to mark certain parts of a bit field as '1' for every
-location that a set of hash functions returns. As an example, consider the
-empty 32-bit bitset representing a Bloom Filter below:</p>
-<pre class="literal-block">
-00000000000000000000000000000000
-</pre>
-<p>From here, we then have for instance three (3) hash functions that when we
-feed a URL will return numbers from [0..31]. Let's say when we hash the
-string '<a class="reference external" href="
http://www.boost.org">http://www.boost.org>' we get the three indexes <tt class="docutils literal"><span class="pre">(0,9,15)</span></tt>. Our
-bitset will then look like:</p>
-<pre class="literal-block">
-10000000010000010000000000000000
-</pre>
-<p>To find out whether we've encountered a certain URL before, we simply pass
-the URL to the same three hash functions. If we see that all the positions
-returned by the three hash functions are all <tt class="docutils literal"><span class="pre">1</span></tt>, then we might have seen
-the URL before -- this is called a false positive. In the case of a caching
-web proxy this shouldn't be a problem because if it really hasn't gotten it
-yet, it's just going to fetch it again accordingly (and update the Bloom
-Filter after that). This matters when you have a hierarchical network of
-web cache proxies that need to know where a page may have been cached before.
-Sharing these bloom filters across the nodes of the network allows for
-optimizing for the case when you may have already cached a page before.</p>
-<p>This also applies when writing distributed filesystems where you may have a
-system of multi-layer caches. Sharing the bloom filters of the pages that may
-have already been accessed (read) by nearby storage/retrieval nodes that have
-these pages cached minimizes the number of times a page that has already been
-retrieved before will have to be retrieved again across the network. In these
-situations you may be able to tolerate false positives but would rather not
-have false negatives -- meaning data you haven't ever accessed before would
-not be available in the caches and therefore will need to be fetched again.</p>
-<div class="section" id="synopsis">
-<h2>Synopsis</h2>
-<p>A <cite>bloom_filter</cite> is a template class which takes three parameters:</p>
-<dl class="docutils">
-<dt>Input</dt>
-<dd>The type of the elements contained in a bloom filter.</dd>
-<dt>M</dt>
-<dd>The number of bits contained by the internal bitset.</dd>
-<dt>K</dt>
-<dd>The number of hash functions used by the bloom filter.</dd>
-</dl>
-<p>To use a <cite>bloom_filter</cite> that maintains a set of integers using 256 bits and
-two hash functions, we could have the following code listing:</p>
-<pre class="literal-block">
-#include &lt;boost/bloom_filter.hpp&gt;
-
-...
-
-using boost::bloom_filter;
-using boost::array;
-using boost::function;
-
-...
-
-array&lt;function&lt;size_t(int)&gt;, 2&gt; hash_array;
-hash_array[0] = hash1;
-hash_array[1] = hash2;
-bloom_filter&lt;int, 256, 2&gt; integers(hash_array);
-</pre>
-<p>Here we first create a Boost.Array of two Boost.Functions that we then use
-to construct the <cite>bloom_filter</cite>. In this code listing we are then able to
-insert new integers into the set by simply doing:</p>
-<pre class="literal-block">
-integers.insert(1);
-integers.insert(7);
-integers.insert(5);
-</pre>
-<p>We are also then able to check whether certain integers are part of the set.
-Remember that in Bloom Filters, there is a possibility of getting false
-positives:</p>
-<pre class="literal-block">
-integers.contains(1); // should be true
-integers.contains(9); // may be true or false
-integers[5]; // should be true
-</pre>
-</div>
-<div class="section" id="reference">
-<h2>Reference</h2>
-<ul class="simple">
-<li>Bloom Filter (Wikipedia Entry) <a class="reference external" href="
http://en.wikipedia.org/wiki/Bloom_filter">http://en.wikipedia.org/wiki/Bloom_filter></li>
-</ul>
-</div>
-</div>
-</div>
-</body>
-</html>

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,17 +0,0 @@
-
-import testing ;
-
-{
- test-suite "bloom_filter"
- :
- [ run static_bloom_filter_test.cpp ]
- [ run static_bloom_filter_default_construct_test.cpp ]
- [ run static_bloom_filter_swap_adl_test.cpp ]
- [ run static_bloom_filter_equality_test.cpp ]
- [ run static_bloom_filter_construct_from_bitset_test.cpp ]
- [ run bloom_filter_construct_runtime_size_test.cpp ]
- [ run bloom_filter_equality_test.cpp ]
- [ run bloom_filter_swap_adl_test.cpp ]
- ;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_construct_runtime_size_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,22 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/tuple.hpp>
-#include <boost/functional/hash.hpp>
-
-using boost::bloom_filter;
-using boost::fusion::tuple;
-using boost::hash_combine;
-
-int main(int argc, char * argv[]) {
- bloom_filter<int> bf(2048);
- bf.insert(1);
- assert(bf.contains(1));
- assert(!bf.contains(2));
- return EXIT_SUCCESS;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_equality_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_equality_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,20 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::bloom_filter;
-
-int main(int argc, char * argv[]) {
- bloom_filter<int> filter1(256), filter2(256);
- assert(filter1 == filter2);
- filter1.insert(1);
- assert(filter1 != filter2);
- filter2.insert(1);
- assert(filter1 == filter2);
- return EXIT_SUCCESS;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/bloom_filter_swap_adl_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,28 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::bloom_filter;
-
-int main(int argc, char * argv[]) {
- typedef bloom_filter<int> filter_type;
- filter_type filter(256);
- filter_type filter_copy = filter;
- assert(filter == filter_copy);
- filter_type other_filter(1024);
- assert(filter != other_filter);
- assert(filter_copy != other_filter);
- // assignment test
- filter_copy = other_filter;
- assert(filter_copy == other_filter);
- assert(filter_copy != filter);
- // swap test
- swap(filter, other_filter);
- assert(filter_copy != other_filter);
- assert(filter_copy == filter);
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_construct_from_bitset_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,18 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::static_bloom_filter;
-
-int main(int argc, char * argv[]) {
- static_bloom_filter<int, 32> filter1;
- filter1.insert(1);
- static_bloom_filter<int, 32> filter2(filter1.state()); // construct from bitset
- assert(filter2.contains(1));
- return EXIT_SUCCESS;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_default_construct_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,18 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter/static_bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::static_bloom_filter;
-
-int main(int argc, char * argv[]) {
- typedef static_bloom_filter<uint32_t, 256> filter_type;
- filter_type filter; // default constructed
- filter.insert(1u);
- assert(filter.contains(1u));
- return EXIT_SUCCESS;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_equality_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,20 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::static_bloom_filter;
-
-int main(int argc, char * arg[]) {
- static_bloom_filter<int, 32> filter1, filter2;
- assert(filter1 == filter2);
- filter1.insert(1);
- assert(filter1 != filter2);
- filter2.insert(1);
- assert(filter1 == filter2);
- return EXIT_SUCCESS;
-}
-

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_swap_adl_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,26 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-using boost::static_bloom_filter;
-
-int main(int argc, char * argv[]) {
- typedef static_bloom_filter<uint32_t, 32> filter_type;
- filter_type filter1, filter2;
- filter1.insert(1u);
- filter2.insert(2u);
- assert(!filter1.contains(2u));
- assert(filter1.contains(1u));
- assert(!filter2.contains(1u));
- assert(filter2.contains(2u));
- swap(filter1, filter2);
- assert(filter1.contains(2u));
- assert(!filter1.contains(1u));
- assert(filter2.contains(1u));
- assert(!filter2.contains(2u));
- return EXIT_SUCCESS;
-}

Deleted: sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_test.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/static_bloom_filter_test.cpp 2011-05-26 09:17:49 EDT (Thu, 26 May 2011)
+++ (empty file)
@@ -1,50 +0,0 @@
-// Copyright 2009 (c) Dean Michael Berris <mikhailberis_at_[hidden]>
-// 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)
-
-#include <boost/bloom_filter.hpp>
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/tuple.hpp>
-
-#define FILTER_SIZE 256
-
-struct hash1 {
- size_t operator()(uint32_t id) const {
- return ((id << 4) | (id >> 4)) % FILTER_SIZE;
- }
-};
-
-struct hash2 {
- size_t operator()(uint32_t id) const {
- return (id * id) % FILTER_SIZE;
- }
-};
-
-struct hash3 {
- size_t operator()(uint32_t id) const {
- return (id * 97) % FILTER_SIZE;
- }
-};
-
-using std::bitset;
-using std::cout;
-using std::endl;
-using boost::function;
-using boost::static_bloom_filter;
-using boost::fusion::tuple;
-using boost::fusion::make_tuple;
-
-int main(int argc, char * argv[]) {
- typedef static_bloom_filter<uint32_t, FILTER_SIZE, tuple<hash1, hash2, hash3> > filter_type;
- filter_type filter(make_tuple(hash1(), hash2(), hash3()));
- filter_type filter_copy = filter;
- for(uint32_t i = 0; i < 10; ++i) filter.insert(i);
- for(uint32_t i = 0; i < 10; ++i) assert(filter.contains(i));
- filter_type::bitset_type bit_set = filter.state();
- cout << endl;
- // assignment test
- filter_copy = filter;
- return EXIT_SUCCESS;
-}
-

Copied: sandbox/bloom_filter/trunk/test/makefile (from r71995, /sandbox/bloom_filter/branches/prototype/test/makefile)
==============================================================================

Copied: sandbox/bloom_filter/trunk/test/test_bloom.cpp (from r71995, /sandbox/bloom_filter/branches/prototype/test/test_bloom.cpp)
==============================================================================


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