|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65959 - in sandbox/itl: boost/itl boost/itl/concept boost/itl_xt boost/validate/driver boost/validate/gentor libs/itl/example/boost_party_ libs/itl/example/party_ libs/itl/test libs/itl/test/test_casual_
From: afojgo_at_[hidden]
Date: 2010-10-14 11:30:08
Author: jofaber
Date: 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
New Revision: 65959
URL: http://svn.boost.org/trac/boost/changeset/65959
Log:
Refactoring: Renamed all occurrences of _interval<T> with itl::interval<T>. Stable{msvc-9.0, gcc-3.4.4}
Text files modified:
sandbox/itl/boost/itl/concept/interval.hpp | 1
sandbox/itl/boost/itl/interval.hpp | 2
sandbox/itl/boost/itl_xt/bits_gentor.hpp | 2
sandbox/itl/boost/itl_xt/itvgentor.hpp | 4 +-
sandbox/itl/boost/itl_xt/map_segment_gentor.hpp | 8 ++--
sandbox/itl/boost/itl_xt/mapgentor.hpp | 6 +-
sandbox/itl/boost/itl_xt/numbergentor.hpp | 6 +-
sandbox/itl/boost/itl_xt/random.hpp | 2
sandbox/itl/boost/itl_xt/seqgentor.hpp | 6 +-
sandbox/itl/boost/itl_xt/setgentor.hpp | 14 +++---
sandbox/itl/boost/validate/driver/map_copy_conformity_driver.hpp | 4 +-
sandbox/itl/boost/validate/gentor/gentorprofile.hpp | 70 +++++++++++++++++-----------------
sandbox/itl/boost/validate/gentor/randomgentor.hpp | 30 +++++++-------
sandbox/itl/boost/validate/gentor/rangegentor.hpp | 12 +++---
sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp | 8 ++--
sandbox/itl/libs/itl/example/party_/party.cpp | 6 +-
sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp | 60 +++++++++++++++---------------
sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp | 2
sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp | 2
sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp | 4 +-
sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp | 80 ++++++++++++++++++++--------------------
sandbox/itl/libs/itl/test/test_value_maker.hpp | 8 ++--
22 files changed, 168 insertions(+), 169 deletions(-)
Modified: sandbox/itl/boost/itl/concept/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/interval.hpp (original)
+++ sandbox/itl/boost/itl/concept/interval.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -15,7 +15,6 @@
#include <boost/mpl/not.hpp>
#include <boost/detail/is_incrementable.hpp>
#include <boost/itl/detail/design_config.hpp>
-//CL #include <boost/itl/type_traits/given.hpp> //JODO given unused: remove
#include <boost/itl/type_traits/unit_element.hpp>
#include <boost/itl/type_traits/identity_element.hpp>
#include <boost/itl/type_traits/infinity.hpp>
Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -16,7 +16,7 @@
{
template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
- struct _interval
+ struct interval
{
typedef typename interval_type_default<DomainT,Compare>::type interval_type;
typedef interval_type type;
Modified: sandbox/itl/boost/itl_xt/bits_gentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/bits_gentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/bits_gentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -20,7 +20,7 @@
class bits_gentor: public RandomGentorAT<itl::bits<NaturalT> >
{
public:
- typedef typename itl::_interval<NaturalT>::type range_type;
+ typedef typename itl::interval<NaturalT>::type range_type;
typedef itl::bits<NaturalT> bits_type;
void some(bits_type& value)
Modified: sandbox/itl/boost/itl_xt/itvgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/itvgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/itvgentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -42,11 +42,11 @@
namespace boost{namespace itl
{
-template <class ItvDomTV, class ItvTV=itl::_interval<ItvDomTV>::type>
+template <class ItvDomTV, class ItvTV=itl::interval<ItvDomTV>::type>
class ItvGentorT: public RandomGentorAT<ItvTV>
{
public:
- typedef typename itl::_interval<ItvDomTV>::type range_type;
+ typedef typename itl::interval<ItvDomTV>::type range_type;
virtual void some(ItvTV& x);
Modified: sandbox/itl/boost/itl_xt/map_segment_gentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/map_segment_gentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/map_segment_gentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -19,16 +19,16 @@
namespace boost{namespace itl
{
-template <class DomainT, class CodomainT, class IntervalT = itl::_interval<DomainT>::type >
+template <class DomainT, class CodomainT, class IntervalT = itl::interval<DomainT>::type >
class map_segment_gentor: public RandomGentorAT<std::pair<IntervalT, CodomainT> >
{
public:
typedef DomainT domain_type;
typedef CodomainT codomain_type;
typedef IntervalT interval_type;
- typedef typename itl::_interval<domain_type>::type range_type;
- typedef typename itl::_interval<codomain_type>::type co_range_type;
- //typedef typename itl::_interval<codomain_type>::type co_range_type;
+ typedef typename itl::interval<domain_type>::type range_type;
+ typedef typename itl::interval<codomain_type>::type co_range_type;
+ //typedef typename itl::interval<codomain_type>::type co_range_type;
typedef std::pair<IntervalT, CodomainT> segment_type;
public:
Modified: sandbox/itl/boost/itl_xt/mapgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/mapgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/mapgentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -23,7 +23,7 @@
typedef typename MapTV::key_type DomainTD;
typedef typename MapTV::data_type CodomainTD;
typedef list<ValueTypeTD> SampleTypeTD;
- typedef typename itl::_interval<int>::type sample_range_type;
+ typedef typename itl::interval<int>::type sample_range_type;
MapGentorT(): p_domainGentor(NULL), p_codomainGentor(NULL) {}
~MapGentorT() { delete p_domainGentor; delete p_codomainGentor; }
@@ -44,9 +44,9 @@
}
void setRangeOfSampleSize(int lwb, int upb)
- { m_sampleSizeRange = _interval<int>::right_open(lwb,upb); }
+ { m_sampleSizeRange = itl::interval<int>::right_open(lwb,upb); }
- void setRangeOfSampleSize(const itl::_interval<int>::type& szRange)
+ void setRangeOfSampleSize(const itl::interval<int>::type& szRange)
{
BOOST_ASSERT(itl::bounds(szRange) == interval_bounds::right_open());
m_sampleSizeRange = szRange;
Modified: sandbox/itl/boost/itl_xt/numbergentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/numbergentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/numbergentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -56,7 +56,7 @@
class NumberGentorProfile : public RandomGentorProfile<NumT>
{
public:
- typedef typename itl::_interval<NumT>::type range_type;
+ typedef typename itl::interval<NumT>::type range_type;
private:
range_type _range;
};
@@ -65,7 +65,7 @@
class NumberGentorT : public RandomGentorAT<NumTV>
{
public:
- typedef typename itl::_interval<NumTV>::type range_type;
+ typedef typename itl::interval<NumTV>::type range_type;
public:
NumberGentorT():
m_valueRange( NumTV(), unit_element<NumTV>::value() ) {}
@@ -83,7 +83,7 @@
}
void setRange(range_type rng) { m_valueRange = rng; }
- void setRange(NumTV lwb, NumTV upb) { m_valueRange = _interval<NumTV>::right_open(lwb,upb); }
+ void setRange(NumTV lwb, NumTV upb) { m_valueRange = itl::interval<NumTV>::right_open(lwb,upb); }
void calibrate(const RandomGentorProfile<NumTV>& profile)
{
Modified: sandbox/itl/boost/itl_xt/random.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/random.hpp (original)
+++ sandbox/itl/boost/itl_xt/random.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -59,7 +59,7 @@
return some + lwb;
}
- unsigned rnd(const itl::_interval<unsigned>::type& rng)
+ unsigned rnd(const itl::interval<unsigned>::type& rng)
{
BOOST_ASSERT(itl::bounds(rng) == interval_bounds::right_open());
return rnd(rng.lower(),rng.upper());
Modified: sandbox/itl/boost/itl_xt/seqgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/seqgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/seqgentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -45,7 +45,7 @@
typedef typename SeqTV::value_type ValueTypeTD;
typedef typename SeqTV::value_type DomainTD;
typedef list<ValueTypeTD> SampleTypeTD;
- typedef typename itl::_interval<int>::type sample_range_type;
+ typedef typename itl::interval<int>::type sample_range_type;
SeqGentorT(): p_domainGentor(NULL), m_unique(false){}
~SeqGentorT(){ delete p_domainGentor; }
@@ -61,8 +61,8 @@
}
void setRangeOfSampleSize(int lwb, int upb)
- { m_sampleSizeRange = _interval<int>::right_open(lwb,upb); }
- void setRangeOfSampleSize(const _interval<int>::type& szRange)
+ { m_sampleSizeRange = itl::interval<int>::right_open(lwb,upb); }
+ void setRangeOfSampleSize(const itl::interval<int>::type& szRange)
{
BOOST_ASSERT(itl::bounds(szRange) == interval_bounds::right_open());
m_sampleSizeRange = szRange;
Modified: sandbox/itl/boost/itl_xt/setgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/setgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/setgentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -43,12 +43,12 @@
class SetGentorT: public RandomGentorAT<SetTV>
{
public:
- typedef typename SetTV::value_type ValueTypeTD;
- typedef typename SetTV::key_type DomainTD;
- typedef list<ValueTypeTD> SampleTypeTD;
- typedef RandomGentorAT<DomainTD> DomainGentorT;
- typedef DomainGentorT* DomainGentorPT;
- typedef typename itl::_interval<int>::type sample_range_type;
+ typedef typename SetTV::value_type ValueTypeTD;
+ typedef typename SetTV::key_type DomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+ typedef RandomGentorAT<DomainTD> DomainGentorT;
+ typedef DomainGentorT* DomainGentorPT;
+ typedef typename itl::interval<int>::type sample_range_type;
SetGentorT(): p_domainGentor(NULL) {}
~SetGentorT() { delete p_domainGentor; }
@@ -65,7 +65,7 @@
void setRangeOfSampleSize(int lwb, int upb)
{ m_sampleSizeRange = _interval<int>::right_open(lwb,upb); }
- void setRangeOfSampleSize(const itl::_interval<int>::type& szRange)
+ void setRangeOfSampleSize(const itl::interval<int>::type& szRange)
{
BOOST_ASSERT(itl::bounds(szRange) == interval_bounds::right_open());
m_sampleSizeRange = szRange;
Modified: sandbox/itl/boost/validate/driver/map_copy_conformity_driver.hpp
==============================================================================
--- sandbox/itl/boost/validate/driver/map_copy_conformity_driver.hpp (original)
+++ sandbox/itl/boost/validate/driver/map_copy_conformity_driver.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -94,8 +94,8 @@
concept_validater* chooseValidater()
{
- typedef _interval<double>::type interval_double;
- typedef _interval<int>::type interval_int;
+ typedef itl::interval<double>::type interval_double;
+ typedef itl::interval<int>::type interval_int;
int rootChoice = _rootChoice.some();
int identityHandlerChoice = _identityHandlerChoice.some();
Modified: sandbox/itl/boost/validate/gentor/gentorprofile.hpp
==============================================================================
--- sandbox/itl/boost/validate/gentor/gentorprofile.hpp (original)
+++ sandbox/itl/boost/validate/gentor/gentorprofile.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -30,35 +30,35 @@
void set_polygon_profile(int max_polygon_set_size, int max_polygon_size, int min_coord, int max_coord);
void set_range_int(int lwb, int upb)
- { _range_int = _interval<int>::right_open(lwb, upb); }
+ { _range_int = itl::interval<int>::right_open(lwb, upb); }
void set_range_nat(cnat lwb, cnat upb)
- { _range_nat = _interval<cnat>::right_open(lwb, upb); }
+ { _range_nat = itl::interval<cnat>::right_open(lwb, upb); }
void set_range_double(double lwb, double upb)
- { _range_double = _interval<double>::right_open(lwb, upb); }
+ { _range_double = itl::interval<double>::right_open(lwb, upb); }
void set_range_ContainerSize(int lwb, int upb)
- { _range_ContainerSize = _interval<int>::right_open(lwb, upb); }
+ { _range_ContainerSize = itl::interval<int>::right_open(lwb, upb); }
void set_range_interval_int(int lwb, int upb)
- { _range_interval_int = _interval<int>::right_open(lwb, upb); }
+ { _range_interval_int = itl::interval<int>::right_open(lwb, upb); }
void set_range_interval_double(double lwb, double upb)
- { _range_interval_double = _interval<double>::right_open(lwb, upb); }
+ { _range_interval_double = itl::interval<double>::right_open(lwb, upb); }
void set_maxIntervalLength(int val)
{ _maxIntervalLength = val; }
void set_range_codomain_ContainerSize(int lwb, int upb)
- { _range_codomain_ContainerSize = _interval<int>::right_open(lwb, upb); }
+ { _range_codomain_ContainerSize = itl::interval<int>::right_open(lwb, upb); }
void set_repeat_count(int repeat) { _repeat_count = repeat; }
void set_trials_count(int trials) { _trials_count = trials; }
void set_trials_count_release(int trials) { _trials_count_release = trials; }
void set_laws_per_cycle(int count){ _laws_per_cycle = count; }
void set_debug_slowdown(double factor){ _debug_slowdown = factor; }
- _interval<int>::type range_int() { return _range_int; }
- _interval<cnat>::type range_nat() { return _range_nat; }
- _interval<double>::type range_double() { return _range_double; }
- _interval<int>::type range_ContainerSize() { return _range_ContainerSize; }
- _interval<int>::type range_interval_int() { return _range_interval_int; }
- _interval<double>::type range_interval_double() { return _range_interval_double; }
+ itl::interval<int>::type range_int() { return _range_int; }
+ itl::interval<cnat>::type range_nat() { return _range_nat; }
+ itl::interval<double>::type range_double() { return _range_double; }
+ itl::interval<int>::type range_ContainerSize() { return _range_ContainerSize; }
+ itl::interval<int>::type range_interval_int() { return _range_interval_int; }
+ itl::interval<double>::type range_interval_double() { return _range_interval_double; }
int maxIntervalLength() { return _maxIntervalLength; }
- _interval<int>::type range_codomain_ContainerSize()
+ itl::interval<int>::type range_codomain_ContainerSize()
{ return _range_codomain_ContainerSize; }
int repeat_count() { return _repeat_count; }
int trials_count() { return _trials_count; }
@@ -75,16 +75,16 @@
void report_profile();
private:
- _interval<int>::type _range_int;
- _interval<cnat>::type _range_nat;
- _interval<double>::type _range_double;
- _interval<int>::type _range_ContainerSize;
+ itl::interval<int>::type _range_int;
+ itl::interval<cnat>::type _range_nat;
+ itl::interval<double>::type _range_double;
+ itl::interval<int>::type _range_ContainerSize;
- _interval<int>::type _range_interval_int;
- _interval<double>::type _range_interval_double;
+ itl::interval<int>::type _range_interval_int;
+ itl::interval<double>::type _range_interval_double;
int _maxIntervalLength;
- _interval<int>::type _range_codomain_ContainerSize;
+ itl::interval<int>::type _range_codomain_ContainerSize;
int _repeat_count;
int _trials_count;
int _trials_count_release;
@@ -122,14 +122,14 @@
void set_trials_count(int trials) { m_profile.set_trials_count(trials); }
void set_laws_per_cycle(int count) { m_profile.set_laws_per_cycle(count); }
- _interval<int>::type range_int() { return m_profile.range_int(); }
- _interval<cnat>::type range_nat() { return m_profile.range_nat(); }
- _interval<double>::type range_double() { return m_profile.range_double(); }
- _interval<int>::type range_ContainerSize(){ return m_profile.range_ContainerSize(); }
- _interval<int>::type range_interval_int() { return m_profile.range_interval_int(); }
- _interval<double>::type range_interval_double() { return m_profile.range_interval_double();}
+ itl::interval<int>::type range_int() { return m_profile.range_int(); }
+ itl::interval<cnat>::type range_nat() { return m_profile.range_nat(); }
+ itl::interval<double>::type range_double() { return m_profile.range_double(); }
+ itl::interval<int>::type range_ContainerSize(){ return m_profile.range_ContainerSize(); }
+ itl::interval<int>::type range_interval_int() { return m_profile.range_interval_int(); }
+ itl::interval<double>::type range_interval_double() { return m_profile.range_interval_double();}
int maxIntervalLength() { return m_profile.maxIntervalLength(); }
- _interval<int>::type range_codomain_ContainerSize(){ return m_profile.range_codomain_ContainerSize(); }
+ itl::interval<int>::type range_codomain_ContainerSize(){ return m_profile.range_codomain_ContainerSize(); }
int repeat_count() { return m_profile.repeat_count(); }
int trials_count() { return m_profile.trials_count(); }
int laws_per_cycle() { return m_profile.laws_per_cycle(); }
@@ -154,37 +154,37 @@
template<typename NumberT>
struct GentorProfileSgl_numeric_range
{
- static typename _interval<NumberT>::type get();
+ static typename itl::interval<NumberT>::type get();
};
template<>
struct GentorProfileSgl_numeric_range<int>
{
- static _interval<int>::type get()
+ static itl::interval<int>::type get()
{ return GentorProfileSgl::it()->range_int(); }
};
template<>
struct GentorProfileSgl_numeric_range<unsigned int>
{
- static _interval<unsigned int>::type get()
+ static itl::interval<unsigned int>::type get()
{
- _interval<cnat>::type inter_val = GentorProfileSgl::it()->range_nat();
- return _interval<unsigned int>::right_open(inter_val.lower(), inter_val.upper());
+ itl::interval<cnat>::type inter_val = GentorProfileSgl::it()->range_nat();
+ return itl::interval<unsigned int>::right_open(inter_val.lower(), inter_val.upper());
}
};
template<>
struct GentorProfileSgl_numeric_range<cnat>
{
- static _interval<cnat>::type get()
+ static itl::interval<cnat>::type get()
{ return GentorProfileSgl::it()->range_nat(); }
};
template<>
struct GentorProfileSgl_numeric_range<double>
{
- static _interval<double>::type get()
+ static itl::interval<double>::type get()
{ return GentorProfileSgl::it()->range_double(); }
};
Modified: sandbox/itl/boost/validate/gentor/randomgentor.hpp
==============================================================================
--- sandbox/itl/boost/validate/gentor/randomgentor.hpp (original)
+++ sandbox/itl/boost/validate/gentor/randomgentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -276,7 +276,7 @@
static void apply(RandomGentor<itl::bits<BitsT> >& gentor)
{
// Set the range within which the sizes of the generated object varies.
- gentor.set_range(itl::_interval<BitsT>::right_open(0, sizeof(BitsT)));
+ gentor.set_range(itl::interval<BitsT>::right_open(0, sizeof(BitsT)));
}
};
@@ -589,7 +589,7 @@
gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
ItvGentorT<int, discrete_interval<int,Compare> >* itvGentor
= new ItvGentorT<int, discrete_interval<int,Compare> >;
- typename _interval<int>::type valRange = GentorProfileSgl::it()->range_interval_int();
+ typename itl::interval<int>::type valRange = GentorProfileSgl::it()->range_interval_int();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
gentor.setDomainGentor(itvGentor);
@@ -683,7 +683,7 @@
NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
- codomainGentor->set_range(_interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+ codomainGentor->set_range(itl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
gentor.setDomainGentor(domainGentor);
gentor.setCodomainGentor(codomainGentor);
}
@@ -708,7 +708,7 @@
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -740,7 +740,7 @@
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -774,7 +774,7 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -806,7 +806,7 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -839,7 +839,7 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -873,7 +873,7 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
@@ -903,12 +903,12 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
- codomainGentor->set_range(_interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+ codomainGentor->set_range(itl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
gentor.setDomainGentor(itvGentor);
gentor.setCodomainGentor(codomainGentor);
@@ -933,12 +933,12 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
- codomainGentor->set_range(_interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+ codomainGentor->set_range(itl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
gentor.setDomainGentor(itvGentor);
gentor.setCodomainGentor(codomainGentor);
@@ -960,12 +960,12 @@
// NumberGentorT<int> intGentor;
ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
= new ItvGentorT<NumericDomainT, ITL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
- typename _interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ typename itl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
itvGentor->setValueRange(valRange.lower(), valRange.upper());
itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
- codomainGentor->set_range(_interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+ codomainGentor->set_range(itl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
gentor.setDomainGentor(itvGentor);
gentor.setCodomainGentor(codomainGentor);
Modified: sandbox/itl/boost/validate/gentor/rangegentor.hpp
==============================================================================
--- sandbox/itl/boost/validate/gentor/rangegentor.hpp (original)
+++ sandbox/itl/boost/validate/gentor/rangegentor.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -40,27 +40,27 @@
{
template <class Type>
- class RangeGentor: public RandomGentorAT<typename _interval<Type>::type >
+ class RangeGentor: public RandomGentorAT<typename itl::interval<Type>::type >
{
public:
- typedef typename _interval<Type>::type interval_type;
+ typedef typename itl::interval<Type>::type interval_type;
public:
virtual void some(interval_type& x);
interval_type last()const;
void setLowerBoundRange(int lwb, int upb)
- { setLowerBoundRange(_interval<int>::right_open(lwb,upb)); }
+ { setLowerBoundRange(itl::interval<int>::right_open(lwb,upb)); }
- void setLowerBoundRange(const itl::_interval<int>::type& range)
+ void setLowerBoundRange(const itl::interval<int>::type& range)
{
//JODO? BOOST_ASSERT(range.is_right_open()||range.is_closed());
_lwbGentor.setRange(range);
}
void setUpperBoundRange(int lwb, int upb)
- { setUpperBoundRange(_interval<int>::right_open(lwb,upb)); }
+ { setUpperBoundRange(itl::interval<int>::right_open(lwb,upb)); }
- void setUpperBoundRange(const itl::_interval<int>::type& range)
+ void setUpperBoundRange(const itl::interval<int>::type& range)
{
//JODO? BOOST_ASSERT(range.is_right_open()||range.is_closed());
_upbGentor.setRange(range);
Modified: sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp (original)
+++ sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -87,21 +87,21 @@
party.add( // add and element
make_pair(
- _interval<ptime>::right_open(
+ interval<ptime>::right_open(
time_from_string("2008-05-20 19:30"),
time_from_string("2008-05-20 23:00")),
mary_harry));
party += // element addition can also be done via operator +=
make_pair(
- _interval<ptime>::right_open(
+ interval<ptime>::right_open(
time_from_string("2008-05-20 20:10"),
time_from_string("2008-05-21 00:00")),
diana_susan);
party +=
make_pair(
- _interval<ptime>::right_open(
+ interval<ptime>::right_open(
time_from_string("2008-05-20 22:15"),
time_from_string("2008-05-21 00:30")),
peter);
@@ -111,7 +111,7 @@
cout << "----- History of party guests -------------------------\n";
while(it != party.end())
{
- _interval<ptime>::type when = it->first;
+ interval<ptime>::type when = it->first;
// Who is at the party within the time interval 'when' ?
GuestSetT who = (*it++).second;
cout << when << ": " << who << endl;
Modified: sandbox/itl/libs/itl/example/party_/party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/party_/party.cpp (original)
+++ sandbox/itl/libs/itl/example/party_/party.cpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -80,9 +80,9 @@
//party += make_pair( discrete_interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
//party += make_pair( discrete_interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
- party += make_pair( _interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
- party += make_pair( _interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
- party += make_pair( _interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
+ party += make_pair( interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
+ party += make_pair( interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
+ party += make_pair( interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
interval_map<Time, GuestSetT>::iterator it = party.begin();
while(it != party.end())
Modified: sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -285,59 +285,59 @@
BOOST_CHECK_EQUAL( is_interval_set<std::set<int> >::value, false );
#if defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && !defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
- BOOST_CHECK( (is_same<_interval<int >::type, right_open_interval<int > >::value) );
- BOOST_CHECK( (is_same<_interval<double>::type, right_open_interval<double> >::value) );
+ BOOST_CHECK( (is_same<itl::interval<int >::type, right_open_interval<int > >::value) );
+ BOOST_CHECK( (is_same<itl::interval<double>::type, right_open_interval<double> >::value) );
- BOOST_CHECK_EQUAL( _interval<int>::open(0,2), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::closed(1,1), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::open(0,2), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::left_open(0,1), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::closed(1,1), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<float>::right_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
+ BOOST_CHECK_EQUAL( itl::interval<float>::right_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
//The next yields compiletime error: STATIC_ASSERTION_FAILURE
- //BOOST_CHECK_EQUAL( _interval<float>::left_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
+ //BOOST_CHECK_EQUAL( itl::interval<float>::left_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
#endif
#if defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
# if defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 0)
cout << "discrete_interval == open_interval\n";
- BOOST_CHECK( (is_same<_interval<int>::type, open_interval<int> >::value) );
- BOOST_CHECK_EQUAL( _interval<int>::open(0,2), itl::construct<open_interval<int> >(0,2) );
- BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1), itl::construct<open_interval<int> >(0,2) );
- BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<open_interval<int> >(0,2) );
- BOOST_CHECK_EQUAL( _interval<int>::closed(1,1), itl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK( (is_same<itl::interval<int>::type, open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::open(0,2), itl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::left_open(0,1), itl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::right_open(1,2), itl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::closed(1,1), itl::construct<open_interval<int> >(0,2) );
# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 1)
cout << "discrete_interval == left_open_interval\n";
- BOOST_CHECK( (is_same<_interval<int>::type, left_open_interval<int> >::value) );
- BOOST_CHECK_EQUAL( _interval<int>::open(0,2), itl::construct<left_open_interval<int> >(0,1) );
- BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1), itl::construct<left_open_interval<int> >(0,1) );
- BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<left_open_interval<int> >(0,1) );
- BOOST_CHECK_EQUAL( _interval<int>::closed(1,1), itl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK( (is_same<itl::interval<int>::type, left_open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::open(0,2), itl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::left_open(0,1), itl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::right_open(1,2), itl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::closed(1,1), itl::construct<left_open_interval<int> >(0,1) );
# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 2)
cout << "discrete_interval == right_open_interval\n";
- BOOST_CHECK( (is_same<_interval<int>::type, right_open_interval<int> >::value) );
- BOOST_CHECK_EQUAL( _interval<int>::open(0,2), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
- BOOST_CHECK_EQUAL( _interval<int>::closed(1,1), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK( (is_same<itl::interval<int>::type, right_open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::open(0,2), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::left_open(0,1), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::closed(1,1), itl::construct<right_open_interval<int> >(1,2) );
# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 3)
cout << "discrete_interval == closed_interval\n";
- BOOST_CHECK( (is_same<_interval<int>::type, closed_interval<int> >::value) );
- BOOST_CHECK_EQUAL( _interval<int>::open(0,2), itl::construct<closed_interval<int> >(1,1) );
- BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1), itl::construct<closed_interval<int> >(1,1) );
- BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<closed_interval<int> >(1,1) );
- BOOST_CHECK_EQUAL( _interval<int>::closed(1,1), itl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK( (is_same<itl::interval<int>::type, closed_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::open(0,2), itl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::left_open(0,1), itl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::right_open(1,2), itl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( itl::interval<int>::closed(1,1), itl::construct<closed_interval<int> >(1,1) );
# else
cout << "#else part, INTERVAL_BORDERS not in {0,1,2,3}\n";
#endif //defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
#else
- BOOST_CHECK( (is_same<_interval<int >::type, discrete_interval<int > >::value) );
- BOOST_CHECK( (is_same<_interval<double>::type, continuous_interval<double> >::value) );
+ BOOST_CHECK( (is_same<itl::interval<int >::type, discrete_interval<int > >::value) );
+ BOOST_CHECK( (is_same<itl::interval<double>::type, continuous_interval<double> >::value) );
#endif
}
Modified: sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp (original)
+++ sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -26,7 +26,7 @@
{
typedef right_open_interval<T,Compare> L__D; // L__D for [..)
typedef left_open_interval<T,Compare> C__I; // C__I for (..]
- typedef typename _interval<T,Compare>::type IntervalT;
+ typedef typename itl::interval<T,Compare>::type IntervalT;
BOOST_CHECK( is_interval<L__D>::value );
BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value );
Modified: sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp (original)
+++ sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -36,7 +36,7 @@
typedef left_open_interval<T,Compare> C__I; // C__I for (..]
typedef closed_interval<T,Compare> L__I; // L__I for [..]
typedef open_interval<T,Compare> C__D; // C__D for (..)
- typedef typename _interval<T,Compare>::type IntervalT;
+ typedef typename itl::interval<T,Compare>::type IntervalT;
BOOST_CHECK( is_interval<L__D>::value );
BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value );
Modified: sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp (original)
+++ sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -26,7 +26,7 @@
template <class T>
void dynamic_interval_bounds_4_bicremental_types()
{
- typedef typename itl::_interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
BOOST_CHECK_EQUAL( T(), pred(succ(T())));
BOOST_CHECK_EQUAL( itl::identity_element<T>::value(), pred(succ(itl::identity_element<T>::value())) );
@@ -51,7 +51,7 @@
template <class T>
void discrete_dynamic_interval_bounds_4_bicremental_types()
{
- typedef typename itl::_interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
BOOST_CHECK( itl::bounds(I_I(2,4)) == interval_bounds::closed() );
BOOST_CHECK( itl::bounds(I_D(2,5)) == interval_bounds::right_open() );
Modified: sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -67,15 +67,15 @@
void interval_ctor_specific()
{
- BOOST_CHECK_EQUAL(itl::length(_interval<double>::type()), 0.0);
- BOOST_CHECK_EQUAL(itl::cardinality(_interval<double>::closed(5.0, 5.0)), 1);
- BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::closed("test", "test")), 1);
- BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::closed("best","test")),
- itl::cardinality(_interval<double>::closed(0.0,0.1)));
- BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::right_open("best","test")),
- itl::infinity<size_type_of<_interval<std::string>::type>::type >::value() );
- BOOST_CHECK_EQUAL(itl::cardinality(_interval<double>::right_open(0.0, 1.0)),
- itl::infinity<size_type_of<_interval<double>::type>::type >::value() );
+ BOOST_CHECK_EQUAL(itl::length(itl::interval<double>::type()), 0.0);
+ BOOST_CHECK_EQUAL(itl::cardinality(itl::interval<double>::closed(5.0, 5.0)), 1);
+ BOOST_CHECK_EQUAL(itl::cardinality(itl::interval<std::string>::closed("test", "test")), 1);
+ BOOST_CHECK_EQUAL(itl::cardinality(itl::interval<std::string>::closed("best","test")),
+ itl::cardinality(itl::interval<double>::closed(0.0,0.1)));
+ BOOST_CHECK_EQUAL(itl::cardinality(itl::interval<std::string>::right_open("best","test")),
+ itl::infinity<size_type_of<itl::interval<std::string>::type>::type >::value() );
+ BOOST_CHECK_EQUAL(itl::cardinality(itl::interval<double>::right_open(0.0, 1.0)),
+ itl::infinity<size_type_of<itl::interval<double>::type>::type >::value() );
}
#endif // ndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
@@ -83,7 +83,7 @@
template <class T>
void interval_equal_4_integral_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
T v2 = make<T>(2);
T v3 = make<T>(3);
T v7 = make<T>(7);
@@ -93,10 +93,10 @@
//I: (I)nside = closed bound
//C: left open bound
//D: right open bound
- IntervalT I3_7I = _interval<T>::closed(v3,v7);
- IntervalT I3__8D = _interval<T>::right_open(v3,v8);
- IntervalT C2__7I = _interval<T>::left_open(v2,v7);
- IntervalT C2___8D = _interval<T>::open(v2,v8);
+ IntervalT I3_7I = itl::interval<T>::closed(v3,v7);
+ IntervalT I3__8D = itl::interval<T>::right_open(v3,v8);
+ IntervalT C2__7I = itl::interval<T>::left_open(v2,v7);
+ IntervalT C2___8D = itl::interval<T>::open(v2,v8);
BOOST_CHECK_EQUAL( I3_7I , I3_7I );
BOOST_CHECK_EQUAL( I3_7I , I3__8D );
@@ -116,28 +116,28 @@
template <class T>
void interval_less_4_integral_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
T v2 = make<T>(2);
T v3 = make<T>(3);
T v4 = make<T>(4);
T v7 = make<T>(7);
T v8 = make<T>(8);
BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v7,v3), false);
- BOOST_CHECK_EQUAL(_interval<T>::open(v2,v3) < _interval<T>::right_open(v7,v7), false);
- BOOST_CHECK_EQUAL(_interval<T>::left_open(v3,v3) < _interval<T>::closed(v7,v3), false);
+ BOOST_CHECK_EQUAL(itl::interval<T>::open(v2,v3) < itl::interval<T>::right_open(v7,v7), false);
+ BOOST_CHECK_EQUAL(itl::interval<T>::left_open(v3,v3) < itl::interval<T>::closed(v7,v3), false);
BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v3,v4), true);
- BOOST_CHECK_EQUAL(_interval<T>::open(v2,v3) < _interval<T>::right_open(v7,v8), true);
+ BOOST_CHECK_EQUAL(itl::interval<T>::open(v2,v3) < itl::interval<T>::right_open(v7,v8), true);
//I: (I)nside = closed bound
//C: left open bound
//D: right open bound
- IntervalT I3_7I = _interval<T>::closed(v3,v7);
- IntervalT I4_7I = _interval<T>::closed(v4,v7);
+ IntervalT I3_7I = itl::interval<T>::closed(v3,v7);
+ IntervalT I4_7I = itl::interval<T>::closed(v4,v7);
- IntervalT I3__8D = _interval<T>::right_open(v3,v8);
- IntervalT C2__7I = _interval<T>::left_open(v2,v7);
- IntervalT C2___8D = _interval<T>::open(v2,v8);
+ IntervalT I3__8D = itl::interval<T>::right_open(v3,v8);
+ IntervalT C2__7I = itl::interval<T>::left_open(v2,v7);
+ IntervalT C2___8D = itl::interval<T>::open(v2,v8);
BOOST_CHECK_EQUAL( I3_7I < I3_7I , false);
BOOST_CHECK_EQUAL( I3_7I < I3__8D , false);
@@ -160,17 +160,17 @@
template <class T>
void interval_equal_4_bicremental_continuous_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
T v3 = make<T>(3);
T v7 = make<T>(7);
BOOST_CHECK_EQUAL(IntervalT(), IntervalT(v7,v3));
//I: (I)nside = closed bound
//O: (O)utside = open bound
- IntervalT I3_7I = _interval<T>::closed(v3,v7);
- IntervalT I3_7D = _interval<T>::right_open(v3,v7);
- IntervalT C3_7I = _interval<T>::left_open(v3,v7);
- IntervalT C3_7D = _interval<T>::open(v3,v7);
+ IntervalT I3_7I = itl::interval<T>::closed(v3,v7);
+ IntervalT I3_7D = itl::interval<T>::right_open(v3,v7);
+ IntervalT C3_7I = itl::interval<T>::left_open(v3,v7);
+ IntervalT C3_7D = itl::interval<T>::open(v3,v7);
BOOST_CHECK_EQUAL( I3_7I , I3_7I );
BOOST_CHECK_EQUAL( I3_7I == I3_7D, false );
@@ -196,17 +196,17 @@
template <class T>
void interval_touches_4_bicremental_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
T v3 = make<T>(3);
T v7 = make<T>(7);
T v9 = make<T>(9);
- IntervalT I3_7D = _interval<T>::right_open(v3,v7);
- IntervalT I7_9I = _interval<T>::closed(v7,v9);
+ IntervalT I3_7D = itl::interval<T>::right_open(v3,v7);
+ IntervalT I7_9I = itl::interval<T>::closed(v7,v9);
BOOST_CHECK_EQUAL( itl::touches(I3_7D, I7_9I), true );
- IntervalT I3_7I = _interval<T>::closed(v3,v7);
- IntervalT C7_9I = _interval<T>::left_open(v7,v9);
+ IntervalT I3_7I = itl::interval<T>::closed(v3,v7);
+ IntervalT C7_9I = itl::interval<T>::left_open(v7,v9);
BOOST_CHECK_EQUAL( itl::touches(I3_7I, C7_9I), true );
BOOST_CHECK_EQUAL( itl::touches(I3_7D, C7_9I), false );
@@ -216,25 +216,25 @@
template <class T>
void interval_touches_4_integral_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
T v3 = make<T>(3);
T v6 = make<T>(6);
T v7 = make<T>(7);
T v9 = make<T>(9);
- IntervalT I3_6I = _interval<T>::closed(v3,v6);
- IntervalT I7_9I = _interval<T>::closed(v7,v9);
+ IntervalT I3_6I = itl::interval<T>::closed(v3,v6);
+ IntervalT I7_9I = itl::interval<T>::closed(v7,v9);
BOOST_CHECK_EQUAL( itl::touches(I3_6I, I7_9I), true );
- IntervalT I3_7D = _interval<T>::right_open(v3,v7);
- IntervalT C6_9I = _interval<T>::left_open(v6,v9);
+ IntervalT I3_7D = itl::interval<T>::right_open(v3,v7);
+ IntervalT C6_9I = itl::interval<T>::left_open(v6,v9);
BOOST_CHECK_EQUAL( itl::touches(I3_7D, C6_9I), true );
}
template <class T>
void interval_infix_intersect_4_bicremental_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
IntervalT section;
IntervalT I3_7D = I_D(3,7);
@@ -275,7 +275,7 @@
template <class T>
void interval_subtract_4_bicremental_types()
{
- typedef typename _interval<T>::type IntervalT;
+ typedef typename itl::interval<T>::type IntervalT;
IntervalT diff_1, diff_2;
IntervalT I0_3D = I_D(0,3);
Modified: sandbox/itl/libs/itl/test/test_value_maker.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_value_maker.hpp (original)
+++ sandbox/itl/libs/itl/test/test_value_maker.hpp 2010-10-14 11:29:56 EDT (Thu, 14 Oct 2010)
@@ -134,13 +134,13 @@
// Very short value denotation for intervals
// Assumption typename T and IntervalT exists in scope
//I_I : [a,b]
-#define I_I(low,up) _interval<T>::closed (make<T>(low), make<T>(up))
+#define I_I(low,up) itl::interval<T>::closed (make<T>(low), make<T>(up))
//I_D : [a,b)
-#define I_D(low,up) _interval<T>::right_open(make<T>(low), make<T>(up))
+#define I_D(low,up) itl::interval<T>::right_open(make<T>(low), make<T>(up))
//C_I : (a,b]
-#define C_I(low,up) _interval<T>::left_open (make<T>(low), make<T>(up))
+#define C_I(low,up) itl::interval<T>::left_open (make<T>(low), make<T>(up))
//C_D : (a,b)
-#define C_D(low,up) _interval<T>::open (make<T>(low), make<T>(up))
+#define C_D(low,up) itl::interval<T>::open (make<T>(low), make<T>(up))
#define MK_I(ItvT,low,up) ItvT(make<T>(low), make<T>(up))
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