|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50052 - sandbox/itl/boost/itl
From: afojgo_at_[hidden]
Date: 2008-12-01 05:55:37
Author: jofaber
Date: 2008-12-01 05:55:36 EST (Mon, 01 Dec 2008)
New Revision: 50052
URL: http://svn.boost.org/trac/boost/changeset/50052
Log:
Refactored: Combiner functor static instantiation. Step 4. subtract_, subtract_rest functors.
Stable {msvc-9.0}
Text files modified:
sandbox/itl/boost/itl/interval_base_map.hpp | 10 ++++------
sandbox/itl/boost/itl/interval_map.hpp | 15 +++++++--------
sandbox/itl/boost/itl/split_interval_map.hpp | 14 +++++++-------
3 files changed, 18 insertions(+), 21 deletions(-)
Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2008-12-01 05:55:36 EST (Mon, 01 Dec 2008)
@@ -498,8 +498,8 @@
*/
private:
template<class Combiner>
- void subtract(const value_type& x, const Combiner& combine)
- { that()->template subtract_(x, combine); }
+ void subtract(const value_type& x)
+ { that()->template subtract_<Combiner>(x); }
public:
/// Subtraction of a base value pair.
@@ -517,8 +517,7 @@
*/
SubType& subtract(const base_pair_type& x)
{
- access::subtract(*that(), value_type(interval_type(x.key), x.data) );
- return *that();
+ return subtract( value_type(interval_type(x.key), x.data) );
}
@@ -540,9 +539,8 @@
typedef inverse<Combine,CodomainT>::type InverseCombine;
if(Traits::emits_neutrons)
that()->template add_<InverseCombine>(x);
- //CL access::add<value_type,InverseCombine>(*that(), x, InverseCombine());
else
- access::subtract<value_type,InverseCombine>(*that(), x, InverseCombine());
+ that()->template subtract_<InverseCombine>(x);
return *that();
}
Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2008-12-01 05:55:36 EST (Mon, 01 Dec 2008)
@@ -187,14 +187,14 @@
{ add_<Combine<CodomainT> >(value); }
template<class Combiner>
- void subtract_(const value_type&, const Combiner&);
+ void subtract_(const value_type&);
- void subtract_(const value_type& value)
+ void subtract_(const value_type& value)//JODO
{
if(Traits::emits_neutrons)
add_<inplace_minus<CodomainT> >(value);
else
- subtract_<inplace_minus<CodomainT> >(value, inplace_minus<CodomainT>());
+ subtract_<inplace_minus<CodomainT> >(value);
}
void insert_(const value_type& value);
@@ -232,8 +232,7 @@
template<class Combiner>
void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, iterator& end_it,
- const Combiner&);
+ iterator& it, iterator& end_it);
void insert_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
void insert_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
@@ -616,7 +615,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>
- ::subtract_(const value_type& x, const Combiner& combine)
+ ::subtract_(const value_type& x)
{
const interval_type& x_itv = x.KEY_VALUE;
@@ -676,7 +675,7 @@
interval_type x_rest(x_itv);
x_rest.left_subtract(fst_itv);
- subtract_rest<Combiner>(x_rest, x_val, snd_it, end_it, combine);
+ subtract_rest<Combiner>(x_rest, x_val, snd_it, end_it);
}
}
@@ -685,7 +684,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>
- ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it, const Combiner& combine)
+ ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
{
iterator nxt_it=it; nxt_it++;
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-12-01 05:55:36 EST (Mon, 01 Dec 2008)
@@ -201,14 +201,14 @@
{ add_<inplace_plus<CodomainT> >(value); }
template<class Combiner>
- void subtract_(const value_type&, const Combiner&);
+ void subtract_(const value_type&);
- void subtract_(const value_type& value)
+ void subtract_(const value_type& value)//JODO
{
if(Traits::emits_neutrons)
add_<inplace_minus<CodomainT> >(value);
else
- subtract_<inplace_minus<CodomainT> >(value, inplace_minus<CodomainT>() );
+ subtract_<inplace_minus<CodomainT> >(value);
}
void insert_(const value_type& value);
@@ -232,7 +232,7 @@
template<class Combiner>
void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
- iterator& it, iterator& end_it, const Combiner& combine);
+ iterator& it, iterator& end_it);
void insert_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
void insert_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
@@ -446,7 +446,7 @@
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>
- ::subtract_(const value_type& x, const Combiner& combine)
+ ::subtract_(const value_type& x)
{
const interval_type& x_itv = x.KEY_VALUE;
@@ -496,7 +496,7 @@
fill(value_type(leftResid, fst_val));
fill(value_type(interSec, cmb_val));
- subtract_rest<Combiner>(x_itv, x_val, snd_it, end_it, combine);
+ subtract_rest<Combiner>(x_itv, x_val, snd_it, end_it);
}
}
@@ -506,7 +506,7 @@
template<class Combiner>
void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>
::subtract_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++;
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