Skip to content

Commit 8b99a11

Browse files
authored
Fix mistakes (#41)
* Update primer.adoc * Update tutorial.adoc * Update filter.adoc * Update implementation_notes.adoc * Update tutorial.adoc * Update tutorial.adoc
1 parent 42ac500 commit 8b99a11

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

doc/bloom/implementation_notes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ with https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-r
127127

128128
=== `fast_multiblock64`
129129

130-
We only provide a SIMD implementation for AVX2 that relies in two
130+
We only provide a SIMD implementation for AVX2 that relies on two
131131
parallel `+++__+++m256i`+++s+++ for the generation of up
132132
to 8 64-bit values with shifted 1s. For Neon and SSE2, emulation
133-
through 4 128-bit registers proved slower than non-SIMD `multiblock<uint64_t, K>`.
133+
through 4 128-bit registers proved slower than non-SIMD `multiblock<uint64_t, K>`.

doc/bloom/primer.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The implementation of a classical Bloom filter consists of an array of _m_ bits,
4848
Inserting an element _x_ reduces to selecting _k_ positions pseudorandomly (with the help
4949
of _k_ independent hash functions) and setting them to one.
5050
51-
image::bloom_insertion.png[align=center, title="Insertion in a classical Bloom filter with _k_ = 6 different hash functions. Inserting _x_ reduces to setting to one the bits at positions 10, 14, 43, 58, 1, and 39 as indicated by _h_~1~(_x_), ... , _h_~6~(_x_)."]
51+
image::bloom_insertion.png[align=center, title="Insertion in a classical Bloom filter with _k_ = 6 different hash functions. Inserting _x_ reduces to setting to one the bits at positions 10, 14, 43, 58, 1, and 39 as indicated by _h_~1~(_x_), ..., _h_~6~(_x_)."]
5252
5353
To check if an element _y_ is in the filter, we follow the same procedure and see if
5454
the selected bits are all set to one. In the example figure there are two unset bits, which
@@ -65,7 +65,7 @@ when the array is sparsely populated, a higher value of _k_ improves (decreases)
6565
as there are more chances that we hit a non-set bit; however, if _k_ is very high
6666
the array will have more and more bits set to one as new elements are inserted, which
6767
eventually will reach a point where we lose out to a filter with a lower _k_ and
68-
thus a smaller proportions of set bits. For given values of _n_ and _m_, the optimum _k_ is
68+
thus a smaller proportion of set bits. For given values of _n_ and _m_, the optimum _k_ is
6969
{small}stem:[\lfloor k_{\text{opt}}\rfloor]{small-end} or
7070
{small}stem:[\lceil k_{\text{opt}}\rceil]{small-end}, with
7171
@@ -123,4 +123,4 @@ multiblock filters and then block filters. Execution speed will roughly go
123123
in the reverse order. When considering block/multiblock filters with
124124
multi-insertion, the number of available configurations grows quickly and
125125
you will need to do some experimenting to locate your preferred point in the
126-
(FPR, capacity, speed) tradeoff space.
126+
(FPR, capacity, speed) tradeoff space.

doc/bloom/reference/filter.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Postconditions:;; `*this == x`.
297297
filter(filter&& x);
298298
----
299299

300-
Constructs a filter tranferring `x`++'++s internal array to `*this` and using
300+
Constructs a filter transferring `x`++'++s internal array to `*this` and using
301301
a hash function and allocator move-constructed from `x`++'++s hash function
302302
and allocator, respectively.
303303

@@ -355,7 +355,7 @@ Postconditions:;; `*this == x`.
355355
filter(filter&& x, const allocator_type& al);
356356
----
357357

358-
Constructs a filter tranferring `x`++'++s internal array to `*this` if
358+
Constructs a filter transferring `x`++'++s internal array to `*this` if
359359
`al == x.get_allocator()`, or using a copy of the array otherwise.
360360
The hash function of the new filter is move-constructed from `x`++'++s
361361
hash function and the allocator is a copy of `al`.
@@ -738,4 +738,4 @@ void swap(filter<T, K, S, B, H, A>& x, filter<T, K, S, B, H, A>& y)
738738

739739
Equivalent to `x.xref:filter_swap[swap](y)`.
740740

741-
'''
741+
'''

doc/bloom/tutorial.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ an array of 2^`N`^ unsigned integrals (e.g. `uint64_t[8]`). In general,
8181
the wider `Block` is, the better (lower) the resulting FPR, but
8282
cache locality worsens and performance may suffer as a result.
8383

84-
Note that the total number of of bits set/checked for a
84+
Note that the total number of bits set/checked for a
8585
`boost::bloom::filter<T, K, _subfilter_<..., K'>>` is `K * K'`. The
8686
default configuration `boost::bloom::filter<T, K>` =
8787
`boost::bloom::filter<T, K, block<unsigned char, 1>>`, which corresponds to a
@@ -91,7 +91,7 @@ subarray is accessed for each bit set/checked. Consult the
9191
xref:benchmarks[benchmarks section] to see different tradeoffs between FPR and
9292
performance.
9393

94-
Once a subfilter have been selected, the parameter `K'` can be tuned
94+
Once a subfilter has been selected, the parameter `K'` can be tuned
9595
to its optimum value (minimum FPR) if the number of elements that will be inserted is
9696
known in advance, as explained in a xref:configuration[dedicated section];
9797
otherwise, low values of `K'` will generally be faster and preferred to
@@ -254,7 +254,7 @@ f &= f3; // f and f3 must have exactly the same capacity
254254

255255
For AND combination, be aware that the resulting FPR will be in general
256256
worse (higher) than if the filter had been constructed from scratch
257-
by inserting only the commom elements -- don't trust `fpr_for` in this
257+
by inserting only the common elements -- don't trust `fpr_for` in this
258258
case.
259259

260260
== Direct Access to the Array
@@ -339,7 +339,7 @@ file):
339339
(gdb) add-auto-load-safe-path _<path-to-executable>_
340340
-----
341341

342-
Alternatively to the use of the embedded pretty-printer, you can explicitly
342+
As an alternative to using the embedded pretty-printer, you can explicitly
343343
load the link:../../extra/boost_bloom_printers.py[`boost_bloom_printers.py`^]
344344
script:
345345

0 commit comments

Comments
 (0)