Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50045 - sandbox/itl/boost/itl
From: afojgo_at_[hidden]
Date: 2008-11-30 20:16:07


Author: jofaber
Date: 2008-11-30 20:16:04 EST (Sun, 30 Nov 2008)
New Revision: 50045
URL: http://svn.boost.org/trac/boost/changeset/50045

Log:
Refactored: Combiner functor static instantiation. Step 2. Local functions. Stable {msvc-9.0}
Text files modified:
   sandbox/itl/boost/itl/interval_map.hpp | 32 ++++++++++++++++----------------
   sandbox/itl/boost/itl/split_interval_map.hpp | 36 ++++++++++++++++++------------------
   2 files changed, 34 insertions(+), 34 deletions(-)

Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2008-11-30 20:16:04 EST (Sun, 30 Nov 2008)
@@ -212,21 +212,21 @@
     iterator joint_insert(iterator& some, const iterator& next);
 
     template<class Combiner>
- iterator fill_gap_join_left(const value_type&, const Combiner&);
+ iterator fill_gap_join_left(const value_type&);
 
     template<class Combiner>
- iterator fill_gap_join_both(const value_type&, const Combiner&);
+ iterator fill_gap_join_both(const value_type&);
 
     iterator fill_join_left(const value_type&);
     iterator fill_join_both(const value_type&);
 
     template<class Combiner>
     void add_rest(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, iterator& end_it, const Combiner&);
+ iterator& it, iterator& end_it);
 
     template<class Combiner>
     void add_rear(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, const Combiner&);
+ iterator& it);
 
     template<class Combiner>
     void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
@@ -382,7 +382,7 @@
     template<class Combiner>
 typename interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>::iterator
 interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::fill_gap_join_left(const value_type& value, const Combiner& combine)
+ ::fill_gap_join_left(const value_type& value)
 {
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
@@ -410,7 +410,7 @@
     template<class Combiner>
 typename interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>::iterator
 interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::fill_gap_join_both(const value_type& value, const Combiner& combine)
+ ::fill_gap_join_both(const value_type& value)
 {
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
@@ -512,9 +512,9 @@
                 fill_join_left(value_type(interSec, cmb_val));
 
             if(!leadGap.empty())
- fill_gap_join_both<Combiner>(value_type(leadGap, x_val), combine);
+ fill_gap_join_both<Combiner>(value_type(leadGap, x_val));
             if(!endGap.empty())
- fill_gap_join_both<Combiner>(value_type(endGap, x_val), combine);
+ fill_gap_join_both<Combiner>(value_type(endGap, x_val));
             else
                 fill_join_left(value_type(rightResid, cur_val));
         }
@@ -525,13 +525,13 @@
             fill_join_left(value_type(interSec, cmb_val));
 
             if(!leadGap.empty())
- fill_gap_join_both<Combiner>(value_type(leadGap, x_val), combine);
+ fill_gap_join_both<Combiner>(value_type(leadGap, x_val));
 
             // shrink interval
             interval_type x_rest(x_itv);
             x_rest.left_subtract(fst_itv);
 
- add_rest<Combiner>(x_rest, x_val, snd_it, end_it, combine);
+ add_rest<Combiner>(x_rest, x_val, snd_it, end_it);
         }
     }
 }
@@ -539,7 +539,7 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class,ITL_COMPARE>class Interval, ITL_COMPARE Compare, ITL_COMPARE Combine, ITL_ALLOC Alloc>
     template<class Combiner>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it, const Combiner& combine)
+ ::add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
 {
     iterator nxt_it = it; nxt_it++;
     interval_type x_rest = x_itv, left_gap, common, cur_itv;
@@ -550,7 +550,7 @@
         x_rest.left_surplus(left_gap, cur_itv);
 
         Combiner()(it->CONT_VALUE, x_val);
- fill_gap_join_left<Combiner>(value_type(left_gap, x_val), combine); //A posteriori
+ fill_gap_join_left<Combiner>(value_type(left_gap, x_val)); //A posteriori
 
         if(Traits::absorbs_neutrons && it->CONT_VALUE == CodomainT())
             this->_map.erase(it++);
@@ -566,13 +566,13 @@
         nxt_it++;
     }
 
- add_rear<Combiner>(x_rest, x_val, it, combine);
+ add_rear<Combiner>(x_rest, x_val, it);
 }
 
 template <typename DomainT, typename CodomainT, class Traits, template<class,ITL_COMPARE>class Interval, ITL_COMPARE Compare, ITL_COMPARE Combine, ITL_ALLOC Alloc>
     template<class Combiner>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it, const Combiner& combine)
+ ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it)
 {
     interval_type cur_itv = (*it).KEY_VALUE ;
     CodomainT cur_val = (*it).CONT_VALUE ;
@@ -600,9 +600,9 @@
         fill_join_left(value_type(common, cmb_val));
 
     if(!lead_gap.empty())
- fill_gap_join_both<Combiner>(value_type(lead_gap, x_val), combine);
+ fill_gap_join_both<Combiner>(value_type(lead_gap, x_val));
     if(!end_gap.empty())
- fill_gap_join_both<Combiner>(value_type(end_gap, x_val), combine);
+ fill_gap_join_both<Combiner>(value_type(end_gap, x_val));
     else
         fill_join_left(value_type(right_resid, cur_val));
 }

Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2008-11-30 20:16:04 EST (Sun, 30 Nov 2008)
@@ -218,15 +218,15 @@
         void fill(const value_type&);
 
         template<class Combiner>
- void fill_gap(const value_type&, const Combiner& combine);
+ void fill_gap(const value_type&);
 
         template<class Combiner>
         void add_rest(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, iterator& end_it, const Combiner& combine);
