Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73505 - in sandbox/bloom_filter/trunk/boost/bloom_filter: . detail
From: cpp.cabrera_at_[hidden]
Date: 2011-08-03 04:48:34


Author: alejandro
Date: 2011-08-03 04:48:33 EDT (Wed, 03 Aug 2011)
New Revision: 73505
URL: http://svn.boost.org/trac/boost/changeset/73505

Log:
Marked union/intersect as experimental:

- operator& -> experimental_intersect
- operator&= -> experimental_intersect_assign
- operator| -> experimental_union
- operator|= -> experimental_union_assign
Text files modified:
   sandbox/bloom_filter/trunk/boost/bloom_filter/counting_bloom_filter.hpp | 45 ----------------------------------------
   sandbox/bloom_filter/trunk/boost/bloom_filter/detail/counting_apply_hash.hpp | 32 ----------------------------
   2 files changed, 0 insertions(+), 77 deletions(-)

Modified: sandbox/bloom_filter/trunk/boost/bloom_filter/counting_bloom_filter.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/counting_bloom_filter.hpp (original)
+++ sandbox/bloom_filter/trunk/boost/bloom_filter/counting_bloom_filter.hpp 2011-08-03 04:48:33 EDT (Wed, 03 Aug 2011)
@@ -172,62 +172,40 @@
         return ret;
       }
 
-<<<<<<< HEAD
       bool empty() const
-=======
- bool empty() const
->>>>>>> wip
       {
         return this->count() == 0;
       }
 
       //! core ops
-<<<<<<< HEAD
       void insert(const T& t)
-=======
- void insert(const T& t)
->>>>>>> wip
       {
         static const unsigned N = boost::mpl::size<hash_function_type>::value - 1;
         detail::counting_apply_hash<N, this_type>::insert(t, this->bits);
       }
 
       template <typename InputIterator>
-<<<<<<< HEAD
       void insert(const InputIterator start, const InputIterator end)
-=======
- void insert(const InputIterator start, const InputIterator end)
->>>>>>> wip
       {
         for (InputIterator i = start; i != end; ++i) {
           this->insert(*i);
         }
       }
-<<<<<<< HEAD
 
       void remove(const T& t)
-=======
-
- void remove(const T& t)
->>>>>>> wip
       {
         static const unsigned N = boost::mpl::size<hash_function_type>::value - 1;
         detail::counting_apply_hash<N, this_type>::remove(t, this->bits);
       }
 
       template <typename InputIterator>
-<<<<<<< HEAD
       void remove(const InputIterator start, const InputIterator end)
-=======
- void remove(const InputIterator start, const InputIterator end)
->>>>>>> wip
       {
         for (InputIterator i = start; i != end; ++i) {
           this->remove(*i);
         }
       }
 
-<<<<<<< HEAD
       bool probably_contains(const T& t) const
       {
         static const unsigned N = mpl::size<HashFunctions>::value - 1;
@@ -237,17 +215,6 @@
 
       //! auxiliary ops
       void clear()
-=======
- bool probably_contains(const T& t) const
- {
- static const unsigned N = mpl::size<HashFunctions>::value - 1;
- return detail::counting_apply_hash<N, this_type>::contains(t,
- this->bits);
- }
-
- //! auxiliary ops
- void clear()
->>>>>>> wip
       {
         for (bucket_iterator i = bits.begin(), end = bits.end();
              i != end; ++i) {
@@ -255,11 +222,7 @@
         }
       }
 
-<<<<<<< HEAD
       void swap(counting_bloom_filter& other)
-=======
- void swap(counting_bloom_filter& other)
->>>>>>> wip
       {
         counting_bloom_filter tmp = other;
         other = *this;
@@ -267,11 +230,7 @@
       }
 
       //! pairwise ops
-<<<<<<< HEAD
       counting_bloom_filter&
-=======
- counting_bloom_filter&
->>>>>>> wip
       experimental_union_assign(const counting_bloom_filter& rhs)
       {
         bucket_iterator this_end = this->bits.end();
@@ -285,11 +244,7 @@
         return *this;
       }
 
-<<<<<<< HEAD
       counting_bloom_filter&
-=======
- counting_bloom_filter&
->>>>>>> wip
       experimental_intersect_assign(const counting_bloom_filter& rhs)
       {
         bucket_iterator this_end = this->bits.end();

Modified: sandbox/bloom_filter/trunk/boost/bloom_filter/detail/counting_apply_hash.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/detail/counting_apply_hash.hpp (original)
+++ sandbox/bloom_filter/trunk/boost/bloom_filter/detail/counting_apply_hash.hpp 2011-08-03 04:48:33 EDT (Wed, 03 Aug 2011)
@@ -38,7 +38,6 @@
           return val+1;
         }
       };
-<<<<<<< HEAD
 
       template <size_t N, class CBF, class Op = void>
       struct BloomOp {
@@ -68,37 +67,6 @@
           return (target_bits != 0);
         }
 
-=======
-
- template <size_t N, class CBF, class Op = void>
- struct BloomOp {
- typedef typename boost::mpl::at_c<typename CBF::hash_function_type,
- N>::type Hash;
-
- BloomOp(const typename CBF::value_type& t,
- const typename CBF::bucket_type& slots)
- :
- hash_val(hasher(t) % CBF::num_bins()),
- pos(hash_val / CBF::bins_per_slot()),
- offset_bits((hash_val % CBF::bins_per_slot()) * CBF::bits_per_bin()),
- target_bits((slots[pos] >> offset_bits) & CBF::mask())
- {}
-
- void update(const typename CBF::value_type& t,
- typename CBF::bucket_type& slots,
- const size_t limit) const {
- static Op op;
-
- const size_t final_bits = op(target_bits, limit);
- slots[pos] &= ~(CBF::mask() << offset_bits);
- slots[pos] |= (final_bits << offset_bits);
- }
-
- bool check() const {
- return (target_bits != 0);
- }
-
->>>>>>> wip
         Hash hasher;
         const size_t hash_val;
         const size_t pos;


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