Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50229 - in sandbox/itl: boost/itl boost/itl_xt libs/itl/build/cygwin libs/itl/doc libs/itl/example/boost_party libs/itl/example/interval
From: afojgo_at_[hidden]
Date: 2008-12-10 08:47:41


Author: jofaber
Date: 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
New Revision: 50229
URL: http://svn.boost.org/trac/boost/changeset/50229

Log:
Enhanced portability. Explicified friend class declarations,Added documentation. Stable {msvc-9.0, partly congcc-4.3-a7}
Text files modified:
   sandbox/itl/boost/itl/functors.hpp | 2
   sandbox/itl/boost/itl/interval.hpp | 11 +
   sandbox/itl/boost/itl/interval_base_map.hpp | 24 ++--
   sandbox/itl/boost/itl/interval_map.hpp | 8 +
   sandbox/itl/boost/itl/interval_set.hpp | 4
   sandbox/itl/boost/itl/notate.hpp | 1
   sandbox/itl/boost/itl/separate_interval_set.hpp | 4
   sandbox/itl/boost/itl/split_interval_map.hpp | 7 +
   sandbox/itl/boost/itl/split_interval_set.hpp | 4
   sandbox/itl/boost/itl_xt/seqgentor.hpp | 4
   sandbox/itl/boost/itl_xt/var_permutation.hpp | 2
   sandbox/itl/libs/itl/build/cygwin/makefile | 35 ++++---
   sandbox/itl/libs/itl/doc/interface.qbk | 194 +++++++++++++++++++++++++++++++++++++--
   sandbox/itl/libs/itl/doc/itl.qbk | 14 +-
   sandbox/itl/libs/itl/example/boost_party/boost_party.cpp | 3
   sandbox/itl/libs/itl/example/interval/interval.cpp | 3
   16 files changed, 259 insertions(+), 61 deletions(-)

Modified: sandbox/itl/boost/itl/functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/functors.hpp (original)
+++ sandbox/itl/boost/itl/functors.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -28,8 +28,8 @@
 #ifndef __itl_functors_H_JOFA_080315__
 #define __itl_functors_H_JOFA_080315__
 
-#include <boost/itl/type_traits/neutron.hpp>
 #include <functional>
+#include <boost/itl/type_traits/neutron.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -30,6 +30,10 @@
 #ifndef __itl_interval_JOFA_000626_H__
 #define __itl_interval_JOFA_000626_H__
 
+#ifdef USE_CONCEPTS
+#include <bits/concepts.h>
+#endif
+
 #include <ostream>
 #include <functional>
 #include <limits>
@@ -301,6 +305,9 @@
     @author Joachim Faulhaber
 */
 template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