+ iterator& it, iterator& end_it);
 
         template<class Combiner>
         void add_rear(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, const Combiner& combine);
+ iterator& it);
 
         template<class Combiner>
         void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
@@ -272,7 +272,7 @@
           template<class,ITL_COMPARE>class Interval, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_ALLOC Alloc>
     template<class Combiner>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::fill_gap(const value_type& value, const Combiner& combine)
+ ::fill_gap(const value_type& value)
 {
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
@@ -332,7 +332,7 @@
 
         interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
         // this is a new Interval that is a gap in the current map
- fill_gap<Combiner>(value_type(leadGap, x_val), combine);
+ fill_gap<Combiner>(value_type(leadGap, x_val));
 
         // only for the first there can be a leftResid: a part of *it left of x
         interval_type leftResid; fst_itv.left_surplus(leftResid, x_itv);
@@ -352,7 +352,7 @@
 
             interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
             // this is a new Interval that is a gap in the current map
- fill_gap<Combiner>(value_type(endGap, x_val), combine);
+ fill_gap<Combiner>(value_type(endGap, x_val));
 
             // only for the last there can be a rightResid: a part of *it right of x
             interval_type rightResid; (*fst_it).KEY_VALUE.right_surplus(rightResid, x_itv);
@@ -372,7 +372,7 @@
             interval_type x_rest(x_itv);
             x_rest.left_subtract(fst_itv);
 
- add_rest<Combiner>(x_rest, x_val, snd_it, end_it, combine);
+ add_rest<Combiner>(x_rest, x_val, snd_it, end_it);
         }
     }
 }
@@ -381,7 +381,7 @@
     template<class Combiner>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
     ::add_rest(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, iterator& end_it, const Combiner& combine)
+ iterator& it, iterator& end_it)
 {
     iterator nxt_it = it; nxt_it++;
     interval_type x_rest = x_itv, gap, common, cur_itv;
@@ -392,7 +392,7 @@
         x_rest.left_surplus(gap, cur_itv);
 
         Combiner()(it->CONT_VALUE, x_val);
- fill_gap<Combiner>(value_type(gap, x_val), combine);
+ fill_gap<Combiner>(value_type(gap, x_val));
 
         if(Traits::absorbs_neutrons && it->CONT_VALUE == CodomainT())
             this->_map.erase(it++);
@@ -403,20 +403,20 @@
         nxt_it++;
     }
 
- add_rear<Combiner>(x_rest, x_val, it, combine);
+ add_rear<Combiner>(x_rest, x_val, it);
 }
 
 template <typename DomainT, typename CodomainT, class Traits, template<class,ITL_COMPARE>class Interval, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_ALLOC Alloc>
     template<class Combiner>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
- ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it, const Combiner& combine)
+ ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it)
 {
     interval_type cur_itv = (*it).KEY_VALUE ;
     CodomainT cur_val = (*it).CONT_VALUE ;
 
     interval_type left_gap;
     x_rest.left_surplus(left_gap, cur_itv);
- fill_gap<Combiner>(value_type(left_gap, x_val), combine);
+ fill_gap<Combiner>(value_type(left_gap, x_val));
 
     interval_type common;
     cur_itv.intersect(common, x_rest);
@@ -426,7 +426,7 @@
 
     interval_type end_gap;
     x_rest.right_surplus(end_gap, cur_itv);
- fill_gap<Combiner>(value_type(end_gap, x_val), combine);
+ fill_gap<Combiner>(value_type(end_gap, x_val));
 
     // only for the last there can be a rightResid: a part of *it right of x
     interval_type right_resid;
@@ -580,7 +580,7 @@
 
         interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
         // this is a new Interval that is a gap in the current map
- fill_gap<inplace_plus<CodomainT> >(value_type(leadGap, x_val), inplace_plus<CodomainT>());
+ fill_gap<inplace_plus<CodomainT> >(value_type(leadGap, x_val));
 
         // only for the first there can be a leftResid: a part of *it left of x
         interval_type leftResid; fst_itv.left_surplus(leftResid, x_itv);
@@ -595,7 +595,7 @@
         {
             interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
             // this is a new Interval that is a gap in the current map
- fill_gap<inplace_plus<CodomainT> >(value_type(endGap, x_val), inplace_plus<CodomainT>());
+ fill_gap<inplace_plus<CodomainT> >(value_type(endGap, x_val));
         }
         else
         {
@@ -622,7 +622,7 @@
     {
         cur_itv = (*it).KEY_VALUE ;
         x_rest.left_surplus(gap, cur_itv);
- fill_gap<inplace_plus<CodomainT> >(value_type(gap, x_val), inplace_plus<CodomainT>());
+ fill_gap<inplace_plus<CodomainT> >(value_type(gap, x_val));
         // shrink interval
         x_rest.left_subtract(cur_itv);
     }
@@ -640,14 +640,14 @@
 
     interval_type left_gap;
     x_rest.left_surplus(left_gap, cur_itv);
- fill_gap<inplace_plus<CodomainT> >(value_type(left_gap, x_val), inplace_plus<CodomainT>());
+ fill_gap<inplace_plus<CodomainT> >(value_type(left_gap, x_val));
 
     interval_type common;
     cur_itv.intersect(common, x_rest);
 
     interval_type end_gap;
     x_rest.right_surplus(end_gap, cur_itv);
- fill_gap<inplace_plus<CodomainT> >(value_type(end_gap, x_val), inplace_plus<CodomainT>());
+ fill_gap<inplace_plus<CodomainT> >(value_type(end_gap, x_val));
 }
 
 


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