diff --git a/doc/buckets.qbk b/doc/buckets.qbk index 7dba891d..b1f34389 100644 --- a/doc/buckets.qbk +++ b/doc/buckets.qbk @@ -7,7 +7,7 @@ The containers are made up of a number of 'buckets', each of which can contain any number of elements. For example, the following diagram shows an [classref boost::unordered_set unordered_set] with 7 buckets containing 5 elements, `A`, -`B`, `C`, `D` and `E` (this is just for illustration, in practise containers +`B`, `C`, `D` and `E` (this is just for illustration, in practice containers will have more buckets). [$../../libs/unordered/doc/diagrams/buckets.png] diff --git a/doc/comparison.qbk b/doc/comparison.qbk index 774e6302..1b89367d 100644 --- a/doc/comparison.qbk +++ b/doc/comparison.qbk @@ -8,13 +8,13 @@ [[Associative Containers] [Unordered Associative Containers]] [ - [Parametrised by an ordering relation `Compare`] - [Parametrised by a function object `Hash` and an equivalence relation + [Parameterized by an ordering relation `Compare`] + [Parameterized by a function object `Hash` and an equivalence relation `Pred`] ] [ [Keys can be compared using `key_compare` which is accessed by member function `key_comp()`, - values can be compared using `value_compare` whice is accessed by member function `value_comp()`.] + values can be compared using `value_compare` which is accessed by member function `value_comp()`.] [Keys can be hashed using `hasher` which is accessed by member function `hash_function()`, and checked for equality using `key_equal` which is accessed by member function `key_eq()`. There is no function object for compared or hashing values.] @@ -102,7 +102,7 @@ ] [ [Insert a single element with a hint] - [Amortised constant if t elements inserted right after hint, + [Amortized constant if t elements inserted right after hint, logarithmic otherwise] [Average case constant, worst case linear (ie. the same as a normal insert).] @@ -119,7 +119,7 @@ ] [ [Erase a single element by iterator] - [Amortised constant] + [Amortized constant] [Average case: O(1), Worst case: O(`size()`)] ] [ diff --git a/doc/hash_equality.qbk b/doc/hash_equality.qbk index e2efde35..11111050 100644 --- a/doc/hash_equality.qbk +++ b/doc/hash_equality.qbk @@ -16,7 +16,7 @@ is declared as: class ``[classref boost::unordered_set unordered_set]``; The hash function comes first as you might want to change the hash function -but not the equality predicate, while if you were to change the behaviour +but not the equality predicate, while if you were to change the behavior of the equality predicate you would have to change the hash function to match it. So, if you wanted to use the [@http://www.isthe.com/chongo/tech/comp/fnv/ FNV-1 hash] you could write: @@ -45,7 +45,7 @@ Similarly, a custom hash function can be used for custom types: [import src_code/point1.cpp] [point_example1] -Although, customising Boost.Hash is probably a better solution: +Although, customizing Boost.Hash is probably a better solution: [import src_code/point2.cpp] [point_example2] diff --git a/doc/rationale.qbk b/doc/rationale.qbk index b621753a..c7000992 100644 --- a/doc/rationale.qbk +++ b/doc/rationale.qbk @@ -28,12 +28,12 @@ By specifying an interface for accessing the buckets of the container the standard pretty much requires that the hash table uses chained addressing. It would be conceivable to write a hash table that uses another method. For -example, an it could use open addressing, and use the lookup chain to act as a +example, it could use open addressing, and use the lookup chain to act as a bucket but there are a some serious problems with this: * The draft standard requires that pointers to elements aren't invalidated, so the elements can't be stored in one array, but will need a layer of - indirection instead - loosing the efficiency and most of the memory gain, + indirection instead - losing the efficiency and most of the memory gain, the main advantages of open addressing. * Local iterators would be very inefficient and may not be able to diff --git a/doc/ref.xml b/doc/ref.xml index 759b385f..3d3ad185 100644 --- a/doc/ref.xml +++ b/doc/ref.xml @@ -149,7 +149,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) size() == 0 - Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocatorand a maximum load factor of 1.0. + Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0. @@ -263,7 +263,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) The bool component of the return type is true if an insert took place. - If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the elment with equivalent value. + If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value. If an exception is thrown by an operation other than a call to hasher the function has no effect. @@ -285,7 +285,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) hint is a suggestion to where the element should be inserted. - If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the elment with equivalent value. + If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value. If an exception is thrown by an operation other than a call to hasher the function has no effect. @@ -356,9 +356,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) const_iterator iterator - + Erases the elements in the range from first to last. - + The iterator following the erased elements - i.e. last. @@ -729,7 +729,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) size() == 0 - Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocatorand a maximum load factor of 1.0. + Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0. @@ -935,9 +935,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) const_iterator iterator - + Erases the elements in the range from first to last. - + The iterator following the erased elements - i.e. last. @@ -1324,7 +1324,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) size() == 0 - Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocatorand a maximum load factor of 1.0. + Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0. @@ -1438,7 +1438,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) The bool component of the return type is true if an insert took place. - If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the elment with equivalent key. + If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key. If an exception is thrown by an operation other than a call to hasher the function has no effect. @@ -1460,7 +1460,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) hint is a suggestion to where the element should be inserted. - If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the elment with equivalent key. + If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key. If an exception is thrown by an operation other than a call to hasher the function has no effect. @@ -1531,9 +1531,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) const_iterator iterator - + Erases the elements in the range from first to last. - + The iterator following the erased elements - i.e. last. @@ -1948,7 +1948,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) size() == 0 - Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocatorand a maximum load factor of 1.0. + Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0. @@ -2154,9 +2154,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) const_iterator iterator - + Erases the elements in the range from first to last. - + The iterator following the erased elements - i.e. last.