|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50836 - in sandbox/itl: boost/itl libs/itl/doc libs/itl/test libs/itl/test/test_interval_map_mixed libs/itl/test/test_interval_set_mixed libs/itl/test/test_quantifier_map libs/itl_xt/test/meta_functors
From: afojgo_at_[hidden]
Date: 2009-01-28 02:23:36
Author: jofaber
Date: 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
New Revision: 50836
URL: http://svn.boost.org/trac/boost/changeset/50836
Log:
Added tests: Added tests for Quantifier maps. Stable {msvc-9.0, partly congcc-4.3-a7}
Text files modified:
sandbox/itl/boost/itl/interval_base_map.hpp | 4
sandbox/itl/boost/itl/interval_base_set.hpp | 3
sandbox/itl/boost/itl/interval_map.hpp | 2
sandbox/itl/boost/itl/interval_set.hpp | 2
sandbox/itl/boost/itl/map.hpp | 1
sandbox/itl/boost/itl/separate_interval_set.hpp | 2
sandbox/itl/boost/itl/set.hpp | 1
sandbox/itl/boost/itl/split_interval_map.hpp | 2
sandbox/itl/boost/itl/split_interval_set.hpp | 2
sandbox/itl/libs/itl/doc/concepts.qbk | 53 ++++
sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp | 26 ++
sandbox/itl/libs/itl/test/test_interval_map_shared.hpp | 24 +-
sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp | 34 +++
sandbox/itl/libs/itl/test/test_laws.hpp | 386 ++++++++++++++++++++++++++++++++++++++-
sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map.cpp | 2
sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map_shared.cpp | 49 ++++
sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp | 290 +++++++++++------------------
sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp | 10
18 files changed, 661 insertions(+), 232 deletions(-)
Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -174,9 +174,11 @@
/// Domain type (type of the keys) of the map
typedef CodomainT codomain_type;
/// basic value type
- typedef std::pair<domain_type,codomain_type> mapping_type;
+ typedef std::pair<domain_type,codomain_type> mapping_type; //JODO
/// Auxiliary type to help the compiler resolve ambiguities when using std::make_pair
typedef mapping_pair<domain_type,codomain_type> domain_mapping_type;
+ /// Conceptual is a map a set of elements of type \c element_type
+ typedef domain_mapping_type element_type;
/// The interval type of the map
typedef Interval<DomainT,Compare> interval_type;
Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -126,6 +126,9 @@
/// The codomaintype is the same as domain_type
typedef DomainT codomain_type;
+ /// The element type of the set
+ typedef DomainT element_type;
+
/// The interval type of the set
typedef Interval<DomainT,Compare> interval_type;
Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -138,7 +138,7 @@
typedef Interval<DomainT,Compare> interval_type;
typedef typename base_type::iterator iterator;
typedef typename base_type::value_type value_type;
- typedef typename base_type::mapping_type mapping_type;
+ typedef typename base_type::element_type element_type;
typedef typename base_type::domain_mapping_type domain_mapping_type;
typedef typename base_type::interval_mapping_type interval_mapping_type;
typedef typename base_type::ImplMapT ImplMapT;
Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -127,6 +127,8 @@
/// The codomaintype is the same as domain_type
typedef DomainT codomain_type;
+ /// The element type of the set
+ typedef DomainT element_type;
/// The interval type of the set
typedef Interval<DomainT,Compare> interval_type;
Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -130,6 +130,7 @@
typedef CodomainT codomain_type;
typedef CodomainT mapped_type;
typedef CodomainT data_type;
+ typedef std::pair<const DomainT, CodomainT> element_type;
typedef std::pair<const DomainT, CodomainT> value_type;
typedef ITL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
typedef ITL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine;
Modified: sandbox/itl/boost/itl/separate_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/separate_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/separate_interval_set.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -91,6 +91,8 @@
/// The codomaintype is the same as domain_type
typedef DomainT codomain_type;
+ /// The element type of the set
+ typedef DomainT element_type;
/// The interval type of the set
typedef Interval<DomainT,Compare> interval_type;
Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -82,6 +82,7 @@
public:
typedef DomainT domain_type;
typedef DomainT codomain_type;
+ typedef DomainT element_type;
typedef DomainT key_type;
typedef DomainT value_type;
typedef DomainT data_type;
Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -154,7 +154,7 @@
typedef Interval<DomainT,Compare> interval_type;
typedef typename base_type::iterator iterator;
typedef typename base_type::value_type value_type;
- typedef typename base_type::mapping_type mapping_type;
+ typedef typename base_type::element_type element_type;
typedef typename base_type::domain_mapping_type domain_mapping_type;
typedef typename base_type::interval_mapping_type interval_mapping_type;
typedef typename base_type::ImplMapT ImplMapT;
Modified: sandbox/itl/boost/itl/split_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_set.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -109,6 +109,8 @@
/// The codomaintype is the same as domain_type
typedef DomainT codomain_type;
+ /// The element type of the set
+ typedef DomainT element_type;
/// The interval type of the set
typedef Interval<DomainT,Compare> interval_type;
Modified: sandbox/itl/libs/itl/doc/concepts.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/concepts.qbk (original)
+++ sandbox/itl/libs/itl/doc/concepts.qbk 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -221,24 +221,26 @@
[endsect][/ Addability, Subtractability and Aggregation on Overlap]
-[section Kind of nuclear: Map Traits]
+[section Map Traits]
Itl maps differ in their behavior dependent on how they handle
['*neutral elements*] of the associated type `CodomainT`. This
section became ['kind of nuclear] at least in wording.
But rest assured `itl::Maps` won't contaminate your software.
+[h4 Remarks on Neutral Elements or Neutrons]
+
In the itl we call ['*neutral elements*] `neutrons` and all values
-that [*are not] `neutrons` we call `protons`. The way, in which
-`neutrons` are dealt with in maps can be specified by the template parameter
-`Traits`. In the pseudo code snipplets below `0` will be used to denote
+that [*are not] `neutrons` we call `protons`.
+
+In the pseudo code snipplets below `0` will be used to denote
`neutrons`, which can be
different objects like `const double 0.0`, empty sets, empty strings,
null-vectors etc. dependent of the instance type for parameter `CodomainT`.
The existence of a ['*neutral element*] wrt. an `operator+=` is a requirement
for template type `CodomainT`.
-[table
+[/ table
[[Trait][]]
[[__absorber__][Value pairs that carry neutrons `(x,0)` are never stored]]
[[__enricher__][Value pairs that carry neutrons `(x,0)` are never deleted by subtract]]
@@ -275,7 +277,44 @@
inplace_times<T>::neutron() == unon<T>::value()
``
-[h4 Neutron Absorber]
+[h4 Definedness and Neutron Storage]
+
+There are two /properties/ or /traits/ of itl maps that can be
+chosen by a template parameter `Traits`.
+The ['*first trait*] relates to the ['*definedness*] of the map. Itl
+maps can be *partial* or *total* on the set of values given by
+domain type `DomainT`.
+
+* A ['*partial*] map in only defined on those key elements that have been
+inserted into the Map. This is usually expected and so ['*partial definedness]
+is the default.
+
+* Alternatively an itl Map can be ['*total*]. It is then considered to
+contain a ['*neutral value*] for all key values that are not
+stored in the map.
+
+Such a total map can be useful if we use it to count or quantify the
+key values. An item that is not counted can be represented as counted
+0-times. A totally defined itl Map can be viewed as a very large or even
+infinite vector.
+
+The second trait is related to the representation of `neutrons` in
+the map. A itl map can be a neutron_absorber or a neutron_enricher.
+
+* A neutron absorber never stores value pairs `(k,0)` that carry neutrons.
+* A neutron enricher stores value pairs `(k,0)`.
+
+For the template parameter `Traits` of itl Maps we have the following
+four values.
+
+[table
+[[] [neutron absorber][neutron enricher]]
+[[partial][partial_absorber][partial_enricher]]
+[[total] [total_absorber] [total_enricher]]
+]
+
+
+[h4 Trait Neutron Absorber]
From a pragmatic perspective value pairs that carry `neutrons` as
mapped values can often be deleted. If we count, for instance,
@@ -287,7 +326,7 @@
A Map that does never insert
associated neutrons or deletes them when they emerge, is called
-__absorber__. To be a __absorber__ is the default setting
+__absorber__. To be a partial __absorber__ is the default setting
for the Trait parameter. Moreover a __absorber__ is able
to erase a pair `(x,y)` from a map `{(x,y)}` by calling
`subtract((x,y))` or `operator - ` .
Modified: sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -1240,15 +1240,37 @@
BOOST_CHECK_EQUAL(split_a | join_a, join_a | split_a);
}
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_map_mixed_infix_minus_overload_4_bicremental_types, T, bicremental_types)
+{
+ typedef int U;
+ typedef interval_map<T,U> IntervalMapT;
+ interval_map<T,U> join_a, join_b;
+ split_interval_map<T,U> split_a, split_b;
+
+ join_a .add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+ split_a.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ BOOST_CHECK_EQUAL(split_a - join_a, (split_b = split_a) -= join_a);
+ BOOST_CHECK_EQUAL(split_a - join_a, split_b);
+
+ BOOST_CHECK_EQUAL(join_a - split_a, (join_b = join_a) -= split_a);
+ BOOST_CHECK_EQUAL(join_a - split_a, join_b);
+}
+
BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_map_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
{
typedef int U;
typedef interval_map<T,U> IntervalMapT;
- interval_map<T,U> join_a;
- split_interval_map<T,U> split_a;
+ interval_map<T,U> join_a, join_b;
+ split_interval_map<T,U> split_a, split_b;
join_a .add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
split_a.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
BOOST_CHECK_EQUAL(split_a & join_a, join_a & split_a);
+ BOOST_CHECK_EQUAL(split_a & join_a, (split_b = split_a) &= join_a);
+ BOOST_CHECK_EQUAL(split_a & join_a, split_b);
+
+ BOOST_CHECK_EQUAL(join_a & split_a, (split_b = split_a) &= join_a);
+ BOOST_CHECK_EQUAL(join_a & split_a, split_b);
}
Modified: sandbox/itl/libs/itl/test/test_interval_map_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_shared.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -893,10 +893,10 @@
itl::interval<T> itv = C_D(4,11);
typename IntervalMapT::interval_mapping_type itv_v = CDv(4,11,3);
- IntervalMapT map_a, map_b;
- //map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
- map_a.add(IIv(6,11,3));
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
map_b.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+ map_c = map_a;
interval_set<T> join_set_a;
separate_interval_set<T> sep_set_a;
@@ -906,7 +906,8 @@
split_set_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
//Happy day overloading
- BOOST_CHECK_EQUAL(map_a - map_b, (map_a) - map_b);
+ BOOST_CHECK_EQUAL(map_a - map_b, (map_c = map_a) -= map_b);
+ BOOST_CHECK_EQUAL(map_a - map_b, map_c);
//This checks all cases of is_interval_map_derivative<T>
BOOST_CHECK_EQUAL((map_a - val_pair1) + val_pair1, (map_a + val_pair1) - val_pair1);
@@ -914,13 +915,13 @@
BOOST_CHECK_EQUAL((map_b - map_pair) + map_pair, (map_b + map_pair) - map_pair);
//This checks all cases of is_interval_set_derivative<T>
- //BOOST_CHECK_EQUAL(map_a - itv, (itv_v + map_a) - itv);
- //BOOST_CHECK_EQUAL(map_b - MK_v(8), (IIv(8,8,3) + map_b) - MK_v(8));
+ BOOST_CHECK_EQUAL(map_a - itv, (map_a + itv_v) - itv);
+ BOOST_CHECK_EQUAL(map_b - MK_v(8), (IIv(8,8,3) + map_b) - MK_v(8));
//This checks all cases of is_interval_set_companion<T>
- //BOOST_CHECK_EQUAL(map_a - split_set_a, (split_set_a + map_a) - split_set_a);
- //BOOST_CHECK_EQUAL(map_a - sep_set_a, (sep_set_a + map_a) - sep_set_a);
- //BOOST_CHECK_EQUAL(map_a - join_set_a, (join_set_a + map_a) - join_set_a);
+ BOOST_CHECK_EQUAL(map_a - split_set_a, ((split_set_a & map_a) + map_a) - split_set_a);
+ BOOST_CHECK_EQUAL(map_a - sep_set_a, ((sep_set_a & map_a) + map_a) - sep_set_a);
+ BOOST_CHECK_EQUAL(map_a - join_set_a, ((join_set_a & map_a) + map_a) - join_set_a);
}
@@ -1010,11 +1011,6 @@
BOOST_CHECK_EQUAL(map_a ^ val_pair1, val_pair1 ^ map_a);
BOOST_CHECK_EQUAL(map_b ^ val_pair2, val_pair2 ^ map_b);
BOOST_CHECK_EQUAL(map_b ^ map_pair, map_pair ^ map_b);
-
- //This checks all cases of is_interval_set_companion<T>
- BOOST_CHECK_EQUAL(map_a & split_set_a, split_set_a & map_a);
- BOOST_CHECK_EQUAL(map_a & sep_set_a, sep_set_a & map_a);
- BOOST_CHECK_EQUAL(map_a & join_set_a, join_set_a & map_a);
}
#endif // __test_itl_interval_map_shared_h_JOFA_080920__
Modified: sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -781,6 +781,25 @@
BOOST_CHECK_EQUAL(sep_a | join_a, join_a | sep_a );
}
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_minus_overload_4_bicremental_types, T, bicremental_types)
+{
+ interval_set<T> join_a, join_b;
+ separate_interval_set<T> sep_a, sep_b;
+ split_interval_set<T> split_a, split_b;
+
+ join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
+ sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
+ split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
+
+ BOOST_CHECK_EQUAL(split_a - sep_a, (split_b = split_a) -= sep_a );
+ BOOST_CHECK_EQUAL(split_a - join_a, (split_b = split_a) -= join_a );
+ BOOST_CHECK_EQUAL(sep_a - join_a, (sep_b = sep_a) -= join_a );
+
+ BOOST_CHECK_EQUAL(sep_a - split_a, (sep_b = sep_a) -= split_a);
+ BOOST_CHECK_EQUAL(join_a - split_a, (join_b = join_a) -= split_a);
+ BOOST_CHECK_EQUAL(join_a - sep_a, (join_b = join_a) -= sep_a );
+}
+
BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
{
interval_set<T> join_a;
@@ -795,3 +814,18 @@
BOOST_CHECK_EQUAL(split_a & join_a, join_a & split_a);
BOOST_CHECK_EQUAL(sep_a & join_a, join_a & sep_a );
}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_caret_overload_4_bicremental_types, T, bicremental_types)
+{
+ interval_set<T> join_a;
+ separate_interval_set<T> sep_a;
+ split_interval_set<T> split_a;
+
+ join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
+ sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
+ split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
+
+ BOOST_CHECK_EQUAL(split_a ^ sep_a, sep_a ^ split_a );
+ BOOST_CHECK_EQUAL(split_a ^ join_a, join_a ^ split_a);
+ BOOST_CHECK_EQUAL(sep_a ^ join_a, join_a ^ sep_a );
+}
Modified: sandbox/itl/libs/itl/test/test_laws.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_laws.hpp (original)
+++ sandbox/itl/libs/itl/test/test_laws.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -15,6 +15,10 @@
typedef bool (type)(const Type&, const Type&);
};
+//------------------------------------------------------------------------------
+// Associativity
+//------------------------------------------------------------------------------
+
#define DEFINE_ASSOCIATIVITY_CHECK_WRT(op_tag, op_sign) \
template<class Type, class TypeB, class TypeC> \
void check_associativity_wrt_##op_tag(const Type& a, const TypeB& b, const TypeC& c) \
@@ -38,14 +42,18 @@
#define CHECK_ASSOCIATIVITY_WRT(op_tag) check_associativity_wrt_##op_tag
#define CHECK_ASSOCIATIVITY_WRT_EQUAL(op_tag) check_associativity_wrt_equal_##op_tag
-DEFINE_ASSOCIATIVITY_CHECK_WRT (plus, + );
-DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(plus, + );
-DEFINE_ASSOCIATIVITY_CHECK_WRT (et, & );
-DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(et, & );
+DEFINE_ASSOCIATIVITY_CHECK_WRT (plus, + );
+DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(plus, + );
+DEFINE_ASSOCIATIVITY_CHECK_WRT (pipe, | );
+DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(pipe, | );
+DEFINE_ASSOCIATIVITY_CHECK_WRT (et, & );
+DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(et, & );
+DEFINE_ASSOCIATIVITY_CHECK_WRT (caret, ^ );
+DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(caret, ^ );
//------------------------------------------------------------------------------
-// neutrality
+// Neutrality
//------------------------------------------------------------------------------
#define DEFINE_RIGHT_NEUTRALITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
@@ -91,13 +99,19 @@
#define CHECK_NEUTRALITY_WRT(op_tag) check_neutrality_wrt_##op_tag
#define CHECK_NEUTRALITY_WRT_EQUAL(op_tag) check_neutrality_wrt_equal_##op_tag
-DEFINE_NEUTRALITY_CHECK_WRT (plus, + );
-DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(plus, + );
-DEFINE_NEUTRALITY_CHECK_WRT (et, & );
-DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(et, & );
+DEFINE_NEUTRALITY_CHECK_WRT (plus, + );
+DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(plus, + );
+DEFINE_NEUTRALITY_CHECK_WRT (pipe, | );
+DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(pipe, | );
+DEFINE_NEUTRALITY_CHECK_WRT (minus, - );
+DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(minus, - );
+DEFINE_NEUTRALITY_CHECK_WRT (et, & );
+DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(et, & );
+DEFINE_NEUTRALITY_CHECK_WRT (caret, ^ );
+DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(caret, ^ );
//------------------------------------------------------------------------------
-// commutativity
+// Commutativity
//------------------------------------------------------------------------------
#define DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
@@ -121,11 +135,50 @@
#define CHECK_COMMUTATIVITY_WRT(op_tag) check_commutativity_wrt_##op_tag
-DEFINE_COMMUTATIVITY_CHECK_WRT (plus, + );
-DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(plus, + );
+DEFINE_COMMUTATIVITY_CHECK_WRT (plus, + );
+DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(plus, + );
+DEFINE_COMMUTATIVITY_CHECK_WRT (pipe, | );
+DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(pipe, | );
+DEFINE_COMMUTATIVITY_CHECK_WRT (et, & );
+DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(et, & );
+DEFINE_COMMUTATIVITY_CHECK_WRT (caret, ^ );
+DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(caret, ^ );
//------------------------------------------------------------------------------
-// monodid EA
+// Inversion
+//------------------------------------------------------------------------------
+
+#define DEFINE_INVERSION_CHECK_WRT_EQUAL(plus_tag, plus_sign) \
+template<class Type> \
+ void check_inversion_wrt_equal_##plus_tag \
+(typename equality<Type>::type* equal, const Type& neutron, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK_EQUAL((*equal)(positive_difference, neutron), true); \
+ Type negative_difference = (neutron - var_a) plus_sign var_a; \
+ BOOST_CHECK_EQUAL((*equal)(negative_difference, neutron), true); \
+}
+
+#define DEFINE_INVERSION_CHECK_WRT(plus_tag, plus_sign) \
+template<class Type> \
+ void check_inversion_wrt_##plus_tag \
+(const Type& neutron, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK_EQUAL(positive_difference, neutron); \
+ Type negative_difference = (neutron - var_a) plus_sign var_a; \
+ BOOST_CHECK_EQUAL(negative_difference, neutron); \
+}
+
+#define CHECK_INVERSION_WRT(plus_tag) check_inversion_wrt_##plus_tag
+
+DEFINE_INVERSION_CHECK_WRT (plus, + );
+DEFINE_INVERSION_CHECK_WRT_EQUAL(plus, + );
+DEFINE_INVERSION_CHECK_WRT (pipe, | );
+DEFINE_INVERSION_CHECK_WRT_EQUAL(pipe, | );
+
+//------------------------------------------------------------------------------
+// Monodid EAN
//------------------------------------------------------------------------------
#define DEFINE_MONOID_CHECK_WRT_EQUAL(op_tag) \
@@ -150,12 +203,319 @@
DEFINE_MONOID_CHECK_WRT(plus);
DEFINE_MONOID_CHECK_WRT_EQUAL(plus);
+DEFINE_MONOID_CHECK_WRT(pipe);
+DEFINE_MONOID_CHECK_WRT_EQUAL(pipe);
DEFINE_MONOID_CHECK_WRT(et);
DEFINE_MONOID_CHECK_WRT_EQUAL(et);
+DEFINE_MONOID_CHECK_WRT(caret);
+DEFINE_MONOID_CHECK_WRT_EQUAL(caret);
#define CHECK_MONOID_WRT(op_tag) check_monoid_wrt_##op_tag
#define CHECK_MONOID_WRT_EQUAL(op_tag) check_monoid_wrt_equal_##op_tag
+//------------------------------------------------------------------------------
+// Commutative or Abelian monodid EANC
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_MONOID_CHECK_WRT_EQUAL(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_abelian_monoid_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& neutron, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ASSOCIATIVITY_WRT_EQUAL(op_tag)(equal,a,b,c); \
+ CHECK_NEUTRALITY_WRT_EQUAL(op_tag)(equal,a,neutron); \
+ CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag)(a,b); \
+ CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag)(a,c); \
+}
+
+#define DEFINE_ABELIAN_MONOID_CHECK_WRT(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_abelian_monoid_wrt_##op_tag \
+(typename const Type& neutron, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ASSOCIATIVITY_WRT(op_tag)(a,b,c); \
+ CHECK_NEUTRALITY_WRT(op_tag)(a,neutron); \
+ CHECK_COMMUTATIVITY_WRT(op_tag)(a,b); \
+ CHECK_COMMUTATIVITY_WRT(op_tag)(a,c); \
+}
+
+DEFINE_ABELIAN_MONOID_CHECK_WRT(plus);
+DEFINE_ABELIAN_MONOID_CHECK_WRT_EQUAL(plus);
+DEFINE_ABELIAN_MONOID_CHECK_WRT(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_WRT_EQUAL(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_WRT(et);
+DEFINE_ABELIAN_MONOID_CHECK_WRT_EQUAL(et);
+DEFINE_ABELIAN_MONOID_CHECK_WRT(caret);
+DEFINE_ABELIAN_MONOID_CHECK_WRT_EQUAL(caret);
+
+#define CHECK_ABELIAN_MONOID_WRT(op_tag) check_abelian_monoid_wrt_##op_tag
+#define CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag) check_abelian_monoid_wrt_equal_##op_tag
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_GROUP_CHECK_WRT_EQUAL(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+ void check_abelian_group_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& neutron, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal,neutron,a,b,c); \
+ CHECK_INVERSION_WRT_EQUAL(op_tag)(equal,neutron,a); \
+}
+
+#define DEFINE_ABELIAN_GROUP_CHECK_WRT(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+ void check_abelian_group_wrt_##op_tag \
+(const Type& neutron, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(neutron,a,b,c); \
+ CHECK_INVERSION_WRT(op_tag)(neutron,a); \
+}
+
+
+DEFINE_ABELIAN_GROUP_CHECK_WRT(plus);
+DEFINE_ABELIAN_GROUP_CHECK_WRT_EQUAL(plus);
+DEFINE_ABELIAN_GROUP_CHECK_WRT(pipe);
+DEFINE_ABELIAN_GROUP_CHECK_WRT_EQUAL(pipe);
+
+#define CHECK_ABELIAN_GROUP_WRT(op_tag) check_abelian_group_wrt_##op_tag
+#define CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag) check_abelian_group_wrt_equal_##op_tag
+
+//------------------------------------------------------------------------------
+// Modoid permuted
+//------------------------------------------------------------------------------
+
+#define DEFINE_MONOID_CHECK_PERMUTED_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_monoid_permuted_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_MONOID_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+#define DEFINE_MONOID_CHECK_PERMUTED_WRT(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_monoid_permuted_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_MONOID_WRT(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_MONOID_WRT(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_MONOID_WRT(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_MONOID_WRT(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+
+DEFINE_MONOID_CHECK_PERMUTED_WRT(plus);
+DEFINE_MONOID_CHECK_PERMUTED_WRT_EQUAL(plus);
+DEFINE_MONOID_CHECK_PERMUTED_WRT(pipe);
+DEFINE_MONOID_CHECK_PERMUTED_WRT_EQUAL(pipe);
+DEFINE_MONOID_CHECK_PERMUTED_WRT(et);
+DEFINE_MONOID_CHECK_PERMUTED_WRT_EQUAL(et);
+DEFINE_MONOID_CHECK_PERMUTED_WRT(caret);
+DEFINE_MONOID_CHECK_PERMUTED_WRT_EQUAL(caret);
+
+#define CHECK_MONOID_PERMUTED_WRT(op_tag) check_monoid_permuted_wrt_##op_tag
+#define CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag) check_monoid_permuted_wrt_equal_##op_tag
+
+
+//------------------------------------------------------------------------------
+// Abelian modoid permuted
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_abelian_monoid_permuted_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+#define DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_abelian_monoid_permuted_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT(plus);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT_EQUAL(plus);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT_EQUAL(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT(et);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT_EQUAL(et);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT(caret);
+DEFINE_ABELIAN_MONOID_CHECK_PERMUTED_WRT_EQUAL(caret);
+
+#define CHECK_ABELIAN_MONOID_PERMUTED_WRT(op_tag) check_abelian_monoid_permuted_wrt_##op_tag
+#define CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag) check_abelian_monoid_permuted_wrt_equal_##op_tag
+
+
+//------------------------------------------------------------------------------
+// Abelian group permuted
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+ void check_abelian_group_permuted_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+#define DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+ void check_abelian_group_permuted_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(neutron<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(neutron<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(neutron<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(neutron<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+
+DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT(plus);
+DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT_EQUAL(plus);
+DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT(pipe);
+DEFINE_ABELIAN_GROUP_CHECK_PERMUTED_WRT_EQUAL(pipe);
+
+#define CHECK_ABELIAN_GROUP_PERMUTED_WRT(op_tag) check_abelian_group_permuted_wrt_##op_tag
+#define CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag) check_abelian_group_permuted_wrt_equal_##op_tag
+
+
+//------------------------------------------------------------------------------
+// Modoid instance
+//------------------------------------------------------------------------------
+
+#define DEFINE_MONOID_CHECK_INSTANCE_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_monoid_instance_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, var_c);\
+ CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_a);\
+ CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_b);\
+}
+
+#define DEFINE_MONOID_CHECK_INSTANCE_WRT(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_monoid_instance_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, var_c);\
+ CHECK_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_a);\
+ CHECK_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_b);\
+}
+
+DEFINE_MONOID_CHECK_INSTANCE_WRT(plus);
+DEFINE_MONOID_CHECK_INSTANCE_WRT_EQUAL(plus);
+DEFINE_MONOID_CHECK_INSTANCE_WRT(pipe);
+DEFINE_MONOID_CHECK_INSTANCE_WRT_EQUAL(pipe);
+DEFINE_MONOID_CHECK_INSTANCE_WRT(et);
+DEFINE_MONOID_CHECK_INSTANCE_WRT_EQUAL(et);
+DEFINE_MONOID_CHECK_INSTANCE_WRT(caret);
+DEFINE_MONOID_CHECK_INSTANCE_WRT_EQUAL(caret);
+
+#define CHECK_MONOID_INSTANCE_WRT(op_tag) check_monoid_instance_wrt_##op_tag
+#define CHECK_MONOID_INSTANCE_WRT_EQUAL(op_tag) check_monoid_instance_wrt_equal_##op_tag
+
+
+
+//------------------------------------------------------------------------------
+// Abelian modoid instance
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_abelian_monoid_instance_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, var_c);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_a);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_b);\
+}
+
+#define DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_abelian_monoid_instance_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, var_c);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_a);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_b);\
+}
+
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT(plus);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT_EQUAL(plus);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT_EQUAL(pipe);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT(et);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT_EQUAL(et);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT(caret);
+DEFINE_ABELIAN_MONOID_CHECK_INSTANCE_WRT_EQUAL(caret);
+
+#define CHECK_ABELIAN_MONOID_INSTANCE_WRT(op_tag) check_abelian_monoid_instance_wrt_##op_tag
+#define CHECK_ABELIAN_MONOID_INSTANCE_WRT_EQUAL(op_tag) check_abelian_monoid_instance_wrt_equal_##op_tag
+
+
+//------------------------------------------------------------------------------
+// Abelian group instance
+//------------------------------------------------------------------------------
+
+#define DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+ void check_abelian_group_instance_wrt_equal_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, var_c);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_a);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag)(var_a, var_b, ass_b);\
+}
+
+#define DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+ void check_abelian_group_instance_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT(op_tag)(var_a, var_b, var_c);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT(op_tag)(var_a, var_b, ass_a);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT(op_tag)(var_a, var_b, ass_b);\
+}
+
+DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT(plus);
+DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT_EQUAL(plus);
+DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT(pipe);
+DEFINE_ABELIAN_GROUP_CHECK_INSTANCE_WRT_EQUAL(pipe);
+
+#define CHECK_ABELIAN_GROUP_INSTANCE_WRT(op_tag) check_abelian_group_instance_wrt_##op_tag
+#define CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(op_tag) check_abelian_group_instance_wrt_equal_##op_tag
+
+
#endif // __test_itl_laws_h_JOFA_080920__
Modified: sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map.cpp (original)
+++ sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map.cpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -14,7 +14,7 @@
// interval instance types
#include "../test_type_lists.hpp"
#include "../test_value_maker.hpp"
-//#include "../test_laws.hpp"
+#include "../test_laws.hpp"
#include <boost/itl/interval_map.hpp>
#include <boost/itl/split_interval_map.hpp>
Modified: sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map_shared.cpp (original)
+++ sandbox/itl/libs/itl/test/test_quantifier_map/test_quantifier_map_shared.cpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -1,16 +1,51 @@
-/*----------------------------------------------------------------------------+
+/*-----------------------------------------------------------------------------+
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_interval_map_base_laws_plus_4_bicremental_types, T, bicremental_types)
-{ interval_map_base_laws_plus_4_bicremental_types<T, int, interval_map, split_interval_map>();}
+(test_itl_quantifier_map_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, neutron_absorber, interval_map>();}
BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_quantifier_map_check_monoid_4_bicremental_types, T, bicremental_types)
-{ quantifier_map_check_monoid_4_bicremental_types<T, int, neutron_emitter>();}
+(test_itl_quantifier_map_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, neutron_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, neutron_absorber, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, neutron_absorber, interval_map>();}
+
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_monoid_plus_4_bicremental_types_ta, T, bicremental_types)
+{ quantifier_map_check_monoid_plus_4_bicremental_types<T, std::string, neutron_emitter, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_monoid_et_4_bicremental_types_ta, T, bicremental_types)
+{ quantifier_map_check_monoid_et_4_bicremental_types<T, int, neutron_emitter, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_abelian_monoid_plus_4_bicremental_types_ta, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_plus_4_bicremental_types<T, std::string, neutron_emitter, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_abelian_monoid_et_4_bicremental_types_ta, T, bicremental_types)
+{ quantifier_map_check_abelian_monoid_et_4_bicremental_types<T, int, neutron_emitter, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_quantifier_map_check_abelian_group_plus_4_bicremental_types_ta, T, bicremental_types)
+{ quantifier_map_check_abelian_group_plus_4_bicremental_types<T, int, neutron_emitter, interval_map>();}
Modified: sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -9,222 +9,150 @@
#define __test_itl_quantifier_map_shared_h_JOFA_090119__
-template <class T, class U,
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
template<class T, class U,
- class Traits = neutron_absorber,
+ 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 IntervalMap1,
+ >class IntervalMap
+ >
+void quantifier_map_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ typename IntervalMapT::interval_mapping_type val_pair = IDv(6,9,1);
+ mapping_pair<T,U> map_pair = K_v(5,1);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, val_pair, map_pair);
+}
+
+
+template <class T, class U, class Trt,
template<class T, class U,
- class Traits = neutron_absorber,
+ 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 IntervalMap2
+ >class IntervalMap
>
-void interval_map_base_laws_plus_4_bicremental_types()
+void quantifier_map_check_monoid_et_4_bicremental_types()
{
- /*
- typedef IntervalMap1<T,U> IntervalMap1T;
- typedef IntervalMap2<T,U> IntervalMap2T;
-
- T v0 = make<T>(0);
- T v1 = make<T>(1);
- T v3 = make<T>(3);
- T v5 = make<T>(5);
- T v6 = make<T>(6);
- T v7 = make<T>(7);
- T v8 = make<T>(8);
- T v9 = make<T>(9);
-
- U u1 = make<U>(1);
- U u2 = make<U>(2);
-
- interval<T> I0_1D = interval<T>::rightopen(v0,v1);
- interval<T> I1_3D = interval<T>::rightopen(v1,v3);
- interval<T> I3_6D = interval<T>::rightopen(v3,v6);
- interval<T> I5_7D = interval<T>::rightopen(v5,v7);
- interval<T> I6_8D = interval<T>::rightopen(v6,v8);
- interval<T> I8_9D = interval<T>::rightopen(v8,v9);
-
- typename IntervalMap1T::value_type I0_1D_1(I0_1D, u1);
- typename IntervalMap1T::value_type I1_3D_1(I1_3D, u1);
- typename IntervalMap1T::value_type I3_6D_1(I3_6D, u1);
- typename IntervalMap1T::value_type I5_7D_1(I5_7D, u1);
- typename IntervalMap1T::value_type I6_8D_1(I6_8D, u1);
- typename IntervalMap1T::value_type I8_9D_1(I8_9D, u1);
-
- IntervalMap1T map_a, map_b;
- map_a.add(I3_6D_1).add(I5_7D_1);
- map_b.add(I1_3D_1).add(I8_9D_1);
- map_a = map_a;
- typename IntervalMap1T::value_type val_pair = I8_9D_1;
-
- IntervalMap2T map2_a, map2_b;
- map2_a = map_a;
- map2_a += map_a;
- IntervalMap2T join_map = map_a + map2_a;
- //IntervalMap2T splt_map = map_a + map2_a;
-
- check_commutativity_wrt_plus(map_a, map_b);
- //check_commutativity_plus(map2_a, map_b);
- check_commutativity_wrt_plus(map_a, val_pair);
- typename IntervalMap1T::domain_mapping_type v5_u2(v5,u2);
- check_commutativity_wrt_plus(map_b, v5_u2);
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
- CHECK_ASSOCIATIVITY_WRT(plus)(map_a, map_b, map_a);
- check_associativity_wrt_plus(map_a, map_b, map_a);
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
- check_neutrality_wrt_plus(map_a, neutron<IntervalMap1T>::value());
+ typename IntervalMapT::interval_mapping_type val_pair = IDv(6,9,1);
+ mapping_pair<T,U> map_pair = K_v(5,1);
- CHECK_MONOID_WRT(plus)(neutron<IntervalMap1T>::value(), map_a, map_b, map_a);
- */
+ CHECK_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, val_pair, map_pair);
}
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
-template <class T, class U, class JointMapT, class SplitMapT>
-void quantifier_map_check_monoid_instance_plus
-(
-const JointMapT& join_map_a, const JointMapT& join_map_b, const JointMapT& join_map_c,
-const SplitMapT& split_map_a, const SplitMapT& split_map_b, const SplitMapT& split_map_c,
-const typename JointMapT::value_type& val_pair, const mapping_pair<T,U>& map_pair
-)
+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()
{
- /*
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT(plus)(neutron<JointMapT>::value(), join_map_a, join_map_b, val_pair);
- CHECK_MONOID_WRT(plus)(neutron<JointMapT>::value(), join_map_a, val_pair, join_map_b);
-
- CHECK_MONOID_WRT(plus)(neutron<JointMapT>::value(), join_map_c, join_map_b, map_pair);
- CHECK_MONOID_WRT(plus)(neutron<JointMapT>::value(), join_map_c, map_pair, join_map_b);
-
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT(plus)(neutron<SplitMapT>::value(), split_map_a, split_map_b, val_pair);
- CHECK_MONOID_WRT(plus)(neutron<SplitMapT>::value(), split_map_a, val_pair, split_map_b);
-
- CHECK_MONOID_WRT(plus)(neutron<SplitMapT>::value(), split_map_c, split_map_b, map_pair);
- CHECK_MONOID_WRT(plus)(neutron<SplitMapT>::value(), split_map_c, map_pair, split_map_b);
-
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, split_map_c);
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, split_map_b, join_map_c);
-
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, join_map_c);
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, join_map_c);
-
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, join_map_b, map_pair);
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, map_pair, join_map_b);
-
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, join_map_b, val_pair);
- CHECK_MONOID_WRT_EQUAL(plus)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, val_pair, join_map_b);
- */
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ typename IntervalMapT::interval_mapping_type val_pair = IDv(6,9,1);
+ mapping_pair<T,U> map_pair = K_v(5,1);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, val_pair, map_pair);
}
-template <class T, class U, class JointMapT, class SplitMapT>
-void quantifier_map_check_monoid_instance_et
-(
-const JointMapT& join_map_a, const JointMapT& join_map_b, const JointMapT& join_map_c,
-const SplitMapT& split_map_a, const SplitMapT& split_map_b, const SplitMapT& split_map_c,
-const typename JointMapT::value_type& val_pair, const mapping_pair<T,U>& map_pair
-)
+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()
{
- /*
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT(et)(neutron<JointMapT>::value(), join_map_a, join_map_b, val_pair);
- CHECK_MONOID_WRT(et)(neutron<JointMapT>::value(), join_map_a, val_pair, join_map_b);
-
- CHECK_MONOID_WRT(et)(neutron<JointMapT>::value(), join_map_c, join_map_b, map_pair);
- CHECK_MONOID_WRT(et)(neutron<JointMapT>::value(), join_map_c, map_pair, join_map_b);
-
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT(et)(neutron<SplitMapT>::value(), split_map_a, split_map_b, val_pair);
- CHECK_MONOID_WRT(et)(neutron<SplitMapT>::value(), split_map_a, val_pair, split_map_b);
-
- CHECK_MONOID_WRT(et)(neutron<SplitMapT>::value(), split_map_c, split_map_b, map_pair);
- CHECK_MONOID_WRT(et)(neutron<SplitMapT>::value(), split_map_c, map_pair, split_map_b);
-
- //-----------------------------------------------------------------------------
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, split_map_c);
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, split_map_b, join_map_c);
-
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, join_map_c);
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_a, join_map_b, join_map_c);
-
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, join_map_b, map_pair);
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, map_pair, join_map_b);
-
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, join_map_b, val_pair);
- CHECK_MONOID_WRT_EQUAL(et)(is_element_equal, neutron<SplitMapT>::value(), split_map_c, val_pair, join_map_b);
- */
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ typename IntervalMapT::interval_mapping_type val_pair = IDv(6,9,1);
+ mapping_pair<T,U> map_pair = K_v(5,1);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, val_pair, map_pair);
}
-template <class T, class U, class Trait>
-void quantifier_map_check_monoid_4_bicremental_types()
+
+//------------------------------------------------------------------------------
+// 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 interval_map<T,U,Trait> IntervalMapT;
- typedef split_interval_map<T,U,Trait> SplitIntervalMapT;
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
- IntervalMapT join_map_a, join_map_b, join_map_c;
- join_map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
- join_map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
- join_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
-
- SplitIntervalMapT split_map_a, split_map_b, split_map_c;
- split_map_a.add(IDv(0,6,2)).add(IDv(5,7,1)).add(IDv(9,10,2));
- split_map_b.add(IDv(2,3,3)).add(IIv(9,9,3)).add(CDv(9,11,2));
- split_map_c.add(CIv(0,9,2)).add(IIv(3,6,1)).add(CDv(5,7,1));
+ IntervalMapT map_a, map_b, map_c;
+ map_a.add(IDv(3,6,1)).add(IIv(5,7,1));
+ map_b.add(CDv(1,3,1)).add(IDv(8,9,1));
+ map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
typename IntervalMapT::interval_mapping_type val_pair = IDv(6,9,1);
mapping_pair<T,U> map_pair = K_v(5,1);
- IntervalMapT jlhs = join_map_a + join_map_b;
- IntervalMapT jrhs = join_map_b + join_map_a;
- BOOST_CHECK_EQUAL(jlhs, jrhs);
-
- jlhs = join_map_a + val_pair;
- jrhs = val_pair + join_map_a;
- BOOST_CHECK_EQUAL(jlhs, jrhs);
-
- SplitIntervalMapT slhs = split_map_a + split_map_b;
- SplitIntervalMapT srhs = split_map_b + split_map_a;
- BOOST_CHECK_EQUAL(slhs, srhs);
-
- slhs = split_map_a + val_pair;
- srhs = val_pair + split_map_a;
- BOOST_CHECK_EQUAL(slhs, srhs);
-
- jlhs = join_map_a + map_pair;
- jrhs = map_pair + join_map_a;
- BOOST_CHECK_EQUAL(jlhs, jrhs);
-
- slhs = split_map_a + map_pair;
- srhs = map_pair + split_map_a;
- BOOST_CHECK_EQUAL(slhs, srhs);
-
- slhs = split_map_a + join_map_b;
- srhs = join_map_b + split_map_a;
- BOOST_CHECK_EQUAL(slhs, srhs);
- /*
- quantifier_map_check_monoid_instance_plus(
- join_map_a, join_map_b, join_map_c,
- split_map_a, split_map_b, split_map_c,
- val_pair, map_pair);
-
- quantifier_map_check_monoid_instance_et(
- join_map_a, join_map_b, join_map_c,
- split_map_a, split_map_b, split_map_c,
- val_pair, map_pair);
- */
-
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (map_a, map_b, map_c, val_pair, map_pair);
}
-
#endif // __test_itl_quantifier_map_shared_h_JOFA_090119__
Modified: sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp (original)
+++ sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp 2009-01-28 02:23:34 EST (Wed, 28 Jan 2009)
@@ -252,10 +252,12 @@
void misc_test()
{
- typedef interval_set<int> SeT;
- SeT a(interval<int>::rightopen(0,2));
- a.flip(interval<int>::rightopen(1,3));
- cout << a << endl;
+ typedef interval_map<int,int,neutron_enricher> MapT;
+ MapT m;
+ m += MapT::value_type(interval<int>::rightopen(1,3), 1);
+ cout << m << endl;
+ m -= MapT::value_type(interval<int>::rightopen(1,3), 1);
+ cout << m << endl;
}
int main()
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