|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67954 - in sandbox/icl: boost/icl_xt libs/icl/doc libs/icl/test/test_casual_
From: afojgo_at_[hidden]
Date: 2011-01-11 07:07:56
Author: jofaber
Date: 2011-01-11 07:07:55 EST (Tue, 11 Jan 2011)
New Revision: 67954
URL: http://svn.boost.org/trac/boost/changeset/67954
Log:
Fixed tweaks in documentation. Replaced tabs.
Text files modified:
sandbox/icl/boost/icl_xt/interval_bitset.hpp | 86 ++++++++++++++++++++--------------------
sandbox/icl/libs/icl/doc/functions_element_iteration.qbk | 16 +++---
sandbox/icl/libs/icl/doc/functions_streaming.qbk | 4 -
sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp | 32 +++++++-------
4 files changed, 68 insertions(+), 70 deletions(-)
Modified: sandbox/icl/boost/icl_xt/interval_bitset.hpp
==============================================================================
--- sandbox/icl/boost/icl_xt/interval_bitset.hpp (original)
+++ sandbox/icl/boost/icl_xt/interval_bitset.hpp 2011-01-11 07:07:55 EST (Tue, 11 Jan 2011)
@@ -124,9 +124,9 @@
typedef typename interval_bitmap_type::const_reference const_reference;
public:
- interval_bitset(): _map() {}
- explicit interval_bitset(const element_type& element) : _map() { this->add(element); }
- explicit interval_bitset(const interval_type& inter_val): _map() { this->add(inter_val); }
+ interval_bitset(): _map() {}
+ explicit interval_bitset(const element_type& element) : _map() { this->add(element); }
+ explicit interval_bitset(const interval_type& inter_val): _map() { this->add(inter_val); }
public:
bool operator ==(const interval_bitset& rhs)const{ return _map == rhs._map; }
@@ -177,7 +177,7 @@
bool contains(element_type element)const{ return _map(element>>shift).contains(element & mask); }
bool contains(const segment_type& segment)const;
- //CL bool contains(const element_type& element)const { return contains(segment_type(element)); };
+ //CL bool contains(const element_type& element)const { return contains(segment_type(element)); };
bool contains(const interval_bitset& sub)const { return icl::contains(_map, sub._map); }
bool contained_in(const interval_bitset& super)const{ return icl::within(_map, super._map); }
@@ -185,10 +185,10 @@
void show_matrix(const char off_on[2] = " 1")const;
std::string as_string()const{ return _map.as_string(); }
- //==========================================================================
- //= Selection
- //==========================================================================
- const_iterator find(const domain_type& key)const{ return _find(key); }
+ //==========================================================================
+ //= Selection
+ //==========================================================================
+ const_iterator find(const domain_type& key)const{ return _find(key); }
//==========================================================================
//= Iterator related
@@ -318,16 +318,16 @@
void intersect_(DomainT lo, DomainT up, BitSetT bits){_map &= value_type(interval_type::right_open(lo,up), bits);}
void flip_(DomainT lo, DomainT up, BitSetT bits){_map ^= value_type(interval_type::right_open(lo,up), bits);}
- const_iterator _find(const domain_type& key)const
- {
- // Search for the potential interval w.r.t the shifted condensed_type
- const_iterator it_ = _map.find(interval_type(key >> shift));
- // Check if the key bit is set:
- if(it_ != _map.end() && ((it_->second).contains(key & mask)))
- return it_;
- else
- return _map.end();
- }
+ const_iterator _find(const domain_type& key)const
+ {
+ // Search for the potential interval w.r.t the shifted condensed_type
+ const_iterator it_ = _map.find(interval_type(key >> shift));
+ // Check if the key bit is set:
+ if(it_ != _map.end() && ((it_->second).contains(key & mask)))
+ return it_;
+ else
+ return _map.end();
+ }
private:
interval_bitmap_type _map;
@@ -342,7 +342,7 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator
elements_begin(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
if(object.begin()==object.end())
return element_iterator(object.begin(), element_iterator::beyond);
else
@@ -353,16 +353,16 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator
elements_end(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- return element_iterator(object.end(), element_iterator::beyond);
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ return element_iterator(object.end(), element_iterator::beyond);
}
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator
elements_begin(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator element_const_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator element_const_iterator;
if(object.begin()==object.end())
return element_const_iterator(object.begin(), element_iterator::beyond);
else
@@ -373,17 +373,17 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator
elements_end(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator element_const_iterator;
- return element_const_iterator(object.end(), element_iterator::beyond);
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator element_const_iterator;
+ return element_const_iterator(object.end(), element_iterator::beyond);
}
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator
elements_rbegin(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator element_reverse_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator element_reverse_iterator;
if(object.rbegin()==object.rend())
return element_reverse_iterator(object.rbegin(), element_iterator::before);
else
@@ -394,17 +394,17 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator
elements_rend(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator element_reverse_iterator;
- return element_reverse_iterator(object.rend(), element_iterator::before);
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator element_reverse_iterator;
+ return element_reverse_iterator(object.rend(), element_iterator::before);
}
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator
elements_rbegin(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator element_const_reverse_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator element_const_reverse_iterator;
if(object.rbegin()==object.rend())
return element_const_reverse_iterator(object.rbegin(), element_iterator::before);
else
@@ -415,9 +415,9 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator
elements_rend(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator element_const_reverse_iterator;
- return element_const_reverse_iterator(object.rend(), element_iterator::before);
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator element_iterator;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator element_const_reverse_iterator;
+ return element_const_reverse_iterator(object.rend(), element_iterator::before);
}
*/
@@ -495,7 +495,7 @@
const segment_type& segment
)const
{
- if(icl::is_empty(segment))
+ if(icl::is_empty(segment))
return PartsT();
condensed_type base = icl::first(segment) >> shift, // segment.first()/ divisor
@@ -539,7 +539,7 @@
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
bool interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::contains(const segment_type& segment)const
{
- if(icl::is_empty(segment))
+ if(icl::is_empty(segment))
return true; // Emptieness is contained in everything
condensed_type lo, up ;
@@ -597,11 +597,11 @@
typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::interval_type
hull(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
{
- typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::interval_type interval_type;
+ typedef typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::interval_type interval_type;
return
icl::is_empty(object)
? identity_element<interval_type>::value()
- : interval_type::closed(*object.elements_begin(), *object.elements_rbegin());
+ : interval_type::closed(*object.elements_begin(), *object.elements_rbegin());
}
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
@@ -692,11 +692,11 @@
template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>&
set_at( interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object,
- const typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::segment_type& segment)
+ const typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::segment_type& segment)
{
object.erase(segment->first);
- object.insert(segment);
- return *this;
+ object.insert(segment);
+ return *this;
}
template<class CharType, class CharTraits,
Modified: sandbox/icl/libs/icl/doc/functions_element_iteration.qbk
==============================================================================
--- sandbox/icl/libs/icl/doc/functions_element_iteration.qbk (original)
+++ sandbox/icl/libs/icl/doc/functions_element_iteration.qbk 2011-01-11 07:07:55 EST (Tue, 11 Jan 2011)
@@ -64,14 +64,14 @@
[table
[[['*Element iteration*]] [Description] ]
-[[`` T::element_iterator elements_begin(T&)
-T::element_const_iterator elements_begin(const T&)``] [Returns an element iterator to the first element of the container.] ]
-[[`` T::element_iterator elements_end(T&)
-T::element_const_iterator elements_end(const T&)``] [Returns an element iterator to a position `elements_end(c)` after the last element of the container.]]
-[[`` T::element_reverse_iterator elements_rbegin(T&)
-T::element_const_reverse_iterator elements_rbegin(const T&)``] [Returns a reverse element iterator to the last element of the container.] ]
-[[`` T::element_reverse_iterator elements_rend(T&)
-T::element_const_reverse_iterator elements_rend(const T&)``] [Returns a reverse element iterator to a position `elements_rend(c)` before the first element of the container.]]
+[[`` element_iterator elements_begin(T&)
+element_const_iterator elements_begin(const T&)``] [Returns an element iterator to the first element of the container.] ]
+[[`` element_iterator elements_end(T&)
+element_const_iterator elements_end(const T&)``] [Returns an element iterator to a position `elements_end(c)` after the last element of the container.]]
+[[`` element_reverse_iterator elements_rbegin(T&)
+element_const_reverse_iterator elements_rbegin(const T&)``] [Returns a reverse element iterator to the last element of the container.] ]
+[[`` element_reverse_iterator elements_rend(T&)
+element_const_reverse_iterator elements_rend(const T&)``] [Returns a reverse element iterator to a position `elements_rend(c)` before the first element of the container.]]
]
['*Example*]
Modified: sandbox/icl/libs/icl/doc/functions_streaming.qbk
==============================================================================
--- sandbox/icl/libs/icl/doc/functions_streaming.qbk (original)
+++ sandbox/icl/libs/icl/doc/functions_streaming.qbk 2011-01-11 07:07:55 EST (Tue, 11 Jan 2011)
@@ -13,17 +13,15 @@
[table
[[['*Streaming, conversion*]] [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__] ]
[[`std::basic_ostream operator << (basic_ostream&, const T&)`] [1] [1] [1] [1] [1] ]
-[[`std::string T::as_string()`] [1] [1] [1] [1] [1] ]
]
[table
[[['*Streaming, conversion*]] [Description] ]
[[`std::basic_ostream operator << (basic_ostream&, const T&)`]
[Serializes the argument of type T to an output stream] ]
-[[`std::string T::as_string()`] [Returns a string representation of the object of type `T`]]
]
-
+
['*Back to section . . .*]
[table
[]
Modified: sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp 2011-01-11 07:07:55 EST (Tue, 11 Jan 2011)
@@ -46,7 +46,7 @@
cout << "Duration of " << a_b << " = "
<< icl::size(a_b) << endl;
- icl::size(a_b);
+ icl::size(a_b);
time_duration half = a_2_b / 2;
ptime t_m = t_a + half;
@@ -55,29 +55,29 @@
" contains " : "does not contain ")
<< t_m << endl;
- ptime day_begin = time_from_string("2010-12-24 00:00");
- time_duration d_a = t_a - day_begin;
- time_duration d_b = t_b - day_begin;
- time_duration d_m = d_b - d_a;
+ ptime day_begin = time_from_string("2010-12-24 00:00");
+ time_duration d_a = t_a - day_begin;
+ time_duration d_b = t_b - day_begin;
+ time_duration d_m = d_b - d_a;
- interval<time_duration>::type rel_a_b
+ interval<time_duration>::type rel_a_b
= interval<time_duration>::right_open(d_a, d_b);
- time_duration sz_a_b_1 = d_b - d_a;
- time_duration sz_a_b_2 = icl::size(rel_a_b);
- cout << "b-a = " << sz_a_b_1 << endl;
- cout << "size([a,b)) = " << sz_a_b_2 << endl;
- cout << "size([a,b)) = " << (icl::size(rel_a_b)) << endl;
+ time_duration sz_a_b_1 = d_b - d_a;
+ time_duration sz_a_b_2 = icl::size(rel_a_b);
+ cout << "b-a = " << sz_a_b_1 << endl;
+ cout << "size([a,b)) = " << sz_a_b_2 << endl;
+ cout << "size([a,b)) = " << (icl::size(rel_a_b)) << endl;
- cout << rel_a_b << " " << (icl::size(rel_a_b)) << endl;
+ cout << rel_a_b << " " << (icl::size(rel_a_b)) << endl;
}
void test_inter_bitset()
{
- inter_bitset<int> inbis;
+ inter_bitset<int> inbis;
- interval<int>::type itv = interval<int>::right_open(0,2);
- inbis.add(itv);
+ interval<int>::type itv = interval<int>::right_open(0,2);
+ inbis.add(itv);
}
BOOST_AUTO_TEST_CASE(casual)
@@ -89,7 +89,7 @@
typedef IntervalMapT::interval_type IntervalT;
// time_test();
- test_inter_bitset();
+ test_inter_bitset();
BOOST_CHECK_EQUAL(true, true);
}
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