|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57357 - in sandbox/itl/libs/itl: doc example/large_bitset_
From: afojgo_at_[hidden]
Date: 2009-11-04 08:43:17
Author: jofaber
Date: 2009-11-04 08:43:16 EST (Wed, 04 Nov 2009)
New Revision: 57357
URL: http://svn.boost.org/trac/boost/changeset/57357
Log:
Corrections of typos.
Text files modified:
sandbox/itl/libs/itl/doc/acknowledgments.qbk | 2 +-
sandbox/itl/libs/itl/doc/projects.qbk | 38 +++++++++++++++++++-------------------
sandbox/itl/libs/itl/example/large_bitset_/large_bitset.cpp | 8 ++++----
3 files changed, 24 insertions(+), 24 deletions(-)
Modified: sandbox/itl/libs/itl/doc/acknowledgments.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/acknowledgments.qbk (original)
+++ sandbox/itl/libs/itl/doc/acknowledgments.qbk 2009-11-04 08:43:16 EST (Wed, 04 Nov 2009)
@@ -17,7 +17,7 @@
Many thanks to Paul A. Bristow, Vicente Botet, Luke Simonson,
Alp Mestan, David Abrahams, Steven Watanabe, Neal Becker,
-Robert Stewart, Jeff Flinn
+Robert Stewart, Jeff Flinn, Zachary Turner
and other developers
form the Boost community who supported the development of the
Interval Template Library by numerous hints and feedbacks on
Modified: sandbox/itl/libs/itl/doc/projects.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/projects.qbk (original)
+++ sandbox/itl/libs/itl/doc/projects.qbk 2009-11-04 08:43:16 EST (Wed, 04 Nov 2009)
@@ -39,7 +39,7 @@
The prefix ['*bit*] usually only indicates,
that the representation of those sets is organized in a compressed
form that exploits the fact, that we can switch on an off single
-bits in machine word. Bitsets are therefore known to be very small
+bits in machine words. Bitsets are therefore known to be very small
and thus efficient.
The efficiency of bitsets is usually coupled to the
precondition that the range of values of elements
@@ -68,7 +68,7 @@
Such an `IntervalBitmap` represents `k*N` bits for every segment.
``
-[a, a+k)->'1111....1111' //(N bits)
+[a, a+k)->'1111....1111' // N bits associated: Represents a total of k*N bits.
``
For the interval `[a, a+k)` above all bits are set.
@@ -91,7 +91,7 @@
``
An `IntervalBitmap` can represent
-`N*(2^M-1)` elements, if `M` is the number of bits of the
+`N*(2^M)` elements, if `M` is the number of bits of the
integral type `IntegralT`. Unlike bitsets, that usually
represent ['*unsigned*] integral numbers, large_bitset may
range over negative numbers as well.
@@ -124,7 +124,7 @@
Program output (/a little beautified/):
``
----- Test function test_large() -----------------------------------------------
-We have just turned on the awesome amount of 18,446,744,073,709,551,615 bits ;-)
+We have just turned on the awesome amount of 18,446,744,073,709,551,616 bits ;-)
[ 0, 288230376151711744) -> 1111111111111111111111111111111111111111111111111111111111111111
---- Let's swich off the very last bit -----------------------------------------
[ 0, 288230376151711743) -> 1111111111111111111111111111111111111111111111111111111111111111
@@ -162,12 +162,12 @@
[3,4)->01011011
[4,8)->11111111
[8,9)->10000000
--- remove even bits in range [0,72) --------
+-- Remove even bits in range [0,72) --------
[1,2)->00010101
[2,3)->01010101
[3,4)->01010001
[4,8)->01010101
--- set odd bits in range [0,72) --------
+-- Set odd bits in range [0,72) --------
[0,9)->01010101
--------------------------------------------
``
@@ -221,7 +221,7 @@
std::less, inplace_bit_add, inplace_bit_and> IntervalBitmap;
``
-`DomainT` is supposed to be an unsigned integral
+`DomainT` is supposed to be an integral
type, the bitset type `BitSetT` will be a wrapper class around an
unsigned integral type. `BitSetT` has to implement bitwise operators
that will be called by the functors `inplace_bit_add<BitSetT>`
@@ -242,12 +242,12 @@
The code of the project is enclosed in a `namespace mini`.
The name indicates, that the implementation is a /minimal/
example implementation. The name of the bitset class will
-be `bits` or qualified `mini::bits`.
+be `bits` or `mini::bits` if qualified.
-To be used as a codomain parameter of class template __itv_map__
-`mini::bits` has implement all the functions that are required
-for a codomain_type in general, which are the default ctor `bits()`
-and `operator==`. Moreover `mini::bits` has to implement operators
+To be used as a codomain parameter of class template __itv_map__,
+`mini::bits` has to implement all the functions that are required
+for a codomain_type in general, which are the default constructor `bits()`
+and an equality `operator==`. Moreover `mini::bits` has to implement operators
required by the instantiations for parameter `Combine` and `Section`
which are `inplace_bit_add` and `inplace_bit_and`. From functors
`inplace_bit_add` and `inplace_bit_and` there are inverse functors
@@ -306,7 +306,7 @@
[large_bitset_class_template_header]
The first template parameter `DomainT` will be instantiated with
-an unsigned integral type that defines the kind of numbers that can
+an integral type that defines the kind of numbers that can
be elements of the set. Since we want to go for a large set we
use `nat64` as default which is a 64 bit unsigned integer ranging
from `0` to `2^64-1`. As bitset parameter we also choose a 64-bit
@@ -349,11 +349,11 @@
[large_bitset_operators]
As we can see, the seven most important operators that work on the
-class type `large_bitset` can be directly implemented propagation
+class type `large_bitset` can be directly implemented by propagating
the operation to the implementing `_map`
of type `interval_bitmap_type`. For the operators that work on segment and
element types, we use member functions `add`, `subtract`, `intersect` and
-`flip`. As we will see only a small amount of adaper code in needed
+`flip`. As we will see only a small amount of adaper code is needed
to couple those functions with the functionality of the implementing
container.
@@ -362,7 +362,7 @@
be uniformly implemented using a private function
`segment_apply` that applies /addition/, /subtraction/,
/intersection/ or /symmetric difference/, after having
-translated the intervals borders into the right bitset
+translated the interval's borders into the right bitset
positions.
[large_bitset_fundamental_functions]
@@ -393,7 +393,7 @@
large_bitset<nat, mini::bits8> lbs;
``
that carries small bitsets of 8 bits only.
-The first four singleton interval of `lbs` are assumed to
+The first four interval of `lbs` are assumed to
be associated with some bitsets. Now we want to add the interval
`[a,b]==[5,27]`. This will result in the following situation:
``
@@ -405,7 +405,7 @@
=> [0,1)-> [1,3)-> [3,4)->
[00101111][11111111][11110000]
``
-So we have to convert values 5 and 35 into a part that
+So we have to convert values 5 and 27 into a part that
points to the interval and a part that refers to the
position within the interval, which is done by a
/division/ and a /modulo/ computation. (In order to have a
@@ -428,7 +428,7 @@
[large_bitset_impl_constants]
Looking at the example again, we can see that we have to identify the
-positions of the beginning and ending of the interval [5,7] that is
+positions of the beginning and ending of the interval [5,27] that is
to insert, and then ['*subdivide*] that range of bitsets into three partitions.
# The bitset where the interval starts.
Modified: sandbox/itl/libs/itl/example/large_bitset_/large_bitset.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/large_bitset_/large_bitset.cpp (original)
+++ sandbox/itl/libs/itl/example/large_bitset_/large_bitset.cpp 2009-11-04 08:43:16 EST (Wed, 04 Nov 2009)
@@ -30,7 +30,7 @@
venti += interval<nat64>(0, much);
cout << "----- Test function test_large() -----------------------------------------------\n";
- cout << "We have just turned on the awesome amount of 18,446,744,073,709,551,615 bits ;-)\n";
+ cout << "We have just turned on the awesome amount of 18,446,744,073,709,551,616 bits ;-)\n";
venti.show_segments();
//]
@@ -48,7 +48,7 @@
{
large_bitset<nat32, bits8> tall; // small is tall ...
// ... because even this 'small' large_bitset
- // can represent up to 2^32-1 == 4,294,967,295 bits.
+ // can represent up to 2^32 == 4,294,967,296 bits.
cout << "----- Test function test_small() -----------\n";
cout << "-- Switch on all bits in range [0,64] ------\n";
@@ -70,12 +70,12 @@
tall -= interval<nat>::rightopen(0,10);
tall.show_segments();
- cout << "-- remove even bits in range [0,72) --------\n";
+ cout << "-- Remove even bits in range [0,72) --------\n";
int bit;
for(bit=0; bit<72; bit++) if(!(bit%2)) tall -= bit;
tall.show_segments();
- cout << "-- set odd bits in range [0,72) --------\n";
+ cout << "-- Set odd bits in range [0,72) --------\n";
for(bit=0; bit<72; bit++) if(bit%2) tall += bit;
tall.show_segments();
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