+#ifdef USE_CONCEPTS
+ requires std::LessThanComparable<DomainT>
+#endif
 class interval
 {
 public:
@@ -560,8 +567,8 @@
 //@{
     /// Maximum Interval
     static interval always()
- { return interval<T>::closed(std::numeric_limits<DomainT>::min(),
- std::numeric_limits<DomainT>::max()); }
+ { return interval<DomainT>::closed(std::numeric_limits<DomainT>::min(),
+ std::numeric_limits<DomainT>::max()); }
 //@}
 
     void set_lwb(DomainT lw) { _lwb=lw; }

Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -36,10 +36,15 @@
 
 #include <limits>
 #include <boost/itl/notate.hpp>
+
+#ifdef USE_CONCEPTS
+#include <bits/concepts.h>
+#endif
+
 #include <boost/itl/map.hpp>
 #include <boost/itl/interval_base_set.hpp>
 #include <boost/itl/interval_sets.hpp>
-#include <boost/itl/interval.hpp>
+//CL #include <boost/itl/interval.hpp>
 
 
 #define const_FOR_IMPLMAP(iter) for(typename ImplMapT::const_iterator iter=_map.begin(); (iter)!=_map.end(); (iter)++)
@@ -141,12 +146,7 @@
     ITL_ALLOC Alloc = std::allocator
>
 #ifdef USE_CONCEPTS
-//conceptgcc is still too buggy
-//requires
-//{
-// std::LessThanComparable<DomainT>,
-// std::EqualityComparable<Codomain>
-//}
+ requires std::LessThanComparable<DomainT>
 #endif
 class interval_base_map
 {
@@ -458,7 +458,7 @@
     */
     SubType& subtract(const value_type& x)
     {
- typedef inverse<Combine,CodomainT>::type InverseCombine;
+ typedef typename inverse<Combine,CodomainT>::type InverseCombine;
         if(Traits::emits_neutrons)
                         that()->template add_<InverseCombine>(x);
         else
@@ -622,7 +622,7 @@
         template
         <
             class DomT,
- template<class DomT, ITL_COMPARE Comp>class Interv,
+ template<class DomT2, ITL_COMPARE>class Interv,
             ITL_COMPARE Comp, ITL_ALLOC Allc
>
         class IntervalSet
@@ -651,7 +651,7 @@
         template
         <
             class DomT, class CodomT,
- class Trts, template<class DomT,ITL_COMPARE Comp>class Interv,
+ class Trts, template<class DomT2,ITL_COMPARE>class Interv,
             ITL_COMPARE Comp, ITL_COMBINE Combi, ITL_ALLOC Allc
>
         class IntervalMap
@@ -711,7 +711,7 @@
     <
         template
         <
- class DomT, template<class DomT,ITL_COMPARE Comp>class Interv,
+ class DomT, template<class DomT2,ITL_COMPARE>class Interv,
             ITL_COMPARE Comp, ITL_ALLOC Allc
>
         class IntervalSet
@@ -917,7 +917,7 @@
         template
         <
             class DomT, class CodomT,
- class Trts, template<class DomT,ITL_COMPARE Comp>class Interv,
+ class Trts, template<class DomT2,ITL_COMPARE>class Interv,
             ITL_COMPARE Comp, ITL_COMBINE Combi, ITL_ALLOC Allc
>
         class IntervalMap

Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -134,6 +134,8 @@
     typedef typename base_type::mapping_pair_type mapping_pair_type;
     typedef typename base_type::ImplMapT ImplMapT;
 
+ typedef typename base_type::codomain_combine codomain_combine;
+
     typedef interval_set<DomainT,Interval,Compare,Alloc> interval_set_type;
     typedef interval_set_type set_type;
 
@@ -182,7 +184,9 @@
         // For funx_ want to be used in the base class via derived SubType pointer:
         // that()->funx_. So they must be either public or made accessible by a
         // friend declaration:
- friend class base_type;
+ friend class
+ interval_base_map <interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>,
+ DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>;
 
     bool contains_(const value_type& x)const;
 
@@ -267,7 +271,7 @@
     ::joint_insert(iterator& left_it, const iterator& right_it)
 {
     // both left and right are in the set and they are neighbours
- BOOST_ASSERT(right_it != _map.end());
+ BOOST_ASSERT(right_it != this->_map.end());
     BOOST_ASSERT(left_it->KEY_VALUE.exclusive_less(right_it->KEY_VALUE));
     BOOST_ASSERT(left_it->KEY_VALUE.touches(right_it->KEY_VALUE));
 

Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -204,7 +204,9 @@
     }
 
 private:
- friend class base_type;
+ friend class
+ interval_base_set<interval_set<DomainT,Interval,Compare,Alloc>,
+ DomainT,Interval,Compare,Alloc>;
 
     /// Does the set contain the interval <tt>x</tt>?
     bool contains_(const interval_type& x)const;

Modified: sandbox/itl/boost/itl/notate.hpp
==============================================================================
--- sandbox/itl/boost/itl/notate.hpp (original)
+++ sandbox/itl/boost/itl/notate.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -111,7 +111,6 @@
 //------------------------------------------------------------------------------
 #define ITL_ALLOC template<class>class
 
-
 #endif // __itl_NOTATE_H_JOFA_990119__
 
 

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 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -166,7 +166,9 @@
     }
 
 private:
- friend class base_type;
+ friend class
+ interval_base_set<separate_interval_set<DomainT,Interval,Compare,Alloc>,
+ DomainT,Interval,Compare,Alloc>;
 
     /// Does the set contain the interval <tt>x</tt>?
     bool contains_(const interval_type& x)const;

Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -155,6 +155,8 @@
         typedef typename base_type::mapping_pair_type mapping_pair_type;
         typedef typename base_type::ImplMapT ImplMapT;
 
+ typedef typename base_type::codomain_combine codomain_combine;
+
         typedef interval_set<DomainT,Interval,Compare,Alloc> interval_set_type;
         typedef interval_set_type set_type;
 
@@ -195,7 +197,10 @@
                 // For funx_ want to be used in the base class via derived SubType pointer:
                 // that()->funx_. So they must be either public or made accessible by a
                 // friend declaration:
- friend class base_type;
+ friend class
+ interval_base_map
+ <split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc>,
+ DomainT,CodomainT,Traits,Interval,Compare,Combine,Alloc >;
 
         bool contains_(const value_type& x)const;
 

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 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -183,7 +183,9 @@
         }
         
         private:
- friend class base_type;
+ friend class
+ interval_base_set<split_interval_set<DomainT,Interval,Compare,Alloc>,
+ DomainT,Interval,Compare,Alloc>;
 
         /// Does the set contain the interval <tt>x</tt>?
         bool contains_(const interval_type& x)const;

Modified: sandbox/itl/boost/itl_xt/seqgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/seqgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/seqgentor.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -54,9 +54,9 @@
     { m_domainGentor = gentor; }
 
     void setRangeOfSampleSize(int lwb, int upb)
- { m_sampleSizeRange = rightopen_interval(lwb,upb); }
+ { m_sampleSizeRange = interval<int>::rightopen(lwb,upb); }
     void setRangeOfSampleSize(const interval<int>& szRange)
- { BOOST_ASSERT(szRange.isROpen()); m_sampleSizeRange = szRange; }
+ { BOOST_ASSERT(szRange.is_rightopen()); m_sampleSizeRange = szRange; }
 
     void setUnique(bool truth) { m_unique = truth; }
 

Modified: sandbox/itl/boost/itl_xt/var_permutation.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/var_permutation.hpp (original)
+++ sandbox/itl/boost/itl_xt/var_permutation.hpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -191,7 +191,7 @@
     bool var_permutation<varCountV>::insert(VarEnumTD var, int pos)
     {
         //JODO URG untested
- BOOST_ASSERT(!contains(var)) //var_permutation has to be unique;
+ BOOST_ASSERT(!contains(var)); //var_permutation has to be unique;
         if(varCountV <= var || varCountV == m_Size)
             return false;
 

Modified: sandbox/itl/libs/itl/build/cygwin/makefile
==============================================================================
--- sandbox/itl/libs/itl/build/cygwin/makefile (original)
+++ sandbox/itl/libs/itl/build/cygwin/makefile 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -19,13 +19,18 @@
 # build.itl.libs.itl
 ITL_ROOT_PATH = ../../../..
 #--- root directory of the interval template library --------------------------
-ITL_SRC_PATH = $(ITL_ROOT_PATH)/boost/itl
-ITL_LIBS_PATH = $(ITL_ROOT_PATH)/libs/itl
-ITL_EXAMPLE_PATH = $(ITL_LIBS_PATH)/example
-ITL_TEST_PATH = $(ITL_LIBS_PATH)/test
+ITL_SRC_PATH = $(ITL_ROOT_PATH)/boost/itl
+ITL_XT_SRC_PATH = $(ITL_ROOT_PATH)/boost/itl_xt
+ITL_LIBS_PATH = $(ITL_ROOT_PATH)/libs/itl
+ITL_XT_LIBS_PATH = $(ITL_ROOT_PATH)/libs/itl_xt
+ITL_EXAMPLE_PATH = $(ITL_LIBS_PATH)/example
+ITL_XT_EXAMPLE_PATH = $(ITL_XT_LIBS_PATH)/example
+ITL_TEST_PATH = $(ITL_LIBS_PATH)/test
+ITL_XT_TEST_PATH = $(ITL_XT_LIBS_PATH)/test
 
 #BOOST_PATH = /usr/include/boost-1_33_1
-BOOST_PATH = /usr/include/boost_1_35_0
+#BOOST_PATH = /usr/include/boost_1_35_0
+BOOST_PATH = $(ITL_ROOT_PATH)
 
 #--- binaries -----------------------------------------------------------------
 BIN_PATH = $(ITL_ROOT_PATH)/bin
@@ -37,7 +42,7 @@
 STD_INCL = -I/usr/include
 #GCC_INCL = $(addprefix -I,$(CMP_PATH))/include
 #CONCEPTGCC_INCL = -I/opt/conceptgcc-boostcon/include
-CONCEPTGCC_INCL = -I/opt/conceptgcc-4.3.0-alpha-7/include
+CONCEPTGCC_INCL = -I/opt/conceptgcc-4.3.0-alpha-7/include/c++/4.3.0
 
 INCLUDE = $(CONCEPTGCC_INCL) $(ITL_INCL) $(BOOST_INCL)
 #NCLUDE = $(STD_INCL) $(ITL_INCL) $(BOOST_INCL)
@@ -53,7 +58,7 @@
 LOAD_FLAGS4BOOST = $(LOAD_FLAGS) -lboost_date_time-gcc-mt-s
 
 #--- compileflags ---------------------------------------------------
-# COMPILE_FLAGS = -o2 -DUSE_CONCEPTS
+#COMPILE_FLAGS = -O2 -DUSE_CONCEPTS
 COMPILE_FLAGS = -O2
 
 #--- compiler -----------------------------------------------------------------
@@ -75,7 +80,7 @@
         make examples
         make itvset_shell
         make splititvmap_shell
- make auto_itv_test
+# make auto_itv_test
         
 examples:
         make party
@@ -146,7 +151,7 @@
         $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(overlap_counter_SOURCES) $(LOAD_FLAGS) -o $(overlap_counter_TARGET)
 
 #--- project history --------------------------------------------------
-history_PATH = $(ITL_EXAMPLE_PATH)/history
+history_PATH = $(ITL_XT_EXAMPLE_PATH)/history
 history_MAIN = $(history_PATH)/history.cpp
 history_SOURCES = $(history_MAIN)
 history_TARGET = $(BIN_PATH)/history$(EXE_TAG)
@@ -155,7 +160,7 @@
         $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(history_SOURCES) $(LOAD_FLAGS) -o $(history_TARGET)
 
 #--- project amount_cube --------------------------------------------------
-amount_cube_PATH = $(ITL_EXAMPLE_PATH)/amount_cube
+amount_cube_PATH = $(ITL_XT_EXAMPLE_PATH)/amount_cube
 amount_cube_MAIN = $(amount_cube_PATH)/amount_cube.cpp
 amount_cube_SOURCES = $(amount_cube_MAIN)
 amount_cube_TARGET = $(BIN_PATH)/amount_cube$(EXE_TAG)
@@ -200,10 +205,8 @@
         $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(man_power_SOURCES) $(LOAD_FLAGS4BOOST) -o $(man_power_TARGET)
 
         
-
-#--- group tests --------------------------------------------------------------
 #--- project itvset_shell -----------------------------------------------------
-itvset_shell_PATH = $(ITL_TEST_PATH)/itvset_shell
+itvset_shell_PATH = $(ITL_EXAMPLE_PATH)/itvset_shell
 itvset_shell_MAIN = $(itvset_shell_PATH)/itvset_shell.cpp
 itvset_shell_SOURCES = $(itvset_shell_MAIN)
 itvset_shell_TARGET = $(BIN_PATH)/itvset_shell$(EXE_TAG)
@@ -212,7 +215,7 @@
         $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(itvset_shell_SOURCES) $(LOAD_FLAGS) -o $(itvset_shell_TARGET)
 
 #--- project splititvmap_shell ------------------------------------------------
-splititvmap_shell_PATH = $(ITL_TEST_PATH)/splititvmap_shell
+splititvmap_shell_PATH = $(ITL_EXAMPLE_PATH)/splititvmap_shell
 splititvmap_shell_MAIN = $(splititvmap_shell_PATH)/splititvmap_shell.cpp
 splititvmap_shell_SOURCES = $(splititvmap_shell_MAIN)
 splititvmap_shell_TARGET = $(BIN_PATH)/splititvmap_shell$(EXE_TAG)
@@ -220,8 +223,10 @@
 splititvmap_shell:
         $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(splititvmap_shell_SOURCES) $(LOAD_FLAGS) -o $(splititvmap_shell_TARGET)
 
+
+#--- group tests --------------------------------------------------------------
 #--- project auto_itv_test -----------------------------------------------------
-auto_itv_test_PATH = $(ITL_TEST_PATH)/auto_itv_test
+auto_itv_test_PATH = $(ITL_XT_TEST_PATH)/auto_itv_test
 auto_itv_test_MAIN = $(auto_itv_test_PATH)/auto_itv_test.cpp
 auto_itv_test_SOURCES = $(auto_itv_test_MAIN)
 auto_itv_test_TARGET = $(BIN_PATH)/auto_itv_test$(EXE_TAG)

Modified: sandbox/itl/libs/itl/doc/interface.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/interface.qbk (original)
+++ sandbox/itl/libs/itl/doc/interface.qbk 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -6,6 +6,125 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ]
 
+[section Concepts]
+
+[section Abstract Sets and Maps]
+
+On the __conceptual__ aspect the __itl_set__ and all __itv_bset__ are a model
+of a concept Set.
+The Set concept of the Interval Template Library refers to the
+mathematical notion of a set.
+
+[table
+[[Function] [Variant][implemented as] ]
+[[empty set ] [] [`Set::Set()`] ]
+[[subset relation] [] [`bool Set::contained_in(const Set& s2)const`] ]
+[[equality ] [] [`bool is_element_equal(const Set& s1, const Set& s2)`]]
+[[set union] [inplace][`Set& operator += (Set& s1, const Set& s2)`] ]
+[[] [] [`Set operator + (const Set& s1, const Set& s2)`]]
+[[set difference] [inplace][`Set& operator -= (Set& s1, const Set& s2)`] ]
+[[] [] [`Set operator - (const Set& s1, const Set& s2)`]]
+[[set intersection][inplace][`Set& operator *= (Set& s1, const Set& s2)`] ]
+[[] [] [`Set operator * (const Set& s1, const Set& s2)`]]
+]
+
+Equality on Sets is not implemented as `operator ==`, because `==` is used for
+the stronger lexicographical equality, that takes the sequence of elements into
+account.
+
+Being models of concept Set, __itl_set__ and all __itv_bsets__ and __itl_set__
+implement these
+operations and obey the associated laws on Sets. See e.g.
+[@http://en.wikipedia.org/wiki/Algebra_of_sets an algebra of sets here].
+
+
+On the __conceptual__ aspect __itl_map__ and all __itv_bmaps__ are models of a
+concept Map.
+Since a map is a set of pairs, we try to design the map concept in accordance
+to the Set concept above.
+
+[table
+[[Function] [Variant][implemented as] ]
+[[empty map ] [] [`Map::Map()`] ]
+[[subset relation] [] [`bool Map::contained_in(const Map& s2)const`] ]
+[[equality ] [] [`bool is_element_equal(const Map& s1, const Map& s2)`]]
+[[set union] [inplace][`Map& operator += (Map& s1, const Map& s2)`] ]
+[[] [] [`Map operator + (const Map& s1, const Map& s2)`]]
+[[set difference] [inplace][`Map& operator -= (Map& s1, const Map& s2)`] ]
+[[] [] [`Map operator - (const Map& s1, const Map& s2)`]]
+[[set intersection][inplace][`Map& operator *= (Map& s1, const Map& s2)`] ]
+[[] [] [`Map operator * (const Map& s1, const Map& s2)`]]
+]
+
+As one can see, on the abstract kernel the signatures of the itl's Set and Map
+concepts are identical, except for the typename. This is not a trivial
+signature since the major
+operations that are used in fundamental axioms that make up the semantics
+of the concepts are given. Interestingly, while signatures are identical
+The set of valid laws are different.
+
+[/ This is due to the fact, that Map::operator+= is not just adding and
+Map::operator-= is not only removing ... liegt and der implementierung von
+add und subtract.]
+
+[/ Auf dem Kern sind die Signaturen (fast) gleich. Unterschiede Semantik.
+vor allem +=, -= und erst recht *=]
+
+[/ insert = add<inplace_identity>]
+[/ erase = subtract<inplace_identity>]
+
+[/ Kind of nuclear]
+
+Itl maps differ in their behavior dependent on how they handle
+neutral elements of the associated value type CodomainT. In the
+itl we call neutral elements neutrons. The way, in which
+neutrons are dealt with can be specified by the template parameter
+Traits.
+
+[/ Tabellchen absorber, enricher, emitter]
+
+From a pragmatic perspective value pairs that carry neutrons as
+mapped values can often be deleted. A Map that does never insert
+associated neutrons or deletes them when they emerge, is called
+a neutron_absorber. To be a neutron_absorber is the default setting
+for the Trait parameter. Moreover a neutron_absorber is able
+to erase a pair (x,y) from a map {(x,y)} by calling subtract((x,y))
+{(x,y)}.subtract((x,y)) == {}.
+
+With a neutron_enricher, on the contrary, subtraction of a
+pair (x,y) that is in the map results in a pair (x,0).
+{(x,y)}.subtract((x,y)) == {(x,0)}. Mapping pairs that carry
+neutrons may emerge as a result of computations and they can
+not be erased by subtractions, so they are enriched in the map.
+
+A neutron enricher carries the information, if values have
+been aggregated for certain keys and resulted in a neutron value
+or if they have not been aggregated at all: No values
+exists for a key.
+
+For a neutron_absorber this distinction can not be made:
+# key k exists and associated value is a neutron:
+ There where aggregations.
+# key k does not exist: No aggregation at all for k.
+
+Sometimes this distictin is needed. Then a neutron_enricher
+is the right choice. Also, If we want to give to itl::Maps
+A common set of keys in order to say iterate synchroniously
+over both maps, we need neutron_enrichers.
+
+The third neutronic trait is called neutron_emitter.
+A map that is a neutron_emitter is defined on every value
+of it's domain. It emits a neutron value for
+every key value, that has not been set or aggregated to
+a values unequal to the neutron value.
+
+That way a neutron emitter map is an infinite array, that
+is always initialized with neutron values.
+
+[endsect]
+
+[endsect]
+
 [section Interface]
 
 Section Interface gives an overview over the types and functions
@@ -14,17 +133,17 @@
 with the corresponding containers of the standard template library.
 
 There are two majaor aspects or views of itl containers. The first and predominant
-aspect is called conceptual. The second and minor aspect is called iterative or
+aspect is called __conceptual__. The second and minor aspect is called iterative or
 iteration related.
 
 [table
-[[Aspect] [Abstraction level][] [] [Practical]]
-[[Conceptual][more abstract][concept related] [iterator independent][interval_sets(maps) can be used as sets(maps)
- except for element iteration.]]
-[[Iterative] [less abstract][implementation related][iterator dependent] [interval_sets(maps) iterate over intervals]]
+[[Aspect] [Abstraction level][] [] [Practical]]
+[[__Conceptual__][more abstract][concept related] [iterator independent][interval_sets(maps) can be used as sets(maps)
+ except for element iteration.]]
+[[Iterative] [less abstract][implementation related][iterator dependent] [interval_sets(maps) iterate over intervals]]
 ]
 
-On the conceptual aspect
+On the __conceptual__ aspect
 
 * in interval implements a set of elements partially.
 * an interval_set implements a set of elements.
@@ -111,16 +230,63 @@
 [[=std::map=] [`_Key`] [`_Data`] [`_Compare = std::less<_Key>`][] [] [] [`Alloc = std::alloc<_Key>`]]
 ]
 
+Using the following placeholders,
+
+``
+D := class DomainT,
+C := class CodomainT,
+Cp := class Compare = std::less<DomainT>,
+cp := template<class D>class Compare = std::less,
+cb := template<class C>class Combine = itl::inplace_plus,
+T := class Traits,
+i := template<class D,template<class>class cp>class Interval = itl::interval
+Ad := class Alloc = std::allocator<DomainT>
+Av := class Alloc = std::allocator<std::pair<DomainT,CodomainT> >
+a := template<class>class Alloc = std::allocator
+``
+
+we arrive at a final synoptical matrix of class templates and their parameters.
+
+[pre
+interval <D, cp, >
+interval_sets<D, cp, i, a >
+itl::set <D, cp, a >
+std::set <D, Cp, Ad>
+interval_maps<D, C, cp, cb, T, i, a >
+itl::map <D, C, cp, cb, T, a >
+std::map <D, C Cp, Av>
+]
+
+The choice of parameters and their positions follow the std::containers
+as close a possible, so that usage of interval sets and maps does only
+require minimal additional knowlege.
+
+Additional knowledge is required when instantiating a comparison parameter
+`Compare` or an allocation parameter `Alloc`. In contrast to std::contianers
+these have to be instantiated as templates, like e.g.
+``
+interval_set<string, german_compare> sections; // 2nd parameter is a template
+std::set<string, german_compare<string> > words; // 2nd parameter is a type
+``
+This choice has been made, because template parameters have to be
+instantiated with different types inside itl class templates. This problem
+is described in detail in section JODO.
+
+Required Concepts
+
+
 
 [table Associated types of sets
-[[Aspects] [] [type] [interval] [interval_sets] [itl::set] [std::set]]
-[[conceptual] [data] [domain_type] [DomainT] [DomainT] [DomainT] []]
-[[] [ordering][domain_compare] [Compare<DomainT>][Compare<DomainT>] [Compare<DomainT>][]]
-[[iterative] [data] [interval_type] [] [Interval<DomainT,Compare>] [] []]
-[[] [] [key_type] [] [Interval<DomainT,Compare>] [] [_Key]]
-[[] [] [value_type] [] [Interval<DomainT,Compare>] [] [_Key]]
-[[] [ordering][interval_compare][] [exclusive_less<interval_type>][] []]
-[[] [] [key_compare] [] [exclusive_less<interval_type>][] [_Compare]]
+[[Aspects] [] [type] [interval] [interval_sets] [itl::set] [std::set]]
+[[__conceptual__] [data] [domain_type] [DomainT] [DomainT] [DomainT] []]
+[[] [ordering][domain_compare] [Compare<DomainT>] [Compare<DomainT>] [Compare<DomainT>][]]
+[[iterative] [data] [interval_type] [] [Interval<DomainT,Compare>] [] []]
+[[] [] [key_type] [] [Interval<DomainT,Compare>] [] [_Key]]
+[[] [] [value_type] [] [Interval<DomainT,Compare>] [] [_Key]]
+[[] [ordering][interval_compare][] [exclusive_less <interval_type>][] []]
+[[] [] [key_compare] [] [exclusive_less <interval_type>][] [_Compare]]
+[[__conceptual__] [size] [size_type] [size<DomainT>::type] [interval_type:: size_type] [std::size_t] []]
+[[] [] [difference_type] [difference <DomainT>::type][interval_type:: difference_type][std::size_t] []]
 ]
 
 [endsect]

Modified: sandbox/itl/libs/itl/doc/itl.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/itl.qbk (original)
+++ sandbox/itl/libs/itl/doc/itl.qbk 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -73,6 +73,10 @@
 [def __eiS [link element_type *e*] [link interval_type *i*] [link interval_set_types *S*]]
 [def __bpM [link element_mapping_type *b*] [link interval_mapping_type *p*] [link interval_map_types *M*]]
 
+[def __conceptual__ functional]
+[def __Conceptual__ Functional]
+[def __iterative__ sequential]
+[def __Itervative__ Sequential]
 
 [/ Cited Boost resources ]
 
@@ -102,16 +106,16 @@
 is the more specific and ['implementation related aspect]. In practice both
 aspects are useful and are therefore supported.
 
-The first aspect, that will be called ['*conceptual aspect*], is the more important one.
-It means that we can use any __itv_set__ or __itv_map__ like a normal
-set or map ['*of elements*].
-
+The first aspect, that will be called ['*__conceptual__ aspect*], is the more important one.
+It means that we can use an __itv_set__ or __itv_map__ like a
+set or map ['*of elements*]. The it exposes the same functions.
 ``
 interval_set<int> mySet;
 mySet.insert(42);
 bool has_answer = mySet.contains(42);
 ``
 
+
 The second aspect, that will be called ['*iterative aspect*], allows to exploit the
 fact, that the elements of __itv_sets__ and __itv_maps__ are clustered in
 __itvs__ that we can iterate over.
@@ -187,7 +191,7 @@
 
 * An __itl_set__ is behavioral equal to __itv_bsets__
   except for iteration. That is to say behavioral equal on
- the conceptual aspect.
+ the __conceptual__ aspect.
 
 * An __itl_map__ is behavioral equal to __itv_bmaps__
   except for iteration, that is on the conceptional

Modified: sandbox/itl/libs/itl/example/boost_party/boost_party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/boost_party/boost_party.cpp (original)
+++ sandbox/itl/libs/itl/example/boost_party/boost_party.cpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -184,4 +184,5 @@
 [2008-May-20 19:30:00 - 2008-May-20 22:15:00): 180 cm = 5.90551 ft
 [2008-May-20 22:15:00 - 2008-May-21 00:30:00): 200 cm = 6.56168 ft
 -----------------------------------------------------------------------------*/
-//]
\ No newline at end of file
+//]
+

Modified: sandbox/itl/libs/itl/example/interval/interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/interval/interval.cpp (original)
+++ sandbox/itl/libs/itl/example/interval/interval.cpp 2008-12-10 08:47:38 EST (Wed, 10 Dec 2008)
@@ -62,4 +62,5 @@
 // Interval<string>: (Barcelona,Boston] does NOT contain 'Barcelona'
 // Interval<string>: (Barcelona,Boston] does contain 'Berlin'
 // Interval<Time>: (mon:08:30,mon:17:20)
-//]
\ No newline at end of file
+//]
+


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