|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50571 - in sandbox/itl: boost/itl libs/itl/test/test_itl_interval
From: afojgo_at_[hidden]
Date: 2009-01-13 18:02:30
Author: jofaber
Date: 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
New Revision: 50571
URL: http://svn.boost.org/trac/boost/changeset/50571
Log:
Refactored. Replaced left/right_surplus by right/left_subtract. Stable {msvc-9.0, partly congcc-4.3-a7}
Text files modified:
sandbox/itl/boost/itl/interval.hpp | 39 +++++++++++++++++++++++++++------------
sandbox/itl/boost/itl/interval_base_map.hpp | 4 ++--
sandbox/itl/boost/itl/interval_map.hpp | 40 ++++++++++++++++++++--------------------
sandbox/itl/boost/itl/interval_set.hpp | 8 ++++----
sandbox/itl/boost/itl/separate_interval_set.hpp | 8 ++++----
sandbox/itl/boost/itl/split_interval_map.hpp | 40 ++++++++++++++++++++--------------------
sandbox/itl/boost/itl/split_interval_set.hpp | 20 ++++++++++----------
sandbox/itl/libs/itl/test/test_itl_interval/test_itl_interval.cpp | 8 ++++----
8 files changed, 91 insertions(+), 76 deletions(-)
Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -436,6 +436,17 @@
/** Intersection with the interval <tt>x2</tt>; assign result to <tt>isec</tt> */
void intersect(interval& isec, const interval& x2)const;
+ /** subtract \c x2 from \c *this interval on it's left side. Assign the difference
+ to \c right_over. The result \c right_over is the part of \c *this right of \c x2.
+\code
+right_over = x1 - x2; //on the left.
+... d) : x1
+... c) : x2; x1.left_subtract(right_over, x2);
+ [c d) : right_over
+\endcode
+ */
+ void left_subtract(interval& rsur, const interval& x2)const;
+
/** subtract \c x2 from \c *this interval on it's right side. Assign the difference
to \c left_over. The result \c left_over is the part of \c *this left of \c x2.
\code
@@ -445,22 +456,26 @@
[a b) : left_over
\endcode
*/
- void left_surplus(interval& left_over, const interval& x2)const;
+ void right_subtract(interval& left_over, const interval& x2)const;
- /** subtract \c x2 from \c *this interval on it's left side. Assign the difference
- to \c right_over. The result \c right_over is the part of \c *this right of \c x2.
+ /** subtract \c x2 from \c *this interval on it's left side.
\code
-right_over = x1 - x2; //on the left.
-... d) : x1
-... c) : x2; x1.left_subtract(right_over, x2);
- [c d) : right_over
+*this = *this - x2; //on the left.
+... d) : *this
+... c) : x2;
+ [c d) : *this
\endcode
*/
- void right_surplus(interval& rsur, const interval& x2)const;
-
-
interval& left_subtract(const interval& x2);
+ /** subtract \c x2 from \c *this interval on it's right side.
+\code
+*this = *this - x2; //on the right side.
+[a ... : *this
+ [b ... : x2;
+[a b) : *this
+\endcode
+ */
interval& right_subtract(const interval& x2);
/** Interval spanning from lower bound of *this interval to the upper bound of rhs.
@@ -973,7 +988,7 @@
template <class DomainT, ITL_COMPARE Compare>
-void interval<DomainT,Compare>::left_surplus(interval<DomainT,Compare>& lsur, const interval<DomainT,Compare>& x2)const
+void interval<DomainT,Compare>::right_subtract(interval<DomainT,Compare>& lsur, const interval<DomainT,Compare>& x2)const
{
if(lower_less(x2)) {
lsur.set_lwb( BoundT(_lwb,boundtypes()) );
@@ -986,7 +1001,7 @@
}
template <class DomainT, ITL_COMPARE Compare>
-void interval<DomainT,Compare>::right_surplus(interval<DomainT,Compare>& rsur, const interval<DomainT,Compare>& x2)const
+void interval<DomainT,Compare>::left_subtract(interval<DomainT,Compare>& rsur, const interval<DomainT,Compare>& x2)const
{
if(x2.upper_less(*this)) {
if(x2.exclusive_less(*this))
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 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -1159,7 +1159,7 @@
typename ImplMapT::iterator it=fst_it, nxt_it=fst_it, victim;
interval_type leftResid; // left residual from first overlapping interval of *this
- (*it).KEY_VALUE.left_surplus(leftResid,x_itv);
+ (*it).KEY_VALUE.right_subtract(leftResid,x_itv);
interval_type rightResid; // right residual from last overlapping interval of *this
CodomainT leftResid_ContVal = (*it).CONT_VALUE;
@@ -1169,7 +1169,7 @@
{
if((++nxt_it)==end_it)
{
- (*it).KEY_VALUE.right_surplus(rightResid,x_itv);
+ (*it).KEY_VALUE.left_subtract(rightResid,x_itv);
rightResid_ContVal = (*it).CONT_VALUE;
}
victim = it; it++; _map.erase(victim);
Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -487,13 +487,13 @@
CodomainT cur_val = (*fst_it).CONT_VALUE;
- interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
+ interval_type leadGap; x_itv.right_subtract(leadGap, fst_itv);
// this is a new Interval that is a gap in the current map
//The first collision interval may grow by joining neighbours after insertion
// 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);
+ fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -509,11 +509,11 @@
{
// first == last
- interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
+ interval_type endGap; x_itv.left_subtract(endGap, fst_itv);
// this is a new Interval that is a gap in the current map
// 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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
this->_map.erase(fst_it);
fill_join_left(value_type(leftResid, cur_val));
@@ -559,7 +559,7 @@
while(nxt_it!=end_it)
{
cur_itv = (*it).KEY_VALUE ;
- x_rest.left_surplus(left_gap, cur_itv);
+ x_rest.right_subtract(left_gap, cur_itv);
Combiner()(it->CONT_VALUE, x_val);
fill_gap_join_left<Combiner>(value_type(left_gap, x_val)); //A posteriori
@@ -590,7 +590,7 @@
CodomainT cur_val = (*it).CONT_VALUE ;
interval_type lead_gap;
- x_rest.left_surplus(lead_gap, cur_itv);
+ x_rest.right_subtract(lead_gap, cur_itv);
interval_type common;
cur_itv.intersect(common, x_rest);
@@ -599,11 +599,11 @@
Combiner()(cmb_val, x_val);
interval_type end_gap;
- x_rest.right_surplus(end_gap, cur_itv);
+ x_rest.left_subtract(end_gap, cur_itv);
// only for the last there can be a rightResid: a part of *it right of x
interval_type right_resid;
- cur_itv.right_surplus(right_resid, x_rest);
+ cur_itv.left_subtract(right_resid, x_rest);
this->_map.erase(it);
if(end_gap.empty() && right_resid.empty())
@@ -648,7 +648,7 @@
// 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);
+ fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -662,7 +662,7 @@
if(snd_it == end_it)
{
// 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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
this->_map.erase(fst_it);
fill_join_left(value_type(leftResid, fst_val));
@@ -719,7 +719,7 @@
const interval_type& cur_itv = (*it).KEY_VALUE ;
interval_type rightResid;
- cur_itv.right_surplus(rightResid, x_itv);
+ cur_itv.left_subtract(rightResid, x_itv);
if(rightResid.empty())
{
@@ -791,11 +791,11 @@
//assert(end_it == this->_map.upper_bound(x_itv));
interval_type fst_itv = (*fst_it).KEY_VALUE ;
- interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
+ interval_type leadGap; x_itv.right_subtract(leadGap, fst_itv);
// this is a new Interval that is a gap in the current map
// 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);
+ interval_type leftResid; fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -809,7 +809,7 @@
if(!leadGap.empty())
fill_join_both(value_type(leadGap, x_val));
- interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
+ interval_type endGap; x_itv.left_subtract(endGap, fst_itv);
// this is a new Interval that is a gap in the current map
fill_join_both(value_type(endGap, x_val));
}
@@ -840,7 +840,7 @@
for(; nxt_it!=end_it; ++it, ++nxt_it)
{
cur_itv = (*it).KEY_VALUE ;
- x_rest.left_surplus(gap, cur_itv);
+ x_rest.right_subtract(gap, cur_itv);
if(!gap.empty())
{
@@ -865,7 +865,7 @@
interval_type cur_itv = (*it).KEY_VALUE ;
interval_type left_gap;
- x_rest.left_surplus(left_gap, cur_itv);
+ x_rest.right_subtract(left_gap, cur_itv);
if(!left_gap.empty())
{
@@ -878,7 +878,7 @@
cur_itv.intersect(common, x_rest);
interval_type end_gap;
- x_rest.right_surplus(end_gap, cur_itv);
+ x_rest.left_subtract(end_gap, cur_itv);
fill_join_both(value_type(end_gap, x_val));
}
@@ -910,7 +910,7 @@
// 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);
+ fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -921,7 +921,7 @@
if(snd_it == end_it)
{
// 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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
if(!interSec.empty() && fst_val == x_val)
{
@@ -969,7 +969,7 @@
CodomainT cur_val = (*it).CONT_VALUE;
interval_type rightResid;
- cur_itv.right_surplus(rightResid, x_itv);
+ cur_itv.left_subtract(rightResid, x_itv);
if(rightResid.empty())
{
Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -325,13 +325,13 @@
typename ImplSetT::iterator end_it = this->_set.upper_bound(x);
typename ImplSetT::iterator it=fst_it, nxt_it=fst_it, victim;
- interval_type leftResid; (*it).left_surplus(leftResid,x);
+ interval_type leftResid; (*it).right_subtract(leftResid,x);
interval_type rightResid;
while(it!=end_it)
{
if((++nxt_it)==end_it)
- (*it).right_surplus(rightResid,x);
+ (*it).left_subtract(rightResid,x);
victim = it; it++; this->_set.erase(victim);
}
@@ -352,12 +352,12 @@
typename ImplSetT::iterator end_it = this->_set.upper_bound(x);
typename ImplSetT::iterator it=fst_it, nxt_it=fst_it, victim;
- interval_type leftResid; (*it).left_surplus(leftResid,x);
+ interval_type leftResid; (*it).right_subtract(leftResid,x);
interval_type rightResid;
while(it!=end_it)
{
- if((++nxt_it)==end_it) (*it).right_surplus(rightResid,x);
+ if((++nxt_it)==end_it) (*it).left_subtract(rightResid,x);
victim = it; it++; this->_set.erase(victim);
}
Modified: sandbox/itl/boost/itl/separate_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/separate_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/separate_interval_set.hpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -212,13 +212,13 @@
typename ImplSetT::iterator end_it = this->_set.upper_bound(x);
typename ImplSetT::iterator it=fst_it, nxt_it=fst_it, victim;
- interval_type leftResid; (*it).left_surplus(leftResid,x);
+ interval_type leftResid; (*it).right_subtract(leftResid,x);
interval_type rightResid;
while(it!=end_it)
{
if((++nxt_it)==end_it)
- (*it).right_surplus(rightResid,x);
+ (*it).left_subtract(rightResid,x);
victim = it; it++; this->_set.erase(victim);
}
@@ -239,12 +239,12 @@
typename ImplSetT::iterator end_it = this->_set.upper_bound(x);
typename ImplSetT::iterator it=fst_it, nxt_it=fst_it, victim;
- interval_type leftResid; (*it).left_surplus(leftResid,x);
+ interval_type leftResid; (*it).right_subtract(leftResid,x);
interval_type rightResid;
while(it!=end_it)
{
- if((++nxt_it)==end_it) (*it).right_surplus(rightResid,x);
+ if((++nxt_it)==end_it) (*it).left_subtract(rightResid,x);
victim = it; it++; this->_set.erase(victim);
}
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 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -338,12 +338,12 @@
CodomainT cur_val = (*fst_it).CONT_VALUE ;
- interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
+ interval_type leadGap; x_itv.right_subtract(leadGap, fst_itv);
// this is a new Interval that is a gap in the current map
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);
+ interval_type leftResid; fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -358,12 +358,12 @@
{
// first == last
- interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
+ interval_type endGap; x_itv.left_subtract(endGap, fst_itv);
// this is a new Interval that is a gap in the current map
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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
this->_map.erase(fst_it);
fill(value_type(leftResid, cur_val));
@@ -397,7 +397,7 @@
while(nxt_it!=end_it)
{
cur_itv = (*it).KEY_VALUE ;
- x_rest.left_surplus(gap, cur_itv);
+ x_rest.right_subtract(gap, cur_itv);
Combiner()(it->CONT_VALUE, x_val);
fill_gap<Combiner>(value_type(gap, x_val));
@@ -423,7 +423,7 @@
CodomainT cur_val = (*it).CONT_VALUE ;
interval_type left_gap;
- x_rest.left_surplus(left_gap, cur_itv);
+ x_rest.right_subtract(left_gap, cur_itv);
fill_gap<Combiner>(value_type(left_gap, x_val));
interval_type common;
@@ -433,12 +433,12 @@
Combiner()(cmb_val, x_val);
interval_type end_gap;
- x_rest.right_surplus(end_gap, cur_itv);
+ x_rest.left_subtract(end_gap, cur_itv);
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;
- cur_itv.right_surplus(right_resid, x_rest);
+ cur_itv.left_subtract(right_resid, x_rest);
this->_map.erase(it);
fill(value_type(common, cmb_val));
@@ -474,7 +474,7 @@
// 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);
+ fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -488,7 +488,7 @@
if(snd_it == end_it)
{
// 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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
this->_map.erase(fst_it);
fill(value_type(leftResid, fst_val));
@@ -532,7 +532,7 @@
const interval_type& cur_itv = (*it).KEY_VALUE ;
interval_type rightResid;
- cur_itv.right_surplus(rightResid, x_itv);
+ cur_itv.left_subtract(rightResid, x_itv);
if(rightResid.empty())
{
@@ -586,12 +586,12 @@
//assert(end_it == this->_map.upper_bound(x_itv));
interval_type fst_itv = (*fst_it).KEY_VALUE ;
- interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
+ interval_type leadGap; x_itv.right_subtract(leadGap, fst_itv);
// this is a new Interval that is a gap in the current map
fill(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);
+ interval_type leftResid; fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -601,7 +601,7 @@
iterator snd_it = fst_it; snd_it++;
if(snd_it == end_it)
{
- interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
+ interval_type endGap; x_itv.left_subtract(endGap, fst_itv);
// this is a new Interval that is a gap in the current map
fill(value_type(endGap, x_val));
}
@@ -629,7 +629,7 @@
for(; nxt_it!=end_it; ++it, ++nxt_it)
{
cur_itv = (*it).KEY_VALUE ;
- x_rest.left_surplus(gap, cur_itv);
+ x_rest.right_subtract(gap, cur_itv);
fill(value_type(gap, x_val));
// shrink interval
x_rest.left_subtract(cur_itv);
@@ -647,14 +647,14 @@
interval_type cur_itv = (*it).KEY_VALUE ;
interval_type left_gap;
- x_rest.left_surplus(left_gap, cur_itv);
+ x_rest.right_subtract(left_gap, cur_itv);
fill(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);
+ x_rest.left_subtract(end_gap, cur_itv);
fill(value_type(end_gap, x_val));
}
@@ -685,7 +685,7 @@
// 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);
+ fst_itv.right_subtract(leftResid, x_itv);
// handle special case for first
@@ -696,7 +696,7 @@
if(snd_it == end_it)
{
// 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);
+ interval_type rightResid; (*fst_it).KEY_VALUE.left_subtract(rightResid, x_itv);
if(!interSec.empty() && fst_val == x_val)
{
@@ -744,7 +744,7 @@
CodomainT cur_val = (*it).CONT_VALUE;
interval_type rightResid;
- cur_itv.right_surplus(rightResid, x_itv);
+ cur_itv.left_subtract(rightResid, x_itv);
if(rightResid.empty())
{
Modified: sandbox/itl/boost/itl/split_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_set.hpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -234,12 +234,12 @@
iterator cur_it = fst_it ;
interval_type cur_itv = *cur_it;
- interval_type leadGap; x.left_surplus(leadGap, cur_itv);
+ interval_type leadGap; x.right_subtract(leadGap, cur_itv);
// this is a new Interval that is a gap in the current map
add_(leadGap);
// only for the first there can be a leftResid: a part of *it left of x
- interval_type leftResid; cur_itv.left_surplus(leftResid, x);
+ interval_type leftResid; cur_itv.right_subtract(leftResid, x);
// handle special case for first
interval_type interSec;
@@ -250,12 +250,12 @@
{
// first == last
- interval_type endGap; x.right_surplus(endGap, cur_itv);
+ interval_type endGap; x.left_subtract(endGap, cur_itv);
// this is a new Interval that is a gap in the current map
add_(endGap);
// only for the last there can be a rightResid: a part of *it right of x
- interval_type rightResid; (*cur_it).right_surplus(rightResid, x);
+ interval_type rightResid; (*cur_it).left_subtract(rightResid, x);
this->_set.erase(cur_it);
add_(leftResid);
@@ -285,7 +285,7 @@
interval_type cur_itv = *it;
- interval_type newGap; x_itv.left_surplus(newGap, cur_itv);
+ interval_type newGap; x_itv.right_subtract(newGap, cur_itv);
// this is a new Interval that is a gap in the current map
add_(newGap);
@@ -294,12 +294,12 @@
if(nxt_it==end_it)
{
- interval_type endGap; x_itv.right_surplus(endGap, cur_itv);
+ interval_type endGap; x_itv.left_subtract(endGap, cur_itv);
// this is a new Interval that is a gap in the current map
add_(endGap);
// only for the last there can be a rightResid: a part of *it right of x
- interval_type rightResid; cur_itv.right_surplus(rightResid, x_itv);
+ interval_type rightResid; cur_itv.left_subtract(rightResid, x_itv);
this->_set.erase(it);
add_(interSec);
@@ -341,7 +341,7 @@
interval_type cur_itv = *cur_it ;
// only for the first there can be a leftResid: a part of *it left of x
- interval_type leftResid; cur_itv.left_surplus(leftResid, x);
+ interval_type leftResid; cur_itv.right_subtract(leftResid, x);
// handle special case for first
interval_type interSec;
@@ -352,7 +352,7 @@
{
// first == last
// only for the last there can be a rightResid: a part of *it right of x
- interval_type rightResid; (*cur_it).right_surplus(rightResid, x);
+ interval_type rightResid; (*cur_it).left_subtract(rightResid, x);
this->_set.erase(cur_it);
add_(leftResid);
@@ -384,7 +384,7 @@
// it refers the last overlaying intervals of x_itv
const interval_type& cur_itv = *it ;
- interval_type rightResid; cur_itv.right_surplus(rightResid, x_itv);
+ interval_type rightResid; cur_itv.left_subtract(rightResid, x_itv);
if(rightResid.empty())
this->_set.erase(it);
Modified: sandbox/itl/libs/itl/test/test_itl_interval/test_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval/test_itl_interval.cpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval/test_itl_interval.cpp 2009-01-13 18:02:29 EST (Tue, 13 Jan 2009)
@@ -335,7 +335,7 @@
interval<T> I6_7D = interval<T>::rightopen(v6,v7);
interval<T> I2_4D = interval<T>::rightopen(v2,v4);
- I2_6D.left_surplus(diff_1,I4_7D);
+ I2_6D.right_subtract(diff_1,I4_7D);
BOOST_CHECK_EQUAL( diff_1, I2_4D );
diff_2 = I2_6D;
@@ -343,11 +343,11 @@
BOOST_CHECK_EQUAL( diff_2, I2_4D );
diff_1.clear();
- I0_3D.left_surplus(diff_1, I4_7D);
+ I0_3D.right_subtract(diff_1, I4_7D);
BOOST_CHECK_EQUAL( diff_1, I0_3D );
// ---------------------------------
- I4_7D.right_surplus(diff_1, I2_6D);
+ I4_7D.left_subtract(diff_1, I2_6D);
BOOST_CHECK_EQUAL( diff_1, I6_7D );
diff_2 = I4_7D;
@@ -355,7 +355,7 @@
BOOST_CHECK_EQUAL( diff_2, I6_7D );
diff_1.clear();
- I4_7D.right_surplus(diff_1, I0_3D);
+ I4_7D.left_subtract(diff_1, I0_3D);
BOOST_CHECK_EQUAL( diff_1, I4_7D );
diff_2 = I4_7D;
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