|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72594 - sandbox/bloom_filter/trunk/libs/bloom_filter/example
From: cpp.cabrera_at_[hidden]
Date: 2011-06-14 17:20:09
Author: alejandro
Date: 2011-06-14 17:20:08 EDT (Tue, 14 Jun 2011)
New Revision: 72594
URL: http://svn.boost.org/trac/boost/changeset/72594
Log:
Modified advanced_bloom.cpp to make output more clear.
Text files modified:
sandbox/bloom_filter/trunk/libs/bloom_filter/example/advanced_bloom.cpp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/example/advanced_bloom.cpp
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/example/advanced_bloom.cpp (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/example/advanced_bloom.cpp 2011-06-14 17:20:08 EDT (Tue, 14 Jun 2011)
@@ -26,7 +26,11 @@
bloom_filter<int, NUM_BITS, HashFns> bloom;
size_t collisions = 0;
- cout << "false positive rate: "
+ cout << "bloom filter storage size: "
+ << sizeof(bloom) << " bytes"
+ << endl;
+
+ cout << "false positive rate before inserts: "
<< bloom.false_positive_rate() * 100.0 << "%"
<< endl;
@@ -38,11 +42,11 @@
if (bloom.contains(i)) ++collisions;
}
- cout << "false positive rate: "
+ cout << "false positive rate after inserts: "
<< bloom.false_positive_rate() * 100.0 << "%"
<< endl;
- cout << "collisions: " << collisions << endl;
+ cout << "collisions (false positives): " << collisions << endl;
return 0;
}
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