|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51232 - in sandbox/itl: boost/itl boost/validate/validater libs/itl/build/win32 libs/itl/test libs/itl/test/test_quantifier_itl_map libs/itl/test/test_set_inerval_set libs/itl/test/test_set_itl_set libs/validate/example/labat_itl_morphic
From: afojgo_at_[hidden]
Date: 2009-02-12 17:25:47
Author: jofaber
Date: 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
New Revision: 51232
URL: http://svn.boost.org/trac/boost/changeset/51232
Log:
Added tests for itl::set and itl::map. Stable {msvc-9.0, partly congcc-4.3-a7}
Added:
sandbox/itl/libs/itl/test/test_quantifier_itl_map/
sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp (contents, props changed)
sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map_shared.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_quantifier_itl_map/vc9_test_quantifier_itl_map.vcproj (contents, props changed)
sandbox/itl/libs/itl/test/test_set_inerval_set/
sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set_shared.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_inerval_set/vc9_test_set_interval_set.vcproj (contents, props changed)
sandbox/itl/libs/itl/test/test_set_interval_set_shared.hpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_itl_set/
sandbox/itl/libs/itl/test/test_set_itl_set.hpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set_shared.cpp (contents, props changed)
sandbox/itl/libs/itl/test/test_set_itl_set/vc9_test_set_itl_set.vcproj (contents, props changed)
Text files modified:
sandbox/itl/boost/itl/map.hpp | 122 ++++++++++++++++++++++++++-------------
sandbox/itl/boost/itl/set.hpp | 43 ++++++++++---
sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp | 36 ++++++----
sandbox/itl/libs/itl/build/win32/vc9_all.sln | 18 +++++
sandbox/itl/libs/itl/test/test_value_maker.hpp | 12 +++
sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj | 36 -----------
6 files changed, 160 insertions(+), 107 deletions(-)
Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -114,6 +114,8 @@
typedef typename base_type::reverse_iterator reverse_iterator;
typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+ enum { fineness = 4 };
+
public:
//==========================================================================
//= Construct, copy, destruct
@@ -129,6 +131,8 @@
map(const map& src): base_type::map(src){}
+ explicit map(const element_type& key_value_pair): base_type::map(){ insert(key_value_pair); }
+
map& operator=(const map& src) { base_type::operator=(src); return *this; }
void swap(map& src) { base_type::swap(src); }
@@ -196,6 +200,9 @@
return base_type::insert(value_pair);
}
+ //==========================================================================
+ //= Addition, subtraction
+ //==========================================================================
/** \c add inserts \c value_pair into the map if it's key does
not exist in the map.
If \c value_pairs's key value exists in the map, it's data
@@ -214,6 +221,18 @@
return *this;
}
+ //==========================================================================
+ //= Insertion, erasure
+ //==========================================================================
+ //JODO
+ /** erase the value pair \c pair(key,val) from the map.
+ Erase only if, the exact value content \c val is stored at key \key. */
+ size_type erase(const value_type& value);
+
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
+
void add_intersection(map& section, const domain_type& key_value)const;
void add_intersection(map& section, const value_type& value_pair)const;
@@ -222,10 +241,12 @@
void add_intersection(map& section, const map& sectant)const;
- //JODO
- /** erase the value pair \c pair(key,val) from the map.
- Erase only if, the exact value content \c val is stored at key \key. */
- size_type erase(const value_type& value);
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+
+ map& flip(const element_type& key_value_pair)
+ { Map::flip(*this, map(key_value_pair)); return *this; }
//==========================================================================
@@ -292,7 +313,7 @@
};
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template <class Combiner>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::add(const value_type& val)
@@ -324,7 +345,7 @@
}
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
typename map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::size_type
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::erase(const value_type& value_pair)
@@ -344,7 +365,7 @@
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template <class Combiner>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::subtract(const value_type& val)
@@ -359,7 +380,7 @@
return *this;
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::add_intersection(map& section, const value_type& sectant)const
{
@@ -382,7 +403,8 @@
}
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::add_intersection(map& section, const domain_type& sectant)const
{
@@ -392,7 +414,7 @@
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::add_intersection(map& section, const typename map::set_type& sectant)const
{
@@ -407,7 +429,7 @@
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::add_intersection(map& section, const map& sectant)const
{
@@ -433,7 +455,7 @@
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
std::string map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::as_string()const
{
std::string repr;
@@ -449,7 +471,7 @@
return repr;
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template<class Predicate>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::erase_if(const Predicate& pred)
@@ -463,7 +485,7 @@
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template<class Predicate>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
::assign_if(const map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& src, const Predicate& pred)
@@ -477,7 +499,7 @@
return *this;
}
//-------------------------------------------------------------------------
-template <typename DomainT, typename CodomainT, class Traits,
+template <class DomainT, class CodomainT, class Traits,
ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
insert(map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
@@ -491,7 +513,7 @@
return object;
}
-template <typename DomainT, typename CodomainT, class Traits,
+template <class DomainT, class CodomainT, class Traits,
ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
erase(map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
@@ -515,7 +537,7 @@
//==============================================================================
/** Standard equality, which is lexicographical equality of the sets
as sequences, that are given by their Compare order. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator == (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{
@@ -523,13 +545,13 @@
return operator==((const base_type&)lhs, (const base_type&)rhs);
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator != (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{ return !(lhs == rhs); }
//JODO comment...
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool is_element_equal(const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{
@@ -538,7 +560,7 @@
}
/** Protonic equality is equality on all elements that do not carry a neutron as content. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool is_protonic_equal (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{
@@ -553,7 +575,7 @@
}
/** Strict weak less ordering which is given by the Compare order */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator < (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{
@@ -561,30 +583,30 @@
return operator<((const base_type&)lhs, (const base_type&)rhs);
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator > (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{ return rhs < lhs; }
/** Partial ordering which is induced by Compare */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator <= (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{ return !(lhs > rhs); }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline bool operator >= (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& lhs,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& rhs)
{ return !(lhs < rhs); }
//--------------------------------------------------------------------------
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator += ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::value_type& operand)
{ return object.add(operand); }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator + ( const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::value_type& operand)
@@ -596,14 +618,14 @@
/** Add a map \c operand to map \c object. If an element of \c operand already exists
in \c object, add up the contents. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator += ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
{ Set::add(object, operand); return object; }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator + (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -614,13 +636,13 @@
//--------------------------------------------------------------------------
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator |= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::value_type& operand)
{ return object.add(operand); }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator | ( const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::value_type& operand)
@@ -632,14 +654,14 @@
/** Add a map \c operand to map \c object. If an element of \c operand already exists
in \c object, add up the contents. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator |= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
{ Set::add(object, operand); return object; }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator | (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -652,7 +674,7 @@
/** Subtract a map \c x2 from this map. If an element of \c x2 already exists
in \c *this, subtract the contents using <tt>operator -=</tt>. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator -= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -664,7 +686,7 @@
return object;
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator - (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -675,14 +697,14 @@
/** Subtract a set \c x2 from this map. Every element of \c this map that
has a key that is element of \c x2 is deleted from the map. */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator -= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::set_type& operand)
{ Set::erase(object, operand); return object; }
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator - (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::set_type& operand)
@@ -694,7 +716,7 @@
/** Intersect map \c x2 and \c *this.
So \c *this becomes the intersection of \c *this and \c x2 */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator &= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -711,7 +733,7 @@
//CL{ Map::intersect(object, operand); return object; }
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator & (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -722,14 +744,14 @@
/** Intersect set \c x2 and \c *this.
So \c *this becomes the intersection of \c *this and \c x2 */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator &= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::set_type& operand)
{ Map::intersect(object, operand); return object; } //JODO TEST
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator & (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const typename itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::set_type& operand)
@@ -741,7 +763,7 @@
/** Symmetric subtract map \c x2 and \c *this.
So \c *this becomes the symmetric difference of \c *this and \c x2 */
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
operator ^= ( itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -750,7 +772,7 @@
return object;
}
-template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+template <class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
operator ^ (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
@@ -760,6 +782,22 @@
}
+//---------------------------------------------------------------------------------
+template<class CharType, class CharTraits,
+ class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream,
+ const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object)
+{
+ typedef itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> ObjectT;
+ stream << "{";
+ const_FORALL(typename ObjectT, it, object)
+ stream << "(" << it->KEY_VALUE << "->" << it->CONT_VALUE << ")";
+
+ return stream << "}";
+}
+
+
//-----------------------------------------------------------------------------
// type traits
//-----------------------------------------------------------------------------
Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -61,6 +61,8 @@
typedef typename base_type::reverse_iterator reverse_iterator;
typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+ enum { fineness = 4 };
+
public:
//==========================================================================
//= Construct, copy, destruct
@@ -77,6 +79,8 @@
set(const set& src): base_type::set(src){}
+ explicit set(const element_type& key): base_type::set(){ insert(key); }
+
set& operator=(const set& src) { base_type::operator=(src); return *this; }
void swap(set& src) { base_type::swap(src); }
@@ -141,6 +145,7 @@
void add_intersection(set& section, const set& sectant)const;
+ set& flip(const element_type& value);
/** \c key_value allows for a uniform access to \c key_values which is
is used for common algorithms on sets and maps. */
@@ -214,6 +219,18 @@
}
template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
+inline itl::set<DomainT,Compare,Alloc>&
+set<DomainT,Compare,Alloc>::flip(const element_type& operand)
+{
+ std::pair<iterator,bool> insertion = insert(operand);
+ if(!insertion.WAS_SUCCESSFUL)
+ erase(insertion.ITERATOR);
+
+ return *this;
+}
+
+
+template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
std::string set<DomainT,Compare,Alloc>::as_string(const char* sep)const
{
const_iterator it_ = begin();
@@ -440,20 +457,18 @@
template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
inline itl::set<DomainT,Compare,Alloc>&
operator ^= ( itl::set<DomainT,Compare,Alloc>& object,
- const typename itl::set<DomainT,Compare,Alloc>::value_type& operand)
+ const typename itl::set<DomainT,Compare,Alloc>::element_type& operand)
{
- typedef itl::set<DomainT,Compare,Alloc> ObjectT;
- if(object.contains(operand))
- return erase(operand);
- else
- return add(operand);
+ return object.flip(operand);
}
template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
itl::set<DomainT,Compare,Alloc>
operator ^ (const itl::set<DomainT,Compare,Alloc>& object,
const typename itl::set<DomainT,Compare,Alloc>::value_type& operand)
-{ return itl::set<DomainT,Compare,Alloc>(object) &= operand; }
+{
+ return itl::set<DomainT,Compare,Alloc>(object) ^= operand;
+}
@@ -463,13 +478,17 @@
inline itl::set<DomainT,Compare,Alloc>&
operator ^= ( itl::set<DomainT,Compare,Alloc>& object,
const itl::set<DomainT,Compare,Alloc>& operand)
-{ Set::flip(object, operand); return object; }
+{
+ Set::flip(object, operand); return object;
+}
template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
itl::set<DomainT,Compare,Alloc>
operator ^ (const itl::set<DomainT,Compare,Alloc>& object,
const itl::set<DomainT,Compare,Alloc>& operand)
-{ return itl::set<DomainT,Compare,Alloc>(object) &= operand; }
+{
+ return itl::set<DomainT,Compare,Alloc>(object) ^= operand;
+}
@@ -491,11 +510,11 @@
class DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
std::basic_ostream<CharType, CharTraits>& operator <<
(std::basic_ostream<CharType, CharTraits>& stream,
- const set<DomainT,Compare,Alloc>& object)
+ const itl::set<DomainT,Compare,Alloc>& object)
{
- typedef itl::set<DomainT,Compare,Alloc> SetT;
+ typedef itl::set<DomainT,Compare,Alloc> ObjectT;
stream << "{";
- const_FORALL(typename SetT, it, object)
+ const_FORALL(typename ObjectT, it, object)
stream << *it;
return stream << "}";
Modified: sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -33,10 +33,12 @@
{
atomize_plus,
atomize_minus,
- atomize_star,
+ atomize_et,
+ atomize_caret,
cluster_plus,
cluster_minus,
- cluster_star,
+ cluster_et,
+ cluster_caret,
atomize_insert,
atomize_erase,
cluster_insert,
@@ -52,17 +54,19 @@
{
_lawChoice.setSize(Laws_size);
_lawChoice.setMaxWeights(100);
- _lawChoice[atomize_plus] = 10;
- _lawChoice[atomize_minus] = 5;
- _lawChoice[atomize_star] = 5;
- _lawChoice[cluster_plus] = 10;
- _lawChoice[cluster_minus] = 5;
- _lawChoice[cluster_star] = 5;
- _lawChoice[atomize_insert] = 10;
- _lawChoice[atomize_erase] = 10;
- _lawChoice[cluster_insert] = 10;
- _lawChoice[cluster_erase] = 20;
- _lawChoice[join_plus] = 10;
+ _lawChoice[atomize_plus] = 8;
+ _lawChoice[atomize_minus] = 8;
+ _lawChoice[atomize_et] = 8;
+ _lawChoice[atomize_caret] = 8;
+ _lawChoice[cluster_plus] = 8;
+ _lawChoice[cluster_minus] = 8;
+ _lawChoice[cluster_et] = 8;
+ _lawChoice[cluster_caret] = 8;
+ _lawChoice[atomize_insert] = 8;
+ _lawChoice[atomize_erase] = 7;
+ _lawChoice[cluster_insert] = 7;
+ _lawChoice[cluster_erase] = 7;
+ _lawChoice[join_plus] = 7;
_lawChoice[absorb_plus] = 0;
_lawChoice.init();
}
@@ -74,10 +78,12 @@
{
case atomize_plus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_plus>, RandomGentor>();
case atomize_minus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_minus>, RandomGentor>();
- case atomize_star: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>, RandomGentor>();
+ case atomize_et: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>, RandomGentor>();
+ case atomize_caret: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_caret>, RandomGentor>();
case cluster_plus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_plus>, RandomGentor>();
case cluster_minus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_minus>, RandomGentor>();
- case cluster_star: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>, RandomGentor>();
+ case cluster_et: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>, RandomGentor>();
+ case cluster_caret: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_caret>, RandomGentor>();
case atomize_insert: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inserter>, RandomGentor>();
case atomize_erase: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, eraser>, RandomGentor>();
case cluster_insert: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inserter>, RandomGentor>();
Modified: sandbox/itl/libs/itl/build/win32/vc9_all.sln
==============================================================================
--- sandbox/itl/libs/itl/build/win32/vc9_all.sln (original)
+++ sandbox/itl/libs/itl/build/win32/vc9_all.sln 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -67,6 +67,12 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_morphic", "..\..\..\validate\example\labat_itl_morphic\vc9_labat_itl_morphic.vcproj", "{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_quantifier_itl_map", "..\..\test\test_quantifier_itl_map\vc9_test_quantifier_itl_map.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_interval_set", "..\..\test\test_set_inerval_set\vc9_test_set_interval_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_itl_set", "..\..\test\test_set_itl_set\vc9_test_set_itl_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -205,6 +211,18 @@
{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Debug|Win32.Build.0 = Debug|Win32
{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Release|Win32.ActiveCfg = Release|Win32
{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,299 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#ifndef __test_itl_quantifier_itl_map_h_JOFA_090119__
+#define __test_itl_quantifier_itl_map_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus)(map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe)(map_a, map_b, map_c, map_pair1, map_pair2);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_protonic_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_protonic_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_abelian_group_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0 |
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void quantifier_map_check_abelian_group_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef itl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a, itv_map_b, itv_map_c;
+ itv_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ itv_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ MapT map_a, map_b, map_c;
+ Interval::atomize(map_a, itv_map_a);
+ Interval::atomize(map_b, itv_map_b);
+ Interval::atomize(map_c, itv_map_c);
+
+ MapT::value_type map_pair1 = sK_v(5,1);
+ MapT::value_type map_pair2 = sK_v(9,3);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair1, map_pair2);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_protonic_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_protonic_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+
+#endif // __test_itl_quantifier_itl_map_h_JOFA_090119__
+
Added: sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,38 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE itl::interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_laws.hpp"
+
+#include <boost/itl/map.hpp>
+#include <boost/itl/interval_map.hpp>
+#include <boost/itl/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::itl;
+
+// -----------------------------------------------------------------------------
+// test_interval_set_shared are tests that should give identical results for all
+// interval_sets: interval_set, separate_interval_set and split_interval_set.
+#include "../test_quantifier_itl_map.hpp"
+
+// Due to limited expressiveness of the testing framework, the testcode in files
+// test_interval_map{,_split}_shared.cpp is generated through code
+// replication.
+#include "test_quantifier_itl_map_shared.cpp"
+
+
Added: sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_quantifier_itl_map/test_quantifier_itl_map_shared.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,111 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+
+//------------------------------------------------------------------------------
+// partial_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_quantifier_map_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_quantifier_map_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, partial_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_quantifier_map_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_quantifier_map_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, partial_absorber, interval_map>();}
+
+// x - x = 0 | partial absorber
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_quantifier_map_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_partial_invertive_monoid_plus_4_bicremental_types<T, int, partial_absorber, interval_map>();}
+
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_quantifier_map_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, total_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_quantifier_map_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, total_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_quantifier_map_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_quantifier_map_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, total_absorber, interval_map>();}
+
+// (0-x) + x = 0 | total absorber
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_quantifier_map_check_abelian_group_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_group_plus_4_bicremental_types<T, int, total_absorber, interval_map>();}
+
+//------------------------------------------------------------------------------
+// partial_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_quantifier_map_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_quantifier_map_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, partial_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_quantifier_map_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_quantifier_map_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, partial_enricher, interval_map>();}
+
+// x - x =p= 0 | partial enricher
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_quantifier_map_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types<T, int, partial_enricher, interval_map>();}
+
+
+//------------------------------------------------------------------------------
+// total_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_quantifier_map_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, total_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_quantifier_map_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, total_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_quantifier_map_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_quantifier_map_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, total_enricher, interval_map>();}
+
+// (0-x) + x =p= 0 | total absorber
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_quantifier_map_check_abelian_group_plus_prot_inv_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_group_plus_prot_inv_4_bicremental_types<T, int, total_enricher, interval_map>();}
+
+
+// absorber enricher
+// partial x - x == 0 x - x =p= 0 partiality of subtraction
+// total (-x)+ x == 0 (-x)+ x =p= 0 totality of subtraction
+
Added: sandbox/itl/libs/itl/test/test_quantifier_itl_map/vc9_test_quantifier_itl_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_quantifier_itl_map/vc9_test_quantifier_itl_map.vcproj 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_quantifier_itl_map"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE3528}"
+ RootNamespace="Test_quantifier_itl_map"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_quantifier_itl_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,39 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE itl::interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_laws.hpp"
+
+#include <boost/itl/interval_set.hpp>
+#include <boost/itl/separate_interval_set.hpp>
+#include <boost/itl/split_interval_set.hpp>
+#include <boost/itl/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::itl;
+
+// -----------------------------------------------------------------------------
+// test_interval_set_shared are tests that should give identical results for all
+// interval_sets: interval_set, separate_interval_set and split_interval_set.
+#include "../test_set_interval_set_shared.hpp"
+
+// Due to limited expressiveness of the testing framework, the testcode in files
+// test_interval_map{,_split}_shared.cpp is generated through code
+// replication.
+#include "test_set_interval_set_shared.cpp"
+
+
Added: sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_inerval_set/test_set_interval_set_shared.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,68 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+
+//------------------------------------------------------------------------------
+// separate_interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_separate_interval_set_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<T, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_separate_interval_set_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<T, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_separate_interval_set_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<T, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_separate_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, separate_interval_set>();}
+
+
+//------------------------------------------------------------------------------
+// split_interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_split_interval_set_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<T, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_split_interval_set_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<T, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_split_interval_set_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<T, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_split_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, split_interval_set>();}
+
+
Added: sandbox/itl/libs/itl/test/test_set_inerval_set/vc9_test_set_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_inerval_set/vc9_test_set_interval_set.vcproj 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_set_interval_set"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}"
+ RootNamespace="Test_set_interval_set"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_set_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: sandbox/itl/libs/itl/test/test_set_interval_set_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_interval_set_shared.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,143 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#ifndef __test_itl_set_interval_set_h_JOFA_090119__
+#define __test_itl_set_interval_set_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
+ typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, inter_val1, inter_val2);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, inter_val1, inter_val2);
+}
+
+template <class T,
+ template<class T,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
+ typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, inter_val1, inter_val2);
+ CHECK_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, inter_val1, inter_val2);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
+ typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, inter_val1, inter_val2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, inter_val1, inter_val2);
+}
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
+ typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, inter_val1, inter_val2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, inter_val1, inter_val2);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
+ typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, inter_val1, inter_val2);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, inter_val1, inter_val2);
+}
+
+
+#endif // __test_itl_set_interval_set_h_JOFA_090119__
+
Added: sandbox/itl/libs/itl/test/test_set_itl_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_itl_set.hpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,174 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#ifndef __test_itl_set_itl_set_h_JOFA_090119__
+#define __test_itl_set_itl_set_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef itl::set<T> SetT;
+
+ IntervalSetT itv_set_a, itv_set_b, itv_set_c;
+ itv_set_a.add(I_D(3,6)).add(I_I(5,7));
+ itv_set_b.add(C_D(1,3)).add(I_D(8,9));
+ itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ SetT set_a, set_b, set_c;
+ Interval::atomize(set_a, itv_set_a);
+ Interval::atomize(set_b, itv_set_b);
+ Interval::atomize(set_c, itv_set_c);
+
+ T val1 = MK_v(7);
+ T val2 = MK_v(5);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, val1, val2);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, val1, val2);
+}
+
+
+template <class T,
+ template<class T,
+ class Traits = Trt,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+ ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef itl::set<T> SetT;
+
+ IntervalSetT itv_set_a, itv_set_b, itv_set_c;
+ itv_set_a.add(I_D(3,6)).add(I_I(5,7));
+ itv_set_b.add(C_D(1,3)).add(I_D(8,9));
+ itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ SetT set_a, set_b, set_c;
+ Interval::atomize(set_a, itv_set_a);
+ Interval::atomize(set_b, itv_set_b);
+ Interval::atomize(set_c, itv_set_c);
+
+ T val1 = MK_v(7);
+ T val2 = MK_v(5);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, val1, val2);
+ CHECK_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, val1, val2);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef itl::set<T> SetT;
+
+ IntervalSetT itv_set_a, itv_set_b, itv_set_c;
+ itv_set_a.add(I_D(3,6)).add(I_I(5,7));
+ itv_set_b.add(C_D(1,3)).add(I_D(8,9));
+ itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ SetT set_a, set_b, set_c;
+ Interval::atomize(set_a, itv_set_a);
+ Interval::atomize(set_b, itv_set_b);
+ Interval::atomize(set_c, itv_set_c);
+
+ T val1 = MK_v(7);
+ T val2 = MK_v(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, val1, val2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, val1, val2);
+}
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef itl::set<T> SetT;
+
+ IntervalSetT itv_set_a, itv_set_b, itv_set_c;
+ itv_set_a.add(I_D(3,6)).add(I_I(5,7));
+ itv_set_b.add(C_D(1,3)).add(I_D(8,9));
+ itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ SetT set_a, set_b, set_c;
+ Interval::atomize(set_a, itv_set_a);
+ Interval::atomize(set_b, itv_set_b);
+ Interval::atomize(set_c, itv_set_c);
+
+ T val1 = MK_v(7);
+ T val2 = MK_v(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, val1, val2);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, val1, val2);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef itl::set<T> SetT;
+
+ IntervalSetT itv_set_a, itv_set_b, itv_set_c;
+ itv_set_a.add(I_D(3,6)).add(I_I(5,7));
+ itv_set_b.add(C_D(1,3)).add(I_D(8,9));
+ itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ SetT set_a, set_b, set_c;
+ Interval::atomize(set_a, itv_set_a);
+ Interval::atomize(set_b, itv_set_b);
+ Interval::atomize(set_c, itv_set_c);
+
+ T val1 = MK_v(7);
+ T val2 = MK_v(5);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, val1, val2);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, val1, val2);
+}
+
+
+#endif // __test_itl_set_itl_set_h_JOFA_090119__
+
Added: sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,39 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE itl::interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_laws.hpp"
+
+#include <boost/itl/interval_set.hpp>
+#include <boost/itl/separate_interval_set.hpp>
+#include <boost/itl/split_interval_set.hpp>
+#include <boost/itl/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::itl;
+
+// -----------------------------------------------------------------------------
+// test_interval_set_shared are tests that should give identical results for all
+// interval_sets: interval_set, separate_interval_set and split_interval_set.
+#include "../test_set_itl_set.hpp"
+
+// Due to limited expressiveness of the testing framework, the testcode in files
+// test_interval_map{,_split}_shared.cpp is generated through code
+// replication.
+#include "test_set_itl_set_shared.cpp"
+
+
Added: sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_itl_set/test_set_itl_set_shared.cpp 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,28 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itl_set_check_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itl_set_check_abelian_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itl_set_check_abelian_monoid_et_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, interval_set>();}
+
Added: sandbox/itl/libs/itl/test/test_set_itl_set/vc9_test_set_itl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_set_itl_set/vc9_test_set_itl_set.vcproj 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_set_itl_set"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}"
+ RootNamespace="Test_set_itl_set"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_set_itl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -81,6 +81,7 @@
typedef typename ItvMapT::interval_type interval_type;
typedef typename ItvMapT::value_type value_type;
typedef typename ItvMapT::domain_mapping_type domain_mapping_type;
+ typedef std::pair<domain_type, codomain_type> std_pair_type;
static interval<domain_type> interval(int lower, int upper, int bounds = 2)
{
@@ -96,8 +97,14 @@
static domain_mapping_type map_pair(int key, int val)
{
- return domain_mapping_type(test_value<domain_type>::make(key),
- test_value<codomain_type>::make(val));
+ return domain_mapping_type(test_value< domain_type>::make(key),
+ test_value<codomain_type>::make(val));
+ }
+
+ static std_pair_type std_pair(int key, int val)
+ {
+ return std_pair_type(test_value< domain_type>::make(key),
+ test_value<codomain_type>::make(val));
}
};
@@ -123,6 +130,7 @@
#define CIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, left_open)
#define CDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, open_bounded)
#define K_v(key,val) map_val<IntervalMapT>::map_pair(key,val)
+#define sK_v(key,val) map_val<IntervalMapT>::std_pair(key,val)
}} // namespace boost itl
Modified: sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj (original)
+++ sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj 2009-02-12 17:25:45 EST (Thu, 12 Feb 2009)
@@ -194,42 +194,6 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
- <File
- RelativePath="..\..\..\..\boost\validate\law.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\lawviolations.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\laws\order.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\boost\validate\typevalidater.h"
- >
- </File>
</Filter>
<Filter
Name="Ressourcendateien"
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