Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66253 - in sandbox/icl: . boost boost/icl boost/icl/concept boost/icl/detail boost/icl/functions boost/icl/type_traits boost/icl_xt boost/icl_xt/detail boost/icl_xt/std boost/validate boost/validate/driver boost/validate/gentor boost/validate/icl boost/validate/laws boost/validate/loki boost/validate/loki_xt boost/validate/std boost/validate/std/algorithm boost/validate/type boost/validate/validater libs libs/icl libs/icl/build libs/icl/build/cygwin libs/icl/build/script libs/icl/build/win32 libs/icl/doxy_doc libs/icl/doxy_doc/doxygen_input libs/icl/doxy_doc/doxygen_input/pages libs/icl/doxy_doc/doxygen_output libs/icl/example libs/icl/example/boost_party_ libs/icl/example/custom_interval_ libs/icl/example/dynamic_interval_ libs/icl/example/interval_ libs/icl/example/interval_container_ libs/icl/example/itvset_shell_ libs/icl/example/large_bitset_ libs/icl/example/man_power_ libs/icl/example/month_and_week_grid_ libs/icl/example/overlap_counter_ libs/icl/example/party_ libs/icl/example/partys_height_average_ libs/icl/example/partys_tallest_guests_ libs/icl/example/splititvmap_shell_ libs/icl/example/static_interval_ libs/icl/example/std_copy_ libs/icl/example/std_transform_ libs/icl/example/user_groups_ libs/icl/prj_home libs/icl/test libs/icl/test/fastest_icl_interval_ libs/icl/test/fastest_icl_map_ libs/icl/test/fastest_interval_map_ libs/icl/test/fastest_interval_map_infix_ libs/icl/test/fastest_interval_map_infix_mixed_ libs/icl/test/fastest_interval_map_mixed2_ libs/icl/test/fastest_interval_map_mixed_ libs/icl/test/fastest_interval_set_ libs/icl/test/fastest_interval_set_infix_ libs/icl/test/fastest_interval_set_mixed_ libs/icl/test/fastest_partial_icl_quantifier_ libs/icl/test/fastest_partial_interval_quantifier_ libs/icl/test/fastest_separate_interval_set_ libs/icl/test/fastest_separate_interval_set_infix_ libs/icl/test/fastest_set_icl_set_ libs/icl/test/fastest_set_interval_set_ libs/icl/test/fastest_split_interval_map_ libs/icl/test/fastest_split_interval_map_infix_ libs/icl/test/fastest_split_interval_set_ libs/icl/test/fastest_split_interval_set_infix_ libs/icl/test/fastest_total_icl_quantifier_ libs/icl/test/fastest_total_interval_quantifier_ libs/icl/test/test_casual_ libs/icl/test/test_changing_interval_defaults_ libs/icl/test/test_combinable_ libs/icl/test/test_doc_code_ libs/icl/test/test_icl_interval_ libs/icl/test/test_icl_map_ libs/icl/test/test_interval_map_ libs/icl/test/test_interval_map_infix_ libs/icl/test/test_interval_map_infix_mixed_ libs/icl/test/test_interval_map_mixed2_ libs/icl/test/test_interval_map_mixed_ libs/icl/test/test_interval_set_ libs/icl/test/test_interval_set_infix_ libs/icl/test/test_interval_set_mixed_ libs/icl/test/test_misc_ libs/icl/test/test_partial_icl_quantifier_ libs/icl/test/test_partial_interval_quantifier_ libs/icl/test/test_separate_interval_set_ libs/icl/test/test_separate_interval_set_infix_ libs/icl/test/test_set_icl_set_ libs/icl/test/test_set_interval_set_ libs/icl/test/test_split_interval_map_ libs/icl/test/test_split_interval_map_infix_ libs/icl/test/test_split_interval_set_ libs/icl/test/test_split_interval_set_infix_ libs/icl/test/test_total_icl_quantifier_ libs/icl/test/test_total_interval_quantifier_ libs/icl/test/test_type_traits_ libs/icl_xt libs/icl_xt/dev libs/icl_xt/example libs/icl_xt/example/amount_cube_ libs/icl_xt/example/history_ libs/icl_xt/test libs/icl_xt/test/auto_itv_test_ libs/icl_xt/test/meta_functors_ libs/validate libs/validate/example libs/validate/example/boostcon_abelian_monoids_ libs/validate/example/boostcon_law_validater_ libs/validate/example/de_morgan_ libs/validate/example/labat_bit_collector_ libs/validate/example/labat_collector_ libs/validate/example/labat_icl_morphic_ libs/validate/example/labat_icl_set_ libs/validate/example/labat_itv_bitset_ libs/validate/example/labat_map_copy_conformity_ libs/validate/example/labat_map_order_ libs/validate/example/labat_polygon_ libs/validate/example/labat_set_copy_conformity_ libs/validate/example/labat_set_order_ libs/validate/example/labat_signed_quantifier_ libs/validate/example/labat_single_ libs/validate/example/labat_sorted_assoc_bitset_ libs/validate/example/labat_sorted_assoc_bitset_back_ libs/validate/example/labat_sorted_assoc_map_ libs/validate/example/labat_sorted_assoc_map_back_ libs/validate/example/labat_sorted_assoc_set_ libs/validate/example/labat_sorted_assoc_set_back_ libs/validate/example/labat_unsigned_quantifier_ libs/validate/example/labat_val_relations_ libs/validate/src libs/validate/src/gentor libs/validate/test libs/validate/test/test_bit_collector_ libs/validate/test/test_collector_ libs/validate/test/test_icl_morphic_ libs/validate/test/test_icl_set_ libs/validate/test/test_interval_bitset_ libs/validate/test/test_map_copy_conformity_ libs/validate/test/test_map_order_ libs/validate/test/test_set_copy_conformity_ libs/validate/test/test_set_order_ libs/validate/test/test_signed_quantifier_ libs/validate/test/test_sorted_assoc_bitset_ libs/validate/test/test_sorted_assoc_bitset_back_ libs/validate/test/test_sorted_assoc_map_ libs/validate/test/test_sorted_assoc_map_back_ libs/validate/test/test_sorted_assoc_set_ libs/validate/test/test_sorted_assoc_set_back_ libs/validate/test/test_unsigned_quantifier_ libs/validate/test/test_val_relations_
From: afojgo_at_[hidden]
Date: 2010-10-29 12:07:16


Author: jofaber
Date: 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
New Revision: 66253
URL: http://svn.boost.org/trac/boost/changeset/66253

Log:
initial import
Added:
   sandbox/icl/
   sandbox/icl/README_ICL.TXT (contents, props changed)
   sandbox/icl/README_ICL_PLUS.TXT (contents, props changed)
   sandbox/icl/boost/
   sandbox/icl/boost/icl/
   sandbox/icl/boost/icl/associative_element_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/associative_interval_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/closed_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/
   sandbox/icl/boost/icl/concept/comparable.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/container.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/element_associator.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/element_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/element_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/element_set_value.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval_associator.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval_bounds.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/interval_set_value.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/joinable.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/map_value.hpp (contents, props changed)
   sandbox/icl/boost/icl/concept/set_value.hpp (contents, props changed)
   sandbox/icl/boost/icl/continuous_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/
   sandbox/icl/boost/icl/detail/associated_value.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/concept_check.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/design_config.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/element_comparer.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/element_iterator.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/exclusive_less_than.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/interval_map_algo.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/interval_morphism.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/interval_set_algo.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/interval_subset_comparer.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/map_algo.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/mapped_reference.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/notate.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/on_absorbtion.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/relation_state.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/set_algo.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/std_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/detail/subset_comparer.hpp (contents, props changed)
   sandbox/icl/boost/icl/discrete_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/dynamic_interval_traits.hpp (contents, props changed)
   sandbox/icl/boost/icl/functions/
   sandbox/icl/boost/icl/functors.hpp (contents, props changed)
   sandbox/icl/boost/icl/gregorian.hpp (contents, props changed)
   sandbox/icl/boost/icl/impl_config.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_base_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_base_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_bounds.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_combining_style.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/interval_traits.hpp (contents, props changed)
   sandbox/icl/boost/icl/iterator.hpp (contents, props changed)
   sandbox/icl/boost/icl/left_open_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/map.hpp (contents, props changed)
   sandbox/icl/boost/icl/open_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/predicates.hpp (contents, props changed)
   sandbox/icl/boost/icl/ptime.hpp (contents, props changed)
   sandbox/icl/boost/icl/rational.hpp (contents, props changed)
   sandbox/icl/boost/icl/right_open_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/separate_interval_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/set.hpp (contents, props changed)
   sandbox/icl/boost/icl/split_interval_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/split_interval_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/
   sandbox/icl/boost/icl/type_traits/absorbs_identities.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/adds_inversely.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/codomain_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/difference.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/difference_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/domain_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/element_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/has_inverse.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/has_set_semantics.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/identity_element.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/infinity.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/interval_type_default.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/interval_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_associative_element_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_asymmetric_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_combinable.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_concept_equivalent.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_continuous.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_continuous_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_discrete.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_discrete_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_element_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_icl_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_interval.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_interval_container.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_interval_joiner.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_interval_separator.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_interval_splitter.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_key_container_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_map.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_numeric.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_set.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/is_total.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/no_type.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/segment_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/size.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/size_type_of.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/succ_pred.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/to_string.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/type_to_string.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/unit_element.hpp (contents, props changed)
   sandbox/icl/boost/icl/type_traits/value_size.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/
   sandbox/icl/boost/icl_xt/bits.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/bits_gentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/detail/
   sandbox/icl/boost/icl_xt/detail/bit_element_iterator.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/enum_bitset.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/episode_product.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/episode_set.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/fixtupelconst.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/gentorit.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/group_order.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/grouping.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/interval_bitset.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/itvgentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/list.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/map_segment_gentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/mapgentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/meta_log.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/numbergentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/ordered_type.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/prefix_set.cpp (contents, props changed)
   sandbox/icl/boost/icl_xt/prefix_set.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/product_history.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/random.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/randomnumber.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/seqgentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/set.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/setgentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/statvardesct.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/std/
   sandbox/icl/boost/icl_xt/std/pair.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/std/pair_gentor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_list.cpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_list.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_map.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_set.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_sheet.cpp (contents, props changed)
   sandbox/icl/boost/icl_xt/string_sheet.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/stringpattern_set.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/tuple_computer.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/typed_episode.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/var_permutation.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/var_tuple.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/var_tuple_inscriptor.hpp (contents, props changed)
   sandbox/icl/boost/icl_xt/var_tuple_order.hpp (contents, props changed)
   sandbox/icl/boost/validate/
   sandbox/icl/boost/validate/driver/
   sandbox/icl/boost/validate/driver/abelian_monoid_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/bit_collector_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/collector_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/icl_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/icl_morphic_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/icl_relations_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/icl_set_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/icl_single_law_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/interval_bitset_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/map_copy_conformity_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/map_order_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/set_copy_conformity_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/set_order_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/signed_quantifier_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_bitset_back_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_bitset_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_map_back_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_map_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_set_back_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/sorted_associative_set_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/driver/unsigned_quantifier_driver.hpp (contents, props changed)
   sandbox/icl/boost/validate/gentor/
   sandbox/icl/boost/validate/gentor/gentorprofile.hpp (contents, props changed)
   sandbox/icl/boost/validate/gentor/randomgentor.hpp (contents, props changed)
   sandbox/icl/boost/validate/gentor/rangegentor.hpp (contents, props changed)
   sandbox/icl/boost/validate/icl/
   sandbox/icl/boost/validate/icl/functors.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/
   sandbox/icl/boost/validate/laws/algo_equivalence.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/atomic_equivalence.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/element_order.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/function_equality.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/induced_relation.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/inversion_laws.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/law.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/law_violations.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/map_laws.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/minor_set_laws.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/monoid.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/order.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/pushouts.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/set_laws.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/subset_order.hpp (contents, props changed)
   sandbox/icl/boost/validate/laws/symmetric_difference.hpp (contents, props changed)
   sandbox/icl/boost/validate/loki/
   sandbox/icl/boost/validate/loki/EmptyType.h (contents, props changed)
   sandbox/icl/boost/validate/loki/NullType.h (contents, props changed)
   sandbox/icl/boost/validate/loki/Sequence.h (contents, props changed)
   sandbox/icl/boost/validate/loki/TypeManip.h (contents, props changed)
   sandbox/icl/boost/validate/loki/TypeTraits.h (contents, props changed)
   sandbox/icl/boost/validate/loki/Typelist.h (contents, props changed)
   sandbox/icl/boost/validate/loki/TypelistMacros.h (contents, props changed)
   sandbox/icl/boost/validate/loki_xt/
   sandbox/icl/boost/validate/loki_xt/Tuple.h (contents, props changed)
   sandbox/icl/boost/validate/loki_xt/TupleGentor.h (contents, props changed)
   sandbox/icl/boost/validate/loki_xt/TypelistGentor.h (contents, props changed)
   sandbox/icl/boost/validate/std/
   sandbox/icl/boost/validate/std/algorithm/
   sandbox/icl/boost/validate/std/algorithm/copy.hpp (contents, props changed)
   sandbox/icl/boost/validate/std/algorithm/find.hpp (contents, props changed)
   sandbox/icl/boost/validate/std/algorithm/relation.hpp (contents, props changed)
   sandbox/icl/boost/validate/std/algorithm/set_algo.hpp (contents, props changed)
   sandbox/icl/boost/validate/type/
   sandbox/icl/boost/validate/type/bits.hpp (contents, props changed)
   sandbox/icl/boost/validate/type/nat.hpp (contents, props changed)
   sandbox/icl/boost/validate/utility.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/
   sandbox/icl/boost/validate/validater/abelian_monoid_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/bit_collector_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/collector_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/concept_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/function_equality_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/icl_induced_relations.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/icl_order_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/icl_set_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/interval_morphic_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/law_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/monoid_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/partial_order_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/signed_quantifier_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/sorted_associative_back_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/sorted_associative_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/strict_weak_order_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validater/unsigned_quantifier_validater.hpp (contents, props changed)
   sandbox/icl/boost/validate/validation_counts.hpp (contents, props changed)
   sandbox/icl/icl_4_0_0_plus.txt (contents, props changed)
   sandbox/icl/icl_4_0_0_plus_standalone.txt (contents, props changed)
   sandbox/icl/install_libs.bat (contents, props changed)
   sandbox/icl/install_libs.sh (contents, props changed)
   sandbox/icl/libs/
   sandbox/icl/libs/icl/
   sandbox/icl/libs/icl/build/
   sandbox/icl/libs/icl/build/cygwin/
   sandbox/icl/libs/icl/build/cygwin/makefile (contents, props changed)
   sandbox/icl/libs/icl/build/script/
   sandbox/icl/libs/icl/build/script/rm_svn.sh (contents, props changed)
   sandbox/icl/libs/icl/build/script/rm_temps.sh (contents, props changed)
   sandbox/icl/libs/icl/build/win32/
   sandbox/icl/libs/icl/build/win32/vc9_all.sln (contents, props changed)
   sandbox/icl/libs/icl/doxy_doc/
   sandbox/icl/libs/icl/doxy_doc/Doxyfile (contents, props changed)
   sandbox/icl/libs/icl/doxy_doc/doxygen_input/
   sandbox/icl/libs/icl/doxy_doc/doxygen_input/pages/
   sandbox/icl/libs/icl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp (contents, props changed)
   sandbox/icl/libs/icl/doxy_doc/doxygen_output/
   sandbox/icl/libs/icl/example/
   sandbox/icl/libs/icl/example/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/example/boost_party_/
   sandbox/icl/libs/icl/example/boost_party_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/example/boost_party_/boost_party.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/boost_party_/vc9_boost_party.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/custom_interval_/
   sandbox/icl/libs/icl/example/custom_interval_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/example/custom_interval_/custom_interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/dynamic_interval_/
   sandbox/icl/libs/icl/example/dynamic_interval_/dynamic_interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/interval_/
   sandbox/icl/libs/icl/example/interval_/interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/interval_/vc9_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/interval_container_/
   sandbox/icl/libs/icl/example/interval_container_/interval_container.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/interval_container_/vc9_interval_container.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/itvset_shell_/
   sandbox/icl/libs/icl/example/itvset_shell_/itvset_shell.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/large_bitset_/
   sandbox/icl/libs/icl/example/large_bitset_/bits.hpp (contents, props changed)
   sandbox/icl/libs/icl/example/large_bitset_/large_bitset.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/large_bitset_/large_bitset.hpp (contents, props changed)
   sandbox/icl/libs/icl/example/large_bitset_/meta_log.hpp (contents, props changed)
   sandbox/icl/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/man_power_/
   sandbox/icl/libs/icl/example/man_power_/man_power.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/man_power_/vc9_man_power.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/month_and_week_grid_/
   sandbox/icl/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/overlap_counter_/
   sandbox/icl/libs/icl/example/overlap_counter_/overlap_counter.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/party_/
   sandbox/icl/libs/icl/example/party_/party.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/party_/vc9_party.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/partys_height_average_/
   sandbox/icl/libs/icl/example/partys_height_average_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/example/partys_height_average_/partys_height_average.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/partys_tallest_guests_/
   sandbox/icl/libs/icl/example/partys_tallest_guests_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/splititvmap_shell_/
   sandbox/icl/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/static_interval_/
   sandbox/icl/libs/icl/example/static_interval_/static_interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/static_interval_/vc9_static_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/std_copy_/
   sandbox/icl/libs/icl/example/std_copy_/std_copy.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/std_copy_/vc9_std_copy.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/std_transform_/
   sandbox/icl/libs/icl/example/std_transform_/std_transform.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/std_transform_/vc9_std_transform.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/toytime.hpp (contents, props changed)
   sandbox/icl/libs/icl/example/user_groups_/
   sandbox/icl/libs/icl/example/user_groups_/user_groups.cpp (contents, props changed)
   sandbox/icl/libs/icl/example/user_groups_/vc9_user_groups.vcproj (contents, props changed)
   sandbox/icl/libs/icl/example/vc9_icl_examples.sln (contents, props changed)
   sandbox/icl/libs/icl/prj_home/
   sandbox/icl/libs/icl/prj_home/boost_powered_by.png (contents, props changed)
   sandbox/icl/libs/icl/prj_home/logo_cortex.png (contents, props changed)
   sandbox/icl/libs/icl/test/
   sandbox/icl/libs/icl/test/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_icl_interval_/
   sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_icl_interval_/vc9_fastest_icl_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_icl_map_/
   sandbox/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_icl_map_/vc9_fastest_icl_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_/
   sandbox/icl/libs/icl/test/fastest_interval_map_/fastest_interval_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_/vc9_fastest_interval_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_/
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_/fastest_interval_map_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_/vc9_fastest_interval_map_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/fastest_interval_map_infix_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/vc9_fastest_interval_map_infix_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/fastest_interval_map_mixed2.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/vc9_fastest_interval_map_mixed2.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/fastest_interval_map_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/vc9_fastest_interval_map_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_/
   sandbox/icl/libs/icl/test/fastest_interval_set_/fastest_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_/vc9_fastest_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_infix_/
   sandbox/icl/libs/icl/test/fastest_interval_set_infix_/fastest_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_infix_/vc9_fastest_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_infix_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/
   sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/fastest_interval_set_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/vc9_fastest_interval_set_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/
   sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/fastest_partial_icl_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/vc9_fastest_partial_icl_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/
   sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/fastest_partial_interval_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/vc9_fastest_partial_interval_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_/
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_/fastest_separate_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_/vc9_fastest_separate_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/fastest_separate_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/vc9_fastest_separate_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_icl_set_/
   sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_icl_set_/vc9_fastest_set_icl_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_interval_set_/
   sandbox/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_set_interval_set_/vc9_fastest_set_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_map_/
   sandbox/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_map_/vc9_fastest_split_interval_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/
   sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/fastest_split_interval_map_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/vc9_fastest_split_interval_map_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_set_/
   sandbox/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_set_/vc9_fastest_split_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/
   sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/fastest_split_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/vc9_fastest_split_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/
   sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/fastest_total_icl_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/vc9_fastest_total_icl_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/
   sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/fastest_total_interval_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/vc9_fastest_total_interval_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_casual_/
   sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_casual_/vc9_test_casual.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_changing_interval_defaults_/
   sandbox/icl/libs/icl/test/test_changing_interval_defaults_/test_changing_interval_defaults.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_changing_interval_defaults_/vc9_test_changing_interval_defalts.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_combinable_/
   sandbox/icl/libs/icl/test/test_combinable_/test_combinable.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_combinable_/vc9_test_combinable.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_doc_code_/
   sandbox/icl/libs/icl/test/test_doc_code_/test_doc_code.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_doc_code_/vc9_test_doc_code.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_functions.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_continuous_interval.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_discrete_interval.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_interval.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_interval_/
   sandbox/icl/libs/icl/test/test_icl_interval_/test_icl_interval.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_interval_/vc9_test_icl_interval.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_interval_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_map.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_map_/
   sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_map_/vc9_test_icl_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_quantifier_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_icl_static_interval.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_laws.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_/
   sandbox/icl/libs/icl/test/test_interval_map_/test_interval_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_/vc9_test_interval_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_infix_/
   sandbox/icl/libs/icl/test/test_interval_map_infix_/test_interval_map_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_infix_/vc9_test_interval_map_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_infix_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/
   sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/test_interval_map_infix_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/vc9_test_interval_map_infix_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_mixed.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_mixed2_/
   sandbox/icl/libs/icl/test/test_interval_map_mixed2_/test_interval_map_mixed2.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_mixed2_/vc9_test_interval_map_mixed2.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_mixed_/
   sandbox/icl/libs/icl/test/test_interval_map_mixed_/test_interval_map_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_mixed_/vc9_test_interval_map_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_map_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_quantifier_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_/
   sandbox/icl/libs/icl/test/test_interval_set_/test_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_/vc9_test_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_infix_/
   sandbox/icl/libs/icl/test/test_interval_set_infix_/test_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_infix_/vc9_test_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_infix_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_laws_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_mixed.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_mixed_/
   sandbox/icl/libs/icl/test/test_interval_set_mixed_/test_interval_set_mixed.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_mixed_/vc9_test_interval_set_mixed.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_interval_set_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_laws.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_misc_/
   sandbox/icl/libs/icl/test/test_misc_/test_misc.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_misc_/vc9_test_misc.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/
   sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/test_partial_icl_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/vc9_test_partial_icl_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_icl_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/
   sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/test_partial_interval_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/vc9_test_partial_interval_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_partial_interval_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_quantifier_icl_map.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_quantifier_map_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_separate_interval_set_/
   sandbox/icl/libs/icl/test/test_separate_interval_set_/test_separate_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_separate_interval_set_/vc9_test_separate_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/
   sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/test_separate_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/vc9_test_separate_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set_/
   sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set_/vc9_test_set_icl_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_icl_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_interval_set_/
   sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_interval_set_/vc9_test_set_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_set_interval_set_shared.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_map_/
   sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_map_/vc9_test_split_interval_map.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_map_infix_/
   sandbox/icl/libs/icl/test/test_split_interval_map_infix_/test_split_interval_map_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_map_infix_/vc9_test_split_interval_map_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_set_/
   sandbox/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set_shared.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_set_/vc9_test_split_interval_set.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_set_infix_/
   sandbox/icl/libs/icl/test/test_split_interval_set_infix_/test_split_interval_set_infix.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_split_interval_set_infix_/vc9_test_split_interval_set_infix.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_icl_quantifier_/
   sandbox/icl/libs/icl/test/test_total_icl_quantifier_/test_total_icl_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_icl_quantifier_/vc9_test_total_icl_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_icl_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_interval_quantifier_/
   sandbox/icl/libs/icl/test/test_total_interval_quantifier_/test_total_interval_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_interval_quantifier_/vc9_test_total_interval_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_total_interval_quantifier_cases.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_type_lists.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_type_traits_/
   sandbox/icl/libs/icl/test/test_type_traits_/test_type_traits.cpp (contents, props changed)
   sandbox/icl/libs/icl/test/test_type_traits_/vc9_test_type_traits.vcproj (contents, props changed)
   sandbox/icl/libs/icl/test/test_value_maker.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/unit_test_unwarned.hpp (contents, props changed)
   sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln (contents, props changed)
   sandbox/icl/libs/icl/test/vc9_icl_slow_tests.sln (contents, props changed)
   sandbox/icl/libs/icl_xt/
   sandbox/icl/libs/icl_xt/dev/
   sandbox/icl/libs/icl_xt/example/
   sandbox/icl/libs/icl_xt/example/amount_cube_/
   sandbox/icl/libs/icl_xt/example/amount_cube_/amount_cube.cpp (contents, props changed)
   sandbox/icl/libs/icl_xt/example/amount_cube_/vc9_amount_cube.vcproj (contents, props changed)
   sandbox/icl/libs/icl_xt/example/history_/
   sandbox/icl/libs/icl_xt/example/history_/history.cpp (contents, props changed)
   sandbox/icl/libs/icl_xt/example/history_/vc9_history.vcproj (contents, props changed)
   sandbox/icl/libs/icl_xt/example/toytime.h (contents, props changed)
   sandbox/icl/libs/icl_xt/test/
   sandbox/icl/libs/icl_xt/test/auto_itv_test_/
   sandbox/icl/libs/icl_xt/test/auto_itv_test_/auto_itv_test.cpp (contents, props changed)
   sandbox/icl/libs/icl_xt/test/auto_itv_test_/vc9_auto_itv_test.vcproj (contents, props changed)
   sandbox/icl/libs/icl_xt/test/itvmaptester.h (contents, props changed)
   sandbox/icl/libs/icl_xt/test/itvsettester.h (contents, props changed)
   sandbox/icl/libs/icl_xt/test/meta_functors_/
   sandbox/icl/libs/icl_xt/test/meta_functors_/meta_functors.cpp (contents, props changed)
   sandbox/icl/libs/icl_xt/test/meta_functors_/vc9_meta_functors.vcproj (contents, props changed)
   sandbox/icl/libs/validate/
   sandbox/icl/libs/validate/example/
   sandbox/icl/libs/validate/example/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/
   sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/boostcon_law_validater_/
   sandbox/icl/libs/validate/example/boostcon_law_validater_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/de_morgan_/
   sandbox/icl/libs/validate/example/de_morgan_/de_morgan.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_bit_collector_/
   sandbox/icl/libs/validate/example/labat_bit_collector_/labat_bit_collector.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_bit_collector_/vc9_labat_bit_collector.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_collector_/
   sandbox/icl/libs/validate/example/labat_collector_/labat_collector.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_collector_/vc9_labat_collector.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_icl_morphic_/
   sandbox/icl/libs/validate/example/labat_icl_morphic_/labat_icl_morphic.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_icl_morphic_/vc9_labat_icl_morphic.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_icl_set_/
   sandbox/icl/libs/validate/example/labat_icl_set_/labat_icl_set.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_icl_set_/vc9_labat_icl_set.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_itv_bitset_/
   sandbox/icl/libs/validate/example/labat_itv_bitset_/labat_itv_bitset.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_itv_bitset_/vc9_labat_itv_bitset.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_map_copy_conformity_/
   sandbox/icl/libs/validate/example/labat_map_copy_conformity_/labat_map_copy_conformity.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_map_copy_conformity_/vc9_labat_map_copy_conformity.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_map_order_/
   sandbox/icl/libs/validate/example/labat_map_order_/labat_map_order.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_map_order_/vc9_labat_map_order.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/
   sandbox/icl/libs/validate/example/labat_polygon_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/custom_polygon.hpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/labat_polygon.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/point_gentor.hpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/polygon_gentor.hpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/polygon_laws.hpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.sln (contents, props changed)
   sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_set_copy_conformity_/
   sandbox/icl/libs/validate/example/labat_set_copy_conformity_/labat_set_copy_conformity.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_set_copy_conformity_/vc9_labat_set_copy_conformity.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_set_order_/
   sandbox/icl/libs/validate/example/labat_set_order_/labat_set_order.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_set_order_/vc9_labat_set_order.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_signed_quantifier_/
   sandbox/icl/libs/validate/example/labat_signed_quantifier_/labat_signed_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_signed_quantifier_/vc9_labat_signed_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_single_/
   sandbox/icl/libs/validate/example/labat_single_/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/validate/example/labat_single_/labat_single.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_single_/vc9_labat_single.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/labat_sorted_assoc_bitset.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/vc9_labat_sorted_assoc_bitset.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/labat_sorted_assoc_bitset_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/vc9_labat_sorted_assoc_bitset_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/labat_sorted_assoc_map.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/vc9_labat_sorted_assoc_map.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/labat_sorted_assoc_map_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/vc9_labat_sorted_assoc_map_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/labat_sorted_assoc_set.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/vc9_labat_sorted_assoc_set.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/labat_sorted_assoc_set_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/vc9_labat_sorted_assoc_set_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/
   sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/labat_unsigned_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/vc9_labat_unsigned_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/labat_val_relations_/
   sandbox/icl/libs/validate/example/labat_val_relations_/labat_val_relations.cpp (contents, props changed)
   sandbox/icl/libs/validate/example/labat_val_relations_/vc9_labat_val_relations.vcproj (contents, props changed)
   sandbox/icl/libs/validate/example/vc9_icl_validate_examples.sln (contents, props changed)
   sandbox/icl/libs/validate/src/
   sandbox/icl/libs/validate/src/gentor/
   sandbox/icl/libs/validate/src/gentor/gentorprofile.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/
   sandbox/icl/libs/validate/test/Jamfile.v2 (contents, props changed)
   sandbox/icl/libs/validate/test/test_bit_collector_/
   sandbox/icl/libs/validate/test/test_bit_collector_/test_bit_collector.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_bit_collector_/vc9_test_bit_collector.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_collector_/
   sandbox/icl/libs/validate/test/test_collector_/test_collector.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_collector_/vc9_test_collector.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_icl_morphic_/
   sandbox/icl/libs/validate/test/test_icl_morphic_/test_icl_morphic.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_icl_morphic_/vc9_test_icl_morphic.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_icl_set_/
   sandbox/icl/libs/validate/test/test_icl_set_/test_icl_set.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_icl_set_/vc9_test_icl_set.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_interval_bitset_/
   sandbox/icl/libs/validate/test/test_interval_bitset_/test_interval_bitset.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_interval_bitset_/vc9_test_interval_bitmap.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_map_copy_conformity_/
   sandbox/icl/libs/validate/test/test_map_copy_conformity_/test_map_copy_conformity.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_map_copy_conformity_/vc9_test_map_copy_conformity.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_map_order_/
   sandbox/icl/libs/validate/test/test_map_order_/test_map_order.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_map_order_/vc9_test_map_order.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_set_copy_conformity_/
   sandbox/icl/libs/validate/test/test_set_copy_conformity_/test_set_copy_conformity.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_set_copy_conformity_/vc9_test_set_copy_conformity.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_set_order_/
   sandbox/icl/libs/validate/test/test_set_order_/test_set_order.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_set_order_/vc9_test_set_order.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_signed_quantifier_/
   sandbox/icl/libs/validate/test/test_signed_quantifier_/test_signed_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_signed_quantifier_/vc9_test_signed_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/test_sorted_assoc_bitset.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/vc9_test_sorted_assoc_bitset.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/test_sorted_assoc_bitset_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/vc9_test_sorted_assoc_bitset_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_/test_sorted_assoc_map.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_/vc9_test_sorted_assoc_map.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/test_sorted_assoc_map_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/vc9_test_sorted_assoc_map_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_/test_sorted_assoc_set.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_/vc9_test_sorted_assoc_set.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/test_sorted_assoc_set_back.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/vc9_test_sorted_assoc_set_back.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_unsigned_quantifier_/
   sandbox/icl/libs/validate/test/test_unsigned_quantifier_/test_unsigned_quantifier.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_unsigned_quantifier_/vc9_test_unsigned_quantifier.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/test_val_relations_/
   sandbox/icl/libs/validate/test/test_val_relations_/test_val_relations.cpp (contents, props changed)
   sandbox/icl/libs/validate/test/test_val_relations_/vc9_test_val_relations.vcproj (contents, props changed)
   sandbox/icl/libs/validate/test/unit_test_unwarned.hpp (contents, props changed)
   sandbox/icl/libs/validate/test/vc9_test.sln (contents, props changed)
   sandbox/icl/libs/validate/test/vc9_validate_tests.sln (contents, props changed)

Added: sandbox/icl/README_ICL.TXT
==============================================================================
--- (empty file)
+++ sandbox/icl/README_ICL.TXT 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,100 @@
+/*-----------------------------------------------------------------------------+
+Interval Template Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 Template Library (Boost.Itl) 3.2.1 Review Version Update 2
+===================================================================
+Abstract:
+=========
+
+The Interval Template Library (Itl) provides intervals
+and two kinds of interval containers: Interval_sets and
+interval_maps. Interval_sets and maps can be used just
+as the sets or maps of elements. Yet they are much more
+space and time efficient when the elements occur in
+contiguous chunks. This is obviously the case in many
+problem domains, particularly in fields that deal with
+problems related to date and time.
+
+In addition to common set and map semantics, interval
+containers allow to compute with segmentation.
+A segmentation, e.g. a grid of months, can be intersected
+into other interval containers and then be iterated over.
+
+Finally interval_maps allow for aggregations on
+associated values, if added intervals overlap with
+intervals, that are stored in the interval_map. This
+feature is called aggregate on overlap.
+
+
+NOTE: Boost.Itl is not an official boost library.
+Boost.Itl is submitted for review which will probably take
+place end of February 2010.
+
+
+Release Notes:
+==============
+
+* Boost.Itl 3.2.1 (Review Version, update 2)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.2, gcc-4.4.1,
+ msvc-8.0, msvc-9.0, msvc-10.0.
++ Some additions and corrections of the documentation.
++ Added file impl_config.hpp and a macro ITL_IMPL_SPACE that allows to
+ switch the implementing set amd map containers between the
+ std and the boost::interprocess implementation.
+
+* Boost.Itl 3.2.0 (Review Version, update 1)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.2, msvc-8.0, msvc-9.0, msvc-10.0.
++ Addition of itl::insert_iterator and itl::add_iterator that allow to
+ copy or transform std::containers of intervals or segments into
+ interval containers.
++ Addition of element_iterators that allow for an iteration on the level
+ of elements. This allows to execute std::algorithms on interval
+ containers of discrete domain types.
++ Updating quickbook documentation. Added examples std_transform and
+ std_copy that demonstrates the use of itl insert and add iterators
++ Adding a more complex example project "large_bitset" that implements
+ a large compressed bitset class template using interval_map.
+
+* Boost.Itl 3.1.0 (Review Version)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.1.0, gcc-4.3.2,
+ msvc-8.0, msvc-9.0.
++ Improved efficiency of algorithms.
++ Documentation of complexity guarantees.
++ Completion of quickbook documentation.
+
+* Boost.Itl 3.0.0 (Preview 4)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.0 and msvc-9.0.
++ Interoperability between interval containers,
+ segments and elements.
++ Full operator support for addition, subtraction,
+ intersection and symmetric difference.
++ Boost.Quickbook documentation.
+
+Content:
+========
+
+itl.html html-documentation referring to
+ libs/itl/doc/html/index.html
+doc/html/images Images for the html docs. You may delete this, if you
+ integrate itl_plus into an existing boost installation.
+
+boost/itl Interval containers, operators, algorithms
+boost/itl/type_traits Metafunctions for types
+boost/itl/detail Implementation details
+
+libs/itl/example Example programs
+libs/itl/test Test suite
+libs/itl/doc Quickbook documentation
+libs/itl/doc/html html documentation (Generated by Quickbook)

Added: sandbox/icl/README_ICL_PLUS.TXT
==============================================================================
--- (empty file)
+++ sandbox/icl/README_ICL_PLUS.TXT 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,208 @@
+/*-----------------------------------------------------------------------------+
+Interval Template Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 Template Library (Boost.Itl) 3.2.1 Review Version Update 2
+===================================================================
+PLUS
+Itl_xt Extended by generalized cross tables (cubes) AND
+validate A law based test automaton (LaBatea).
+
+Abstract:
+=========
+
+The Interval Template Library (Itl) provides intervals
+and two kinds of interval containers: Interval_sets and
+interval_maps. Interval_sets and maps can be used just
+as the sets or maps of elements. Yet they are much more
+space and time efficient when the elements occur in
+contiguous chunks. This is obviously the case in many
+problem domains, particularly in fields that deal with
+problems related to date and time.
+
+In addition to common set and map semantics, interval
+containers allow to compute with segmentation.
+A segmentation, e.g. a grid of months, can be intersected
+into other interval containers and then be iterated over.
+
+Finally interval_maps allow for aggregations on
+associated values, if added intervals overlap with
+intervals, that are stored in the interval_map. This
+feature is called aggregate on overlap.
+
+Itl_xt's cubes and the law based test automaton (LaBatea)
+are not yet proposed and prepared as Boost libraries.
+But LaBatea has been used in the development of the
+itl as test automaton and for checking sematical
+concepts.
+
+NOTE: Neither of the tree libraries itl, itl_xt and validate
+is an official boost library yet. They are named Boost.Itl,
+Boost.Itl_xt and Boost.Validate here, because they are already
+organized in the boost centric directory structure.
+
+The core library Boost.Itl is submitted for review which
+will probably take place end of February 2010.
+
+Release Notes:
+==============
+
+* Boost.Itl 3.2.1 (Review Version, update 2)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.2, gcc-4.4.1,
+ msvc-8.0, msvc-9.0, msvc-10.0.
++ Some additions and corrections of the documentation.
++ Added file impl_config.hpp and a macro ITL_IMPL_SPACE that allows to
+ switch the implementing set amd map containers between the
+ std and the boost::interprocess implementation.
+
+* Boost.Itl 3.2.0 (Review Version, update 1)
+------------------------------------------------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.2, msvc-8.0, msvc-9.0, msvc-10.0.
++ Addition of itl::insert_iterator and itl::add_iterator that allow to
+ copy or transform std::containers of intervals or segments into
+ interval containers.
++ Addition of element_iterators that enable an iteration on the level
+ of elements. This allows to execute std::algorithms on interval
+ containers of discrete domain types.
++ Updating quickbook documentation. Added examples std_transform and
+ std_copy that demonstrates the use of itl insert and add iterators
++ Adding a more complex example project "large_bitset" that implement
+ large compressed bitsets class template using interval_map.
+
+* Boost.Itl_xt 3.2.0
+------------------------------------------------------------------------
++ Addition of a class template interval_bitset that implements a
+ large compressed bitset using an interval_map.
+
+* Boost.Validate 3.2.1
+------------------------------------------------------------------------
++ Addition of a commented example project de_morgan.cpp.
++ Addition of some basic doxygen generating comments to provide minimal
+ documentation.
+
+* Boost.Validate 3.2.0
+------------------------------------------------------------------------
++ Addition of a law 'AtomicEquivalence' to validate the equivalence of
+ std::algorithms on element and interval containers.
++ Addition of law based tests validating itl::insert and add iterators
+ element_iterators and the implementation of interval_bitset.
+
+========================================================================
+
+
+* Boost.Itl 3.1.0 (Review Version)
+------------------------------------------------------------------------
++ Tested Compilers:
+ Itl: gcc-3.4.4, gcc-4.1.0, gcc-4.3.2, msvc-8.0, msvc-9.0.
+ Validate (LaBatea): gcc-4.3.2, msvc-8.0, msvc-9.0.
+ LaBatea does not compile with gcc-4.1.0 or below.
++ Improved efficiency of algorithms.
++ Documentation of complexity guarantees.
++ Completion of quickbook documentation.
++ LaBatea now measures time per test.
+
+* Boost.Itl 3.0.0 (Preview 4)
+------------------------------
++ Tested Compilers: gcc-3.4.4, gcc-4.3.0 and msvc-9.0.
++ Interoperability between interval containers,
+ segments and elements.
++ Full operator support for addition, subtraction,
+ intersection and symmetric difference.
++ Boost.Quickbook documentation.
+
+Content:
+========
+
+=== Itl =======================================================================
+itl.html html-documentation referring to
+ libs/itl/doc/html/index.html
+doc/html/images Images for the html docs. You may delete this, if you
+ integrate itl_plus into an existing boost installation.
+
+boost/itl Interval containers, operators, algorithms
+boost/itl/type_traits Metafunctions for types
+boost/itl/detail Implementation details
+
+libs/itl/example Example programs
+libs/itl/test Test suite
+libs/itl/doc Quickbook documentatons
+libs/itl/doc/html html documentation from Quickbook sources for Boost.Itl
+libs/itl/build/win32 vc9_all.sln. solution file for msvc-9 including LaBatea
+ programs.
+
+=== Itl extended ==============================================================
+boost/itl_xt Headers of extended itl classes like cubes.
+libs/itl_xt/example Example programs
+libs/itl_xt/test Test programs
+
+=== LaBatea ===================================================================
+boost/validate Headers of the law based test automaton (LaBatea).
+libs/validate/example Projects for validating Boost.Itl with LaBatea.
+libs/validate/src Sourcefiles.
+
+=== Itl, Itl_xt and Validate =================================================
+itl_plus_doxy.html Html file that contains a link to the doygen docs:
+libs/itl/doxy_doc/doxygen_output/html/index.html: html documentation generated
+ by doxygen that covers a minimal documentation for
+ itl_xt and validate (LaBatea).
+itl.html Html file that contains a link to the quickbook docs:
+libs/itl/doc/html/index.html: html documentation generated by doxygen
+ that covers a minimal documentation for itl_xt and
+ validate (LaBatea).
+
+itl_plus and boost
+==================
+
+The interval template library comes in the boost centric project structure
+<boost-root>/boost/itl/ contains all include files
+<boost-root>/boost/itl/ examples, tests and documentation.
+So you can integrate itl, itl_xt and validate into an existing boost
+installation by copying
+boost/{itl,itl_xt,validate} to the <boost-root>/boost directory and
+libs/{itl,itl_xt,validate} to the <boost-root>/libs directory.
+
+In subdirectories like libs/itl/example, libs/itl/test you will find a
+Jamfile.v2 that allows you to compile the related code with bjam.
+
+To learn more about boost libraries and bjam refer to the boost web site.
+http://www.boost.org/
+
+
+itl_plus_standalone
+===================
+
+You can also download itl_plus_standalone. Included in itl_plus_standalone are
+all sources from the boost libraries that are needed to compile itl code,
+examples and tests. For msvc-9 users it contains sln and vcproj files and a few
+precompiled libraries needed by examples and test projects. If you are lucky
+you can compile and run using
+
+libs/itl/example/vc9_itl_examples.sln Examples for the itl
+libs/itl/test/vc9_itl_tests.sln Boost unit tests for the itl
+libs/validate/examples/vc9_validate_examples.sln Law based tests for itl
+libs/validate/test/vc9_validate_test.sln Law based tests as unit tests
+libs/itl/build/win32/vc9_all.sln Almost everything in one project
+
+If this does not work out of the box, you can reinstall the boost date_time and
+test binaries using
+
+install_libs.bat
+
+from the command line at the root directory of itl_plus_standalone.
+If this still does not work, get a new version of bjam (boost-jam) at
+http://sourceforge.net/projects/boost/files/boost-jam/
+
+and consult documentations at
+http://www.boost.org/
+
+Enjoy
+Joachim Faulhaber
+

Added: sandbox/icl/boost/icl/associative_element_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/associative_element_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,20 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023
+#define BOOST_ICL_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023
+
+#include <boost/icl/detail/map_algo.hpp>
+#include <boost/icl/concept/comparable.hpp>
+#include <boost/icl/concept/container.hpp>
+#include <boost/icl/concept/element_set.hpp>
+#include <boost/icl/concept/element_map.hpp>
+#include <boost/icl/concept/element_associator.hpp>
+
+#endif
+
+

Added: sandbox/icl/boost/icl/associative_interval_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/associative_interval_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,20 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_101023
+#define BOOST_ICL_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_101023
+
+#include <boost/icl/concept/comparable.hpp>
+#include <boost/icl/concept/joinable.hpp>
+#include <boost/icl/concept/container.hpp>
+#include <boost/icl/concept/interval_set.hpp>
+#include <boost/icl/concept/interval_map.hpp>
+#include <boost/icl/concept/interval_associator.hpp>
+
+#endif
+
+

Added: sandbox/icl/boost/icl/closed_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/closed_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,116 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324
+#define BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324
+
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class closed_interval
+{
+public:
+ typedef closed_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>[0,0)</tt>. */
+ closed_interval()
+ : _lwb(unit_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for a closed singleton interval <tt>[val,val]</tt> */
+ explicit closed_interval(const DomainT& val)
+ : _lwb(val), _upb(val)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((!icl::is_continuous<DomainT>::value));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ closed_interval(const DomainT& low, const DomainT& up) :
+ _lwb(low), _upb(up)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ DomainT lower()const{ return _lwb; }
+ DomainT upper()const{ return _upb; }
+
+ DomainT first()const{ return _lwb; }
+ DomainT last() const{ return _upb; }
+
+private:
+ DomainT _lwb;
+ DomainT _upb;
+};
+
+
+//==============================================================================
+//=T closed_interval -> concept intervals
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::closed_interval<DomainT, Compare> >
+{
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::closed_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< closed_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_closed);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::closed_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "[I]<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT>
+struct value_size<icl::closed_interval<DomainT> >
+{
+ static std::size_t apply(const icl::closed_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/concept/comparable.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/comparable.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,44 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_COMPARABLE_HPP_JOFA_100921
+#define BOOST_ICL_CONCEPT_COMPARABLE_HPP_JOFA_100921
+
+#include <boost/icl/type_traits/is_icl_container.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Equivalences and Orderings<Comparable>
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_icl_container<Type>, bool>::type
+operator != (const Type& left, const Type& right)
+{ return !(left == right); }
+
+template<class Type>
+inline typename enable_if<is_icl_container<Type>, bool>::type
+operator > (const Type& left, const Type& right)
+{ return right < left; }
+
+/** Partial ordering which is induced by Compare */
+template<class Type>
+inline typename enable_if<is_icl_container<Type>, bool>::type
+operator <= (const Type& left, const Type& right)
+{ return !(left > right); }
+
+template<class Type>
+inline typename enable_if<is_icl_container<Type>, bool>::type
+operator >= (const Type& left, const Type& right)
+{ return !(left < right); }
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,87 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_CONTAINER_HPP_JOFA_100923
+#define BOOST_ICL_CONCEPT_CONTAINER_HPP_JOFA_100923
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_container.hpp>
+#include <boost/icl/type_traits/is_icl_container.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Emptieness
+//==============================================================================
+
+/** Tests if the container is empty.
+ Complexity: constant. */
+template<class Type>
+typename enable_if<is_container<Type>, bool>::type
+is_empty(const Type& object)
+{
+ return object.begin()==object.end();
+}
+
+
+/** All content of the container is dropped.
+ Complexity: linear. */
+template<class Type>
+typename enable_if<is_container<Type>, void>::type
+clear(Type& object)
+{
+ object.erase(object.begin(), object.end());
+}
+
+//==============================================================================
+//= Size
+//==============================================================================
+
+template<class Type>
+typename enable_if<mpl::and_< is_container<Type>
+ , mpl::not_<is_icl_container<Type> > >
+ , std::size_t>::type
+iterative_size(const Type& object)
+{
+ return object.size();
+}
+
+//==============================================================================
+//= Swap
+//==============================================================================
+
+template<class Type>
+typename enable_if<is_container<Type>, void>::type
+swap(Type& left, Type& right)
+{
+ left.swap(right);
+}
+
+//==============================================================================
+//= Iteration
+//==============================================================================
+
+template<class Type>
+typename enable_if<is_container<Type>, typename Type::iterator>::type
+cyclic_prior(Type& object, typename Type::iterator it_)
+{ return it_ == object.begin() ? object.end() : --it_; }
+
+template<class Type>
+typename enable_if<is_container<Type>, typename Type::const_iterator>::type
+cyclic_prior(const Type& object, typename Type::const_iterator it_)
+{ return it_ == object.begin() ? object.end() : --it_; }
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/element_associator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/element_associator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,499 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_ELEMENT_ASSOCIATOR_HPP_JOFA_100921
+#define BOOST_ICL_CONCEPT_ELEMENT_ASSOCIATOR_HPP_JOFA_100921
+
+#include <boost/icl/type_traits/is_associative_element_container.hpp>
+#include <boost/icl/type_traits/is_key_container_of.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/detail/subset_comparer.hpp>
+#include <boost/icl/concept/element_set.hpp>
+#include <boost/icl/concept/element_map.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Size
+//==============================================================================
+template<class Type>
+typename enable_if<is_element_container<Type>, std::size_t>::type
+iterative_size(const Type& object)
+{
+ return object.size();
+}
+
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
+size(const Type& object)
+{
+ return icl::iterative_size(object);
+}
+
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
+cardinality(const Type& object)
+{
+ return icl::iterative_size(object);
+}
+
+
+//==============================================================================
+//= Containedness<ElementSet|ElementMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- bool within(c P&, c T&) T:{s}|{m} P:{e}|{i} fragment_types|key_types
+//------------------------------------------------------------------------------
+/** Checks if a key is in the associative container */
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, bool>::type
+within(const typename Type::key_type& key, const Type& super)
+{
+ return !(super.find(key) == super.end());
+}
+
+//------------------------------------------------------------------------------
+//- bool within(c P&, c T&) T:{s}|{m} P:{s'} fragment_types|key_types
+//------------------------------------------------------------------------------
+template<class SubT, class SuperT>
+typename enable_if<mpl::and_< is_associative_element_container<SuperT>
+ , is_key_container_of<SubT, SuperT> >,
+ bool>::type
+within(const SubT& sub, const SuperT& super)
+{
+ if(icl::is_empty(sub)) return true;
+ if(icl::is_empty(super)) return false;
+ if(icl::size(super) < icl::size(sub)) return false;
+
+ typename SubT::const_iterator common_lwb_;
+ typename SubT::const_iterator common_upb_;
+ if(!Set::common_range(common_lwb_, common_upb_, sub, super))
+ return false;
+
+ typename SubT::const_iterator sub_ = sub.begin();
+ typename SuperT::const_iterator super_;
+ while(sub_ != sub.end())
+ {
+ super_ = super.find(key_value<SubT>(sub_));
+ if(super_ == super.end())
+ return false;
+ else if(!co_equal(sub_, super_, &sub, &super))
+ return false;
+
+ ++sub_;
+ }
+ return true;
+}
+
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{s}|{m} P:{e}|{i} fragment_types|key_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, bool>::type
+contains(const Type& super, const typename Type::key_type& key)
+{
+ return icl::within(key, super);
+}
+
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{s}|{m} P:{s'} fragment_types|key_types
+//------------------------------------------------------------------------------
+template<class SubT, class SuperT>
+typename enable_if<mpl::and_< is_associative_element_container<SuperT>
+ , is_key_container_of<SubT, SuperT> >,
+ bool>::type
+contains(const SuperT& super, const SubT& sub)
+{
+ return icl::within(sub, super);
+}
+
+//==============================================================================
+//= Equivalences and Orderings
+//==============================================================================
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
+#endif // I do guarantee here that I am using the parameters correctly :)
+
+/** Standard equality, which is lexicographical equality of the sets
+ as sequences, that are given by their Compare order. */
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, bool>::type
+operator == (const Type& left, const Type& right)
+{
+ return left.size() == right.size()
+ && std::equal(left.begin(), left.end(), right.begin());
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, bool>::type
+is_element_equal(const Type& left, const Type& right)
+{ return left == right; }
+
+
+/* Strict weak less ordering which is given by the Compare order */
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, bool>::type
+operator < (const Type& left, const Type& right)
+{
+ return std::lexicographical_compare(
+ left.begin(), left.end(), right.begin(), right.end(),
+ typename Type::element_compare()
+ );
+}
+
+template<class LeftT, class RightT>
+typename enable_if<is_concept_equivalent<is_element_container,LeftT, RightT>,
+ int>::type
+inclusion_compare(const LeftT& left, const RightT& right)
+{
+ return Set::subset_compare(left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end());
+}
+
+//==============================================================================
+//= Addition
+//==============================================================================
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator += (Type& object, const typename Type::value_type& operand)
+{
+ return icl::add(object, operand);
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator + (Type object, const typename Type::value_type& operand)
+{
+ return object += operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator + (const typename Type::value_type& operand, Type object)
+{
+ return object += operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator += (Type& object, const Type& operand)
+{
+ if(&object == &operand)
+ return object;
+
+ typename Type::iterator prior_ = object.end();
+ ICL_const_FORALL(typename Type, it_, operand)
+ prior_ = icl::add(object, prior_, *it_);
+
+ return object;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator + (Type object, const Type& operand)
+{
+ return object += operand;
+}
+
+//==============================================================================
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator |= (Type& object, const typename Type::value_type& operand)
+{
+ return icl::add(object, operand);
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator | (Type object, const typename Type::value_type& operand)
+{
+ return object += operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator | (const typename Type::value_type& operand, Type object)
+{
+ return object += operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator |= (Type& object, const Type& operand)
+{
+ return object += operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator | (Type object, const Type& operand)
+{
+ return object += operand;
+}
+
+
+//==============================================================================
+//= Insertion
+//==============================================================================
+//------------------------------------------------------------------------------
+//- V insert(T&, c P&) T:{s}|{m} P:{e}|{b} fragment_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_associative_element_container<Type>,
+ std::pair<typename Type::iterator,bool> >::type
+insert(Type& object, const typename Type::value_type& operand)
+{
+ return object.insert(operand);
+}
+
+template<class Type>
+typename enable_if<is_associative_element_container<Type>,
+ typename Type::iterator>::type
+insert(Type& object, typename Type::iterator prior,
+ const typename Type::value_type& operand)
+{
+ return object.insert(prior, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T insert(T&, c T&) T:{s m} map fragment_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, Type>::type&
+insert(Type& object, const Type& addend)
+{
+ typedef typename Type::iterator iterator;
+
+ iterator prior_ = object.end();
+ ICL_const_FORALL(typename Type, elem_, addend)
+ icl::insert(object, prior_, *elem_);
+
+ return object;
+}
+
+
+//==============================================================================
+//= Erasure
+//==============================================================================
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
+erase(Type& object, const typename Type::key_type& key_value)
+{
+ typedef typename Type::size_type size_type;
+ typename Type::iterator it_ = object.find(key_value);
+ if(it_ != object.end())
+ {
+ object.erase(it_);
+ return unit_element<size_type>::value();
+ }
+ return identity_element<size_type>::value();
+}
+
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, Type>::type&
+erase(Type& object, const Type& erasure)
+{
+ ICL_const_FORALL(typename Type, elem_, erasure)
+ icl::erase(object, *elem_);
+
+ return object;
+}
+
+
+
+//==============================================================================
+//= Subtraction<ElementSet|ElementMap>
+//==============================================================================
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator -= (Type& object, const typename Type::value_type& operand)
+{
+ return icl::subtract(object, operand);
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator - (Type object, const typename Type::value_type& operand)
+{
+ return object -= operand;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator -= (Type& object, const Type& subtrahend)
+{
+ ICL_const_FORALL(typename Type, it_, subtrahend)
+ icl::subtract(object, *it_);
+
+ return object;
+}
+
+template <class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator - (Type object, const Type& subtrahend)
+{
+ return object -= subtrahend;
+}
+
+
+//==============================================================================
+//= Intersection
+//==============================================================================
+//------------------------------------------------------------------------------
+//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{e}{e} key_type
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::key_type& operand)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator it_ = object.find(operand);
+ if(it_ != object.end())
+ icl::add(section, *it_);
+}
+
+//------------------------------------------------------------------------------
+//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{s}{s} set key_type
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename key_container_type_of<Type>::type& operand)
+{
+ typedef typename key_container_type_of<Type>::type key_container_type;
+ typedef typename key_container_type::const_iterator const_iterator;
+ const_iterator common_lwb_, common_upb_;
+ if(!Set::common_range(common_lwb_, common_upb_, operand, object))
+ return;
+
+ const_iterator sec_ = common_lwb_;
+ while(sec_ != common_upb_)
+ add_intersection(section, object, *sec_++);
+}
+
+//------------------------------------------------------------------------------
+//- Intersection<ElementMap|ElementSet>
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator &= (Type& object, const typename Type::key_type& operand)
+{
+ Type section;
+ add_intersection(section, object, operand);
+ object.swap(section);
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator & (Type object, const typename Type::key_type& operand)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator & (const typename Type::key_type& operand, Type object)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+operator &= (Type& object, const typename key_container_type_of<Type>::type& operand)
+{
+ Type section;
+ add_intersection(section, object, operand);
+ object.swap(section);
+ return object;
+}
+
+//------------------------------------------------------------------------------
+
+template<class Type, class CoType>
+inline typename enable_if<is_associative_element_container<Type>, bool>::type
+disjoint(const Type& left, const Type& right)
+{
+ return !intersects(left, right);
+}
+
+//==============================================================================
+//= Symmetric difference<ElementSet|ElementMap>
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator ^ (Type object, const typename Type::value_type& operand)
+{
+ return icl::flip(object, operand);
+}
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator ^ (const typename Type::value_type& operand, Type object)
+{
+ return icl::flip(object, operand);
+}
+
+template<class Type>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type
+operator ^ (Type object, const Type& operand)
+{
+ return object ^= operand;
+}
+
+
+//==============================================================================
+//= Manipulation by predicates
+//==============================================================================
+template<class Type, class Predicate>
+typename enable_if<is_associative_element_container<Type>, Type>::type&
+erase_if(const Predicate& pred, Type& object)
+{
+ typename Type::iterator it_ = object.begin();
+ while(it_ != object.end())
+ if(pred(*it_))
+ icl::erase(object, it_++);
+ else ++it_;
+ return object;
+}
+
+template<class Type, class Predicate>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+add_if(const Predicate& pred, Type& object, const Type& src)
+{
+ typename Type::const_iterator it_ = src.begin();
+ while(it_ != src.end())
+ if(pred(*it_))
+ icl::add(object, *it_++);
+
+ return object;
+}
+
+template<class Type, class Predicate>
+inline typename enable_if<is_associative_element_container<Type>, Type>::type&
+assign_if(const Predicate& pred, Type& object, const Type& src)
+{
+ icl::clear(object);
+ return add_if(object, src, pred);
+}
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/element_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/element_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,487 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_ELEMENT_MAP_HPP_JOFA_100921
+#define BOOST_ICL_CONCEPT_ELEMENT_MAP_HPP_JOFA_100921
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/detail/on_absorbtion.hpp>
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/icl/type_traits/absorbs_identities.hpp>
+#include <boost/icl/type_traits/is_associative_element_container.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+
+#include <boost/icl/concept/map_value.hpp>
+#include <boost/icl/detail/map_algo.hpp>
+
+
+namespace boost{ namespace icl
+{
+
+//NOTE: Some forward declarations are needed by some compilers.
+template<class Type, class Predicate>
+typename enable_if<is_associative_element_container<Type>, Type>::type&
+erase_if(const Predicate& pred, Type& object);
+
+
+//==============================================================================
+//= Containedness<ElementMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- bool within(c P&, c T&) T:{m} P:{b} fragment_types
+//------------------------------------------------------------------------------
+/** Checks if a key-value pair is in the map */
+template<class Type>
+typename enable_if<is_element_map<Type>, bool>::type
+within(const typename Type::element_type& value_pair, const Type& super)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator found_ = super.find(value_pair.first);
+ return found_ != super.end() && found_->second == value_pair.second;
+}
+
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{m} P:{b} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_element_map<Type>, bool>::type
+contains(const Type& super, const typename Type::element_type& value_pair)
+{
+ return icl::within(value_pair, super);
+}
+
+//==============================================================================
+//= Equivalences and Orderings<ElementMap>
+//==============================================================================
+
+/** Protonic equality is equality on all elements that do not carry an identity element as content. */
+template<class Type>
+inline typename enable_if<is_element_map<Type>, bool>::type
+is_distinct_equal(const Type& lhs, const Type& rhs)
+{
+ return Map::lexicographical_distinct_equal(lhs, rhs);
+}
+
+//==============================================================================
+//= Addition<ElementMap>
+//==============================================================================
+/** \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
+ value is added to the data value already found in the map. */
+template <class Type>
+typename enable_if<is_element_map<Type>, Type>::type&
+add(Type& object, const typename Type::value_type& value_pair)
+{
+ return object.add(value_pair);
+}
+
+/** \c add add \c value_pair into the map using \c prior as a hint to
+ insert \c value_pair after the position \c prior is pointing to. */
+template <class Type>
+typename enable_if<is_element_map<Type>, typename Type::iterator>::type
+add(Type& object, typename Type::iterator prior,
+ const typename Type::value_type& value_pair)
+{
+ return object.add(prior, value_pair);
+}
+
+//==============================================================================
+//= Erasure
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& erase(T&, c P&) T:{m} P:{b} fragment_type
+//------------------------------------------------------------------------------
+template <class Type>
+typename enable_if<is_element_map<Type>, typename Type::size_type>::type
+erase(Type& object, const typename Type::element_type& value_pair)
+{
+ typedef typename Type::size_type size_type;
+ typedef typename Type::iterator iterator;
+ typedef typename Type::on_identity_absorbtion on_identity_absorbtion;
+
+ if(on_identity_absorbtion::is_absorbable(value_pair.second))
+ return identity_element<size_type>::value();
+
+ iterator it_ = object.find(value_pair.first);
+ if(it_ != object.end() && value_pair.second == it_->second)
+ {
+ object.erase(it_);
+ return unit_element<size_type>::value();
+ }
+
+ return identity_element<size_type>::value();
+}
+
+template<class Type>
+typename enable_if<is_element_map<Type>, Type>::type&
+erase(Type& object, const typename Type::set_type& erasure)
+{
+ typedef typename Type::set_type set_type;
+ ICL_const_FORALL(typename set_type, elem_, erasure)
+ icl::erase(object, *elem_);
+
+ return object;
+}
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{m} P:{b} fragment_type
+//------------------------------------------------------------------------------
+template <class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::element_type& operand)
+{
+ return object.subtract(operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{m} P:{e} key_type
+//------------------------------------------------------------------------------
+template <class Type>
+typename enable_if<is_element_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::domain_type& key_value)
+{
+ return icl::erase(object, key_value);
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{m} P:{s} set key_type
+//------------------------------------------------------------------------------
+template <class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type&
+operator -= (Type& object, const typename Type::set_type& operand)
+{
+ typedef typename Type::set_type set_type;
+ typedef typename set_type::const_iterator co_iterator;
+ typedef typename Type::iterator iterator;
+
+ co_iterator common_lwb_, common_upb_;
+ if(!Set::common_range(common_lwb_, common_upb_, operand, object))
+ return object;
+
+ co_iterator it_ = common_lwb_;
+ iterator common_;
+
+ while(it_ != common_upb_)
+ object.erase(*it_++);
+
+ return object;
+}
+
+template <class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator - (Type object, const typename Type::set_type& subtrahend)
+{
+ return object -= subtrahend;
+}
+
+//==============================================================================
+//= Selective Update<ElementMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& set_at(T&, c P&) T:{m} P:{b}
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type&
+set_at(Type& object, const typename Type::element_type& operand)
+{
+ typedef typename Type::iterator iterator;
+ typedef typename Type::codomain_combine codomain_combine;
+ typedef on_absorbtion<Type,codomain_combine,absorbs_identities<Type>::value>
+ on_identity_absorbtion;
+
+ if(!on_identity_absorbtion::is_absorbable(operand.second))
+ {
+ std::pair<iterator,bool> insertion = object.insert(operand);
+ if(!insertion.second)
+ insertion->second = operand.second;
+ }
+ return object;
+}
+
+
+//==============================================================================
+//= Intersection
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_element_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::element_type& operand)
+{
+ object.add_intersection(section, operand);
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, void>::type
+add_intersection(Type& section, const Type& object, const Type& operand)
+{
+ ICL_const_FORALL(typename Type, it_, operand)
+ icl::add_intersection(section, object, *it_);
+}
+
+//------------------------------------------------------------------------------
+//- T& op &=(T&, c P&) T:{m} P:{b m} fragment_types
+//------------------------------------------------------------------------------
+
+template<class Type>
+inline typename enable_if<mpl::and_<is_element_map<Type>, is_total<Type> >, Type>::type&
+operator &=(Type& object, const typename Type::element_type& operand)
+{
+ object.add(operand);
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<mpl::and_<is_element_map<Type>, mpl::not_<is_total<Type> > >, Type>::type&
+operator &=(Type& object, const typename Type::element_type& operand)
+{
+ Type section;
+ icl::add_intersection(section, object, operand);
+ object.swap(section);
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator & (Type object, const typename Type::element_type& operand)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator & (const typename Type::element_type& operand, Type object)
+{
+ return object &= operand;
+}
+
+
+template<class Type>
+inline typename enable_if<mpl::and_<is_element_map<Type>, is_total<Type> >, Type>::type&
+operator &=(Type& object, const Type& operand)
+{
+ object += operand;
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<mpl::and_<is_element_map<Type>, mpl::not_<is_total<Type> > >, Type>::type&
+operator &=(Type& object, const Type& operand)
+{
+ Type section;
+ icl::add_intersection(section, object, operand);
+ object.swap(section);
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator & (Type object, const Type& operand)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator & (Type object, const typename Type::key_object_type& operand)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type
+operator & (const typename Type::key_object_type& operand, Type object)
+{
+ return object &= operand;
+}
+
+//==============================================================================
+//= Intersection<ElementMap> bool intersects(x,y)
+//==============================================================================
+template<class Type, class CoType>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , is_total<Type> >
+ , bool>::type
+intersects(const Type&, const CoType&)
+{
+ return true;
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+intersects(const Type& object, const typename Type::domain_type& operand)
+{
+ return icl::contains(object, operand);
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+intersects(const Type& object, const typename Type::set_type& operand)
+{
+ if(object.iterative_size() < operand.iterative_size())
+ return Map::intersects(object, operand);
+ else
+ return Map::intersects(operand, object);
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+intersects(const Type& object, const typename Type::element_type& operand)
+{
+ Type intersection;
+ icl::add_intersection(intersection, object, operand);
+ return !intersection.empty();
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+intersects(const Type& object, const Type& operand)
+{
+ if(object.iterative_size() < operand.iterative_size())
+ return Map::intersects(object, operand);
+ else
+ return Map::intersects(operand, object);
+}
+
+//==============================================================================
+//= Symmetric difference
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_element_map<Type>, Type>::type&
+flip(Type& object, const typename Type::element_type& operand)
+{
+ return object.flip(operand);
+}
+
+template<class Type, class CoType>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , is_total<Type>
+ , absorbs_identities<Type> >
+ , Type>::type&
+operator ^= (Type& object, const CoType&)
+{
+ icl::clear(object);
+ return object;
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , is_total<Type>
+ , mpl::not_<absorbs_identities<Type> > >
+ , Type>::type&
+operator ^= (Type& object, const typename Type::element_type& operand)
+{
+ return object.flip(operand);
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , is_total<Type>
+ , mpl::not_<absorbs_identities<Type> > >
+ , Type>::type&
+operator ^= (Type& object, const Type& operand)
+{
+ ICL_const_FORALL(typename Type, it_, operand)
+ icl::flip(object, *it_);
+
+ ICL_FORALL(typename Type, it2_, object)
+ it2_->second = identity_element<typename Type::codomain_type>::value();
+
+ return object;
+}
+
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , Type>::type&
+operator ^= (Type& object, const typename Type::element_type& operand)
+{
+ return icl::flip(object, operand);
+}
+
+template<class Type>
+inline typename enable_if< mpl::and_< is_element_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , Type>::type&
+operator ^= (Type& object, const Type& operand)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator it_ = operand.begin();
+ while(it_ != operand.end())
+ icl::flip(object, *it_++);
+
+ return object;
+}
+
+
+//==============================================================================
+//= Set selection
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_element_map<Type>,
+ typename Type::set_type>::type&
+domain(typename Type::set_type& domain_set, const Type& object)
+{
+ typename Type::set_type::iterator prior_ = domain_set.end();
+ typename Type::const_iterator it_ = object.begin();
+ while(it_ != object.end())
+ prior_ = domain_set.insert(prior_, (*it_++).first);
+
+ return domain_set;
+}
+
+//==============================================================================
+//= Neutron absorbtion
+//==============================================================================
+template<class Type>
+inline typename enable_if<mpl::and_< is_element_map<Type>
+ , absorbs_identities<Type> >, Type>::type&
+absorb_identities(Type& object)
+{
+ typedef typename Type::element_type element_type;
+ return icl::erase_if(content_is_identity_element<element_type>(), object);
+}
+
+template<class Type>
+inline typename enable_if<mpl::and_< is_element_map<Type>
+ , mpl::not_<absorbs_identities<Type> > >
+ , Type>::type&
+absorb_identities(Type&){}
+
+//==============================================================================
+//= Streaming<ElementMap>
+//==============================================================================
+template<class CharType, class CharTraits, class Type>
+inline typename enable_if<is_element_map<Type>, std::basic_ostream<CharType, CharTraits> >::type&
+operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object)
+{
+ stream << "{";
+ ICL_const_FORALL(typename Type, it, object)
+ stream << "(" << it->first << "->" << it->second << ")";
+
+ return stream << "}";
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/element_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/element_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,141 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_ELEMENT_SET_HPP_JOFA_100921
+#define BOOST_ICL_CONCEPT_ELEMENT_SET_HPP_JOFA_100921
+
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/concept/set_value.hpp>
+#include <boost/icl/detail/std_set.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Addition<ElementSet>
+//==============================================================================
+/** \c add inserts \c operand into the map if it's key does
+ not exist in the map.
+ If \c operands's key value exists in the map, it's data
+ value is added to the data value already found in the map. */
+template <class Type>
+typename enable_if<is_element_set<Type>, Type>::type&
+add(Type& object, const typename Type::value_type& operand)
+{
+ object.insert(operand);
+ return object;
+}
+
+/** \c add add \c operand into the map using \c prior as a hint to
+ insert \c operand after the position \c prior is pointing to. */
+template <class Type>
+typename enable_if<is_element_set<Type>, typename Type::iterator>::type
+add(Type& object, typename Type::iterator prior,
+ const typename Type::value_type& operand)
+{
+ return object.insert(prior, operand);
+}
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+/** If the \c operand's key value is in the map, it's data value is
+ subtraced from the data value stored in the map. */
+template<class Type>
+typename enable_if<is_element_set<Type>, Type>::type&
+subtract(Type& object, const typename Type::value_type& operand)
+{
+ object.erase(operand);
+ return object;
+}
+
+
+//==============================================================================
+//= Intersection
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_element_set<Type>, Type>::type
+operator & (Type object, const Type& operand)
+{
+ return object &= operand;
+}
+
+template<class Type>
+inline typename enable_if<is_element_set<Type>, bool>::type
+intersects(const Type& object, const typename Type::key_type& operand)
+{
+ return !(object.find(operand) == object.end());
+}
+
+template<class Type>
+inline typename enable_if<is_element_set<Type>, bool>::type
+intersects(const Type& object, const Type& operand)
+{
+ if(iterative_size(object) < iterative_size(operand))
+ return Set::intersects(object, operand);
+ else
+ return Set::intersects(operand, object);
+}
+
+//==============================================================================
+//= Symmetric difference
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_element_set<Type>, Type>::type&
+flip(Type& object, const typename Type::value_type& operand)
+{
+ typedef typename Type::iterator iterator;
+ std::pair<iterator,bool> insertion = object.insert(operand);
+ if(!insertion.second)
+ object.erase(insertion.first);
+
+ return object;
+}
+
+template<class Type>
+inline typename enable_if<is_element_set<Type>, Type>::type&
+operator ^= (Type& object, const typename Type::element_tpye& operand)
+{
+ return icl::flip(object, operand);
+}
+
+/** Symmetric subtract map \c x2 and \c *this.
+ So \c *this becomes the symmetric difference of \c *this and \c x2 */
+template<class Type>
+inline typename enable_if<is_element_set<Type>, Type>::type&
+operator ^= (Type& object, const Type& operand)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator it_ = operand.begin();
+ while(it_ != operand.end())
+ icl::flip(object, *it_++);
+
+ return object;
+}
+
+//==============================================================================
+//= Streaming<ElementSet>
+//==============================================================================
+template<class CharType, class CharTraits, class Type>
+inline typename enable_if<is_element_set<Type>, std::basic_ostream<CharType, CharTraits> >::type&
+operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object)
+{
+ stream << "{";
+ ICL_const_FORALL(typename Type, it, object)
+ stream << (*it) << " ";
+
+ return stream << "}";
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/element_set_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/element_set_value.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,31 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924
+#define BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924
+
+#include <boost/icl/type_traits/is_element_container.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= AlgoUnifiers<Set>
+//==============================================================================
+template<class Type, class Iterator>
+inline typename enable_if<is_element_set<Type>, const typename Type::key_type>::type&
+co_value(Iterator it_)
+{
+ return *it_;
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,1348 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_HPP_JOFA_100323
+#define BOOST_ICL_CONCEPT_INTERVAL_HPP_JOFA_100323
+
+#include <boost/assert.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/type_traits/unit_element.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/infinity.hpp>
+#include <boost/icl/type_traits/succ_pred.hpp>
+#include <boost/icl/type_traits/is_numeric.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/is_asymmetric_interval.hpp>
+#include <boost/icl/type_traits/is_discrete_interval.hpp>
+#include <boost/icl/type_traits/is_continuous_interval.hpp>
+
+#include <boost/icl/concept/interval_bounds.hpp>
+#include <boost/icl/interval_traits.hpp>
+#include <boost/icl/dynamic_interval_traits.hpp>
+
+
+namespace boost{namespace icl
+{
+
+//==============================================================================
+//= Ordering
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_interval<Type>, bool>::type
+domain_less(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ return typename interval_traits<Type>::domain_compare()(left, right);
+}
+
+template<class Type>
+inline typename enable_if<is_interval<Type>, bool>::type
+domain_less_equal(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ return !(typename interval_traits<Type>::domain_compare()(right, left));
+}
+
+template<class Type>
+inline typename enable_if<is_interval<Type>, bool>::type
+domain_equal(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+ return !(domain_compare()(left, right)) && !(domain_compare()(right, left));
+}
+
+//==============================================================================
+//= Construct<Interval> singleton
+//==============================================================================
+template<class Type>
+typename enable_if
+<
+ mpl::and_< is_static_right_open<Type>
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , Type
+>::type
+singleton(const typename interval_traits<Type>::domain_type& value)
+{
+ //ASSERT: This always creates an interval with exactly one element
+ return interval_traits<Type>::construct(value, icl::succ(value));
+}
+
+template<class Type>
+typename enable_if
+<
+ mpl::and_< is_static_left_open<Type>
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , Type
+>::type
+singleton(const typename interval_traits<Type>::domain_type& value)
+{
+ //ASSERT: This always creates an interval with exactly one element
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value) ));
+
+ return interval_traits<Type>::construct(icl::pred(value), value);
+}
+
+template<class Type>
+typename enable_if<is_discrete_static_open<Type>, Type>::type
+singleton(const typename interval_traits<Type>::domain_type& value)
+{
+ //ASSERT: This always creates an interval with exactly one element
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value)));
+
+ return interval_traits<Type>::construct(icl::pred(value), icl::succ(value));
+}
+
+template<class Type>
+typename enable_if<is_discrete_static_closed<Type>, Type>::type
+singleton(const typename interval_traits<Type>::domain_type& value)
+{
+ //ASSERT: This always creates an interval with exactly one element
+ return interval_traits<Type>::construct(value, value);
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>, Type>::type
+singleton(const typename interval_traits<Type>::domain_type& value)
+{
+ return dynamic_interval_traits<Type>::construct(value, value, interval_bounds::closed());
+}
+
+//==============================================================================
+//= Construct<Interval> multon
+//==============================================================================
+template<class Type>
+typename enable_if<has_static_bounds<Type>, Type>::type
+construct(const typename interval_traits<Type>::domain_type& low,
+ const typename interval_traits<Type>::domain_type& up )
+{
+ return interval_traits<Type>::construct(low, up);
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>, Type>::type
+construct(const typename interval_traits<Type>::domain_type& low,
+ const typename interval_traits<Type>::domain_type& up,
+ interval_bounds bounds = interval_bounds::right_open())
+{
+ return dynamic_interval_traits<Type>::construct(low, up, bounds);
+}
+
+
+//- construct form bounded values ----------------------------------------------
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>, Type>::type
+construct(const typename Type::bounded_domain_type& low,
+ const typename Type::bounded_domain_type& up)
+{
+ return dynamic_interval_traits<Type>::construct_bounded(low, up);
+}
+
+template<class Type>
+typename enable_if<is_interval<Type>, Type>::type
+span(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ if(interval_traits<Type>::domain_compare(left,right))
+ return construct<Type>(left, right);
+ else
+ return construct<Type>(right, left);
+}
+
+
+//==============================================================================
+template<class Type>
+typename enable_if<is_static_right_open<Type>, Type>::type
+hull(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ if(interval_traits<Type>::domain_compare(left,right))
+ return construct<Type>(left, succ(right));
+ else
+ return construct<Type>(right, succ(left));
+}
+
+template<class Type>
+typename enable_if<is_static_left_open<Type>, Type>::type
+hull(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ if(interval_traits<Type>::domain_compare(left,right))
+ {
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(left) ));
+ return construct<Type>(pred(left), right);
+ }
+ else
+ {
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(right) ));
+ return construct<Type>(pred(right), left);
+ }
+}
+
+template<class Type>
+typename enable_if<is_static_closed<Type>, Type>::type
+hull(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ if(interval_traits<Type>::domain_compare(left,right))
+ return construct<Type>(left, right);
+ else
+ return construct<Type>(right, left);
+}
+
+template<class Type>
+typename enable_if<is_static_open<Type>, Type>::type
+hull(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ if(interval_traits<Type>::domain_compare(left,right))
+ {
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(left) ));
+ return construct<Type>(pred(left), succ(right));
+ }
+ else
+ {
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(right) ));
+ return construct<Type>(pred(right), succ(left));
+ }
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>, Type>::type
+hull(const typename interval_traits<Type>::domain_type& left,
+ const typename interval_traits<Type>::domain_type& right)
+{
+ if(interval_traits<Type>::domain_compare(left,right))
+ return construct<Type>(left, right, interval_bounds::closed());
+ else
+ return construct<Type>(right, left, interval_bounds::closed());
+}
+
+//==============================================================================
+//= Selection
+//==============================================================================
+
+template<class Type>
+inline typename enable_if<is_interval<Type>,
+ typename interval_traits<Type>::domain_type>::type
+lower(const Type& object)
+{
+ return interval_traits<Type>::lower(object);
+}
+
+template<class Type>
+inline typename enable_if<is_interval<Type>,
+ typename interval_traits<Type>::domain_type>::type
+upper(const Type& object)
+{
+ return interval_traits<Type>::upper(object);
+}
+
+
+//- first ----------------------------------------------------------------------
+template<class Type>
+inline typename
+enable_if< mpl::or_<is_static_right_open<Type>, is_static_closed<Type> >
+ , typename interval_traits<Type>::domain_type>::type
+first(const Type& object)
+{
+ return lower(object);
+}
+
+template<class Type>
+inline typename
+enable_if< mpl::and_< mpl::or_<is_static_left_open<Type>, is_static_open<Type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , typename interval_traits<Type>::domain_type>::type
+first(const Type& object)
+{
+ return succ(lower(object));
+}
+
+template<class Type>
+inline typename enable_if<is_discrete_interval<Type>,
+ typename interval_traits<Type>::domain_type>::type
+first(const Type& object)
+{
+ return is_left_closed(object.bounds()) ?
+ lower(object) :
+ succ(lower(object));
+}
+
+//- last -----------------------------------------------------------------------
+template<class Type>
+inline typename
+enable_if< mpl::or_<is_static_left_open<Type>, is_static_closed<Type> >
+ , typename interval_traits<Type>::domain_type>::type
+last(const Type& object)
+{
+ return upper(object);
+}
+
+template<class Type>
+inline typename
+enable_if< mpl::and_< mpl::or_<is_static_right_open<Type>, is_static_open<Type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , typename interval_traits<Type>::domain_type>::type
+last(const Type& object)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value>
+ ::is_less_than(upper(object)) ));
+ return pred(upper(object));
+}
+
+template<class Type>
+inline typename enable_if<is_discrete_interval<Type>,
+ typename interval_traits<Type>::domain_type>::type
+last(const Type& object)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value>
+ ::is_less_than_or(upper(object), is_right_closed(object.bounds())) ));
+ return is_right_closed(object.bounds()) ?
+ upper(object) :
+ pred(upper(object));
+}
+
+//- last_next ------------------------------------------------------------------
+template<class Type>
+inline typename
+enable_if< mpl::and_< mpl::or_<is_static_left_open<Type>, is_static_closed<Type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , typename interval_traits<Type>::domain_type>::type
+last_next(const Type& object)
+{
+ return succ(upper(object));
+}
+
+template<class Type>
+inline typename
+enable_if< mpl::and_< mpl::or_<is_static_right_open<Type>, is_static_open<Type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
+ , typename interval_traits<Type>::domain_type>::type
+last_next(const Type& object)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ return upper(object); // NOTE: last_next is implemented to avoid calling pred(object)
+} // For unsigned integral types this may cause underflow.
+
+template<class Type>
+inline typename enable_if<is_discrete_interval<Type>,
+ typename interval_traits<Type>::domain_type>::type
+last_next(const Type& object)
+{
+ return is_right_closed(object.bounds()) ?
+ succ(upper(object)):
+ upper(object) ;
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type>::type
+bounded_lower(const Type& object)
+{
+ return typename
+ Type::bounded_domain_type(lower(object), object.bounds().left());
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type>::type
+reverse_bounded_lower(const Type& object)
+{
+ return typename
+ Type::bounded_domain_type(lower(object),
+ object.bounds().reverse_left());
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type>::type
+bounded_upper(const Type& object)
+{
+ return typename
+ Type::bounded_domain_type(upper(object),
+ object.bounds().right());
+}
+
+template<class Type>
+typename enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type>::type
+reverse_bounded_upper(const Type& object)
+{
+ return typename
+ Type::bounded_domain_type(upper(object),
+ object.bounds().reverse_right());
+}
+
+//- bounds ---------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<has_dynamic_bounds<Type>, interval_bounds>::type
+bounds(const Type& object)
+{
+ return object.bounds();
+}
+
+template<class Type>
+inline typename enable_if<has_static_bounds<Type>, interval_bounds>::type
+bounds(const Type&)
+{
+ return interval_bounds(interval_bound_type<Type>::value);
+}
+
+
+//==============================================================================
+//= Emptieness
+//==============================================================================
+/** Is the interval empty? */
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+is_empty(const Type& object)
+{
+ return domain_less_equal<Type>(upper(object), lower(object));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_closed<Type>, bool>::type
+is_empty(const Type& object)
+{
+ return domain_less<Type>(upper(object), lower(object));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_open<Type>, bool>::type
+is_empty(const Type& object)
+{
+ return domain_less_equal<Type>(upper(object), succ(lower(object)));
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+is_empty(const Type& object)
+{
+ if(object.bounds() == interval_bounds::closed())
+ return domain_less<Type>(upper(object), lower(object));
+ else if(object.bounds() == interval_bounds::open())
+ return domain_less_equal<Type>(upper(object), succ(lower(object)));
+ else
+ return domain_less_equal<Type>(upper(object), lower(object));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+is_empty(const Type& object)
+{
+ return domain_less<Type>(upper(object), lower(object))
+ || ( domain_equal<Type>(upper(object), lower(object))
+ && object.bounds() != interval_bounds::closed() );
+}
+
+//==============================================================================
+//= Orderings, containedness (non empty)
+//==============================================================================
+namespace non_empty
+{
+
+ template<class Type>
+ inline typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+ exclusive_less(const Type& left, const Type& right)
+ {
+ BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right)));
+ return domain_less_equal<Type>(upper(left), lower(right));
+ }
+
+ template<class Type>
+ inline typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+ exclusive_less(const Type& left, const Type& right)
+ {
+ BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right)));
+ return domain_less<Type>(last(left), first(right));
+ }
+
+ template<class Type>
+ inline typename boost::
+ enable_if<has_symmetric_bounds<Type>, bool>::type
+ exclusive_less(const Type& left, const Type& right)
+ {
+ BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right)));
+ return domain_less<Type>(last(left), first(right));
+ }
+
+ template<class Type>
+ inline typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+ exclusive_less(const Type& left, const Type& right)
+ {
+ BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right)));
+ return domain_less <Type>(left.upper(), right.lower())
+ || ( domain_equal<Type>(left.upper(), right.lower())
+ && inner_bounds(left,right) != interval_bounds::open() );
+ }
+
+ template<class Type>
+ inline typename boost::enable_if<is_interval<Type>, bool>::type
+ contains(const Type& super, const Type& sub)
+ {
+ return lower_less_equal(super,sub) && upper_less_equal(sub,super);
+ }
+
+
+} //namespace non_empty
+
+
+//- contains -------------------------------------------------------------------
+template<class Type>
+inline typename boost::enable_if<is_interval<Type>, bool>::type
+contains(const Type& super, const Type& sub)
+{
+ return icl::is_empty(sub) || non_empty::contains(super, sub);
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_static<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+ return domain_less_equal<Type>(icl::first(super), element )
+ && domain_less_equal<Type>( element, icl::last(super));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_left_open<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+ return domain_less <Type>(icl::lower(super), element )
+ && domain_less_equal<Type>( element, icl::upper(super));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_right_open<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+ return domain_less_equal<Type>(icl::lower(super), element )
+ && domain_less <Type>( element, icl::upper(super));
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+ return
+ (is_left_closed(super.bounds())
+ ? domain_less_equal<Type>(super.lower(), element)
+ : domain_less<Type>(super.lower(), element))
+ &&
+ (is_right_closed(super.bounds())
+ ? domain_less_equal<Type>(element, super.upper())
+ : domain_less<Type>(element, super.upper()));
+}
+
+//- within ---------------------------------------------------------------------
+template<class Type>
+inline typename boost::enable_if<is_interval<Type>, bool>::type
+within(const Type& sub, const Type& super)
+{
+ return contains(super,sub);
+}
+
+
+//==============================================================================
+//= Equivalences and Orderings
+//==============================================================================
+//- exclusive_less -------------------------------------------------------------
+/** Maximal element of <tt>left</tt> is less than the minimal element of
+ <tt>right</tt> */
+template<class Type>
+inline typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+exclusive_less(const Type& left, const Type& right)
+{
+ return icl::is_empty(left) || icl::is_empty(right)
+ || domain_less_equal<Type>(upper(left), lower(right));
+}
+
+template<class Type>
+inline typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+exclusive_less(const Type& left, const Type& right)
+{
+ return icl::is_empty(left) || icl::is_empty(right)
+ || domain_less<Type>(last(left), first(right));
+}
+
+template<class Type>
+inline typename boost::
+enable_if<has_symmetric_bounds<Type>, bool>::type
+exclusive_less(const Type& left, const Type& right)
+{
+ return icl::is_empty(left) || icl::is_empty(right)
+ || domain_less<Type>(last(left), first(right));
+}
+
+template<class Type>
+inline typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+exclusive_less(const Type& left, const Type& right)
+{
+ return icl::is_empty(left) || icl::is_empty(right)
+ || domain_less<Type>(left.upper(), right.lower())
+ || ( domain_equal<Type>(left.upper(), right.lower())
+ && inner_bounds(left,right) != interval_bounds::open() );
+}
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_static_bounds<Type>, bool>::type
+lower_less(const Type& left, const Type& right)
+{
+ return domain_less<Type>(left.lower(), right.lower());
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+lower_less(const Type& left, const Type& right)
+{
+ return domain_less<Type>(first(left), first(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+lower_less(const Type& left, const Type& right)
+{
+ if(left_bounds(left,right) == interval_bounds::right_open()) //'[(' == 10
+ return domain_less_equal<Type>(left.lower(), right.lower());
+ else
+ return domain_less<Type>(left.lower(), right.lower());
+}
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_static_bounds<Type>, bool>::type
+upper_less(const Type& left, const Type& right)
+{
+ return domain_less<Type>(left.upper(), right.upper());
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+upper_less(const Type& left, const Type& right)
+{
+ return domain_less<Type>(last(left), last(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+upper_less(const Type& left, const Type& right)
+{
+ if(right_bounds(left,right) == interval_bounds::left_open())
+ return domain_less_equal<Type>(left.upper(), right.upper());
+ else
+ return domain_less<Type>(left.upper(), right.upper());
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type >::type
+lower_min(const Type& left, const Type& right)
+{
+ return lower_less(left, right) ? bounded_lower(left) : bounded_lower(right);
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type >::type
+lower_max(const Type& left, const Type& right)
+{
+ return lower_less(left, right) ? bounded_lower(right) : bounded_lower(left);
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type >::type
+upper_max(const Type& left, const Type& right)
+{
+ return upper_less(left, right) ? bounded_upper(right) : bounded_upper(left);
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>,
+ typename Type::bounded_domain_type >::type
+upper_min(const Type& left, const Type& right)
+{
+ return upper_less(left, right) ? bounded_upper(left) : bounded_upper(right);
+}
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+lower_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(left.lower(), right.lower());
+}
+
+template<class Type>
+typename boost::enable_if<has_symmetric_bounds<Type>, bool>::type
+lower_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(first(left), first(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+lower_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(first(left), first(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+lower_equal(const Type& left, const Type& right)
+{
+ return (left.bounds().left()==right.bounds().left())
+ && domain_equal<Type>(left.lower(), right.lower());
+}
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+upper_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(left.upper(), right.upper());
+}
+
+template<class Type>
+typename boost::enable_if<has_symmetric_bounds<Type>, bool>::type
+upper_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(last(left), last(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+upper_equal(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(last(left), last(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+upper_equal(const Type& left, const Type& right)
+{
+ return (left.bounds().right()==right.bounds().right())
+ && domain_equal<Type>(left.upper(), right.upper());
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+lower_less_equal(const Type& left, const Type& right)
+{
+ return lower_less(left,right) || lower_equal(left,right);
+}
+
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+upper_less_equal(const Type& left, const Type& right)
+{
+ return upper_less(left,right) || upper_equal(left,right);
+}
+
+
+//- operator == ----------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+operator == (const Type& left, const Type& right)
+{
+ return (icl::is_empty(left) && icl::is_empty(right))
+ || (lower_equal(left,right) && upper_equal(left,right));
+}
+
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+operator != (const Type& left, const Type& right)
+{
+ return !(left == right);
+}
+
+//- operator < -----------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+operator < (const Type& left, const Type& right)
+{
+ if(icl::is_empty(left))
+ return !icl::is_empty(right);
+ else
+ return lower_less(left,right)
+ || (lower_equal(left,right) && upper_less(left,right));
+}
+
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+touches(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(upper(left), lower(right));
+}
+
+template<class Type>
+typename boost::enable_if<has_symmetric_bounds<Type>, bool>::type
+touches(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(last_next(left), first(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+touches(const Type& left, const Type& right)
+{
+ return domain_equal<Type>(succ(last(left)), first(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+touches(const Type& left, const Type& right)
+{
+ return is_complementary(inner_bounds(left,right))
+ && domain_equal<Type>(left.upper(), right.lower());
+}
+
+
+//==============================================================================
+//= Size
+//==============================================================================
+//- cardinality ----------------------------------------------------------------
+
+template<class Type>
+typename boost::enable_if<is_continuous_interval<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+cardinality(const Type& object)
+{
+ typedef typename size_type_of<interval_traits<Type> >::type SizeT;
+ if(icl::is_empty(object))
+ return icl::identity_element<SizeT>::value();
+ else if( object.bounds() == interval_bounds::closed()
+ && domain_equal<Type>(lower(object), upper(object)))
+ return icl::unit_element<SizeT>::value();
+ else
+ return infinity<SizeT>::value();
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_interval<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+cardinality(const Type& object)
+{
+ typedef typename size_type_of<interval_traits<Type> >::type SizeT;
+ return icl::is_empty(object) ? identity_element<SizeT>::value()
+ : static_cast<SizeT>(last_next(object) - first(object));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_asymmetric<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+cardinality(const Type& object)
+{
+ typedef typename size_type_of<interval_traits<Type> >::type SizeT;
+ if(icl::is_empty(object))
+ return icl::identity_element<SizeT>::value();
+ else
+ return infinity<SizeT>::value();
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_asymmetric<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+cardinality(const Type& object)
+{
+ typedef typename size_type_of<interval_traits<Type> >::type SizeT;
+ return icl::is_empty(object) ? identity_element<SizeT>::value()
+ : static_cast<SizeT>(last_next(object) - first(object));
+}
+
+template<class Type>
+typename boost::enable_if<has_symmetric_bounds<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+cardinality(const Type& object)
+{
+ typedef typename size_type_of<interval_traits<Type> >::type SizeT;
+ return icl::is_empty(object) ? identity_element<SizeT>::value()
+ : static_cast<SizeT>(last_next(object) - first(object));
+}
+
+
+
+//- size -----------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_interval<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+size(const Type& object)
+{
+ return cardinality(object);
+}
+
+//- length ---------------------------------------------------------------------
+template<class Type>
+inline typename boost::enable_if<is_continuous_interval<Type>,
+ typename difference_type_of<interval_traits<Type> >::type>::type
+length(const Type& object)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type DiffT;
+ return icl::is_empty(object) ? identity_element<DiffT>::value()
+ : upper(object) - lower(object);
+}
+
+template<class Type>
+inline typename boost::enable_if<is_discrete_interval<Type>,
+ typename difference_type_of<interval_traits<Type> >::type>::type
+length(const Type& object)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type DiffT;
+ return icl::is_empty(object) ? identity_element<DiffT>::value()
+ : last_next(object) - first(object);
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_asymmetric<Type>,
+ typename difference_type_of<interval_traits<Type> >::type>::type
+length(const Type& object)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type DiffT;
+ return icl::is_empty(object) ? identity_element<DiffT>::value()
+ : upper(object) - lower(object);
+}
+
+template<class Type>
+inline typename boost::enable_if<is_discrete_static<Type>,
+ typename difference_type_of<interval_traits<Type> >::type>::type
+length(const Type& object)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type DiffT;
+ return icl::is_empty(object) ? identity_element<DiffT>::value()
+ : last_next(object) - first(object);
+}
+
+//- iterative_size -------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_interval<Type>,
+ typename size_type_of<interval_traits<Type> >::type>::type
+iterative_size(const Type& object)
+{
+ return 2;
+}
+
+
+//==============================================================================
+//= Addition
+//==============================================================================
+//- hull -----------------------------------------------------------------------
+/** \c hull returns the smallest interval containing \c left and \c right. */
+template<class Type>
+typename boost::enable_if<has_static_bounds<Type>, Type>::type
+hull(Type left, const Type& right)
+{
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+
+ if(icl::is_empty(right))
+ return left;
+ else if(icl::is_empty(left))
+ return right;
+
+ return
+ construct<Type>
+ (
+ (std::min)(lower(left), lower(right), domain_compare()),
+ (std::max)(upper(left), upper(right), domain_compare())
+ );
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, Type>::type
+hull(Type left, const Type& right)
+{
+ if(icl::is_empty(right))
+ return left;
+ else if(icl::is_empty(left))
+ return right;
+
+ return dynamic_interval_traits<Type>::construct_bounded
+ (
+ lower_min(left, right),
+ upper_max(left, right)
+ );
+}
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+//- left_subtract --------------------------------------------------------------
+/** subtract \c left_minuend from the \c right interval on it's left side.
+ Return the difference: The part of \c right right of \c left_minuend.
+\code
+right_over = right - left_minuend; //on the left.
+... d) : right
+... c) : left_minuend
+ [c d) : right_over
+\endcode
+*/
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, Type>::type
+left_subtract(Type right, const Type& left_minuend)
+{
+ if(exclusive_less(left_minuend, right))
+ return right;
+
+ return construct<Type>(upper(left_minuend), upper(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_closed<Type>, Type>::type
+left_subtract(Type right, const Type& left_minuend)
+{
+ if(exclusive_less(left_minuend, right))
+ return right;
+
+ return construct<Type>(succ(upper(left_minuend)), upper(right));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_open<Type>, Type>::type
+left_subtract(Type right, const Type& left_minuend)
+{
+ if(exclusive_less(left_minuend, right))
+ return right;
+
+ return construct<Type>(pred(upper(left_minuend)), upper(right));
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, Type>::type
+left_subtract(Type right, const Type& left_minuend)
+{
+ if(exclusive_less(left_minuend, right))
+ return right;
+ return dynamic_interval_traits<Type>::construct_bounded
+ ( reverse_bounded_upper(left_minuend), bounded_upper(right) );
+}
+
+
+//- right_subtract -------------------------------------------------------------
+/** subtract \c right_minuend from the \c left interval on it's right side.
+ Return the difference: The part of \c left right of \c right_minuend.
+\code
+left_over = left - right_minuend; //on the right side.
+[a ... : left
+ [b ... : right_minuend
+[a b) : left_over
+\endcode
+*/
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, Type>::type
+right_subtract(Type left, const Type& right_minuend)
+{
+ if(exclusive_less(left, right_minuend))
+ return left;
+ return construct<Type>(lower(left), lower(right_minuend));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_closed<Type>, Type>::type
+right_subtract(Type left, const Type& right_minuend)
+{
+ if(exclusive_less(left, right_minuend))
+ return left;
+ else if(lower_less_equal(right_minuend, left))
+ return identity_element<Type>::value();
+
+ return construct<Type>(lower(left), pred(lower(right_minuend)));
+}
+
+template<class Type>
+typename boost::enable_if<is_static_open<Type>, Type>::type
+right_subtract(Type left, const Type& right_minuend)
+{
+ if(exclusive_less(left, right_minuend))
+ return left;
+
+ return construct<Type>(lower(left), succ(lower(right_minuend)));
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, Type>::type
+right_subtract(Type left, const Type& right_minuend)
+{
+ if(exclusive_less(left, right_minuend))
+ return left;
+
+ return dynamic_interval_traits<Type>::construct_bounded
+ ( bounded_lower(left), reverse_bounded_lower(right_minuend) );
+}
+
+//==============================================================================
+//= Intersection
+//==============================================================================
+//- operator & -----------------------------------------------------------------
+/** Returns the intersection of \c left and \c right interval. */
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, Type>::type
+operator & (Type left, const Type& right)
+{
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else
+ return
+ construct<Type>
+ (
+ (std::max)(icl::lower(left), icl::lower(right), domain_compare()),
+ (std::min)(icl::upper(left), icl::upper(right), domain_compare())
+ );
+}
+
+template<class Type>
+typename boost::enable_if<has_symmetric_bounds<Type>, Type>::type
+operator & (Type left, const Type& right)
+{
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else
+ return
+ construct<Type>
+ (
+ (std::max)(icl::lower(left), icl::lower(right), domain_compare()),
+ (std::min)(icl::upper(left), icl::upper(right), domain_compare())
+ );
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, Type>::type
+operator & (Type left, const Type& right)
+{
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else
+ return dynamic_interval_traits<Type>::construct_bounded
+ (
+ lower_max(left, right),
+ upper_min(left, right)
+ );
+}
+
+
+//- intersects -----------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+intersects(const Type& left, const Type& right)
+{
+ return !( icl::is_empty(left) || icl::is_empty(right)
+ || exclusive_less(left,right) || exclusive_less(right,left));
+}
+
+//- disjoint -------------------------------------------------------------------
+template<class Type>
+typename boost::enable_if<is_interval<Type>, bool>::type
+disjoint(const Type& left, const Type& right)
+{
+ return icl::is_empty(left) || icl::is_empty(right)
+ || exclusive_less(left,right) || exclusive_less(right,left);
+}
+
+//==============================================================================
+//= Complement
+//==============================================================================
+
+template<class Type>
+typename boost::enable_if<is_asymmetric_interval<Type>, Type>::type
+inner_complement(const Type& left, const Type& right)
+{
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else if(exclusive_less(left, right))
+ return construct<Type>(upper(left), lower(right));
+ else if(exclusive_less(right, left))
+ return construct<Type>(upper(right), lower(left));
+ else
+ return identity_element<Type>::value();
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_static_closed<Type>, Type>::type
+inner_complement(const Type& left, const Type& right)
+{
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else if(exclusive_less(left, right))
+ return construct<Type>(succ(upper(left)), pred(lower(right)));
+ else if(exclusive_less(right, left))
+ return construct<Type>(succ(upper(right)), pred(lower(left)));
+ else
+ return identity_element<Type>::value();
+}
+
+template<class Type>
+typename boost::enable_if<is_discrete_static_open<Type>, Type>::type
+inner_complement(const Type& left, const Type& right)
+{
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else if(exclusive_less(left, right))
+ return construct<Type>(last(left), first(right));
+ else if(exclusive_less(right, left))
+ return construct<Type>(last(right), first(left));
+ else
+ return identity_element<Type>::value();
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, Type>::type
+inner_complement(const Type& left, const Type& right)
+{
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return identity_element<Type>::value();
+ else if(exclusive_less(left, right))
+ return right_subtract(left_subtract(hull(left, right), left), right);
+ else if(exclusive_less(right, left))
+ return right_subtract(left_subtract(hull(right, left), right), left);
+ else
+ return identity_element<Type>::value();
+}
+
+template<class Type>
+inline typename boost::enable_if<is_interval<Type>, Type>::type
+between(const Type& left, const Type& right)
+{
+ return inner_complement(left, right);
+}
+
+
+
+//==============================================================================
+//= Distance
+//==============================================================================
+template<class Type>
+typename boost::
+enable_if< mpl::and_< is_interval<Type>
+ , has_difference<typename interval_traits<Type>::domain_type>
+ , is_discrete<typename interval_traits<Type>::domain_type>
+ >
+ , typename difference_type_of<interval_traits<Type> >::type>::type
+distance(const Type& x1, const Type& x2)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type difference_type;
+
+ if(icl::is_empty(x1) || icl::is_empty(x2))
+ return icl::identity_element<difference_type>::value();
+ else if(domain_less<Type>(last(x1), first(x2)))
+ return static_cast<difference_type>(pred(first(x2) - last(x1)));
+ else if(domain_less<Type>(last(x2), first(x1)))
+ return static_cast<difference_type>(pred(first(x1) - last(x2)));
+ else
+ return icl::identity_element<difference_type>::value();
+}
+
+template<class Type>
+typename boost::
+enable_if< mpl::and_< is_interval<Type>
+ , has_difference<typename interval_traits<Type>::domain_type>
+ , is_continuous<typename interval_traits<Type>::domain_type>
+ >
+ , typename difference_type_of<interval_traits<Type> >::type>::type
+distance(const Type& x1, const Type& x2)
+{
+ typedef typename difference_type_of<interval_traits<Type> >::type DiffT;
+
+ if(icl::is_empty(x1) || icl::is_empty(x2))
+ return icl::identity_element<DiffT>::value();
+ else if(domain_less<Type>(upper(x1), lower(x2)))
+ return x2.lower() - x1.upper();
+ else if(domain_less<Type>(upper(x2), lower(x1)))
+ return lower(x1) - upper(x2);
+ else
+ return icl::identity_element<DiffT>::value();
+}
+
+//==============================================================================
+//= Streaming, representation
+//==============================================================================
+template<class Type>
+typename boost::
+ enable_if< mpl::or_< is_static_left_open<Type>
+ , is_static_open<Type> >, std::string>::type
+left_bracket(const Type&) { return "("; }
+
+template<class Type>
+typename boost::
+ enable_if< mpl::or_< is_static_right_open<Type>
+ , is_static_closed<Type> >, std::string>::type
+left_bracket(const Type&) { return "["; }
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, std::string>::type
+left_bracket(const Type& object)
+{
+ return left_bracket(object.bounds());
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename boost::
+ enable_if< mpl::or_< is_static_right_open<Type>
+ , is_static_open<Type> >, std::string>::type
+right_bracket(const Type&) { return ")"; }
+
+template<class Type>
+typename boost::
+ enable_if< mpl::or_< is_static_left_open<Type>
+ , is_static_closed<Type> >, std::string>::type
+right_bracket(const Type&) { return "]"; }
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, std::string>::type
+right_bracket(const Type& object)
+{
+ return right_bracket(object.bounds());
+}
+
+//------------------------------------------------------------------------------
+template<class CharType, class CharTraits, class Type>
+typename boost::enable_if<is_interval<Type>,
+ std::basic_ostream<CharType, CharTraits> >::type&
+operator << (std::basic_ostream<CharType, CharTraits> &stream, Type const& object)
+{
+ if(boost::icl::is_empty(object))
+ return stream << left_bracket<Type>(object) << right_bracket<Type>(object);
+ else
+ return stream << left_bracket<Type>(object)
+ << interval_traits<Type>::lower(object)
+ << ","
+ << interval_traits<Type>::upper(object)
+ << right_bracket<Type>(object) ;
+}
+
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/concept/interval_associator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval_associator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,947 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920
+#define BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920
+
+#include <boost/icl/type_traits/domain_type_of.hpp>
+#include <boost/icl/type_traits/interval_type_of.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+#include <boost/icl/detail/map_algo.hpp>
+#include <boost/icl/detail/interval_set_algo.hpp>
+#include <boost/icl/detail/interval_map_algo.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Containedness<IntervalSet|IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- bool within(c T&, c P&) T={Set,Map} P={e i b p S M}
+//------------------------------------------------------------------------------
+template<class SubT, class SuperT>
+typename enable_if<is_interval_container<SuperT>, bool>::type
+within(const SubT& sub, const SuperT& super)
+{
+ return icl::contains(super, sub);
+}
+
+//==============================================================================
+//= Equivalences and Orderings<IntervalSet|IntervalMap>
+//==============================================================================
+template<class Type>
+inline typename enable_if<is_interval_container<Type>, bool>::type
+operator == (const Type& left, const Type& right)
+{
+ return Set::lexicographical_equal(left, right);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_container<Type>, bool>::type
+operator < (const Type& left, const Type& right)
+{
+ typedef typename Type::segment_compare segment_compare;
+ return std::lexicographical_compare(
+ left.begin(), left.end(), right.begin(), right.end(),
+ segment_compare()
+ );
+}
+
+/** Returns true, if \c left and \c right contain the same elements.
+ Complexity: linear. */
+template<class LeftT, class RightT>
+typename enable_if<is_intra_combinable<LeftT, RightT>, bool>::type
+is_element_equal(const LeftT& left, const RightT& right)
+{
+ return Interval_Set::is_element_equal(left, right);
+}
+
+/** Returns true, if \c left is lexicographically less than \c right.
+ Intervals are interpreted as sequence of elements.
+ Complexity: linear. */
+template<class LeftT, class RightT>
+typename enable_if<is_intra_combinable<LeftT, RightT>, bool>::type
+is_element_less(const LeftT& left, const RightT& right)
+{
+ return Interval_Set::is_element_less(left, right);
+}
+
+/** Returns true, if \c left is lexicographically greater than \c right.
+ Intervals are interpreted as sequence of elements.
+ Complexity: linear. */
+template<class LeftT, class RightT>
+typename enable_if<is_intra_combinable<LeftT, RightT>, bool>::type
+is_element_greater(const LeftT& left, const RightT& right)
+{
+ return Interval_Set::is_element_greater(left, right);
+}
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+typename enable_if<is_inter_combinable<LeftT, RightT>, int>::type
+inclusion_compare(const LeftT& left, const RightT& right)
+{
+ return Interval_Set::subset_compare(left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end());
+}
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+typename enable_if< is_concept_compatible<is_interval_map, LeftT, RightT>,
+ bool >::type
+is_distinct_equal(const LeftT& left, const RightT& right)
+{
+ return Map::lexicographical_distinct_equal(left, right);
+}
+
+//==============================================================================
+//= Size<IntervalSet|IntervalMap>
+//==============================================================================
+template<class Type>
+typename enable_if<is_interval_container<Type>, std::size_t>::type
+iterative_size(const Type& object)
+{
+ return object.iterative_size();
+}
+
+template<class Type>
+typename enable_if
+< mpl::and_< is_interval_container<Type>
+ , is_discrete<typename Type::domain_type> >
+, typename Type::size_type
+>::type
+cardinality(const Type& object)
+{
+ typedef typename Type::size_type size_type;
+ typedef typename Type::interval_type interval_type;
+
+ size_type size = identity_element<size_type>::value();
+ ICL_const_FORALL(typename Type, it, object)
+ size += icl::cardinality(key_value<Type>(it));
+ return size;
+
+}
+
+template<class Type>
+typename enable_if
+< mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_discrete<typename Type::domain_type> > >
+, typename Type::size_type
+>::type
+cardinality(const Type& object)
+{
+ typedef typename Type::size_type size_type;
+ typedef typename Type::interval_type interval_type;
+
+ size_type size = identity_element<size_type>::value();
+ size_type interval_size;
+ ICL_const_FORALL(typename Type, it, object)
+ {
+ interval_size = icl::cardinality(key_value<Type>(it));
+ if(interval_size == infinity<size_type>::value())
+ return interval_size;
+ else
+ size += interval_size;
+ }
+ return size;
+}
+
+template<class Type>
+inline typename enable_if<is_interval_container<Type>, typename Type::size_type>::type
+size(const Type& object)
+{
+ return icl::cardinality(object);
+}
+
+template<class Type>
+typename enable_if<is_interval_container<Type>, typename Type::difference_type>::type
+length(const Type& object)
+{
+ typedef typename Type::difference_type difference_type;
+ typedef typename Type::const_iterator const_iterator;
+ difference_type length = identity_element<difference_type>::value();
+ const_iterator it_ = object.begin();
+
+ while(it_ != object.end())
+ length += icl::length(key_value<Type>(it_++));
+ return length;
+}
+
+template<class Type>
+typename enable_if<is_interval_container<Type>, std::size_t>::type
+interval_count(const Type& object)
+{
+ return icl::iterative_size(object);
+}
+
+
+template<class Type>
+typename enable_if< is_interval_container<Type>
+ , typename Type::difference_type >::type
+distance(const Type& object)
+{
+ typedef typename Type::difference_type DiffT;
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator it_ = object.begin(), pred_;
+ DiffT dist = identity_element<DiffT>::value();
+
+ if(it_ != object.end())
+ pred_ = it_++;
+
+ while(it_ != object.end())
+ dist += icl::distance(key_value<Type>(pred_++), key_value<Type>(it_++));
+
+ return dist;
+}
+
+
+//==============================================================================
+//= Range<IntervalSet|IntervalMap>
+//==============================================================================
+template<class Type>
+typename enable_if<is_interval_container<Type>,
+ typename Type::interval_type>::type
+hull(const Type& object)
+{
+ return
+ icl::is_empty(object)
+ ? identity_element<typename Type::interval_type>::value()
+ : icl::hull( key_value<Type>(object.begin()),
+ key_value<Type>(object.rbegin()) );
+}
+
+template<class Type>
+typename enable_if<is_interval_container<Type>,
+ typename Type::interval_type>::type
+lower(const Type& object)
+{
+ return
+ icl::is_empty(object)
+ ? identity_element<typename Type::interval_type>::value()
+ : icl::lower( key_value<Type>(object.begin()) );
+}
+
+template<class Type>
+typename enable_if<is_interval_container<Type>,
+ typename Type::interval_type>::type
+upper(const Type& object)
+{
+ return
+ icl::is_empty(object)
+ ? identity_element<typename Type::interval_type>::value()
+ : icl::upper( key_value<Type>(object.rbegin()) );
+}
+
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if
+< mpl::and_< is_interval_container<Type>
+ , is_discrete<typename Type::domain_type> >
+, typename Type::interval_type>::type
+first(const Type& object)
+{
+ return
+ icl::is_empty(object)
+ ? identity_element<typename Type::interval_type>::value()
+ : icl::first( key_value<Type>(object.begin()) );
+}
+
+template<class Type>
+typename enable_if
+< mpl::and_< is_interval_container<Type>
+ , is_discrete<typename Type::domain_type> >
+, typename Type::interval_type>::type
+last(const Type& object)
+{
+ return
+ icl::is_empty(object)
+ ? identity_element<typename Type::interval_type>::value()
+ : icl::last( key_value<Type>(object.rbegin()) );
+}
+
+
+//==============================================================================
+//= Addition<IntervalSet|IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& op +=(T&, c P&) T:{S}|{M} P:{e i}|{b p}
+//------------------------------------------------------------------------------
+/* \par \b Requires: \c OperandT is an addable derivative type of \c Type.
+ \b Effects: \c operand is added to \c object.
+ \par \b Returns: A reference to \c object.
+ \b Complexity:
+\code
+ \ OperandT:
+ \ element segment
+Type:
+ interval container O(log n) O(n)
+
+ interval_set amortized
+ spearate_interval_set O(log n)
+
+n = object.interval_count()
+\endcode
+
+For the addition of \b elements or \b segments
+complexity is \b logarithmic or \b linear respectively.
+For \c interval_sets and \c separate_interval_sets addition of segments
+is \b amortized \b logarithmic.
+*/
+template<class Type, class OperandT>
+typename enable_if<is_intra_derivative<Type, OperandT>, Type>::type&
+operator += (Type& object, const OperandT& operand)
+{
+ return icl::add(object, operand);
+}
+
+
+//------------------------------------------------------------------------------
+//- T& op +=(T&, c P&) T:{S}|{M} P:{S'}|{M'}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c OperandT is an interval container addable to \c Type.
+ \b Effects: \c operand is added to \c object.
+ \par \b Returns: A reference to \c object.
+ \b Complexity: loglinear */
+template<class Type, class OperandT>
+typename enable_if<is_intra_combinable<Type, OperandT>, Type>::type&
+operator += (Type& object, const OperandT& operand)
+{
+ typename Type::iterator prior_ = object.end();
+ ICL_const_FORALL(typename OperandT, elem_, operand)
+ prior_ = icl::add(object, prior_, *elem_);
+
+ return object;
+}
+
+
+//------------------------------------------------------------------------------
+//- T op + (T, c P&) T:{S}|{M} P:{e i S}|{b p M}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c += */
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator + (Type object, const OperandT& operand)
+{
+ return object += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op + (c P&, T) T:{S}|{M} P:{e i S'}|{b p M'}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c += */
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator + (const OperandT& operand, Type object)
+{
+ return object += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op + (T, c P&) T:{S}|{M} P:{S}|{M}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c += */
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type
+operator + (Type object, const Type& operand)
+{
+ return object += operand;
+}
+
+
+//------------------------------------------------------------------------------
+//- Addition |=, |
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+//- T& op |=(c P&) T:{S}|{M} P:{e i}|{b p}
+//------------------------------------------------------------------------------
+/** \par \b Requires: Types \c Type and \c OperandT are addable.
+ \par \b Effects: \c operand is added to \c object.
+ \par \b Returns: A reference to \c object.
+ \b Complexity:
+\code
+ \ OperandT: interval
+ \ element segment container
+Type:
+ interval container O(log n) O(n) O(m log(n+m))
+
+ interval_set amortized
+ spearate_interval_set O(log n)
+
+n = object.interval_count()
+m = operand.interval_count()
+\endcode
+
+For the addition of \b elements, \b segments and \b interval \b containers
+complexity is \b logarithmic, \b linear and \b loglinear respectively.
+For \c interval_sets and \c separate_interval_sets addition of segments
+is \b amortized \b logarithmic.
+*/
+template<class Type, class OperandT>
+typename enable_if<is_right_intra_combinable<Type, OperandT>, Type>::type&
+operator |= (Type& object, const OperandT& operand)
+{
+ return object += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op | (T, c P&) T:{S}|{M} P:{e i S}|{b p M}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c |= */
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator | (Type object, const OperandT& operand)
+{
+ return object += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op | (T, c P&) T:{S}|{M} P:{S}|{M}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c |= */
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator | (const OperandT& operand, Type object)
+{
+ return object += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op | (T, c P&) T:{S}|{M} P:{S}|{M}
+//------------------------------------------------------------------------------
+/** \par \b Requires: \c object and \c operand are addable.
+ \b Effects: \c operand is added to \c object.
+ \par \b Efficieny: There is one additional copy of
+ \c Type \c object compared to inplace \c operator \c |= */
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type
+operator | (Type object, const Type& operand)
+{
+ return object += operand;
+}
+
+//==============================================================================
+//= Insertion<IntervalSet|IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& insert(T&, c P&) T:{S}|{M} P:{S'}|{M'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_intra_combinable<Type, OperandT>, Type>::type&
+insert(Type& object, const OperandT& operand)
+{
+ typename Type::iterator prior_ = object.end();
+ ICL_const_FORALL(typename OperandT, elem_, operand)
+ insert(object, *elem_);
+
+ return object;
+}
+
+//==============================================================================
+//= Erasure<IntervalSet|IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& erase(T&, c P&) T:{S}|{M} P:{S'}|{S' M'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<combines_right_to_interval_container<Type, OperandT>,
+ Type>::type&
+erase(Type& object, const OperandT& operand)
+{
+ typedef typename OperandT::const_iterator const_iterator;
+
+ if(icl::is_empty(operand))
+ return object;
+
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return object;
+
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ icl::erase(object, *it_++);
+
+ return object;
+}
+
+//==============================================================================
+//= Subtraction<IntervalSet|IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& op -= (c P&) T:{M} P:{M'}
+//------------------------------------------------------------------------------
+/** \par \b Requires: Types \c Type and \c OperandT are subtractable.
+ \par \b Effects: \c operand is subtracted from \c object.
+ \par \b Returns: A reference to \c object.
+ \b Complexity:
+\code
+ \ OperandT: interval
+ \ element segment container
+Type:
+ interval container O(log n) O(n) O(m log(n+m))
+
+ amortized
+ interval_sets O(log n)
+
+n = object.interval_count()
+m = operand.interval_count()
+\endcode
+
+For the subtraction of \em elements, \b segments and \b interval \b containers
+complexity is \b logarithmic, \b linear and \b loglinear respectively.
+For interval sets subtraction of segments
+is \b amortized \b logarithmic.
+*/
+template<class Type, class OperandT>
+typename enable_if<is_concept_compatible<is_interval_map, Type, OperandT>,
+ Type>::type&
+operator -=(Type& object, const OperandT& operand)
+{
+ ICL_const_FORALL(typename OperandT, elem_, operand)
+ icl::subtract(object, *elem_);
+
+ return object;
+}
+
+//------------------------------------------------------------------------------
+//- T& op -= (c P&) T:{S}|{M} P:{e i}|{b p}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_intra_derivative<Type, OperandT>, Type>::type&
+operator -= (Type& object, const OperandT& operand)
+{
+ return icl::subtract(object, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& op -= (c P&) T:{M} P:{e i}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_cross_derivative<Type, OperandT>, Type>::type&
+operator -= (Type& object, const OperandT& operand)
+{
+ return icl::erase(object, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& op -= (c P&) T:{S M} P:{S'}
+//------------------------------------------------------------------------------
+template<class Type, class IntervalSetT>
+typename enable_if<combines_right_to_interval_set<Type, IntervalSetT>,
+ Type>::type&
+operator -= (Type& object, const IntervalSetT& operand)
+{
+ return erase(object, operand);
+}
+
+
+//------------------------------------------------------------------------------
+//- T op - (T, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_right_inter_combinable<Type, OperandT>, Type>::type
+operator - (Type object, const OperandT& operand)
+{
+ return object -= operand;
+}
+
+
+//==============================================================================
+//= Intersection<IntervalSet|IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- void add_intersection(T&, c T&, c P&) T:{S M} P:{S'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<mpl::and_<is_interval_set<Type>,
+ combines_right_to_interval_set<Type, OperandT> >,
+ void>::type
+add_intersection(Type& section, const Type& object, const OperandT& operand)
+{
+ typedef typename OperandT::const_iterator const_iterator;
+
+ if(operand.empty())
+ return;
+
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return;
+
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ icl::add_intersection(section, object, key_value<OperandT>(it_++));
+}
+
+//------------------------------------------------------------------------------
+//- T& op &=(T&, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_right_inter_combinable<Type, OperandT>, Type>::type&
+operator &= (Type& object, const OperandT& operand)
+{
+ Type intersection;
+ add_intersection(intersection, object, operand);
+ object.swap(intersection);
+ return object;
+}
+
+//------------------------------------------------------------------------------
+//- T op & (T, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'} S<S' M<M' <:coarser
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_binary_inter_combinable<Type, OperandT>, Type>::type
+operator & (Type object, const OperandT& operand)
+{
+ return object &= operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op & (c P&, T) T:{S}|{M} P:{e i S'}|{e i b p S' M'} S<S' M<M' <:coarser
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_binary_inter_combinable<Type, OperandT>, Type>::type
+operator & (const OperandT& operand, Type object)
+{
+ return object &= operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op & (T, c T&) T:{S M}
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type
+operator & (Type object, const Type& operand)
+{
+ return object &= operand;
+}
+
+//------------------------------------------------------------------------------
+//- intersects<IntervalSet|IntervalMap>
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+//- bool intersects(c T&, c P&) T:{S}|{M} P:{e i}
+//------------------------------------------------------------------------------
+template<class Type, class CoType>
+typename enable_if<mpl::and_< is_interval_container<Type>
+ , is_same<CoType, domain_type_of<Type> > >,
+ bool>::type
+intersects(const Type& left, const CoType& right)
+{
+ return icl::contains(left, right);
+}
+
+template<class Type, class CoType>
+typename enable_if<mpl::and_< is_interval_container<Type>
+ , is_same<CoType, interval_type_of<Type> > >,
+ bool>::type
+intersects(const Type& left, const CoType& right)
+{
+ return left.find(right) != left.end();
+}
+
+template<class LeftT, class RightT>
+typename enable_if< mpl::and_< is_intra_combinable<LeftT, RightT>
+ , mpl::or_<is_total<LeftT>, is_total<RightT> > >
+ , bool>::type
+intersects(const LeftT& left, const RightT& right)
+{
+ return true;
+}
+
+template<class LeftT, class RightT>
+typename enable_if< mpl::and_< is_intra_combinable<LeftT, RightT>
+ , mpl::not_<mpl::or_< is_total<LeftT>
+ , is_total<RightT> > > >
+ , bool>::type
+intersects(const LeftT& left, const RightT& right)
+{
+ typedef typename RightT::const_iterator const_iterator;
+ LeftT intersection;
+
+ const_iterator right_common_lower_, right_common_upper_;
+ if(!Set::common_range(right_common_lower_, right_common_upper_, right, left))
+ return false;
+
+ const_iterator it_ = right_common_lower_;
+ while(it_ != right_common_upper_)
+ {
+ icl::add_intersection(intersection, left, *it_++);
+ if(!icl::is_empty(intersection))
+ return true;
+ }
+ return false;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<is_cross_combinable<LeftT, RightT>, bool>::type
+intersects(const LeftT& left, const RightT& right)
+{
+ typedef typename RightT::const_iterator const_iterator;
+ LeftT intersection;
+
+ if(icl::is_empty(left) || icl::is_empty(right))
+ return false;
+
+ const_iterator right_common_lower_, right_common_upper_;
+ if(!Set::common_range(right_common_lower_, right_common_upper_, right, left))
+ return false;
+
+ typename RightT::const_iterator it_ = right_common_lower_;
+ while(it_ != right_common_upper_)
+ {
+ icl::add_intersection(intersection, left, key_value<RightT>(it_++));
+ if(!icl::is_empty(intersection))
+ return true;
+ }
+
+ return false;
+}
+
+template<class Type, class AssociateT>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , is_inter_derivative<Type, AssociateT> >,
+ bool>::type
+intersects(const Type& left, const AssociateT& right)
+{
+ return icl::intersects(left, right);
+}
+
+/** \b Returns true, if \c left and \c right have no common elements.
+ Intervals are interpreted as sequence of elements.
+ \b Complexity: loglinear, if \c left and \c right are interval containers. */
+template<class LeftT, class RightT>
+typename enable_if<is_inter_combinable<LeftT, RightT>, bool>::type
+disjoint(const LeftT& left, const RightT& right)
+{
+ return !intersects(left, right);
+}
+
+/** \b Returns true, if \c left and \c right have no common elements.
+ Intervals are interpreted as sequence of elements.
+ \b Complexity: logarithmic, if \c AssociateT is an element type \c Type::element_type.
+ linear, if \c AssociateT is a segment type \c Type::segment_type. */
+template<class Type, class AssociateT>
+typename enable_if<is_inter_derivative<Type, AssociateT>, bool>::type
+disjoint(const Type& left, const AssociateT& right)
+{
+ return !intersects(left,right);
+}
+
+//==============================================================================
+//= Symmetric difference<IntervalSet|IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- Symmetric difference ^=, ^
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+//- T& op ^=(T&, c P&) T:{S}|{M} P:{S'}|{M'}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_intra_combinable<Type, OperandT>, Type>::type&
+operator ^= (Type& object, const OperandT& operand)
+{
+ return icl::flip(object, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& op ^=(T&, c P&) T:{S}|{M} P:{e i}|{b p}
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_intra_derivative<Type, OperandT>, Type>::type&
+operator ^= (Type& object, const OperandT& operand)
+{
+ return icl::flip(object, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T op ^ (T, c P&) T:{S}|{M} P:{e i S'}|{b p M'} S<S' M<M' <:coarser
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator ^ (Type object, const OperandT& operand)
+{
+ return object ^= operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op ^ (c P&, T) T:{S}|{M} P:{e i S'}|{b p M'} S<S' M<M' <:coarser
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<is_binary_intra_combinable<Type, OperandT>, Type>::type
+operator ^ (const OperandT& operand, Type object)
+{
+ return object ^= operand;
+}
+
+//------------------------------------------------------------------------------
+//- T op ^ (T, c T&) T:{S M}
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type
+operator ^ (typename Type::overloadable_type object, const Type& operand)
+{
+ return object ^= operand;
+}
+
+//==========================================================================
+//= Element Iteration <IntervalSet|IntervalMap>
+//==========================================================================
+//--------------------------------------------------------------------------
+//- Forward
+//--------------------------------------------------------------------------
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_iterator>::type
+elements_begin(Type& object)
+{
+ return typename Type::element_iterator(object.begin());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_iterator>::type
+elements_end(Type& object)
+{
+ return typename Type::element_iterator(object.end());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_const_iterator>::type
+elements_begin(const Type& object)
+{
+ return typename Type::element_const_iterator(object.begin());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_const_iterator>::type
+elements_end(const Type& object)
+{
+ return typename Type::element_const_iterator(object.end());
+}
+
+//--------------------------------------------------------------------------
+//- Reverse
+//--------------------------------------------------------------------------
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_reverse_iterator>::type
+elements_rbegin(Type& object)
+{
+ return typename Type::element_reverse_iterator(object.rbegin());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_reverse_iterator>::type
+elements_rend(Type& object)
+{
+ return typename Type::element_reverse_iterator(object.rend());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_const_reverse_iterator>::type
+elements_rbegin(const Type& object)
+{
+ return typename Type::element_const_reverse_iterator(object.rbegin());
+}
+
+template<class Type>
+typename enable_if
+<mpl::and_< is_interval_container<Type>
+ , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
+typename Type::element_const_reverse_iterator>::type
+elements_rend(const Type& object)
+{
+ return typename Type::element_const_reverse_iterator(object.rend());
+}
+
+//==============================================================================
+//= Morphisms
+//==============================================================================
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type&
+join(Type& object)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ iterator it_ = object.begin();
+ if(it_ == object.end())
+ return object;
+
+ iterator next_ = it_; next_++;
+
+ while(next_ != object.end())
+ {
+ if( segmental::is_joinable<Type>(it_, next_) )
+ {
+ iterator fst_mem = it_; // hold the first member
+
+ // Go on while touching members are found
+ it_++; next_++;
+ while( next_ != object.end()
+ && segmental::is_joinable<Type>(it_, next_) )
+ { it_++; next_++; }
+
+ // finally we arrive at the end of a sequence of joinable intervals
+ // and it points to the last member of that sequence
+ const_cast<interval_type&>(key_value<Type>(it_))
+ = hull(key_value<Type>(it_), key_value<Type>(fst_mem));
+ object.erase(fst_mem, it_);
+
+ it_++; next_=it_;
+ if(next_!=object.end())
+ next_++;
+ }
+ else { it_++; next_++; }
+ }
+ return object;
+}
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/interval_bounds.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval_bounds.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,163 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_BOUNDS_HPP_JOFA_100927
+#define BOOST_ICL_CONCEPT_INTERVAL_BOUNDS_HPP_JOFA_100927
+
+#include <boost/icl/interval_bounds.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+#include <boost/icl/type_traits/is_numeric.hpp>
+
+namespace boost{namespace icl
+{
+
+inline interval_bounds left(interval_bounds x1)
+{ return interval_bounds(x1._bits & interval_bounds::_left); }
+
+inline interval_bounds right(interval_bounds x1)
+{ return interval_bounds(x1._bits & interval_bounds::_right); }
+
+inline interval_bounds all(interval_bounds x1)
+{ return interval_bounds(x1._bits & interval_bounds::_all); }
+
+inline bool operator == (const interval_bounds x1, const interval_bounds x2)
+{ return x1._bits == x2._bits; }
+
+inline bool operator != (const interval_bounds x1, const interval_bounds x2)
+{ return x1._bits != x2._bits; }
+
+inline interval_bounds operator & (interval_bounds x1, interval_bounds x2)
+{ return interval_bounds(x1._bits & x2._bits); }
+
+inline interval_bounds operator | (interval_bounds x1, interval_bounds x2)
+{ return interval_bounds(x1._bits | x2._bits); }
+
+// left shift (multiplies by 2^shift)
+inline interval_bounds operator << (interval_bounds bounds, unsigned int shift)
+{ return interval_bounds(bounds._bits << shift); }
+
+// right shift (divides by 2^shift)
+inline interval_bounds operator >> (interval_bounds bounds, unsigned int shift)
+{ return interval_bounds(bounds._bits >> shift); }
+
+inline interval_bounds operator ~ (interval_bounds x1)
+{ return all(interval_bounds(~(x1._bits))); }
+
+inline interval_bounds outer_bounds(interval_bounds x1, interval_bounds x2)
+{ return left(x1) | right(x2); }
+
+inline interval_bounds inner_bounds(interval_bounds x1, interval_bounds x2)
+{ return interval_bounds(x1.reverse_right() | x2.reverse_left()); }
+
+inline interval_bounds left_bounds(interval_bounds x1, interval_bounds x2)
+{ return left(x1) | (left(x2) >> 1); }
+
+inline interval_bounds right_bounds(interval_bounds x1, interval_bounds x2)
+{ return (right(x1) <<1 ) | right(x2); }
+
+inline interval_bounds left_subtract_bounds(interval_bounds x1, interval_bounds x2)
+{ return right(x1) | ~(right(x2) << 1); }
+
+inline interval_bounds right_subtract_bounds(interval_bounds x1, interval_bounds x2)
+{ return left(x1) | ~(left(x2) >> 1); }
+
+inline bool is_complementary(interval_bounds x1)
+{ return x1 == interval_bounds::right_open() || x1 == interval_bounds::left_open(); }
+
+inline bool is_left_closed(interval_bounds bounds)
+{ return bounds.left().bits()==2; }
+
+inline bool is_right_closed(interval_bounds bounds)
+{ return bounds.right().bits()==1; }
+
+inline std::string left_bracket(interval_bounds bounds)
+{ return is_left_closed(bounds) ? "[" : "("; }
+
+inline std::string right_bracket(interval_bounds bounds)
+{ return is_right_closed(bounds) ? "]" : ")"; }
+
+template <class Type>
+inline typename enable_if<is_discrete<Type>, Type>::type
+shift_lower(interval_bounds decl, interval_bounds repr, const Type& low)
+{
+ if(is_left_closed(decl) && !is_left_closed(repr))
+ {
+ BOOST_ASSERT((numeric_minimum<Type, is_numeric<Type>::value >::is_less_than(low) ));
+ return icl::pred(low);
+ }
+ else if(!is_left_closed(decl) && is_left_closed(repr))
+ return icl::succ(low);
+ else
+ return low;
+}
+
+template <class Type>
+inline typename enable_if<is_discrete<Type>, Type>::type
+shift_upper(interval_bounds decl, interval_bounds repr, const Type& up)
+{
+ if(!is_right_closed(decl) && is_right_closed(repr))
+ {
+ BOOST_ASSERT((numeric_minimum<Type, is_numeric<Type>::value >::is_less_than(up) ));
+ return icl::pred(up);
+ }
+ else if(is_right_closed(decl) && !is_right_closed(repr))
+ return icl::succ(up);
+ else
+ return up;
+}
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits> &stream,
+ interval_bounds const& object)
+{
+ return stream << left_bracket(object) << right_bracket(object);
+}
+
+
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+outer_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return outer_bounds(x1.bounds(), x2.bounds()); }
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+inner_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return inner_bounds(x1.bounds(), x2.bounds()); }
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+left_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return left_bounds(x1.bounds(), x2.bounds()); }
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+right_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return right_bounds(x1.bounds(), x2.bounds()); }
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+left_subtract_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return left_subtract_bounds(x1.bounds(), x2.bounds()); }
+
+template<class IntervalT>
+inline typename
+boost::enable_if<has_dynamic_bounds<IntervalT>, interval_bounds>::type
+right_subtract_bounds(const IntervalT& x1, const IntervalT& x2)
+{ return right_subtract_bounds(x1.bounds(), x2.bounds()); }
+
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/concept/interval_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,670 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_MAP_HPP_JOFA_100920
+#define BOOST_ICL_CONCEPT_INTERVAL_MAP_HPP_JOFA_100920
+
+#include <boost/icl/type_traits/element_type_of.hpp>
+#include <boost/icl/type_traits/segment_type_of.hpp>
+#include <boost/icl/type_traits/absorbs_identities.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/type_traits/is_interval_splitter.hpp>
+
+#include <boost/icl/detail/set_algo.hpp>
+#include <boost/icl/detail/interval_map_algo.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type&
+join(Type&);
+
+
+//==============================================================================
+//= Containedness<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{M} P:{b p M} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, bool>::type
+contains(const Type& super, const typename Type::element_type& key_value_pair)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator it_ = super.find(key_value_pair.key);
+ return it_ != super.end() && it_->second == key_value_pair.data;
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, bool>::type
+contains(const Type& super, const typename Type::segment_type& sub_segment)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::const_iterator const_iterator;
+
+ interval_type sub_interval = sub_segment.first;
+ if(icl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ if(!(sub_segment.second == exterior.first->second) )
+ return false;
+
+ return
+ icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Map::is_joinable(super, exterior.first, last_overlap);
+}
+
+template<class Type, class CoType>
+typename enable_if<is_concept_compatible<is_interval_map, Type, CoType>, bool>::type
+contains(const Type& super, const CoType& sub)
+{
+ return Interval_Set::within(sub, super);
+}
+
+
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{M} P:{e i S} key_types : total
+//------------------------------------------------------------------------------
+template<class Type, class CoType>
+typename enable_if< mpl::and_< is_interval_map<Type>
+ , is_total<Type>
+ , is_cross_derivative<Type, CoType> >
+ , bool>::type
+contains(const Type& super, const CoType& sub)
+{
+ return true;
+}
+
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{M} P:{e i S} key_types : partial
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if< mpl::and_< is_interval_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+contains(const Type& super, const typename Type::domain_type& key)
+{
+ return super.find(key) != super.end();
+}
+
+template<class Type>
+typename enable_if< mpl::and_< is_interval_map<Type>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+contains(const Type& super, const typename Type::interval_type& sub_interval)
+{
+ typedef typename Type::const_iterator const_iterator;
+
+ if(icl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ return
+ icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Set::is_joinable(super, exterior.first, last_overlap);
+}
+
+template<class Type, class KeyT>
+typename enable_if< mpl::and_< is_concept_combinable<is_interval_map, is_interval_set, Type, KeyT>
+ , mpl::not_<is_total<Type> > >
+ , bool>::type
+contains(const Type& super, const KeyT& sub)
+{
+ return Interval_Set::within(sub, super);
+}
+
+//==============================================================================
+//= Addition<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& add(T&, c P&) T:{M} P:{b p} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+add(Type& object, const typename Type::segment_type& operand)
+{
+ return object.add(operand);
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+add(Type& object, const typename Type::element_type& operand)
+{
+ return icl::add(object, make_segment<Type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& add(T&, J, c P&) T:{M} P:{p} segment_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, typename Type::iterator >::type
+add(Type& object, typename Type::iterator prior_,
+ const typename Type::segment_type& operand)
+{
+ return object.add(prior_, operand);
+}
+
+//==============================================================================
+//= Insertion<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& insert(T&, c P&) T:{M} P:{b p} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+insert(Type& object, const typename Type::segment_type& operand)
+{
+ return object.insert(operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_map<Type>, Type>::type&
+insert(Type& object, const typename Type::element_type& operand)
+{
+ return icl::insert(object, make_segment<Type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& insert(T&, J, c P&) T:{M} P:{p} with hint
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, typename Type::iterator>::type
+insert(Type& object, typename Type::iterator prior,
+ const typename Type::segment_type& operand)
+{
+ return object.insert(prior, operand);
+}
+
+
+//==============================================================================
+//= Erasure<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& erase(T&, c P&) T:{M} P:{e i} key_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+erase(Type& object, const typename Type::interval_type& operand)
+{
+ return object.erase(operand);
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+erase(Type& object, const typename Type::domain_type& operand)
+{
+ typedef typename Type::interval_type interval_type;
+ return icl::erase(object, icl::singleton<interval_type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& erase(T&, c P&) T:{M} P:{b p} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+erase(Type& object, const typename Type::segment_type& operand)
+{
+ return object.erase(operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_map<Type>, Type>::type&
+erase(Type& object, const typename Type::element_type& operand)
+{
+ return icl::erase(object, make_segment<Type>(operand));
+}
+
+//==============================================================================
+//= Subtraction<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{b p} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::segment_type& operand)
+{
+ return object.subtract(operand);
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::element_type& operand)
+{
+ return icl::subtract(object, make_segment<Type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{e i} key_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::domain_type& operand)
+{
+ return object.erase(operand);
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+subtract(Type& object, const typename Type::interval_type& operand)
+{
+ return object.erase(operand);
+}
+
+//==============================================================================
+//= Selective Update<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& set_at(T&, c P&) T:{M} P:{e i}
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+set_at(Type& object, const typename Type::segment_type& operand)
+{
+ icl::erase(object, operand.first);
+ return icl::insert(object, operand);
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+set_at(Type& object, const typename Type::element_type& operand)
+{
+ return icl::set_at(object, make_segment<Type>(operand));
+}
+
+//==============================================================================
+//= Intersection<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{b p} fragment_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::element_type& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ object.add_intersection(section, make_segment<Type>(operand));
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::segment_type& operand)
+{
+ object.add_intersection(section, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{M'} map fragment_type total
+//------------------------------------------------------------------------------
+template<class Type, class MapT>
+typename enable_if
+<
+ mpl::and_< is_total<Type>
+ , is_concept_compatible<is_interval_map, Type, MapT> >
+ , void
+>::type
+add_intersection(Type& section, const Type& object, const MapT& operand)
+{
+ section += object;
+ section += operand;
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{M'} map fragment_type partial
+//------------------------------------------------------------------------------
+template<class Type, class MapT>
+typename enable_if
+<
+ mpl::and_< mpl::not_<is_total<Type> >
+ , is_concept_compatible<is_interval_map, Type, MapT> >
+ , void
+>::type
+add_intersection(Type& section, const Type& object, const MapT& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename MapT::const_iterator const_iterator;
+
+ if(operand.empty())
+ return;
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return;
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ add_intersection(section, object, *it_++);
+}
+
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{M} P:{e i S} key_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::domain_type& key_value)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::const_iterator const_iterator;
+
+ const_iterator it_ = object.find(key_value);
+ if(it_ != object.end())
+ add(section, segment_type(interval_type(key_value),it_->second));
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::interval_type& inter_val)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::iterator iterator;
+
+ if(icl::is_empty(inter_val))
+ return;
+
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return;
+
+ iterator prior_ = section.end();
+ for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
+ {
+ interval_type common_interval = it_->first & inter_val;
+ if(!icl::is_empty(common_interval))
+ prior_ = add(section, prior_,
+ value_type(common_interval, it_->second) );
+ }
+}
+
+template<class Type, class KeySetT>
+typename enable_if<is_concept_combinable<is_interval_map, is_interval_set, Type, KeySetT>, void>::type
+add_intersection(Type& section, const Type& object, const KeySetT& key_set)
+{
+ typedef typename KeySetT::const_iterator const_iterator;
+
+ if(icl::is_empty(key_set))
+ return;
+
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, key_set, object))
+ return;
+
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ add_intersection(section, object, *it_++);
+}
+
+//------------------------------------------------------------------------------
+//- intersects<IntervalMaps> fragment_types
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , is_total<Type>
+ , is_same<OperandT, segment_type_of<Type> > >,
+ bool>::type
+intersects(const Type&, const OperandT&)
+{
+ return true;
+}
+
+template<class Type, class OperandT>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , mpl::not_<is_total<Type> >
+ , is_same<OperandT, segment_type_of<Type> > >,
+ bool>::type
+intersects(const Type& object, const OperandT& operand)
+{
+ Type intersection;
+ icl::add_intersection(intersection, left, operand);
+ return !icl::is_empty(intersection);
+}
+
+template<class Type, class OperandT>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , is_same<OperandT, element_type_of<Type> > >,
+ bool>::type
+intersects(const Type& object, const OperandT& operand)
+{
+ return icl::intersects(object, make_segment<Type>(operand));
+}
+
+//==============================================================================
+//= Symmetric difference<IntervalMap>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& flip(T&, c P&) T:{M} P:{b p} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_map<Type>, Type>::type&
+flip(Type& object, const typename Type::segment_type& operand)
+{
+ return object.flip(operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_map<Type>, Type>::type&
+flip(Type& object, const typename Type::element_type& operand)
+{
+ return icl::flip(object, make_segment<Type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& flip(T&, c P&) T:{M} P:{M'} total absorber
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if< mpl::and_< is_total<Type>
+ , absorbs_identities<Type>
+ , is_concept_compatible<is_interval_map,
+ Type, OperandT >
+ >
+ , Type>::type&
+flip(Type& object, const OperandT&)
+{
+ object.clear();
+ return object;
+}
+
+//------------------------------------------------------------------------------
+//- T& flip(T&, c P&) T:{M} P:{M'} total enricher
+//------------------------------------------------------------------------------
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+template<class Type, class OperandT>
+typename enable_if< mpl::and_< is_total<Type>
+ , mpl::not_<absorbs_identities<Type> >
+ , is_concept_compatible<is_interval_map,
+ Type, OperandT >
+ >
+ , Type>::type&
+flip(Type& object, const OperandT& operand)
+{
+ typedef typename Type::codomain_type codomain_type;
+
+ object += operand;
+ ICL_FORALL(typename Type, it_, object)
+ it_->second = identity_element<codomain_type>::value();
+
+ if(mpl::not_<is_interval_splitter<Type> >::value)
+ icl::join(object);
+
+ return object;
+}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+//------------------------------------------------------------------------------
+//- T& flip(T&, c P&) T:{M} P:{M'} partial
+//------------------------------------------------------------------------------
+template<class Type, class OperandT>
+typename enable_if< mpl::and_< mpl::not_<is_total<Type> >
+ , is_concept_compatible<is_interval_map,
+ Type, OperandT >
+ >
+ , Type>::type&
+flip(Type& object, const OperandT& operand)
+{
+ typedef typename OperandT::const_iterator const_iterator;
+ typedef typename Type::codomain_type codomain_type;
+
+ const_iterator common_lwb, common_upb;
+
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return object += operand;
+
+ const_iterator it_ = operand.begin();
+
+ // All elements of operand left of the common range are added
+ while(it_ != common_lwb)
+ icl::add(object, *it_++);
+ // All elements of operand in the common range are symmetrically subtracted
+ while(it_ != common_upb)
+ icl::flip(object, *it_++);
+ // All elements of operand right of the common range are added
+ while(it_ != operand.end())
+ icl::add(object, *it_++);
+
+ return object;
+}
+
+//==============================================================================
+//= Set selection
+//==============================================================================
+template<class Type, class SetT>
+typename enable_if<is_concept_combinable<is_interval_set, is_interval_map,
+ SetT, Type>, SetT>::type&
+domain(SetT& result, const Type& object)
+{
+ typedef typename SetT::iterator set_iterator;
+ result.clear();
+ set_iterator prior_ = result.end();
+ ICL_const_FORALL(typename Type, it_, object)
+ prior_ = icl::insert(result, prior_, it_->first);
+
+ return result;
+}
+
+template<class Type, class SetT>
+typename enable_if<is_concept_combinable<is_interval_set, is_interval_map,
+ SetT, Type>, SetT>::type&
+between(SetT& in_between, const Type& object)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename SetT::iterator set_iterator;
+ in_between.clear();
+ const_iterator it_ = object.begin(), pred_;
+ set_iterator prior_ = in_between.end();
+
+ if(it_ != object.end())
+ pred_ = it_++;
+
+ while(it_ != object.end())
+ prior_ = icl::insert(in_between, prior_,
+ between((*pred_++).first, (*it_++).first));
+
+ return in_between;
+}
+
+//==============================================================================
+//= Manipulation by predicates
+//==============================================================================
+template<class MapT, class Predicate>
+typename enable_if<is_interval_map<MapT>, MapT>::type&
+erase_if(const Predicate& pred, MapT& object)
+{
+ typename MapT::iterator it_ = object.begin();
+ while(it_ != object.end())
+ if(pred(*it_))
+ object.erase(it_++);
+ else ++it_;
+ return object;
+}
+
+template<class MapT, class Predicate>
+inline typename enable_if<is_interval_map<MapT>, MapT>::type&
+add_if(const Predicate& pred, MapT& object, const MapT& src)
+{
+ typename MapT::const_iterator it_ = src.begin();
+ while(it_ != src.end())
+ if(pred(*it_))
+ icl::add(object, *it_++);
+
+ return object;
+}
+
+template<class MapT, class Predicate>
+inline typename enable_if<is_interval_map<MapT>, MapT>::type&
+assign_if(const Predicate& pred, MapT& object, const MapT& src)
+{
+ icl::clear(object);
+ return add_if(object, src, pred);
+}
+
+
+//==============================================================================
+//= Morphisms
+//==============================================================================
+template<class Type>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , absorbs_identities<Type> >, Type>::type&
+absorb_identities(Type& object)
+{
+ return object;
+}
+
+template<class Type>
+typename enable_if<mpl::and_< is_interval_map<Type>
+ , mpl::not_<absorbs_identities<Type> > >, Type>::type&
+absorb_identities(Type& object)
+{
+ typedef typename Type::segment_type segment_type;
+ return icl::erase_if(content_is_identity_element<segment_type>(), object);
+}
+
+//==============================================================================
+//= Streaming
+//==============================================================================
+template<class CharType, class CharTraits, class Type>
+typename enable_if<is_interval_map<Type>,
+ std::basic_ostream<CharType, CharTraits> >::type&
+operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object)
+{
+ stream << "{";
+ ICL_const_FORALL(typename Type, it_, object)
+ stream << "(" << it_->first << "->" << it_->second << ")";
+
+ return stream << "}";
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/interval_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,353 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_SET_HPP_JOFA_100920
+#define BOOST_ICL_CONCEPT_INTERVAL_SET_HPP_JOFA_100920
+
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+#include <boost/icl/detail/interval_set_algo.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Containedness<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- bool contains(c T&, c P&) T:{S} P:{e i S} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, bool>::type
+contains(const Type& super, const typename Type::element_type& element)
+{
+ return !(super.find(element) == super.end());
+}
+
+template<class Type>
+typename enable_if<is_interval_set<Type>, bool>::type
+contains(const Type& super, const typename Type::segment_type& inter_val)
+{
+ typedef typename Type::const_iterator const_iterator;
+ if(icl::is_empty(inter_val))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior
+ = super.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = cyclic_prior(super, exterior.second);
+
+ return
+ icl::contains(hull(*(exterior.first), *last_overlap), inter_val)
+ && Interval_Set::is_joinable(super, exterior.first, last_overlap);
+}
+
+template<class Type, class OperandT>
+typename enable_if<has_same_concept<is_interval_set, Type, OperandT>,
+ bool>::type
+contains(const Type& super, const OperandT& sub)
+{
+ return Interval_Set::contains(super, sub);
+}
+
+//==============================================================================
+//= Addition<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& add(T&, c P&) T:{S} P:{e i} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+add(Type& object, const typename Type::segment_type& operand)
+{
+ return object.add(operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, Type>::type&
+add(Type& object, const typename Type::element_type& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ return icl::add(object, icl::singleton<segment_type>(operand));
+}
+
+//------------------------------------------------------------------------------
+//- T& add(T&, J, c P&) T:{S} P:{i} interval_type
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, typename Type::iterator>::type
+add(Type& object, typename Type::iterator prior,
+ const typename Type::segment_type& operand)
+{
+ return object.add(prior, operand);
+}
+
+//==============================================================================
+//= Insertion<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& insert(T&, c P&) T:{S} P:{e i} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, Type>::type&
+insert(Type& object, const typename Type::segment_type& operand)
+{
+ return icl::add(object, operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, Type>::type&
+insert(Type& object, const typename Type::element_type& operand)
+{
+ return icl::add(object, operand);
+}
+
+//------------------------------------------------------------------------------
+//- T& insert(T&, J, c P&) T:{S} P:{i} with hint
+//------------------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, typename Type::iterator>::type
+insert(Type& object, typename Type::iterator prior,
+ const typename Type::segment_type& operand)
+{
+ return icl::add(object, prior, operand);
+}
+
+//==============================================================================
+//= Subtraction<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& subtract(T&, c P&) T:{S} P:{e i} fragment_type
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+subtract(Type& object, const typename Type::segment_type& operand)
+{
+ return object.subtract(operand);
+}
+
+template<class Type>
+inline typename enable_if<is_interval_set<Type>, Type>::type&
+subtract(Type& object, const typename Type::element_type& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ return icl::subtract(object, icl::singleton<segment_type>(operand));
+}
+
+//==============================================================================
+//= Erasure<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& erase(T&, c P&) T:{S} P:{e i} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+erase(Type& object, const typename Type::segment_type& minuend)
+{
+ return icl::subtract(object, minuend);
+}
+
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+erase(Type& object, const typename Type::element_type& minuend)
+{
+ return icl::subtract(object, minuend);
+}
+
+//==============================================================================
+//= Intersection
+//==============================================================================
+//------------------------------------------------------------------------------
+//- void add_intersection(T&, c T&, c P&) T:{S} P:{e i} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::element_type& operand)
+{
+ typedef typename Type::const_iterator const_iterator;
+ const_iterator found = object.find(operand);
+ if(found != object.end())
+ icl::add(section, operand);
+}
+
+
+template<class Type>
+typename enable_if<is_interval_set<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::segment_type& segment)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::iterator iterator;
+ typedef typename Type::interval_type interval_type;
+
+ if(icl::is_empty(segment))
+ return;
+
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(segment);
+ if(exterior.first == exterior.second)
+ return;
+
+ iterator prior_ = section.end();
+ for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
+ {
+ interval_type common_interval = key_value<Type>(it_) & segment;
+ if(!icl::is_empty(common_interval))
+ prior_ = section.insert(prior_, common_interval);
+ }
+}
+
+//==============================================================================
+//= Symmetric difference<IntervalSet>
+//==============================================================================
+//------------------------------------------------------------------------------
+//- T& flip(T&, c P&) T:{S} P:{e i S'} fragment_types
+//------------------------------------------------------------------------------
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+flip(Type& object, const typename Type::element_type& operand)
+{
+ if(icl::contains(object, operand))
+ return object -= operand;
+ else
+ return object += operand;
+}
+
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+flip(Type& object, const typename Type::segment_type& segment)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::interval_type interval_type;
+ // That which is common shall be subtracted
+ // That which is not shall be added
+ // So x has to be 'complementary added' or flipped
+ interval_type span = segment;
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(span);
+
+ const_iterator fst_ = exterior.first;
+ const_iterator end_ = exterior.second;
+
+ interval_type covered, left_over;
+ const_iterator it_ = fst_;
+ while(it_ != end_)
+ {
+ covered = *it_++;
+ //[a ... : span
+ // [b ... : covered
+ //[a b) : left_over
+ left_over = right_subtract(span, covered);
+ icl::subtract(object, span & covered); //That which is common shall be subtracted
+ icl::add(object, left_over); //That which is not shall be added
+
+ //... d) : span
+ //... c) : covered
+ // [c d) : span'
+ span = left_subtract(span, covered);
+ }
+
+ //If span is not empty here, it_ is not in the set so it_ shall be added
+ icl::add(object, span);
+ return object;
+}
+
+
+template<class Type, class OperandT>
+typename enable_if<is_concept_compatible<is_interval_set, Type, OperandT>, Type>::type&
+flip(Type& object, const OperandT& operand)
+{
+ typedef typename OperandT::const_iterator const_iterator;
+
+ if(operand.empty())
+ return object;
+
+ const_iterator common_lwb, common_upb;
+
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return object += operand;
+
+ const_iterator it_ = operand.begin();
+
+ // All elements of operand left of the common range are added
+ while(it_ != common_lwb)
+ icl::add(object, *it_++);
+ // All elements of operand in the common range are symmertrically subtracted
+ while(it_ != common_upb)
+ icl::flip(object, *it_++);
+ // All elements of operand right of the common range are added
+ while(it_ != operand.end())
+ icl::add(object, *it_++);
+
+ return object;
+}
+
+//==============================================================================
+//= Set selection
+//==============================================================================
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+domain(Type& dom, const Type& object)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::iterator iterator;
+ dom.clear();
+ const_iterator it_ = object.begin();
+ iterator prior_ = dom.end();
+
+ while(it_ != object.end())
+ prior_ = icl::insert(dom, prior_, *it_++);
+
+ return dom;
+}
+
+template<class Type>
+typename enable_if<is_interval_set<Type>, Type>::type&
+between(Type& in_between, const Type& object)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::iterator iterator;
+ in_between.clear();
+ const_iterator it_ = object.begin(), pred_;
+ iterator prior_ = in_between.end();
+
+ if(it_ != object.end())
+ pred_ = it_++;
+
+ while(it_ != object.end())
+ prior_ = icl::insert(in_between, prior_,
+ icl::between(*pred_++, *it_++));
+
+ return in_between;
+}
+
+
+//==============================================================================
+//= Streaming
+//==============================================================================
+template<class CharType, class CharTraits, class Type>
+typename enable_if<is_interval_set<Type>,
+ std::basic_ostream<CharType, CharTraits> >::type&
+operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object)
+{
+ stream << "{";
+ ICL_const_FORALL(typename Type, it_, object)
+ stream << (*it_);
+
+ return stream << "}";
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/interval_set_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/interval_set_value.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924
+#define BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/icl/type_traits/is_interval_container.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= AlgoUnifiers<Set>
+//==============================================================================
+template<class Type, class Iterator>
+inline typename enable_if<is_interval_set<Type>, typename Type::codomain_type>::type
+co_value(Iterator value_)
+{
+ typedef typename Type::codomain_type codomain_type;
+ return icl::is_empty(*value_)? codomain_type() : (*value_).lower();
+}
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/joinable.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/joinable.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,50 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920
+#define BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920
+
+#include <boost/icl/type_traits/is_interval_container.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template<class Type>
+inline typename enable_if<is_interval_map<Type>, typename Type::segment_type>::type
+make_segment(const typename Type::element_type& element)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::segment_type segment_type;
+ return segment_type(icl::singleton<interval_type>(element.key), element.data);
+}
+
+namespace segmental
+{
+ template<class Type>
+ typename enable_if<is_interval_set<Type>, bool>::type
+ is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
+ {
+ return touches(*it_, *next_);
+ }
+
+ template<class Type>
+ typename enable_if<is_interval_map<Type>, bool>::type
+ is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
+ {
+ return touches(it_->first, next_->first)
+ && it_->second == next_->second ;
+ }
+}
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/map_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/map_value.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,46 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_MAP_VALUE_HPP_JOFA_100924
+#define BOOST_ICL_CONCEPT_MAP_VALUE_HPP_JOFA_100924
+
+#include <boost/icl/type_traits/is_map.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= AlgoUnifiers<Map>
+//==============================================================================
+template<class Type, class Iterator>
+inline typename enable_if<is_map<Type>, const typename Type::key_type>::type&
+key_value(Iterator it_)
+{
+ return it_->first;
+}
+
+template<class Type, class Iterator>
+inline typename enable_if<is_map<Type>, const typename Type::codomain_type>::type&
+co_value(Iterator it_)
+{
+ return it_->second;
+}
+
+template<class Type>
+inline typename enable_if<is_map<Type>, typename Type::value_type>::type
+make_value(const typename Type:: key_type& key_val,
+ const typename Type::codomain_type& co_val)
+{
+ return typename Type::value_type(key_val, co_val);
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/concept/set_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/concept/set_value.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,40 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924
+#define BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924
+
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/type_traits/codomain_type_of.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= AlgoUnifiers<Set>
+//==============================================================================
+template<class Type, class Iterator>
+inline typename enable_if<is_set<Type>, const typename Type::key_type>::type&
+key_value(Iterator it_)
+{
+ return *it_;
+}
+
+template<class Type>
+inline typename enable_if<is_set<Type>, typename Type::value_type>::type
+make_value(const typename Type::key_type& key_val,
+ const typename codomain_type_of<Type>::type& )
+{
+ return typename Type::value_type(key_val);
+}
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/continuous_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/continuous_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,171 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_CONTINUOUS_INTERVAL_HPP_JOFA_100327
+#define BOOST_ICL_CONTINUOUS_INTERVAL_HPP_JOFA_100327
+
+#include <functional>
+#include <boost/static_assert.hpp>
+#include <boost/concept/assert.hpp>
+#include <boost/icl/detail/concept_check.hpp>
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/concept/container.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/is_continuous_interval.hpp>
+#include <boost/icl/interval_bounds.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class continuous_interval
+{
+public:
+ typedef continuous_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+ typedef typename bounded_value<DomainT>::type bounded_domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>[0,0)</tt>. */
+ continuous_interval()
+ : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ , _bounds(interval_bounds::right_open())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_continuous<DomainT>::value));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for a closed singleton interval <tt>[val,val]</tt> */
+ explicit continuous_interval(const DomainT& val)
+ : _lwb(val), _upb(val), _bounds(interval_bounds::closed())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_continuous<DomainT>::value));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ continuous_interval(const DomainT& low, const DomainT& up,
+ interval_bounds bounds = interval_bounds::right_open(),
+ continuous_interval* = 0)
+ : _lwb(low), _upb(up), _bounds(bounds)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_continuous<DomainT>::value));
+ }
+
+ domain_type lower()const { return _lwb; }
+ domain_type upper()const { return _upb; }
+ interval_bounds bounds()const{ return _bounds; }
+
+ static continuous_interval open (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::open()); }
+ static continuous_interval right_open(const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::right_open());}
+ static continuous_interval left_open (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::left_open()); }
+ static continuous_interval closed (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::closed()); }
+
+private:
+ domain_type _lwb;
+ domain_type _upb;
+ interval_bounds _bounds;
+};
+
+
+//==============================================================================
+//=T continuous_interval -> concept interval
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::continuous_interval<DomainT, Compare> >
+{
+ typedef interval_traits type;
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::continuous_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+
+//==============================================================================
+//=T continuous_interval -> concept dynamic_interval
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct dynamic_interval_traits<boost::icl::continuous_interval<DomainT,Compare> >
+{
+ typedef dynamic_interval_traits type;
+ typedef boost::icl::continuous_interval<DomainT,Compare> interval_type;
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+
+ static interval_type construct(const domain_type lo, const domain_type up, interval_bounds bounds)
+ {
+ return icl::continuous_interval<DomainT,Compare>(lo, up, bounds,
+ static_cast<icl::continuous_interval<DomainT,Compare>* >(0) );
+ }
+
+ static interval_type construct_bounded(const bounded_value<DomainT>& lo,
+ const bounded_value<DomainT>& up)
+ {
+ return icl::continuous_interval<DomainT,Compare>
+ (
+ lo.value(), up.value(),
+ lo.bound().left() | up.bound().right(),
+ static_cast<icl::continuous_interval<DomainT,Compare>* >(0)
+ );
+ }
+};
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< continuous_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct is_continuous_interval<continuous_interval<DomainT,Compare> >
+{
+ typedef is_continuous_interval<continuous_interval<DomainT,Compare> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::continuous_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "cI<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT>
+struct value_size<icl::continuous_interval<DomainT> >
+{
+ static std::size_t apply(const icl::continuous_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/associated_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/associated_value.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829
+#define BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829
+
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/and.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class Type, class CoType>
+typename enable_if< mpl::and_< is_key_compare_equal<Type,CoType>
+ , mpl::and_<is_map<Type>, is_map<CoType> > >,
+ bool>::type
+co_equal(typename Type::const_iterator left_, typename CoType::const_iterator right_,
+ const Type* = 0, const CoType* = 0)
+{
+ return co_value<Type>(left_) == co_value<CoType>(right_);
+}
+
+template<class Type, class CoType>
+typename enable_if< mpl::and_< is_key_compare_equal<Type,CoType>
+ , mpl::not_<mpl::and_<is_map<Type>, is_map<CoType> > > >,
+ bool>::type
+co_equal(typename Type::const_iterator, typename CoType::const_iterator,
+ const Type* = 0, const CoType* = 0)
+{
+ return true;
+}
+
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/concept_check.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/concept_check.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,31 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_CONCEPT_CHECK_HPP_JOFA_090913
+#define BOOST_ICL_CONCEPT_CHECK_HPP_JOFA_090913
+
+#include <boost/concept_check.hpp>
+#include <boost/concept/detail/concept_def.hpp>
+
+namespace boost{ namespace icl
+{
+
+ BOOST_concept(EqualComparable,(Type))
+ {
+ BOOST_CONCEPT_USAGE(EqualComparable) {
+ require_boolean_expr(_left == _right);
+ }
+ private:
+ Type _left, _right;
+ };
+
+}}// namespace boost icl
+
+
+#endif
+
+

Added: sandbox/icl/boost/icl/detail/design_config.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/design_config.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,107 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-2010: 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)
++-----------------------------------------------------------------------------*/
+/*-----------------------------------------------------------------------------+
+Template parameters of major itl class templates can be designed as
+template template parameters or
+template type parameter
+by setting defines in this file.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
+#define BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
+
+// If this macro is defined, right_open_interval with static interval borders
+// will be used as default for all interval containers.
+// BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS should be defined in the application
+// before other includes from the ITL
+//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// If BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS is NOT defined, ITL uses intervals
+// with dynamic borders as default.
+
+
+//------------------------------------------------------------------------------
+// Auxiliary macros for denoting template signatures.
+// Purpose:
+// (1) Shorten the lenthy and redundant template signatures.
+// (2) Name anonymous template types according to their meaning ...
+// (3) Making easier to refactor by redefinitin of the macros
+// (4) Being able to check template template parameter variants against
+// template type parameter variants.
+
+#define ICL_USE_COMPARE_TEMPLATE_TEMPLATE
+#define ICL_USE_COMBINE_TEMPLATE_TEMPLATE
+#define ICL_USE_SECTION_TEMPLATE_TEMPLATE
+// ICL_USE_INTERVAL_TEMPLATE_TYPE
+
+//------------------------------------------------------------------------------
+// template parameter Compare can not be a template type parameter as long as
+// Compare<Interval<DomainT,Compare> >() is called in std::lexicographical_compare
+// implementing operator< for interval_base_{set,map}. see NOTE DESIGN TTP
+#ifdef ICL_USE_COMPARE_TEMPLATE_TEMPLATE
+# define ICL_COMPARE template<class>class
+# define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare<domain_type>
+# define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance
+# define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than
+#else//ICL_USE_COMPARE_TEMPLATE_TYPE
+# define ICL_COMPARE class
+# define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare
+# define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance<domain_type>
+# define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than<interval_type>
+#endif
+
+//------------------------------------------------------------------------------
+// template parameter Combine could be a template type parameter.
+#ifdef ICL_USE_COMBINE_TEMPLATE_TEMPLATE
+# define ICL_COMBINE template<class>class
+# define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine<codomain_type>
+# define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance
+#else//ICL_USE_COMBINE_TEMPLATE_TYPE
+# define ICL_COMBINE class
+# define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine
+# define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance<codomain_type>
+#endif
+
+//------------------------------------------------------------------------------
+// template parameter Section could be a template type parameter.
+#ifdef ICL_USE_SECTION_TEMPLATE_TEMPLATE
+# define ICL_SECTION template<class>class
+# define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect<codomain_type>
+# define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance
+#else//ICL_USE_SECTION_TEMPLATE_TYPE
+# define ICL_SECTION class
+# define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect
+# define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance<codomain_type>
+#endif
+
+
+//------------------------------------------------------------------------------
+// template parameter Interval could be a template type parameter.
+#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
+# define ICL_INTERVAL(itl_compare) template<class,itl_compare>class
+# define ICL_INTERVAL2(itl_compare) template<class DomT2,itl_compare>class
+# define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval<domain_type,itl_compare>
+# define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) interval_instance
+#else//ICL_USE_INTERVAL_TEMPLATE_TYPE
+# define ICL_INTERVAL(itl_compare) class
+# define ICL_INTERVAL2(itl_compare) class
+# define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval
+# define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) typename interval_instance<domain_type,itl_compare>::type
+#endif
+
+
+//------------------------------------------------------------------------------
+#define ICL_INTERVAL_DEFAULT boost::icl::interval_type_default
+
+//------------------------------------------------------------------------------
+#define ICL_ALLOC template<class>class
+
+//------------------------------------------------------------------------------
+
+#endif // BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
+
+

Added: sandbox/icl/boost/icl/detail/element_comparer.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/element_comparer.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_ELEMENT_COMPARER_HPP_JOFA_090202
+#define BOOST_ICL_ELEMENT_COMPARER_HPP_JOFA_090202
+
+#include <boost/mpl/and.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+
+namespace boost{namespace icl
+{
+
+namespace Interval_Set
+{
+
+template<class LeftT, class RightT>
+class element_comparer
+{
+public:
+ typedef typename LeftT::const_iterator LeftIterT;
+ typedef typename RightT::const_iterator RightIterT;
+
+ BOOST_STATIC_CONSTANT(bool,
+ _compare_codomain = (mpl::and_<is_map<LeftT>, is_map<RightT> >::value));
+
+ element_comparer(const LeftT& left,
+ const RightT& right,
+ const LeftIterT& left_end,
+ const RightIterT& right_end)
+ : _left(left), _right(right),
+ _left_end(left_end), _right_end(right_end), _result(equal)
+ {}
+
+ enum{nextboth, nextleft, nextright, stop};
+
+ enum
+ {
+ less = comparison::less,
+ equal = comparison::equal,
+ greater = comparison::greater
+ };
+
+ int result()const{ return _result; }
+
+ bool covalues_are_equal(LeftIterT& left, RightIterT& right)
+ {
+ if(co_value<LeftT>(left) < co_value<RightT>(right))
+ _result = less;
+ if(co_value<RightT>(right) < co_value<LeftT>(left))
+ _result = greater;
+ return _result == equal;
+ }
+
+ int proceed(LeftIterT& left, RightIterT& right)
+ {
+ if(upper_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ {
+ _prior_left = left;
+ ++left;
+ return nextleft;
+ }
+ else if(upper_less(key_value<RightT>(right), key_value<LeftT>(left)))
+ {
+ _prior_right = right;
+ ++right;
+ return nextright;
+ }
+ else
+ {
+ ++left;
+ ++right;
+ return nextboth;
+ }
+ }
+
+ int next_both(LeftIterT& left, RightIterT& right)
+ {
+ if(left == _left_end)
+ {
+ _result = (right == _right_end) ? equal : less;
+ return stop;
+ }
+
+ // left != _left_end
+ if(right == _right_end)
+ {
+ _result = greater;
+ return stop;
+ }
+
+ // The starting intervals have to begin equally
+ if(lower_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // left: same A... = sameA...
+ // right:same B.. = sameB...
+ _result = less;
+ return stop;
+ }
+
+ if(lower_less(key_value<LeftT>(right), key_value<RightT>(left)))
+ { // left: same B.. = sameB...
+ // right:same A... = sameA...
+ _result = greater;
+ return stop;
+ }
+
+ if(_compare_codomain && !covalues_are_equal(left, right))
+ return stop;
+
+ return proceed(left, right);
+ }
+
+ int next_left(LeftIterT& left, RightIterT& right)
+ {
+ if(left == _left_end)
+ { // left: same
+ // right:sameA...
+ _result = less;
+ return stop;
+ }
+
+ if(!key_value<LeftT>(_prior_left).touches(key_value<LeftT>(left)))
+ { // left: same B = sameB...
+ // right:sameA = sameA...
+ _result = greater;
+ return stop;
+ }
+
+ if(_compare_codomain && !covalues_are_equal(left, right))
+ return stop;
+
+ return proceed(left, right);
+ }
+
+ int next_right(LeftIterT& left, RightIterT& right)
+ {
+ if(right == _right_end)
+ { // left: sameA...
+ // right:same
+ _result = greater;
+ return stop;
+ }
+
+ if(!key_value<RightT>(_prior_right).touches(key_value<RightT>(right)))
+ {
+ // left: sameA... = sameA...
+ // right:same B.. = sameB...
+ _result = less;
+ return stop;
+ }
+
+ if(_compare_codomain && !covalues_are_equal(left, right))
+ return stop;
+
+ return proceed(left, right);
+ }
+
+private:
+ const LeftT& _left;
+ const RightT& _right;
+ LeftIterT _left_end;
+ RightIterT _right_end;
+ LeftIterT _prior_left;
+ RightIterT _prior_right;
+ int _result;
+};
+
+
+
+template<class LeftT, class RightT>
+int element_compare
+(
+ const LeftT& left, //sub
+ const RightT& right, //super
+ typename LeftT::const_iterator left_begin,
+ typename LeftT::const_iterator left_end,
+ typename RightT::const_iterator right_begin,
+ typename RightT::const_iterator right_end
+)
+{
+ typedef element_comparer<LeftT,RightT> Step;
+ Step step(left, right, left_end, right_end);
+
+ typename LeftT::const_iterator left_ = left_begin;
+ typename RightT::const_iterator right_ = right_begin;
+
+ int state = Step::nextboth;
+ while(state != Step::stop)
+ {
+ switch(state){
+ case Step::nextboth: state = step.next_both (left_, right_); break;
+ case Step::nextleft: state = step.next_left (left_, right_); break;
+ case Step::nextright: state = step.next_right(left_, right_); break;
+ }
+ }
+ return step.result();
+}
+
+
+} // namespace Interval_Set
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/element_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/element_iterator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,334 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104
+#define BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104
+
+#include <boost/mpl/if.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/config/warning_disable.hpp>
+#include <boost/icl/detail/mapped_reference.hpp>
+
+namespace boost{namespace icl
+{
+
+//------------------------------------------------------------------------------
+template<class Type>
+struct is_std_pair
+{
+ typedef is_std_pair<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template<class FirstT, class SecondT>
+struct is_std_pair<std::pair<FirstT, SecondT> >
+{
+ typedef is_std_pair<std::pair<FirstT, SecondT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+//------------------------------------------------------------------------------
+template<class Type>
+struct first_element
+{
+ typedef Type type;
+};
+
+template<class FirstT, class SecondT>
+struct first_element<std::pair<FirstT, SecondT> >
+{
+ typedef FirstT type;
+};
+
+//------------------------------------------------------------------------------
+template <class SegmentIteratorT> class element_iterator;
+
+template<class IteratorT>
+struct is_reverse
+{
+ typedef is_reverse type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template<class BaseIteratorT>
+struct is_reverse<std::reverse_iterator<BaseIteratorT> >
+{
+ typedef is_reverse<std::reverse_iterator<BaseIteratorT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<class BaseIteratorT>
+struct is_reverse<icl::element_iterator<BaseIteratorT> >
+{
+ typedef is_reverse<icl::element_iterator<BaseIteratorT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = is_reverse<BaseIteratorT>::value);
+};
+
+//------------------------------------------------------------------------------
+template<class SegmentT>
+struct elemental;
+
+#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
+
+ template<class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct elemental<ICL_INTERVAL_TYPE(Interval,DomainT,Compare) >
+ {
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type;
+ typedef segment_type interval_type;
+ typedef DomainT type;
+ typedef DomainT domain_type;
+ typedef DomainT codomain_type;
+ typedef DomainT transit_type;
+ };
+
+ template< class DomainT, class CodomainT,
+ ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval >
+ struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> >
+ {
+ typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef std::pair<DomainT, CodomainT> type;
+ typedef DomainT domain_type;
+ typedef CodomainT codomain_type;
+ typedef mapped_reference<DomainT, CodomainT> transit_type;
+ };
+
+#else //ICL_USE_INTERVAL_TEMPLATE_TYPE
+
+ template<ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct elemental
+ {
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type;
+ typedef segment_type interval_type;
+ typedef typename interval_traits<interval_type>::domain_type domain_type;
+ typedef domain_type type;
+ typedef domain_type codomain_type;
+ typedef domain_type transit_type;
+ };
+
+ template< class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval >
+ struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> >
+ {
+ typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef typename interval_traits<interval_type>::domain_type domain_type;
+ typedef CodomainT codomain_type;
+ typedef std::pair<domain_type, codomain_type> type;
+ typedef mapped_reference<domain_type, codomain_type> transit_type;
+ };
+
+#endif //ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
+
+
+//------------------------------------------------------------------------------
+//- struct segment_adapter
+//------------------------------------------------------------------------------
+template<class SegmentIteratorT, class SegmentT>
+struct segment_adapter;
+
+#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
+
+template<class SegmentIteratorT, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+struct segment_adapter<SegmentIteratorT, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) >
+{
+ typedef segment_adapter type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type;
+ typedef segment_type interval_type;
+ typedef typename interval_type::difference_type domain_difference_type;
+ typedef DomainT domain_type;
+ typedef DomainT codomain_type;
+ typedef domain_type element_type;
+ typedef domain_type& transit_type;
+
+ static domain_type first (const SegmentIteratorT& leaper){ return leaper->first(); }
+ static domain_type last (const SegmentIteratorT& leaper){ return leaper->last(); }
+ static domain_difference_type length(const SegmentIteratorT& leaper){ return leaper->length();}
+
+ static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper,
+ const domain_difference_type& sneaker)
+ {
+ inter_pos = is_reverse<SegmentIteratorT>::value ? leaper->last() - sneaker
+ : leaper->first() + sneaker;
+ return inter_pos;
+ }
+};
+
+template < class SegmentIteratorT, class DomainT, class CodomainT,
+ ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval >
+struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> >
+{
+ typedef segment_adapter type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef DomainT domain_type;
+ typedef std::pair<DomainT, CodomainT> element_type;
+ typedef CodomainT codomain_type;
+ typedef mapped_reference<DomainT, CodomainT> transit_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ domain_difference_type;
+
+ static domain_type first (const SegmentIteratorT& leaper){ return leaper->first.first(); }
+ static domain_type last (const SegmentIteratorT& leaper){ return leaper->first.last(); }
+ static domain_difference_type length(const SegmentIteratorT& leaper){ return leaper->first.length();}
+
+ static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper,
+ const domain_difference_type& sneaker)
+ {
+ inter_pos = is_reverse<SegmentIteratorT>::value ? leaper->first.last() - sneaker
+ : leaper->first.first() + sneaker;
+ return transit_type(inter_pos, leaper->second);
+ }
+};
+
+#else // ICL_USE_INTERVAL_TEMPLATE_TYPE
+
+template<class SegmentIteratorT, ICL_INTERVAL(ICL_COMPARE) Interval>
+struct segment_adapter
+{
+ typedef segment_adapter type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type;
+ typedef segment_type interval_type;
+ typedef typename interval_traits<interval_type>::domain_type domain_type;
+ typedef domain_type codomain_type;
+ typedef domain_type element_type;
+ typedef domain_type& transit_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ domain_difference_type;
+
+ static domain_type first (const SegmentIteratorT& leaper){ return leaper->first(); }
+ static domain_type last (const SegmentIteratorT& leaper){ return leaper->last(); }
+ static domain_difference_type length(const SegmentIteratorT& leaper){ return icl::length(*leaper);}
+
+ static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper,
+ const domain_difference_type& sneaker)
+ {
+ inter_pos = is_reverse<SegmentIteratorT>::value ? icl::last(*leaper) - sneaker
+ : icl::first(*leaper) + sneaker;
+ return inter_pos;
+ }
+};
+
+template < class SegmentIteratorT, class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval >
+struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> >
+{
+ typedef segment_adapter type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef typename interval_traits<interval_type>::domain_type domain_type;
+ typedef CodomainT codomain_type;
+ typedef std::pair<domain_type, codomain_type> element_type;
+ typedef mapped_reference<domain_type, CodomainT> transit_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ domain_difference_type;
+
+ static domain_type first (const SegmentIteratorT& leaper){ return leaper->first.first(); }
+ static domain_type last (const SegmentIteratorT& leaper){ return leaper->first.last(); }
+ static domain_difference_type length(const SegmentIteratorT& leaper){ return icl::length(leaper->first);}
+
+ static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper,
+ const domain_difference_type& sneaker)
+ {
+ inter_pos = is_reverse<SegmentIteratorT>::value ? icl::last(leaper->first) - sneaker
+ : icl::first(leaper->first) + sneaker;
+ return transit_type(inter_pos, leaper->second);
+ }
+};
+
+#endif // ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
+
+template <class SegmentIteratorT>
+class element_iterator
+ : public boost::iterator_facade<
+ element_iterator<SegmentIteratorT>
+ , typename elemental<typename SegmentIteratorT::value_type>::transit_type
+ , boost::bidirectional_traversal_tag
+ , typename elemental<typename SegmentIteratorT::value_type>::transit_type
+ >
+{
+public:
+ typedef element_iterator type;
+ typedef SegmentIteratorT segment_iterator;
+ typedef typename SegmentIteratorT::value_type segment_type;
+ typedef typename first_element<segment_type>::type interval_type;
+ typedef typename elemental<segment_type>::type element_type;
+ typedef typename elemental<segment_type>::domain_type domain_type;
+ typedef typename elemental<segment_type>::codomain_type codomain_type;
+ typedef typename elemental<segment_type>::transit_type transit_type;
+ typedef transit_type value_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ domain_difference_type;
+
+private:
+ typedef typename segment_adapter<segment_iterator,segment_type>::type adapt;
+
+ struct enabler{};
+
+public:
+ element_iterator()
+ : _saltator(identity_element<segment_iterator>::value())
+ , _reptator(identity_element<domain_difference_type>::value()){}
+
+ explicit element_iterator(segment_iterator jumper)
+ : _saltator(jumper), _reptator(identity_element<domain_difference_type>::value()) {}
+
+ template <class SaltatorT>
+ element_iterator
+ ( element_iterator<SaltatorT> const& other
+ , typename enable_if<boost::is_convertible<SaltatorT*,SegmentIteratorT*>, enabler>::type = enabler())
+ : _saltator(other._saltator), _reptator(other._reptator) {}
+
+private:
+ friend class boost::iterator_core_access;
+ template <class> friend class element_iterator;
+
+ template <class SaltatorT>
+ bool equal(element_iterator<SaltatorT> const& other) const
+ {
+ return this->_saltator == other._saltator
+ && this->_reptator == other._reptator;
+ }
+
+ void increment()
+ {
+ if(_reptator < pred(adapt::length(_saltator)))
+ ++_reptator;
+ else
+ {
+ ++_saltator;
+ _reptator = identity_element<domain_difference_type>::value();
+ }
+ }
+
+ void decrement()
+ {
+ if(identity_element<domain_difference_type>::value() < _reptator)
+ --_reptator;
+ else
+ {
+ --_saltator;
+ _reptator = adapt::length(_saltator);
+ --_reptator;
+ }
+ }
+
+ value_type dereference()const
+ {
+ return adapt::transient_element(_inter_pos, _saltator, _reptator);
+ }
+
+private:
+ segment_iterator _saltator; // satltare: to jump : the fast moving iterator
+ mutable domain_difference_type _reptator; // reptare: to sneak : the slow moving iterator 0 based
+ mutable domain_type _inter_pos; // inter position : Position within the current segment
+ // _saltator->first.first() <= _inter_pos <= _saltator->first.last()
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104
+
+
+

Added: sandbox/icl/boost/icl/detail/exclusive_less_than.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/exclusive_less_than.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,31 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929
+#define BOOST_ICL_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929
+
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+/// Comparison functor on intervals implementing an overlap free less
+template <class IntervalT>
+struct exclusive_less_than
+{
+ /** Operator <tt>operator()</tt> implements a strict weak ordering on intervals. */
+ bool operator()(const IntervalT& left, const IntervalT& right)const
+ {
+ return icl::non_empty::exclusive_less(left, right);
+ }
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/detail/interval_map_algo.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/interval_map_algo.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,171 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 BOOST_ICL_INTERVAL_MAP_ALGO_HPP_JOFA_100730
+#define BOOST_ICL_INTERVAL_MAP_ALGO_HPP_JOFA_100730
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/not.hpp>
+
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/interval_combining_style.hpp>
+#include <boost/icl/detail/element_comparer.hpp>
+#include <boost/icl/detail/interval_subset_comparer.hpp>
+
+namespace boost{namespace icl
+{
+
+
+namespace Interval_Map
+{
+using namespace segmental;
+
+template<class IntervalMapT>
+bool is_joinable(const IntervalMapT& container,
+ typename IntervalMapT::const_iterator first,
+ typename IntervalMapT::const_iterator past)
+{
+ if(first == container.end())
+ return true;
+
+ typename IntervalMapT::const_iterator it_ = first, next_ = first;
+ ++next_;
+
+ const typename IntervalMapT::codomain_type& co_value
+ = icl::co_value<IntervalMapT>(first);
+ while(it_ != past)
+ {
+ if(icl::co_value<IntervalMapT>(next_) != co_value)
+ return false;
+ if(!icl::touches(key_value<IntervalMapT>(it_++),
+ key_value<IntervalMapT>(next_++)))
+ return false;
+ }
+
+ return true;
+}
+
+//------------------------------------------------------------------------------
+//- Containedness of key objects
+//------------------------------------------------------------------------------
+
+//- domain_type ----------------------------------------------------------------
+template<class IntervalMapT>
+typename enable_if<mpl::not_<is_total<IntervalMapT> >, bool>::type
+contains(const IntervalMapT& container,
+ const typename IntervalMapT::domain_type& key)
+{
+ return container.find(key) != container.end();
+}
+
+template<class IntervalMapT>
+typename enable_if<is_total<IntervalMapT>, bool>::type
+contains(const IntervalMapT& container,
+ const typename IntervalMapT::domain_type& key)
+{
+ return true;
+}
+
+//- interval_type --------------------------------------------------------------
+template<class IntervalMapT>
+typename enable_if<mpl::not_<is_total<IntervalMapT> >, bool>::type
+contains(const IntervalMapT& container,
+ const typename IntervalMapT::interval_type& sub_interval)
+{
+ typedef typename IntervalMapT::const_iterator const_iterator;
+ if(icl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = container.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ return
+ icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Set::is_joinable(container, exterior.first, last_overlap);
+}
+
+template<class IntervalMapT>
+typename enable_if<is_total<IntervalMapT>, bool>::type
+contains(const IntervalMapT& container,
+ const typename IntervalMapT::interval_type& sub_interval)
+{
+ return true;
+}
+
+//- set_type -------------------------------------------------------------------
+template<class IntervalMapT, class IntervalSetT>
+typename enable_if<mpl::and_<mpl::not_<is_total<IntervalMapT> >
+ ,is_interval_set<IntervalSetT> >, bool>::type
+contains(const IntervalMapT& super_map, const IntervalSetT& sub_set)
+{
+ return Interval_Set::within(sub_set, super_map);
+}
+
+template<class IntervalMapT, class IntervalSetT>
+typename enable_if<mpl::and_<is_total<IntervalMapT>
+ ,is_interval_set<IntervalSetT> >, bool>::type
+contains(const IntervalMapT& super_map, const IntervalSetT& sub_set)
+{
+ return true;
+}
+
+
+//------------------------------------------------------------------------------
+//- Containedness of sub objects
+//------------------------------------------------------------------------------
+
+template<class IntervalMapT>
+bool contains(const IntervalMapT& container,
+ const typename IntervalMapT::element_type& key_value_pair)
+{
+ typename IntervalMapT::const_iterator it_ = container.find(key_value_pair.key);
+ return it_ != container.end() && it_->second == key_value_pair.data;
+}
+
+template<class IntervalMapT>
+bool contains(const IntervalMapT& container,
+ const typename IntervalMapT::segment_type sub_segment)
+{
+ typedef typename IntervalMapT::const_iterator const_iterator;
+ typename IntervalMapT::interval_type sub_interval = sub_segment.first;
+ if(icl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = container.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ if(!(sub_segment.second == exterior.first->second) )
+ return false;
+
+ return
+ icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Map::is_joinable(container, exterior.first, last_overlap);
+}
+
+
+template<class IntervalMapT>
+bool contains(const IntervalMapT& super, const IntervalMapT& sub)
+{
+ return Interval_Set::within(sub, super);
+}
+
+} // namespace Interval_Map
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/interval_morphism.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/interval_morphism.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,105 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+#define BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/concept/interval_set_value.hpp>
+#include <boost/icl/concept/element_set_value.hpp>
+#include <boost/icl/concept/set_value.hpp>
+#include <boost/icl/concept/map_value.hpp>
+
+namespace boost{namespace icl
+{
+ namespace segmental
+ {
+ template <typename ElementContainerT, typename IntervalContainerT>
+ void atomize(ElementContainerT& result, const IntervalContainerT& src)
+ {
+ ICL_const_FORALL(typename IntervalContainerT, itv_, src)
+ {
+ const typename IntervalContainerT::key_type& itv = icl::key_value<IntervalContainerT>(itv_);
+ typename IntervalContainerT::codomain_type coval = icl::co_value<IntervalContainerT>(itv_);
+
+ for(typename IntervalContainerT::domain_type element = first(itv); element <= last(itv); ++element)
+ insert(result, icl::make_value<ElementContainerT>(element, coval));
+ }
+ }
+
+ template <typename IntervalContainerT, typename ElementContainerT>
+ void cluster(IntervalContainerT& result, const ElementContainerT& src)
+ {
+ typedef typename IntervalContainerT::key_type key_type;
+ ICL_const_FORALL(typename ElementContainerT, element_, src)
+ {
+ const typename ElementContainerT::key_type& key
+ = key_value<ElementContainerT>(element_);
+ const typename codomain_type_of<ElementContainerT>::type& coval
+ = co_value<ElementContainerT>(element_);
+
+ result += icl::make_value<IntervalContainerT>(key_type(key), coval);
+ }
+ }
+
+ template <typename AtomizedType, typename ClusteredType>
+ struct atomizer
+ {
+ void operator()(AtomizedType& atomized, const ClusteredType& clustered)
+ {
+ segmental::atomize(atomized, clustered);
+ }
+ };
+
+ template <typename ClusteredType, typename AtomizedType>
+ struct clusterer
+ {
+ void operator()(ClusteredType& clustered, const AtomizedType& atomized)
+ {
+ segmental::cluster(clustered, atomized);
+ }
+ };
+
+ template <typename JointType, typename SplitType>
+ struct joiner
+ {
+ void operator()(JointType& joint, SplitType& split)
+ {
+ icl::join(split);
+ ICL_FORALL(typename SplitType, split_, split)
+ joint.insert(*split_);
+ }
+ };
+
+ template <typename AbsorberType, typename EnricherType>
+ struct identity_absorber
+ {
+ void operator()(AbsorberType& absorber, EnricherType& enricher)
+ {
+ icl::absorb_identities(enricher);
+ ICL_FORALL(typename EnricherType, enricher_, enricher)
+ absorber.insert(*enricher_);
+ }
+ };
+
+ } // namespace Interval
+
+
+ template<>
+ inline std::string binary_template_to_string<segmental::atomizer>::apply() { return "@"; }
+ template<>
+ inline std::string binary_template_to_string<segmental::clusterer>::apply() { return "&"; }
+ template<>
+ inline std::string binary_template_to_string<segmental::joiner>::apply() { return "j"; }
+ template<>
+ inline std::string binary_template_to_string<segmental::identity_absorber>::apply() { return "a0"; }
+}} // namespace boost icl
+
+#endif // BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+
+
+

Added: sandbox/icl/boost/icl/detail/interval_set_algo.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/interval_set_algo.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,647 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 BOOST_ICL_INTERVAL_SET_ALGO_HPP_JOFA_081005
+#define BOOST_ICL_INTERVAL_SET_ALGO_HPP_JOFA_081005
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/concept/set_value.hpp>
+#include <boost/icl/concept/map_value.hpp>
+#include <boost/icl/interval_combining_style.hpp>
+#include <boost/icl/detail/element_comparer.hpp>
+#include <boost/icl/detail/interval_subset_comparer.hpp>
+#include <boost/icl/detail/associated_value.hpp>
+
+namespace boost{namespace icl
+{
+
+namespace Interval_Set
+{
+
+//------------------------------------------------------------------------------
+// Lexicographical comparison on ranges of two interval container
+//------------------------------------------------------------------------------
+
+template<class LeftT, class RightT>
+bool is_element_equal(const LeftT& left, const RightT& right)
+{
+ return subset_compare
+ (
+ left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end()
+ ) == inclusion::equal;
+}
+
+template<class LeftT, class RightT>
+bool is_element_less(const LeftT& left, const RightT& right)
+{
+ return element_compare
+ (
+ left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end()
+ ) == comparison::less;
+}
+
+template<class LeftT, class RightT>
+bool is_element_greater(const LeftT& left, const RightT& right)
+{
+ return element_compare
+ (
+ left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end()
+ ) == comparison::greater;
+}
+
+//------------------------------------------------------------------------------
+// Subset/superset compare on ranges of two interval container
+//------------------------------------------------------------------------------
+
+template<class IntervalContainerT>
+bool is_joinable(const IntervalContainerT& container,
+ typename IntervalContainerT::const_iterator first,
+ typename IntervalContainerT::const_iterator past)
+{
+ if(first == container.end())
+ return true;
+
+ typename IntervalContainerT::const_iterator it_ = first, next_ = first;
+ ++next_;
+
+ while(next_ != container.end() && it_ != past)
+ if(!icl::touches(key_value<IntervalContainerT>(it_++),
+ key_value<IntervalContainerT>(next_++)))
+ return false;
+
+ return true;
+}
+
+
+template<class LeftT, class RightT>
+bool is_inclusion_equal(const LeftT& left, const RightT& right)
+{
+ return subset_compare
+ (
+ left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end()
+ ) == inclusion::equal;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<mpl::and_<is_concept_combinable<is_interval_set, is_interval_map, LeftT, RightT>,
+ is_total<RightT> >,
+ bool>::type
+within(const LeftT&, const RightT&)
+{
+ return true;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<mpl::and_<is_concept_combinable<is_interval_set, is_interval_map, LeftT, RightT>,
+ mpl::not_<is_total<RightT> > >,
+ bool>::type
+within(const LeftT& sub, const RightT& super)
+{
+ int result =
+ subset_compare
+ (
+ sub, super,
+ sub.begin(), sub.end(),
+ super.begin(), super.end()
+ );
+ return result == inclusion::subset || result == inclusion::equal;
+}
+
+
+template<class LeftT, class RightT>
+typename enable_if<is_concept_combinable<is_interval_map, is_interval_map, LeftT, RightT>,
+ bool>::type
+within(const LeftT& sub, const RightT& super)
+{
+ int result =
+ subset_compare
+ (
+ sub, super,
+ sub.begin(), sub.end(),
+ super.begin(), super.end()
+ );
+ return result == inclusion::subset || result == inclusion::equal;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<is_concept_combinable<is_interval_set, is_interval_set, LeftT, RightT>,
+ bool>::type
+within(const LeftT& sub, const RightT& super)
+{
+ int result =
+ subset_compare
+ (
+ sub, super,
+ sub.begin(), sub.end(),
+ super.begin(), super.end()
+ );
+ return result == inclusion::subset || result == inclusion::equal;
+}
+
+
+
+template<class LeftT, class RightT>
+typename enable_if<mpl::and_<is_concept_combinable<is_interval_map, is_interval_set, LeftT, RightT>,
+ is_total<LeftT> >,
+ bool>::type
+contains(const LeftT&, const RightT&)
+{
+ return true;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<mpl::and_<is_concept_combinable<is_interval_map, is_interval_set, LeftT, RightT>,
+ mpl::not_<is_total<LeftT> > >,
+ bool>::type
+contains(const LeftT& super, const RightT& sub)
+{
+ int result =
+ subset_compare
+ (
+ super, sub,
+ super.begin(), super.end(),
+ sub.begin(), sub.end()
+ );
+ return result == inclusion::superset || result == inclusion::equal;
+}
+
+template<class LeftT, class RightT>
+typename enable_if<is_concept_combinable<is_interval_set, is_interval_set, LeftT, RightT>,
+ bool>::type
+contains(const LeftT& super, const RightT& sub)
+{
+ int result =
+ subset_compare
+ (
+ super, sub,
+ super.begin(), super.end(),
+ sub.begin(), sub.end()
+ );
+ return result == inclusion::superset || result == inclusion::equal;
+}
+
+template<class IntervalContainerT>
+bool is_dense(const IntervalContainerT& container,
+ typename IntervalContainerT::const_iterator first,
+ typename IntervalContainerT::const_iterator past)
+{
+ if(first == container.end())
+ return true;
+
+ typename IntervalContainerT::const_iterator it_ = first, next_ = first;
+ ++next_;
+
+ while(next_ != container.end() && it_ != past)
+ if(!icl::touches(key_value<IntervalContainerT>(it_++),
+ key_value<IntervalContainerT>(next_++)))
+ return false;
+
+ return true;
+}
+
+} // namespace Interval_Set
+
+namespace segmental
+{
+
+template<class Type>
+inline bool joinable(const Type& _Type, typename Type::iterator& some, typename Type::iterator& next)
+{
+ // assert: next != end && some++ == next
+ return touches(key_value<Type>(some), key_value<Type>(next))
+ && co_equal(some, next, &_Type, &_Type);
+}
+
+template<class Type>
+inline void join_nodes(Type& object, typename Type::iterator& left_,
+ typename Type::iterator& right_)
+{
+ typedef typename Type::interval_type interval_type;
+ interval_type right_interval = key_value<Type>(right_);
+ object.erase(right_);
+ const_cast<interval_type&>(key_value<Type>(left_))
+ = hull(key_value<Type>(left_), right_interval);
+}
+
+template<class Type>
+inline typename Type::iterator
+ join_on_left(Type& object, typename Type::iterator& left_,
+ typename Type::iterator& right_)
+{
+ typedef typename Type::interval_type interval_type;
+ // both left and right are in the set and they are neighbours
+ BOOST_ASSERT(exclusive_less(key_value<Type>(left_), key_value<Type>(right_)));
+ BOOST_ASSERT(joinable(object, left_, right_));
+
+ join_nodes(object, left_, right_);
+ return left_;
+}
+
+template<class Type>
+inline typename Type::iterator
+ join_on_right(Type& object, typename Type::iterator& left_,
+ typename Type::iterator& right_)
+{
+ typedef typename Type::interval_type interval_type;
+ // both left and right are in the map and they are neighbours
+ BOOST_ASSERT(exclusive_less(key_value<Type>(left_), key_value<Type>(right_)));
+ BOOST_ASSERT(joinable(object, left_, right_));
+
+ join_nodes(object, left_, right_);
+ right_ = left_;
+ return right_;
+}
+
+template<class Type>
+typename Type::iterator join_left(Type& object, typename Type::iterator& it_)
+{
+ typedef typename Type::iterator iterator;
+
+ if(it_ == object.begin())
+ return it_;
+
+ // there is a predecessor
+ iterator pred_ = it_;
+ if(joinable(object, --pred_, it_))
+ return join_on_right(object, pred_, it_);
+
+ return it_;
+}
+
+template<class Type>
+typename Type::iterator join_right(Type& object, typename Type::iterator& it_)
+{
+ typedef typename Type::iterator iterator;
+
+ if(it_ == object.end())
+ return it_;
+
+ // there is a successor
+ iterator succ_ = it_;
+
+ if(++succ_ != object.end() && joinable(object, it_, succ_))
+ return join_on_left(object, it_, succ_);
+
+ return it_;
+}
+
+template<class Type>
+typename Type::iterator join_neighbours(Type& object, typename Type::iterator& it_)
+{
+ join_left (object, it_);
+ return join_right(object, it_);
+}
+
+template<class Type>
+inline typename Type::iterator
+ join_under(Type& object, const typename Type::value_type& addend)
+{
+ //ASSERT: There is at least one interval in object that overlaps with addend
+ typedef typename Type::iterator iterator;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+
+ std::pair<iterator,iterator> overlap = object.equal_range(addend);
+ iterator first_ = overlap.first,
+ end_ = overlap.second,
+ last_ = end_; --last_;
+
+ iterator second_= first_; ++second_;
+
+ interval_type left_resid = right_subtract(key_value<Type>(first_), addend);
+ interval_type right_resid = left_subtract(key_value<Type>(last_) , addend);
+
+ object.erase(second_, end_);
+
+ const_cast<value_type&>(key_value<Type>(first_))
+ = hull(hull(left_resid, addend), right_resid);
+ return first_;
+}
+
+template<class Type>
+inline typename Type::iterator
+ join_under(Type& object, const typename Type::value_type& addend,
+ typename Type::iterator last_)
+{
+ //ASSERT: There is at least one interval in object that overlaps with addend
+ typedef typename Type::iterator iterator;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+
+ iterator first_ = object.lower_bound(addend);
+ //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val));
+ iterator second_= boost::next(first_), end_ = boost::next(last_);
+
+ interval_type left_resid = right_subtract(key_value<Type>(first_), addend);
+ interval_type right_resid = left_subtract(key_value<Type>(last_) , addend);
+
+ object.erase(second_, end_);
+
+ const_cast<value_type&>(key_value<Type>(first_))
+ = hull(hull(left_resid, addend), right_resid);
+ return first_;
+}
+
+} // namespace segmental
+
+namespace Interval_Set
+{
+using namespace segmental;
+
+template<class Type, int combining_style>
+struct on_style;
+
+template<class Type>
+struct on_style<Type, interval_combine::joining>
+{
+ typedef on_style type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ inline static iterator handle_inserted(Type& object, iterator inserted_)
+ { return join_neighbours(object, inserted_); }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend, iterator last_)
+ {
+ iterator joined_ = join_under(object, addend, last_);
+ return join_neighbours(object, joined_);
+ }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend)
+ {
+ iterator joined_ = join_under(object, addend);
+ return join_neighbours(object, joined_);
+ }
+};
+
+template<class Type>
+struct on_style<Type, interval_combine::separating>
+{
+ typedef on_style type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ inline static iterator handle_inserted(Type&, iterator inserted_)
+ { return inserted_; }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend, iterator last_)
+ {
+ return join_under(object, addend, last_);
+ }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend)
+ {
+ return join_under(object, addend);
+ }
+};
+
+template<class Type>
+struct on_style<Type, interval_combine::splitting>
+{
+ typedef on_style type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ inline static iterator handle_inserted(Type&, iterator inserted_)
+ { return inserted_; }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend, iterator last_)
+ {
+ iterator first_ = object.lower_bound(addend);
+ //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val));
+
+ iterator it_ = first_;
+ interval_type rest_interval = addend;
+
+ add_front(object, rest_interval, it_);
+ add_main (object, rest_interval, it_, last_);
+ add_rear (object, rest_interval, it_);
+ return it_;
+ }
+
+ inline static iterator add_over
+ (Type& object, const interval_type& addend)
+ {
+ std::pair<iterator,iterator> overlap = object.equal_range(addend);
+ iterator first_ = overlap.first,
+ end_ = overlap.second,
+ last_ = end_; --last_;
+
+ iterator it_ = first_;
+ interval_type rest_interval = addend;
+
+ add_front(object, rest_interval, it_);
+ add_main (object, rest_interval, it_, last_);
+ add_rear (object, rest_interval, it_);
+
+ return it_;
+ }
+};
+
+
+template<class Type>
+void add_front(Type& object, const typename Type::interval_type& inter_val,
+ typename Type::iterator& first_)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+ // If the collision sequence has a left residual 'left_resid' it will
+ // be split, to provide a standardized start of algorithms:
+ // The addend interval 'inter_val' covers the beginning of the collision sequence.
+
+ // only for the first there can be a left_resid: a part of *first_ left of inter_val
+ interval_type left_resid = right_subtract(key_value<Type>(first_), inter_val);
+
+ if(!icl::is_empty(left_resid))
+ { // [------------ . . .
+ // [left_resid---first_ --- . . .
+ iterator prior_ = cyclic_prior(object, first_);
+ const_cast<interval_type&>(key_value<Type>(first_))
+ = left_subtract(key_value<Type>(first_), left_resid);
+ //NOTE: Only splitting
+ object._insert(prior_, icl::make_value<Type>(left_resid, co_value<Type>(first_)));
+ }
+
+ //POST:
+ // [----- inter_val ---- . . .
+ // ...[-- first_ --...
+}
+
+
+template<class Type>
+void add_segment(Type& object, const typename Type::interval_type& inter_val,
+ typename Type::iterator& it_ )
+{
+ typedef typename Type::interval_type interval_type;
+ interval_type lead_gap = right_subtract(inter_val, *it_);
+ if(!icl::is_empty(lead_gap))
+ // [lead_gap--- . . .
+ // [prior_) [-- it_ ...
+ object._insert(prior(it_), lead_gap);
+
+ // . . . --------- . . . addend interval
+ // [-- it_ --) has a common part with the first overval
+ ++it_;
+}
+
+
+template<class Type>
+void add_main(Type& object, typename Type::interval_type& rest_interval,
+ typename Type::iterator& it_,
+ const typename Type::iterator& last_)
+{
+ typedef typename Type::interval_type interval_type;
+ interval_type cur_interval;
+ while(it_ != last_)
+ {
+ cur_interval = *it_ ;
+ add_segment(object, rest_interval, it_);
+ // shrink interval
+ rest_interval = left_subtract(rest_interval, cur_interval);
+ }
+}
+
+
+template<class Type>
+void add_rear(Type& object, const typename Type::interval_type& inter_val,
+ typename Type::iterator& it_ )
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ iterator prior_ = cyclic_prior(object, it_);
+ interval_type cur_itv = *it_;
+
+ interval_type lead_gap = right_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(lead_gap))
+ // [lead_gap--- . . .
+ // [prior_) [-- it_ ...
+ object._insert(prior_, lead_gap);
+
+ interval_type end_gap = left_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(end_gap))
+ // [---------------end_gap)
+ // [-- it_ --)
+ it_ = object._insert(it_, end_gap);
+ else
+ {
+ // only for the last there can be a right_resid: a part of *it_ right of addend
+ interval_type right_resid = left_subtract(cur_itv, inter_val);
+
+ if(!icl::is_empty(right_resid))
+ {
+ // [--------------)
+ // [-- it_ --right_resid)
+ const_cast<interval_type&>(*it_) = right_subtract(*it_, right_resid);
+ it_ = object._insert(it_, right_resid);
+ }
+ }
+}
+
+
+//==============================================================================
+//= Addition
+//==============================================================================
+template<class Type>
+typename Type::iterator
+ add(Type& object, const typename Type::value_type& addend)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+ typedef typename on_style<Type, Type::fineness>::type on_style_;
+
+ if(icl::is_empty(addend))
+ return object.end();
+
+ std::pair<iterator,bool> insertion = object._insert(addend);
+
+ if(insertion.second)
+ return on_style_::handle_inserted(object, insertion.first);
+ else
+ return on_style_::add_over(object, addend, insertion.first);
+}
+
+
+template<class Type>
+typename Type::iterator
+ add(Type& object, typename Type::iterator prior_,
+ const typename Type::value_type& addend)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+ typedef typename on_style<Type, Type::fineness>::type on_style_;
+
+ if(icl::is_empty(addend))
+ return prior_;
+
+ iterator insertion = object._insert(prior_, addend);
+
+ if(*insertion == addend)
+ return on_style_::handle_inserted(object, insertion);
+ else
+ return on_style_::add_over(object, addend);
+}
+
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+template<class Type>
+void subtract(Type& object, const typename Type::value_type& minuend)
+{
+ typedef typename Type::iterator iterator;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+
+ if(icl::is_empty(minuend)) return;
+
+ std::pair<iterator, iterator> exterior = object.equal_range(minuend);
+ if(exterior.first == exterior.second) return;
+
+ iterator first_ = exterior.first;
+ iterator end_ = exterior.second;
+ iterator last_ = end_; --last_;
+
+ interval_type leftResid = right_subtract(*first_, minuend);
+ interval_type rightResid;
+ if(first_ != end_ )
+ rightResid = left_subtract(*last_ , minuend);
+
+ object.erase(first_, end_);
+
+ if(!icl::is_empty(leftResid))
+ object._insert(leftResid);
+
+ if(!icl::is_empty(rightResid))
+ object._insert(rightResid);
+}
+
+
+} // namespace Interval_Set
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/interval_subset_comparer.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/interval_subset_comparer.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,368 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_INTERVAL_SUBSET_COMPARER_HPP_JOFA_090827
+#define BOOST_ICL_INTERVAL_SUBSET_COMPARER_HPP_JOFA_090827
+
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/is_concept_equivalent.hpp>
+#include <boost/icl/type_traits/is_interval_container.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/concept/interval_set_value.hpp>
+
+namespace boost{namespace icl
+{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace Interval_Set
+{
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+struct settic_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ return inclusion_compare( icl::co_value<LeftT>(left_),
+ icl::co_value<RightT>(right_));
+ }
+};
+
+template<class LeftT, class RightT>
+struct atomic_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ if(icl::co_value<LeftT>(left_) == icl::co_value<RightT>(right_))
+ return inclusion::equal;
+ else
+ return inclusion::unrelated;
+ }
+};
+
+template<class LeftT, class RightT>
+struct empty_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator&, typename RightT::const_iterator)
+ {
+ return inclusion::equal;
+ }
+};
+
+template<class LeftT, class RightT>
+struct map_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ using namespace boost::mpl;
+ typedef typename LeftT::codomain_type LeftCodomainT;
+ typedef typename RightT::codomain_type RightCodomainT;
+
+ return
+ if_<
+ bool_<is_concept_equivalent<is_set,LeftCodomainT,
+ RightCodomainT>::value>,
+ settic_codomain_compare<LeftT,RightT>,
+ atomic_codomain_compare<LeftT,RightT>
+ >
+ ::type::apply(left_, right_);
+ }
+};
+
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+class subset_comparer
+{
+private:
+ subset_comparer& operator = (const subset_comparer&);
+public:
+ typedef typename LeftT::const_iterator LeftIterT;
+ typedef typename RightT::const_iterator RightIterT;
+
+ BOOST_STATIC_CONSTANT(bool,
+ _compare_codomain = (mpl::and_<is_map<LeftT>, is_map<RightT> >::value));
+
+
+ subset_comparer(const LeftT& left,
+ const RightT& right,
+ const LeftIterT& left_end,
+ const RightIterT& right_end)
+ : _left(left), _right(right),
+ _left_end(left_end), _right_end(right_end), _result(equal)
+ {}
+
+ enum{nextboth, nextleft, nextright, stop};
+
+ enum
+ {
+ unrelated = inclusion::unrelated,
+ subset = inclusion::subset, // left is_subset_of right
+ superset = inclusion::superset, // left is_superset_of right
+ equal = inclusion::equal // equal = subset | superset
+ };
+
+ int result()const{ return _result; }
+
+
+ int co_compare(LeftIterT& left, RightIterT& right)
+ {
+ using namespace boost::mpl;
+
+ return
+ if_<
+ bool_<is_concept_equivalent<is_interval_map,LeftT,RightT>::value>,
+ map_codomain_compare<LeftT,RightT>,
+ empty_codomain_compare<LeftT,RightT>
+ >
+ ::type::apply(left,right);
+ }
+
+ int restrict_result(int state) { return _result &= state; }
+
+ int proceed(LeftIterT& left, RightIterT& right)
+ {
+ if(upper_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // left ..)
+ // right .....)
+ _prior_left = left;
+ ++left;
+ return nextleft;
+ }
+ else if(upper_less(key_value<RightT>(right), key_value<LeftT>(left)))
+ { // left .....)
+ // right ..)
+ _prior_right = right;
+ ++right;
+ return nextright;
+ }
+ else//key_value<LeftT>(left).upper_equal(key_value<RightT>(right))
+ { // left ..)
+ // right ..)
+ ++left;
+ ++right;
+ return nextboth;
+ }
+ }
+
+ int next_both(LeftIterT& left, RightIterT& right)
+ {
+ if(left == _left_end && right == _right_end)
+ return stop;
+ else if(left == _left_end)
+ { // left: ....end left could be subset
+ // right:....[..
+ restrict_result(subset);
+ return stop;
+ }
+ else if(right == _right_end)
+ { // left: ....[.. left could be superset
+ // right:....end
+ restrict_result(superset);
+ return stop;
+ }
+ else if(exclusive_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // left: [..) . . .[---) left could be superset
+ // right: [..).... if [---) exists
+ restrict_result(superset);
+ if(unrelated == _result)
+ return stop;
+ else
+ {
+ LeftIterT joint_ = _left.lower_bound(key_value<RightT>(right));
+ if(joint_ == _left.end())
+ {
+ _result = unrelated;
+ return stop;
+ }
+ else
+ {
+ left = joint_;
+ return nextboth;
+ }
+ }
+ }
+ else if(exclusive_less(key_value<RightT>(right), key_value<LeftT>(left)))
+ { // left: [.. left could be subset
+ // right:....) . . .[---) if [---) exists
+ restrict_result(subset);
+ if(unrelated == _result)
+ return stop;
+ else
+ {
+ RightIterT joint_ = _right.lower_bound(key_value<LeftT>(left));
+ if(joint_ == _right.end())
+ {
+ _result = unrelated;
+ return stop;
+ }
+ else
+ {
+ right = joint_;
+ return nextboth;
+ }
+ }
+ }
+
+ // left and right have intervals with nonempty intersection:
+ if(_compare_codomain)
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+
+ // examine left borders only. Right borders are checked in proceed
+ if(lower_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // left: ....[... left could be superset
+ // right:.... [..
+ if(unrelated == restrict_result(superset))
+ return stop;
+ }
+ else if(lower_less(key_value<RightT>(right), key_value<LeftT>(left)))
+ { // left: .... [.. left can be subset
+ // right:....[...
+ if(unrelated == restrict_result(subset))
+ return stop;
+ }
+ //else key_value<LeftT>(right).lower_equal(key_value<RightT>(left))
+ // left: ....[.. both can be equal
+ // right:....[..
+ // nothing to do: proceed
+
+ return proceed(left, right);
+ }
+
+ int next_left(LeftIterT& left, RightIterT& right)
+ {
+ if(left == _left_end)
+ { // left: ..)end left could be subset
+ // right:......)
+ restrict_result(subset);
+ return stop;
+ }
+ else if(!touches(key_value<LeftT>(_prior_left), key_value<LeftT>(left)))
+ { // left: ..) [..
+ // right:.........)
+ if(lower_less(key_value<RightT>(right), key_value<LeftT>(left)))
+ { // ..) [.. left could be subset
+ // ..........)
+ if(unrelated == restrict_result(subset))
+ return stop;
+ }
+ //else ..) [...
+ // [..
+ if(_compare_codomain && intersects(key_value<LeftT>(left),key_value<RightT>(right)) )
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+ }
+ else
+ { // left: ..)[.. left could be subset
+ // right:.......)
+ if(_compare_codomain && intersects(key_value<LeftT>(left), key_value<RightT>(right)) )
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+ }
+
+ return proceed(left, right);
+ }
+
+
+ int next_right(LeftIterT& left, RightIterT& right)
+ {
+ if(right == _right_end)
+ { // left: ......) left could be superset
+ // right:..)end
+ restrict_result(superset);
+ return stop;
+ }
+ else if(!touches(key_value<RightT>(_prior_right), key_value<RightT>(right)))
+ { // left: .........)
+ // right:..) [..
+ if(lower_less(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // [....) left could be superset
+ // ..) [..
+ if(unrelated == restrict_result(superset))
+ return stop;
+ }
+ //else [....)
+ // ..) [..
+ if(_compare_codomain && intersects(key_value<LeftT>(left), key_value<RightT>(right)) )
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+ }
+ else
+ {
+ if(_compare_codomain && intersects(key_value<LeftT>(left), key_value<RightT>(right)) )
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+ }
+
+ return proceed(left, right);
+ }
+
+private:
+ const LeftT& _left;
+ const RightT& _right;
+ LeftIterT _left_end;
+ RightIterT _right_end;
+ LeftIterT _prior_left;
+ RightIterT _prior_right;
+ int _result;
+};
+
+
+
+
+
+//------------------------------------------------------------------------------
+// Subset/superset comparison on ranges of two interval container
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+int subset_compare
+(
+ const LeftT& left, //sub
+ const RightT& right, //super
+ typename LeftT::const_iterator left_begin,
+ typename LeftT::const_iterator left_end,
+ typename RightT::const_iterator right_begin,
+ typename RightT::const_iterator right_end
+)
+{
+ typedef subset_comparer<LeftT,RightT> Step;
+ Step step(left, right, left_end, right_end);
+
+ typename LeftT::const_iterator left_ = left_begin;
+ typename RightT::const_iterator right_ = right_begin;
+
+ int state = Step::nextboth;
+ while(state != Step::stop)
+ {
+ switch(state){
+ case Step::nextboth: state = step.next_both(left_, right_); break;
+ case Step::nextleft: state = step.next_left(left_, right_); break;
+ case Step::nextright: state = step.next_right(left_, right_); break;
+ }
+ }
+ return step.result();
+}
+
+
+} // namespace Interval_Set
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/map_algo.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/map_algo.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,90 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: 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 BOOST_ICL_MAPALGO_HPP_JOFA_080225
+#define BOOST_ICL_MAPALGO_HPP_JOFA_080225
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace boost{namespace icl
+{
+namespace Map
+{
+
+template <class ObjectT, class CoObjectT>
+bool intersects(const ObjectT& left, const CoObjectT& right)
+{
+ typedef typename CoObjectT::const_iterator co_iterator;
+ co_iterator right_common_lower_, right_common_upper_;
+ if(!Set::common_range(right_common_lower_, right_common_upper_, right, left))
+ return false;
+
+ co_iterator right_ = right_common_lower_;
+ while(right_ != right_common_upper_)
+ if(!(left.find(key_value<CoObjectT>(right_++))==left.end()))
+ return true;
+
+ return false;
+}
+
+
+template<class MapT>
+typename MapT::const_iterator next_proton(typename MapT::const_iterator& iter_, const MapT& object)
+{
+ while( iter_ != object.end()
+ && iter_->second == identity_element<typename MapT::codomain_type>::value())
+ ++iter_;
+
+ return iter_;
+}
+
+/** Function template <tt>lexicographical_equal</tt> implements
+lexicographical equality except for identity_elementic content values. */
+template<class MapT>
+bool lexicographical_distinct_equal(const MapT& left, const MapT& right)
+{
+ if(&left == &right)
+ return true;
+
+ typename MapT::const_iterator left_ = left.begin();
+ typename MapT::const_iterator right_ = right.begin();
+
+ left_ = next_proton(left_, left);
+ right_ = next_proton(right_, right);
+
+ while(left_ != left.end() && right_ != right.end())
+ {
+ if(!(left_->first == right_->first && left_->second == right_->second))
+ return false;
+
+ ++left_;
+ ++right_;
+ left_ = next_proton(left_, left);
+ right_ = next_proton(right_, right);
+ }
+
+ return left_ == left.end() && right_ == right.end();
+}
+
+} // namespace Map
+}} // namespace boost icl
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/mapped_reference.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/mapped_reference.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,192 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108
+#define BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/is_concept_equivalent.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class FirstT, class SecondT> class mapped_reference;
+
+//------------------------------------------------------------------------------
+template<class Type>
+struct is_mapped_reference_combinable{
+ typedef is_mapped_reference_combinable type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template<class FirstT, class SecondT>
+struct is_mapped_reference_combinable<std::pair<const FirstT,SecondT> >
+{
+ typedef is_mapped_reference_combinable<std::pair<const FirstT,SecondT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<class FirstT, class SecondT>
+struct is_mapped_reference_combinable<std::pair<FirstT,SecondT> >
+{
+ typedef is_mapped_reference_combinable<std::pair<FirstT,SecondT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//------------------------------------------------------------------------------
+template<class Type>
+struct is_mapped_reference_or_combinable{
+ typedef is_mapped_reference_or_combinable type;
+ BOOST_STATIC_CONSTANT(bool, value = is_mapped_reference_combinable<Type>::value);
+};
+
+template<class FirstT, class SecondT>
+struct is_mapped_reference_or_combinable<mapped_reference<FirstT,SecondT> >
+{
+ typedef is_mapped_reference_or_combinable<mapped_reference<FirstT,SecondT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT>
+class mapped_reference
+{
+private:
+ mapped_reference& operator = (const mapped_reference&);
+public:
+ typedef FirstT first_type;
+ typedef SecondT second_type;
+ typedef mapped_reference type;
+
+ typedef typename
+ mpl::if_<is_const<second_type>,
+ second_type&,
+ const second_type&>::type second_reference_type;
+
+ typedef std::pair< first_type, second_type> std_pair_type;
+ typedef std::pair<const first_type, second_type> key_std_pair_type;
+
+ const first_type& first ;
+ second_reference_type second;
+
+ mapped_reference(const FirstT& fst, second_reference_type snd) : first(fst), second(snd){}
+
+ template<class FstT, class SndT>
+ mapped_reference(const mapped_reference<FstT, SndT>& source):
+ first(source.first), second(source.second){}
+
+ template<class FstT, class SndT>
+ operator std::pair<FstT,SndT>(){ return std::pair<FstT,SndT>(first, second); }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator == (const Comparand& right)const
+ { return first == right.first && second == right.second; }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator != (const Comparand& right)const
+ { return !(*this == right); }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator < (const Comparand& right)const
+ {
+ return first < right.first
+ ||(!(right.first < first) && second < right.second);
+ }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator > (const Comparand& right)const
+ {
+ return first > right.first
+ ||(!(right.first > first) && second > right.second);
+ }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator <= (const Comparand& right)const
+ {
+ return !(*this > right);
+ }
+
+ template<class Comparand>
+ typename enable_if<is_mapped_reference_or_combinable<Comparand>, bool>::type
+ operator >= (const Comparand& right)const
+ {
+ return !(*this < right);
+ }
+
+};
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator == ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return right == left;
+}
+
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator != ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return !(right == left);
+}
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator < ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return right > left;
+}
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator > ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return right < left;
+}
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator <= ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return !(right < left);
+}
+
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT, class StdPairT>
+inline typename enable_if<is_mapped_reference_combinable<StdPairT>, bool>::type
+operator >= ( const StdPairT& left,
+ const mapped_reference<FirstT, SecondT>& right)
+{
+ return !(left < right);
+}
+
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+template<class FirstT, class SecondT>
+inline mapped_reference<FirstT, SecondT> make_mapped_reference(const FirstT& left, SecondT& right)
+{ return mapped_reference<FirstT, SecondT>(left, right); }
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108

Added: sandbox/icl/boost/icl/detail/notate.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/notate.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/*-----------------------------------------------------------------------------
+ Macro definitions for some useful notations e.g. iteration headers
+-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
+#define BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
+
+
+// Iterations over stl or stl-compatible containers:
+#define ICL_FORALL(type,iter,obj) for(type::iterator iter=(obj).begin(); (iter)!=(obj).end(); (iter)++)
+#define ICL_const_FORALL(type,iter,obj) for(type::const_iterator iter=(obj).begin(); !((iter)==(obj).end()); (iter)++)
+
+#define ICL_FORALL_THIS(iter) for(iterator iter=begin(); (iter)!=end(); (iter)++)
+#define ICL_const_FORALL_THIS(iter) for(const_iterator iter=this->begin(); (iter)!=this->end(); (iter)++)
+
+// Plain old array iteration (assuming member function VecT::size()!)
+#define ICL_FORALL_VEC(idx, vec) for(int idx=0; idx<vec.size(); idx++)
+
+namespace boost{namespace icl
+{
+ const int UNDEFINED_INDEX = -1;
+}} // namespace icl boost
+
+
+#endif // BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
+
+

Added: sandbox/icl/boost/icl/detail/on_absorbtion.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/on_absorbtion.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915
+#define BOOST_ICL_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915
+
+namespace boost{ namespace icl
+{
+
+template<class Type, class Combiner, bool absorbs_identities>
+struct on_absorbtion;
+
+template<class Type, class Combiner>
+struct on_absorbtion<Type, Combiner, false>
+{
+ typedef on_absorbtion type;
+ typedef typename Type::codomain_type codomain_type;
+
+ static bool is_absorbable(const codomain_type&){ return false; }
+};
+
+template<class Type, class Combiner>
+struct on_absorbtion<Type, Combiner, true>
+{
+ typedef on_absorbtion type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::codomain_combine codomain_combine;
+
+ static bool is_absorbable(const codomain_type& co_value)
+ {
+ return co_value == Combiner::identity_element();
+ }
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/detail/relation_state.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/relation_state.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+/*-----------------------------------------------------------------------------+
+States of comparison and inclusion relations as static constants
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_RELATION_STATE_HPP_JOFA_090214
+#define BOOST_ICL_RELATION_STATE_HPP_JOFA_090214
+
+namespace boost{namespace icl
+{
+ namespace comparison
+ {
+ static const int less = -1;
+ static const int equal = 0;
+ static const int greater = 1;
+ }
+
+ namespace inclusion
+ {
+ static const int unrelated = 0;
+ static const int subset = 1;
+ static const int superset = 2;
+ static const int equal = 3;
+ }
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_RELATION_STATE_HPP_JOFA_090214
+
+

Added: sandbox/icl/boost/icl/detail/set_algo.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/set_algo.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,135 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_SET_ALGO_HPP_JOFA_990225
+#define BOOST_ICL_SET_ALGO_HPP_JOFA_990225
+
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/icl/functors.hpp>
+
+#include <boost/icl/concept/container.hpp>
+#include <boost/icl/concept/set_value.hpp>
+#include <boost/icl/concept/map_value.hpp>
+
+
+namespace boost{namespace icl
+{
+
+namespace Set
+{
+
+template<class ObjectT, class ConstObjectT, class IteratorT>
+bool common_range(IteratorT& lwb, IteratorT& upb, ObjectT& x1, const ConstObjectT& x2)
+{
+ // lwb and upb are iterators of x1 marking the lower and upper bound of
+ // the common range of x1 and x2.
+ typedef typename ConstObjectT::const_iterator ConstObject_iterator;
+ // ObjectT may be const or non const.
+ typedef typename remove_const<ObjectT>::type PureObjectT;
+
+ lwb = x1.end();
+ upb = x1.end();
+
+ if(icl::is_empty(x1) || icl::is_empty(x2))
+ return false;
+
+ IteratorT x1_fst_ = x1.begin();
+ IteratorT x1_lst_ = x1.end(); x1_lst_--;
+
+ ConstObject_iterator x2_fst_ = x2.begin();
+ ConstObject_iterator x2_lst_ = x2.end(); x2_lst_--;
+
+ typename ObjectT::key_compare key_less;
+ if(key_less(icl::key_value< PureObjectT>(x1_lst_),
+ icl::key_value<ConstObjectT>(x2_fst_))) // {x1} {x2}
+ return false;
+ if(key_less(icl::key_value<ConstObjectT>(x2_lst_),
+ icl::key_value< PureObjectT>(x1_fst_))) // {x2} {x1}
+ return false;
+
+ // We do have a common range
+ lwb = x1.lower_bound(icl::key_value<ConstObjectT>(x2_fst_));
+ upb = x1.upper_bound(icl::key_value<ConstObjectT>(x2_lst_));
+
+ return true;
+}
+
+
+/** Function template <tt>contained_in</tt> implements the subset relation.
+<tt>contained_in(sub, super)</tt> is true if <tt>sub</tt> is contained in <tt>super</tt> */
+template<class SetType>
+inline bool within(const SetType& sub, const SetType& super)
+{
+ if(&super == &sub) return true;
+ if(icl::is_empty(sub)) return true;
+ if(icl::is_empty(super)) return false;
+
+ typename SetType::const_iterator common_lwb_, common_upb_;
+ if(!common_range(common_lwb_, common_upb_, sub, super))
+ return false;
+
+ typename SetType::const_iterator sub_ = common_lwb_, super_;
+ while(sub_ != common_upb_)
+ {
+ super_ = super.find(*sub_++);
+ if(super_ == super.end())
+ return false;
+ }
+ return true;
+}
+
+template<class SetType>
+bool intersects(const SetType& left, const SetType& right)
+{
+ typename SetType::const_iterator common_lwb_right_, common_upb_right_;
+ if(!common_range(common_lwb_right_, common_upb_right_, right, left))
+ return false;
+
+ typename SetType::const_iterator right_ = common_lwb_right_, found_;
+ while(right_ != common_upb_right_)
+ {
+ found_ = left.find(*right_++);
+ if(found_ != left.end())
+ return true; // found a common element
+ }
+ // found no common element
+ return false;
+}
+
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
+#endif // I do guarantee here that I am using the parameters correctly :)
+
+/** Function template <tt>lexicographical_equal</tt> implements
+ lexicographical equality. */
+template<class SetType>
+inline bool lexicographical_equal(const SetType& left, const SetType& right)
+{
+ if(&left == &right)
+ return true;
+ else return left.iterative_size() == right.iterative_size()
+ && std::equal(left.begin(), left.end(), right.begin());
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+} // namespace Set
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/detail/std_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/std_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: 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 BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007
+#define BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007
+
+#include <set>
+#include <boost/config.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+
+
+namespace boost{namespace icl
+{
+
+template <class Type>
+struct is_set<std::set<Type> >
+{
+ typedef is_set<std::set<Type> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+template <class Type>
+struct type_to_string<std::set<Type> >
+{
+ static std::string apply()
+ { return "set<"+ type_to_string<Type>::apply() +">"; }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007
+

Added: sandbox/icl/boost/icl/detail/subset_comparer.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/detail/subset_comparer.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,259 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202
+#define BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202
+
+#include <boost/mpl/and.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/codomain_type_of.hpp>
+#include <boost/icl/type_traits/is_concept_equivalent.hpp>
+#include <boost/icl/type_traits/is_element_container.hpp>
+#include <boost/icl/concept/interval_set_value.hpp>
+#include <boost/icl/concept/map_value.hpp>
+
+namespace boost{namespace icl
+{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace Set
+{
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+struct settic_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ return inclusion_compare( co_value<LeftT>(left_),
+ co_value<RightT>(right_));
+ }
+};
+
+template<class LeftT, class RightT>
+struct atomic_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ if(co_value<LeftT>(left_) == co_value<RightT>(right_))
+ return inclusion::equal;
+ else
+ return inclusion::unrelated;
+ }
+};
+
+template<class LeftT, class RightT>
+struct empty_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator&, typename RightT::const_iterator&)
+ {
+ return inclusion::equal;
+ }
+};
+
+template<class LeftT, class RightT>
+struct map_codomain_compare
+{
+ static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_)
+ {
+ using namespace boost::mpl;
+ typedef typename LeftT::codomain_type LeftCodomainT;
+ typedef typename RightT::codomain_type RightCodomainT;
+
+ return
+ if_<
+ bool_<is_concept_equivalent<is_set,LeftCodomainT,
+ RightCodomainT>::value>,
+ settic_codomain_compare<LeftT,RightT>,
+ atomic_codomain_compare<LeftT,RightT>
+ >
+ ::type::apply(left_, right_);
+ }
+};
+
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+class subset_comparer
+{
+private:
+ subset_comparer& operator = (const subset_comparer&);
+public:
+ typedef typename LeftT::const_iterator LeftIterT;
+ typedef typename RightT::const_iterator RightIterT;
+
+ BOOST_STATIC_CONSTANT(bool,
+ _compare_codomain = (mpl::and_<is_map<LeftT>, is_map<RightT> >::value));
+
+ subset_comparer(const LeftT& left,
+ const RightT& right,
+ const LeftIterT& left_end,
+ const RightIterT& right_end)
+ : _left(left), _right(right),
+ _left_end(left_end), _right_end(right_end), _result(equal)
+ {}
+
+ enum{nextboth, stop};
+
+ enum
+ {
+ unrelated = inclusion::unrelated,
+ subset = inclusion::subset, // left is_subset_of right
+ superset = inclusion::superset, // left is_superset_of right
+ equal = inclusion::equal // equal = subset | superset
+ };
+
+ int result()const{ return _result; }
+
+ int co_compare(LeftIterT& left, RightIterT& right)
+ {
+ using namespace boost::mpl;
+ typedef typename codomain_type_of<LeftT>::type LeftCodomainT;
+ typedef typename codomain_type_of<RightT>::type RightCodomainT;
+
+ return
+ if_<
+ bool_<is_concept_equivalent<is_element_map,LeftT,RightT>::value>,
+ map_codomain_compare<LeftT,RightT>,
+ empty_codomain_compare<LeftT,RightT>
+ >
+ ::type::apply(left,right);
+ }
+
+ int restrict_result(int state) { return _result &= state; }
+
+ int next_both(LeftIterT& left, RightIterT& right)
+ {
+ if(left == _left_end && right == _right_end)
+ return stop;
+ else if(left == _left_end)
+ {
+ restrict_result(subset);
+ return stop;
+ }
+ else if(right == _right_end)
+ {
+ restrict_result(superset);
+ return stop;
+ }
+ else if(typename LeftT::key_compare()(key_value<LeftT>(left), key_value<RightT>(right)))
+ { // left: *left . . *joint_ left could be superset
+ // right: *right ... if joint_ exists
+ restrict_result(superset);
+ if(unrelated == _result)
+ return stop;
+ else
+ {
+ LeftIterT joint_ = _left.lower_bound(key_value<RightT>(right));
+ if( joint_ == _left.end()
+ || typename LeftT::key_compare()(key_value<RightT>(right), key_value<LeftT>(joint_)))
+ {
+ _result = unrelated;
+ return stop;
+ }
+ else
+ left = joint_;
+ }
+ }
+ else if(typename LeftT::key_compare()(key_value<RightT>(right), key_value<LeftT>(left)))
+ { // left: *left left could be subset
+ // right:*right . . .*joint_ if *joint_ exists
+ restrict_result(subset);
+ if(unrelated == _result)
+ return stop;
+ else
+ {
+ RightIterT joint_ = _right.lower_bound(key_value<LeftT>(left));
+ if( joint_ == _right.end()
+ || typename LeftT::key_compare()(key_value<LeftT>(left), key_value<RightT>(joint_)))
+ {
+ _result = unrelated;
+ return stop;
+ }
+ else
+ right = joint_;
+ }
+ }
+
+ // left =key= right
+ if(_compare_codomain)
+ if(unrelated == restrict_result(co_compare(left,right)))
+ return stop;
+
+ ++left;
+ ++right;
+ return nextboth;
+ }
+
+private:
+ const LeftT& _left;
+ const RightT& _right;
+ LeftIterT _left_end;
+ RightIterT _right_end;
+ int _result;
+};
+
+
+
+
+
+//------------------------------------------------------------------------------
+// Subset/superset comparison on ranges of two interval container
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+int subset_compare
+(
+ const LeftT& left, //sub
+ const RightT& right, //super
+ typename LeftT::const_iterator left_begin,
+ typename LeftT::const_iterator left_end,
+ typename RightT::const_iterator right_begin,
+ typename RightT::const_iterator right_end
+)
+{
+ typedef subset_comparer<LeftT,RightT> Step;
+ Step step(left, right, left_end, right_end);
+
+ typename LeftT::const_iterator left_ = left_begin;
+ typename RightT::const_iterator right_ = right_begin;
+
+ int state = Step::nextboth;
+ while(state != Step::stop)
+ state = step.next_both(left_, right_);
+
+ return step.result();
+}
+
+template<class LeftT, class RightT>
+int subset_compare(const LeftT& left, const RightT& right)
+{
+ return subset_compare
+ (
+ left, right,
+ left.begin(), left.end(),
+ right.begin(), right.end()
+ );
+}
+
+
+} // namespace Set
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/discrete_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/discrete_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,168 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100403
+#define BOOST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100403
+
+#include <functional>
+#include <boost/static_assert.hpp>
+#include <boost/concept/assert.hpp>
+#include <boost/icl/detail/concept_check.hpp>
+#include <boost/icl/type_traits/succ_pred.hpp>
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/is_discrete_interval.hpp>
+#include <boost/icl/interval_bounds.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class discrete_interval
+{
+public:
+ typedef discrete_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+ typedef typename bounded_value<DomainT>::type bounded_domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>[0,0)</tt>. */
+ discrete_interval()
+ : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ , _bounds(interval_bounds::right_open())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for a closed singleton interval <tt>[val,val]</tt> */
+ explicit discrete_interval(const DomainT& val)
+ : _lwb(val), _upb(val), _bounds(interval_bounds::closed())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ discrete_interval(const DomainT& low, const DomainT& up,
+ interval_bounds bounds = interval_bounds::right_open(),
+ discrete_interval* = 0)
+ : _lwb(low), _upb(up), _bounds(bounds)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ }
+
+ domain_type lower()const { return _lwb; }
+ domain_type upper()const { return _upb; }
+ interval_bounds bounds()const{ return _bounds; }
+
+ static discrete_interval open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::open()); }
+ static discrete_interval right_open(const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::right_open());}
+ static discrete_interval left_open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::left_open()); }
+ static discrete_interval closed (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::closed()); }
+
+private:
+ domain_type _lwb;
+ domain_type _upb;
+ interval_bounds _bounds;
+};
+
+//==============================================================================
+//=T discrete_interval -> concept intervals
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::discrete_interval<DomainT, Compare> >
+{
+ typedef interval_traits type;
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::discrete_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+//==============================================================================
+//=T discrete_interval -> concept dynamic_interval_traits
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct dynamic_interval_traits<boost::icl::discrete_interval<DomainT,Compare> >
+{
+ typedef dynamic_interval_traits type;
+ typedef boost::icl::discrete_interval<DomainT,Compare> interval_type;
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up, interval_bounds bounds)
+ {
+ return interval_type(lo, up, bounds, static_cast<interval_type*>(0) );
+ }
+
+ static interval_type construct_bounded(const bounded_value<DomainT>& lo,
+ const bounded_value<DomainT>& up)
+ {
+ return interval_type
+ (
+ lo.value(), up.value(),
+ lo.bound().left() | up.bound().right(),
+ static_cast<interval_type* >(0)
+ );
+ }
+};
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< discrete_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct is_discrete_interval<discrete_interval<DomainT,Compare> >
+{
+ typedef is_discrete_interval<discrete_interval<DomainT,Compare> > type;
+ BOOST_STATIC_CONSTANT(bool, value = is_discrete<DomainT>::value);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::discrete_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "dI<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT>
+struct value_size<icl::discrete_interval<DomainT> >
+{
+ static std::size_t apply(const icl::discrete_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/dynamic_interval_traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/dynamic_interval_traits.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_DYNAMIC_INTERVAL_TRAITS_HPP_JOFA_100926
+#define BOOST_ICL_DYNAMIC_INTERVAL_TRAITS_HPP_JOFA_100926
+
+namespace boost{ namespace icl
+{
+
+class interval_bounds;
+template<class DomainT> class bounded_value;
+
+
+//------------------------------------------------------------------------------
+//- Adapter class
+//------------------------------------------------------------------------------
+template<class Type>
+struct dynamic_interval_traits
+{
+ typedef typename Type::domain_type domain_type;
+ typedef typename Type::domain_compare domain_compare;
+
+ static Type construct(const domain_type& lo, const domain_type& up, interval_bounds bounds);
+ static Type construct_bounded(const bounded_value<domain_type>& lo,
+ const bounded_value<domain_type>& up);
+};
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/functors.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/functors.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,473 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FUNCTORS_HPP_JOFA_080315
+#define BOOST_ICL_FUNCTORS_HPP_JOFA_080315
+
+#include <functional>
+#include <boost/type_traits.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/unit_element.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/type_traits/has_set_semantics.hpp>
+
+namespace boost{namespace icl
+{
+ // ------------------------------------------------------------------------
+ template <typename Type> struct identity_based_inplace_combine
+ : public std::binary_function<Type&, const Type&, void>
+ {
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct unit_element_based_inplace_combine
+ : public std::binary_function<Type&, const Type&, void>
+ {
+ static Type identity_element() { return boost::icl::unit_element<Type>::value(); }
+ };
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_identity
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_identity<Type> type;
+ void operator()(Type& object, const Type& operand)const{}
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_identity>::apply()
+ { return "i="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_erasure
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_erasure<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ {
+ if(object == operand)
+ object = Type();
+ }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_erasure>::apply()
+ { return "0="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_plus
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_plus<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object += operand; }
+
+ static void version(Type& object){}
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_plus>::apply() { return "+="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_minus
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_minus<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object -= operand; }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_minus>::apply() { return "-="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_bit_add
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_bit_add<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object |= operand; }
+
+ static void version(Type& object){}
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_bit_add>::apply() { return "b|="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_bit_subtract
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_bit_subtract<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object &= ~operand; }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_bit_subtract>::apply() { return "b-="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_bit_and
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_bit_and<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object &= operand; }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_bit_and>::apply() { return "b&="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_bit_xor
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_bit_xor<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object ^= operand; }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_et
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_et<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object &= operand; }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_et>::apply() { return "&="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_caret
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_caret<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object ^= operand; }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_caret>::apply() { return "^="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_insert
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_insert<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { insert(object,operand); }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_insert>::apply() { return "ins="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_erase
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_erase<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { erase(object,operand); }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_erase>::apply() { return "ers="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_star
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_star<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object *= operand; }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_star>::apply() { return "*="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_slash
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_slash<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ { object /= operand; }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_slash>::apply() { return "/="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_max
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_max<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ {
+ if(object < operand)
+ object = operand;
+ }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_max>::apply() { return "max="; }
+
+ // ------------------------------------------------------------------------
+ template <typename Type> struct inplace_min
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef inplace_min<Type> type;
+
+ void operator()(Type& object, const Type& operand)const
+ {
+ if(object > operand)
+ object = operand;
+ }
+
+ static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<inplace_min>::apply() { return "min="; }
+
+ //--------------------------------------------------------------------------
+ // Inter_section functor
+ //--------------------------------------------------------------------------
+ template<class Type> struct inter_section
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef typename boost::mpl::
+ if_<has_set_semantics<Type>,
+ icl::inplace_et<Type>,
+ icl::inplace_plus<Type>
+ >::type
+ type;
+
+ void operator()(Type& object, const Type& operand)const
+ {
+ type()(object, operand);
+ }
+ };
+
+ //--------------------------------------------------------------------------
+ // Inverse functor
+ //--------------------------------------------------------------------------
+ template<class Functor> struct inverse;
+
+ template<class Type>
+ struct inverse<icl::inplace_plus<Type> >
+ { typedef icl::inplace_minus<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_minus<Type> >
+ { typedef icl::inplace_plus<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_bit_add<Type> >
+ { typedef icl::inplace_bit_subtract<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_bit_subtract<Type> >
+ { typedef icl::inplace_bit_add<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_et<Type> >
+ { typedef icl::inplace_caret<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_caret<Type> >
+ { typedef icl::inplace_et<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_bit_and<Type> >
+ { typedef icl::inplace_bit_xor<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_bit_xor<Type> >
+ { typedef icl::inplace_bit_and<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_star<Type> >
+ { typedef icl::inplace_slash<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_slash<Type> >
+ { typedef icl::inplace_star<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_max<Type> >
+ { typedef icl::inplace_min<Type> type; };
+
+ template<class Type>
+ struct inverse<icl::inplace_min<Type> >
+ { typedef icl::inplace_max<Type> type; };
+
+
+ //--------------------------------------------------------------------------
+ // Inverse inter_section functor
+ //--------------------------------------------------------------------------
+ template<class Type>
+ struct inverse<icl::inter_section<Type> >
+ : public identity_based_inplace_combine<Type>
+ {
+ typedef typename boost::mpl::
+ if_<has_set_semantics<Type>,
+ icl::inplace_caret<Type>,
+ icl::inplace_minus<Type>
+ >::type
+ type;
+
+ void operator()(Type& object, const Type& operand)const
+ {
+ type()(object, operand);
+ }
+ };
+
+
+ //--------------------------------------------------------------------------
+ // Positive or negative functor trait
+ //--------------------------------------------------------------------------
+
+ // A binary operation - is negative (or inverting) with respect to the
+ // neutral element iff it yields the inverse element if it is applied to the
+ // identity element:
+ // 0 - x = -x
+ // For a functor that wraps the inplace of op-assign version this is
+ // equivalent to
+ //
+ // T x = ..., y;
+ // y = Functor::identity_element();
+ // Functor()(y, x); // y == inverse_of(x)
+
+ template<class Functor> struct is_negative;
+
+ template<class Functor>
+ struct is_negative
+ {
+ typedef is_negative<Functor> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template<class Type>
+ struct is_negative<icl::inplace_minus<Type> >
+ {
+ typedef is_negative type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<class Type>
+ struct is_negative<icl::inplace_bit_subtract<Type> >
+ {
+ typedef is_negative type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ //--------------------------------------------------------------------------
+ // Pro- or in-version functor
+ //--------------------------------------------------------------------------
+ template<class Combiner> struct conversion;
+
+ template<class Combiner>
+ struct conversion
+ {
+ typedef conversion<Combiner> type;
+ typedef typename
+ remove_const<
+ typename remove_reference<typename Combiner::first_argument_type
+ >::type
+ >::type
+ argument_type;
+ // The proversion of an op-assign functor o= lets the value unchanged
+ // (0 o= x) == x;
+ // Example += : (0 += x) == x
+ static argument_type proversion(const argument_type& value)
+ {
+ return value;
+ }
+
+ // The inversion of an op-assign functor o= inverts the value x
+ // to it's inverse element -x
+ // (0 o= x) == -x;
+ // Example -= : (0 -= x) == -x
+ static argument_type inversion(const argument_type& value)
+ {
+ argument_type inverse = Combiner::identity_element();
+ Combiner()(inverse, value);
+ return inverse;
+ }
+ };
+
+ template<class Combiner> struct version : public conversion<Combiner>
+ {
+ typedef version<Combiner> type;
+ typedef conversion<Combiner> base_type;
+ typedef typename base_type::argument_type argument_type;
+
+ argument_type operator()(const argument_type& value)
+ { return base_type::proversion(value); }
+ };
+
+ template<>struct version<icl::inplace_minus<short > >{short operator()(short val){return -val;}};
+ template<>struct version<icl::inplace_minus<int > >{int operator()(int val){return -val;}};
+ template<>struct version<icl::inplace_minus<long > >{long operator()(long val){return -val;}};
+ template<>struct version<icl::inplace_minus<long long > >{long long operator()(long long val){return -val;}};
+ template<>struct version<icl::inplace_minus<float > >{float operator()(float val){return -val;}};
+ template<>struct version<icl::inplace_minus<double > >{double operator()(double val){return -val;}};
+ template<>struct version<icl::inplace_minus<long double> >{long double operator()(long double val){return -val;}};
+
+ template<class Type>
+ struct version<icl::inplace_minus<Type> > : public conversion<icl::inplace_minus<Type> >
+ {
+ typedef version<icl::inplace_minus<Type> > type;
+ typedef conversion<icl::inplace_minus<Type> > base_type;
+ typedef typename base_type::argument_type argument_type;
+
+ Type operator()(const Type& value)
+ {
+ return base_type::inversion(value);
+ }
+ };
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/gregorian.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/gregorian.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,102 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416
+#define BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416
+
+#include <stdio.h>
+#include <string>
+#include <sstream>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data
+#endif
+
+#include <boost/date_time/gregorian/gregorian.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+#include <boost/icl/type_traits/difference_type_of.hpp>
+#include <boost/icl/type_traits/size_type_of.hpp>
+
+namespace boost{namespace icl
+{
+ template<> struct is_discrete<boost::gregorian::date>
+ {
+ typedef is_discrete type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<>
+ inline boost::gregorian::date identity_element<boost::gregorian::date>::value()
+ {
+ return boost::gregorian::date(boost::gregorian::min_date_time);
+ }
+
+ template<>
+ struct identity_element<boost::gregorian::date_duration>
+ {
+ static boost::gregorian::date_duration value()
+ {
+ return boost::gregorian::date(boost::gregorian::min_date_time)
+ - boost::gregorian::date(boost::gregorian::min_date_time);
+ }
+ };
+
+ template<>
+ struct has_difference<boost::gregorian::date>
+ {
+ typedef has_difference type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<>
+ struct difference_type_of<boost::gregorian::date>
+ { typedef boost::gregorian::date_duration type; };
+
+ template<>
+ struct size_type_of<boost::gregorian::date>
+ { typedef boost::gregorian::date_duration type; };
+
+
+
+ // ------------------------------------------------------------------------
+ boost::gregorian::date operator ++(boost::gregorian::date& x)
+ {
+ return x += boost::gregorian::date::duration_type::unit();
+ }
+
+ boost::gregorian::date operator --(boost::gregorian::date& x)
+ {
+ return x -= boost::gregorian::date::duration_type::unit();
+ }
+
+ // ------------------------------------------------------------------------
+ boost::gregorian::date_duration operator ++(boost::gregorian::date_duration& x)
+ {
+ return x += boost::gregorian::date::duration_type::unit();
+ }
+
+ boost::gregorian::date_duration operator --(boost::gregorian::date_duration& x)
+ {
+ return x -= boost::gregorian::date::duration_type::unit();
+ }
+
+ // ------------------------------------------------------------------------
+
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/impl_config.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/impl_config.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,45 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225
+#define BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225
+
+/*-----------------------------------------------------------------------------+
+You can choose an implementation for the basic set and map classes.
+Select at most ONE of the following defines
++-----------------------------------------------------------------------------*/
+
+//#define ICL_USE_STD_IMPLEMENTATION
+//#define ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION
+//#define ICL_USE_BOOST_MOVE_IMPLEMENTATION
+
+/*-----------------------------------------------------------------------------+
+NO define or ICL_USE_STD_IMPLEMENTATION: Choose std::set and std::map as
+ implementing containers (default).
+
+ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION: Choose set and map implementations
+ from boost::interprocess.
+
+ICL_USE_BOOST_MOVE_IMPLEMENTATION: Move aware containers from boost::container
+ (NEW) are used. Currently (January 2010) this is only experimental.
+ boost::move from the boost::sandbox has to be used. This is depreciated for
+ production code, as long as move aware containers are not officially
+ accepted into boost.
++-----------------------------------------------------------------------------*/
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#define ICL_IMPL_SPACE boost::interprocess
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#define ICL_IMPL_SPACE boost::container
+#else
+#define ICL_IMPL_SPACE std
+#endif
+
+#endif // BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225
+
+

Added: sandbox/icl/boost/icl/interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,136 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_INTERVAL_HPP_JOFA_101014
+#define BOOST_ICL_INTERVAL_HPP_JOFA_101014
+
+
+#include <boost/icl/type_traits/interval_type_default.hpp>
+
+
+namespace boost{ namespace icl
+{
+
+ template <class IntervalT, bool IsDiscrete, bound_type PretendedBounds, bound_type RepresentedBounds>
+ struct static_interval;
+
+ template <class DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+ struct interval
+ {
+ typedef typename interval_type_default<DomainT,Compare>::type interval_type;
+ typedef interval_type type;
+
+#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+ static inline interval_type open(const DomainT& low, const DomainT& up)
+ {
+ return
+ static_interval
+ < interval_type // if the domain_type is discrete ...
+ , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+ , interval_bounds::static_open // 'pretended' bounds will be transformed to
+ , interval_bound_type<interval_type>::value // the represented bounds
+ >
+ ::construct(low, up);
+ }
+
+ static inline interval_type left_open(const DomainT& low, const DomainT& up)
+ {
+ return
+ static_interval
+ < interval_type
+ , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+ , interval_bounds::static_left_open
+ , interval_bound_type<interval_type>::value
+ >
+ ::construct(low, up);
+ }
+
+ static inline interval_type right_open(const DomainT& low, const DomainT& up)
+ {
+ return
+ static_interval
+ < interval_type
+ , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+ , interval_bounds::static_right_open
+ , interval_bound_type<interval_type>::value
+ >
+ ::construct(low, up);
+ }
+
+ static inline interval_type closed(const DomainT& low, const DomainT& up)
+ {
+ return
+ static_interval
+ < interval_type
+ , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+ , interval_bounds::static_closed
+ , interval_bound_type<interval_type>::value
+ >
+ ::construct(low, up);
+ }
+
+ static inline interval_type construct(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up); }
+
+#else // ICL_USE_DYNAMIC_INTERVAL_BORDER_DEFAULTS
+ static inline interval_type right_open(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up, interval_bounds::right_open()); }
+
+ static inline interval_type left_open(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up, interval_bounds::left_open()); }
+
+ static inline interval_type open(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up, interval_bounds::open()); }
+
+ static inline interval_type closed(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up, interval_bounds::closed()); }
+
+ static inline interval_type construct(const DomainT& low, const DomainT& up)
+ { return icl::construct<interval_type>(low, up); }
+
+#endif
+ };
+
+ template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds>
+ struct static_interval<IntervalT, true, PretendedBounds, RepresentedBounds>
+ {// is_discrete<domain_type<IntervalT>>
+ typedef typename interval_traits<IntervalT>::domain_type domain_type;
+
+ static inline IntervalT construct(const domain_type& low, const domain_type& up)
+ {
+ return icl::construct<IntervalT>(
+ shift_lower(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), low)
+ , shift_upper(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), up )
+ );
+ }
+ };
+
+ template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds>
+ struct static_interval<IntervalT, false, PretendedBounds, RepresentedBounds>
+ {// !is_discrete<domain_type<IntervalT>>
+ typedef typename interval_traits<IntervalT>::domain_type domain_type;
+
+ static inline IntervalT construct(const domain_type& low, const domain_type& up)
+ {
+ BOOST_STATIC_ASSERT((is_discrete<domain_type>::value || PretendedBounds==RepresentedBounds));
+ // For domain_types that are not discrete, e.g. interval<float>
+ // one of the following must hold: If you call
+ // interval<T>::right_open(x,y) then interval<T>::type must be static_right_open
+ // interval<T>::left_open(x,y) then interval<T>::type must be static_left_open
+ // interval<T>::open(x,y) then interval<T>::type must be static_open
+ // interval<T>::closed(x,y) then interval<T>::type must be static_closed
+ // Conversion between 'PretendedBounds' and 'RepresentedBounds' is only possible
+ // for discrete domain_types.
+ return icl::construct<IntervalT>(low, up);
+ }
+ };
+
+}} // namespace boost icl
+
+#endif // BOOST_ICL_INTERVAL_HPP_JOFA_101014
+

Added: sandbox/icl/boost/icl/interval_base_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_base_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,1348 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 __interval_base_map_h_JOFA_990223__
+#define __interval_base_map_h_JOFA_990223__
+
+#include <limits>
+#include <boost/type_traits/ice.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/detail/on_absorbtion.hpp>
+#include <boost/icl/detail/interval_map_algo.hpp>
+
+#include <boost/icl/associative_interval_container.hpp>
+
+#include <boost/icl/type_traits/is_interval_splitter.hpp>
+#include <boost/icl/map.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class DomainT, class CodomainT>
+struct mapping_pair
+{
+ DomainT key;
+ CodomainT data;
+
+ mapping_pair():key(), data(){}
+
+ mapping_pair(const DomainT& key_value, const CodomainT& data_value)
+ :key(key_value), data(data_value){}
+
+ mapping_pair(const std::pair<DomainT,CodomainT>& std_pair)
+ :key(std_pair.first), data(std_pair.second){}
+};
+
+/** \brief Implements a map as a map of intervals (base class) */
+template
+<
+ class SubType,
+ typename DomainT,
+ typename CodomainT,
+ class Traits = icl::partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class interval_base_map
+{
+public:
+ //==========================================================================
+ //= Associated types
+ //==========================================================================
+ typedef interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>
+ type;
+
+ /// The designated \e derived or \e sub_type of this base class
+ typedef SubType sub_type;
+
+ /// Auxilliary type for overloadresolution
+ typedef type overloadable_type;
+
+ /// Traits of an itl map
+ typedef Traits traits;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Related types
+ //--------------------------------------------------------------------------
+ /// The atomized type representing the corresponding container of elements
+ typedef typename icl::map<DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Alloc> atomized_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Data
+ //--------------------------------------------------------------------------
+ /// Domain type (type of the keys) of the map
+ typedef DomainT domain_type;
+ typedef typename boost::call_traits<DomainT>::param_type domain_param;
+ /// Domain type (type of the keys) of the map
+ typedef CodomainT codomain_type;
+ /// 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 ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ /// Auxiliary type for overload resolution
+ typedef std::pair<interval_type,CodomainT> interval_mapping_type;
+ /// Type of an interval containers segment, that is spanned by an interval
+ typedef std::pair<interval_type,CodomainT> segment_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Size
+ //--------------------------------------------------------------------------
+ /// The difference type of an interval which is sometimes different form the domain_type
+ typedef typename difference_type_of<domain_type>::type difference_type;
+ /// The size type of an interval which is mostly std::size_t
+ typedef typename size_type_of<domain_type>::type size_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Functors
+ //--------------------------------------------------------------------------
+ /// Comparison functor for domain values
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef ICL_COMPARE_DOMAIN(Compare,segment_type) segment_compare;
+ /// Combine functor for codomain value aggregation
+ typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine;
+ /// Inverse Combine functor for codomain value aggregation
+ typedef typename inverse<codomain_combine>::type inverse_codomain_combine;
+ /// Intersection functor for codomain values
+
+ typedef typename mpl::if_
+ <has_set_semantics<codomain_type>
+ , ICL_SECTION_CODOMAIN(Section,CodomainT)
+ , codomain_combine
+ >::type codomain_intersect;
+
+
+ /// Inverse Combine functor for codomain value intersection
+ typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect;
+
+ /// Comparison functor for intervals which are keys as well
+ typedef exclusive_less_than<interval_type> interval_compare;
+
+ /// Comparison functor for keys
+ typedef exclusive_less_than<interval_type> key_compare;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Implementation and stl related
+ //--------------------------------------------------------------------------
+ /// The allocator type of the set
+ typedef Alloc<std::pair<const interval_type, codomain_type> >
+ allocator_type;
+
+ /// Container type for the implementation
+ typedef ICL_IMPL_SPACE::map<interval_type,codomain_type,
+ key_compare,allocator_type> ImplMapT;
+
+ /// key type of the implementing container
+ typedef typename ImplMapT::key_type key_type;
+ /// value type of the implementing container
+ typedef typename ImplMapT::value_type value_type;
+ /// data type of the implementing container
+ typedef typename ImplMapT::value_type::second_type data_type;
+
+ /// pointer type
+ typedef typename ImplMapT::pointer pointer;
+ /// const pointer type
+ typedef typename ImplMapT::const_pointer const_pointer;
+ /// reference type
+ typedef typename ImplMapT::reference reference;
+ /// const reference type
+ typedef typename ImplMapT::const_reference const_reference;
+
+ /// iterator for iteration over intervals
+ typedef typename ImplMapT::iterator iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplMapT::const_iterator const_iterator;
+ /// iterator for reverse iteration over intervals
+ typedef typename ImplMapT::reverse_iterator reverse_iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplMapT::const_reverse_iterator const_reverse_iterator;
+
+ /// element iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<iterator> element_iterator;
+ /// const element iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<const_iterator> element_const_iterator;
+ /// element reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<reverse_iterator> element_reverse_iterator;
+ /// element const reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<const_reverse_iterator> element_const_reverse_iterator;
+
+ typedef typename on_absorbtion<type, codomain_combine,
+ Traits::absorbs_identities>::type on_codomain_absorbtion;
+
+public:
+ BOOST_STATIC_CONSTANT(bool,
+ is_total_invertible = ( Traits::is_total
+ && has_inverse<codomain_type>::value));
+
+ BOOST_STATIC_CONSTANT(int, fineness = 0);
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor for the empty object */
+ interval_base_map()
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>));
+ BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>));
+ }
+
+ /** Copy constructor */
+ interval_base_map(const interval_base_map& src): _map(src._map)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>));
+ BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>));
+ }
+
+ /** Assignment operator */
+ interval_base_map& operator = (const interval_base_map& src)
+ {
+ this->_map = src._map;
+ return *this;
+ }
+
+ /** swap the content of containers */
+ void swap(interval_base_map& object) { _map.swap(object._map); }
+
+ //==========================================================================
+ //= Containedness
+ //==========================================================================
+ /** clear the map */
+ void clear() { icl::clear(*that()); }
+
+ /** is the map empty? */
+ bool empty()const { return icl::is_empty(*that()); }
+
+ //==========================================================================
+ //= Size
+ //==========================================================================
+ /** An interval map's size is it's cardinality */
+ size_type size()const
+ {
+ return icl::cardinality(*that());
+ }
+
+ /** Size of the iteration over this container */
+ std::size_t iterative_size()const
+ {
+ return _map.size();
+ }
+
+ //==========================================================================
+ //= Selection
+ //==========================================================================
+
+ /** Find the interval value pair, that contains \c key */
+ const_iterator find(const domain_type& key)const
+ {
+ return _map.find(interval_type(key));
+ }
+
+ const_iterator find(const interval_type& key)const
+ {
+ return _map.find(key);
+ }
+
+ /** Total select function. */
+ codomain_type operator()(const domain_type& key)const
+ {
+ const_iterator it_ = _map.find(interval_type(key));
+ return it_==end() ? identity_element<codomain_type>::value()
+ : it_->second;
+ }
+
+ //==========================================================================
+ //= Addition
+ //==========================================================================
+
+ /** Addition of a key value pair to the map */
+ SubType& add(const element_type& key_value_pair)
+ {
+ return icl::add(*that(), key_value_pair);
+ }
+
+ /** Addition of an interval value pair to the map. */
+ SubType& add(const segment_type& interval_value_pair)
+ {
+ this->template _add<codomain_combine>(interval_value_pair);
+ return *that();
+ }
+
+ /** Addition of an interval value pair \c interval_value_pair to the map.
+ Iterator \c prior_ is a hint to the position \c interval_value_pair can be
+ inserted after. */
+ iterator add(iterator prior_, const segment_type& interval_value_pair)
+ {
+ return this->template _add<codomain_combine>(prior_, interval_value_pair);
+ }
+
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
+ /** Subtraction of a key value pair from the map */
+ SubType& subtract(const element_type& key_value_pair)
+ {
+ return icl::subtract(*that(), key_value_pair);
+ }
+
+ /** Subtraction of an interval value pair from the map. */
+ SubType& subtract(const segment_type& interval_value_pair)
+ {
+ on_invertible<type, is_total_invertible>
+ ::subtract(*that(), interval_value_pair);
+ return *that();
+ }
+
+ //==========================================================================
+ //= Insertion
+ //==========================================================================
+ /** Insertion of a \c key_value_pair into the map. */
+ SubType& insert(const element_type& key_value_pair)
+ {
+ return icl::insert(*that(), key_value_pair);
+ }
+
+ /** Insertion of an \c interval_value_pair into the map. */
+ SubType& insert(const segment_type& interval_value_pair)
+ {
+ _insert(interval_value_pair);
+ return *that();
+ }
+
+ /** Insertion of an \c interval_value_pair into the map. Iterator \c prior_.
+ serves as a hint to insert after the element \c prior point to. */
+ iterator insert(iterator prior, const segment_type& interval_value_pair)
+ {
+ return _insert(prior, interval_value_pair);
+ }
+
+ /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */
+ SubType& set(const element_type& key_value_pair)
+ {
+ return icl::set_at(*that(), key_value_pair);
+ }
+
+ /** With <tt>interval_value_pair = (I,v)</tt> set value \c v
+ for all keys in interval \c I in the map. */
+ SubType& set(const segment_type& interval_value_pair)
+ {
+ return icl::set_at(*that(), interval_value_pair);
+ }
+
+ //==========================================================================
+ //= Erasure
+ //==========================================================================
+ /** Erase a \c key_value_pair from the map. */
+ SubType& erase(const element_type& key_value_pair)
+ {
+ icl::erase(*that(), key_value_pair);
+ return *that();
+ }
+
+ /** Erase an \c interval_value_pair from the map. */
+ SubType& erase(const segment_type& interval_value_pair);
+
+ /** Erase a key value pair for \c key. */
+ SubType& erase(const domain_type& key)
+ {
+ return icl::erase(*that(), key);
+ }
+
+ /** Erase all value pairs within the range of the
+ interval <tt>inter_val</tt> from the map. */
+ SubType& erase(const interval_type& inter_val);
+
+
+ /** Erase all value pairs within the range of the interval that iterator
+ \c position points to. */
+ void erase(iterator position){ this->_map.erase(position); }
+
+ /** Erase all value pairs for a range of iterators <tt>[first,past)</tt>. */
+ void erase(iterator first, iterator past){ this->_map.erase(first, past); }
+
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
+ /** The intersection of \c interval_value_pair and \c *this map is added to \c section. */
+ void add_intersection(SubType& section, const segment_type& interval_value_pair)const
+ {
+ on_definedness<SubType, Traits::is_total>
+ ::add_intersection(section, *that(), interval_value_pair);
+ }
+
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+ /** If \c *this map contains \c key_value_pair it is erased, otherwise it is added. */
+ SubType& flip(const element_type& key_value_pair)
+ {
+ return icl::flip(*that(), key_value_pair);
+ }
+
+ /** If \c *this map contains \c interval_value_pair it is erased, otherwise it is added. */
+ SubType& flip(const segment_type& interval_value_pair)
+ {
+ on_total_absorbable<SubType, Traits::is_total, Traits::absorbs_identities>
+ ::flip(*that(), interval_value_pair);
+ return *that();
+ }
+
+ //==========================================================================
+ //= Iterator related
+ //==========================================================================
+
+ iterator lower_bound(const key_type& interval)
+ { return _map.lower_bound(interval); }
+
+ iterator upper_bound(const key_type& interval)
+ { return _map.upper_bound(interval); }
+
+ const_iterator lower_bound(const key_type& interval)const
+ { return _map.lower_bound(interval); }
+
+ const_iterator upper_bound(const key_type& interval)const
+ { return _map.upper_bound(interval); }
+
+ std::pair<iterator,iterator> equal_range(const key_type& interval)
+ { return _map.equal_range(interval); }
+
+ std::pair<const_iterator,const_iterator> equal_range(const key_type& interval)const
+ { return _map.equal_range(interval); }
+
+ iterator begin() { return _map.begin(); }
+ iterator end() { return _map.end(); }
+ const_iterator begin()const { return _map.begin(); }
+ const_iterator end()const { return _map.end(); }
+ reverse_iterator rbegin() { return _map.rbegin(); }
+ reverse_iterator rend() { return _map.rend(); }
+ const_reverse_iterator rbegin()const { return _map.rbegin(); }
+ const_reverse_iterator rend()const { return _map.rend(); }
+
+private:
+ template<class Combiner>
+ iterator _add(const segment_type& interval_value_pair);
+
+ template<class Combiner>
+ iterator _add(iterator prior_, const segment_type& interval_value_pair);
+
+ template<class Combiner>
+ void _subtract(const segment_type& interval_value_pair);
+
+ iterator _insert(const segment_type& interval_value_pair);
+ iterator _insert(iterator prior_, const segment_type& interval_value_pair);
+
+private:
+ template<class Combiner>
+ void add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
+
+ template<class Combiner>
+ void add_main(interval_type& inter_val, const CodomainT& co_val,
+ iterator& it_, const iterator& last_);
+
+ template<class Combiner>
+ void add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
+
+ void add_front(const interval_type& inter_val, iterator& first_);
+
+private:
+ void subtract_front(const interval_type& inter_val, iterator& first_);
+
+ template<class Combiner>
+ void subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_);
+
+ template<class Combiner>
+ void subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_);
+
+private:
+ void insert_main(const interval_type&, const CodomainT&, iterator&, const iterator&);
+ void erase_rest ( interval_type&, const CodomainT&, iterator&, const iterator&);
+
+ template<class FragmentT>
+ void total_add_intersection(SubType& section, const FragmentT& fragment)const
+ {
+ section += *that();
+ section.add(fragment);
+ }
+
+ void partial_add_intersection(SubType& section, const segment_type& operand)const
+ {
+ interval_type inter_val = operand.first;
+ if(icl::is_empty(inter_val))
+ return;
+
+ std::pair<const_iterator, const_iterator> exterior
+ = this->_map.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return;
+
+ for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
+ {
+ interval_type common_interval = it_->first & inter_val;
+ if(!icl::is_empty(common_interval))
+ {
+ section.template _add<codomain_combine> (value_type(common_interval, it_->second) );
+ section.template _add<codomain_intersect>(value_type(common_interval, operand.second));
+ }
+ }
+ }
+
+ void partial_add_intersection(SubType& section, const element_type& operand)const
+ {
+ partial_add_intersection(section, make_segment<type>(operand));
+ }
+
+
+protected:
+
+ template <class Combiner>
+ iterator gap_insert(iterator prior_, const interval_type& inter_val,
+ const codomain_type& co_val )
+ {
+ // inter_val is not conained in this map. Insertion will be successful
+ BOOST_ASSERT(this->_map.find(inter_val) == this->_map.end());
+ BOOST_ASSERT((!on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val)));
+ return this->_map.insert(prior_, value_type(inter_val, version<Combiner>()(co_val)));
+ }
+
+ template <class Combiner>
+ std::pair<iterator, bool>
+ add_at(const iterator& prior_, const interval_type& inter_val,
+ const codomain_type& co_val )
+ {
+ // Never try to insert an identity element into an identity element absorber here:
+ BOOST_ASSERT((!(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val))));
+
+ iterator inserted_
+ = this->_map.insert(prior_, value_type(inter_val, Combiner::identity_element()));
+
+ if(inserted_->first == inter_val && inserted_->second == Combiner::identity_element())
+ {
+ Combiner()(inserted_->second, co_val);
+ return std::pair<iterator,bool>(inserted_, true);
+ }
+ else
+ return std::pair<iterator,bool>(inserted_, false);
+ }
+
+ std::pair<iterator, bool>
+ insert_at(const iterator& prior_, const interval_type& inter_val,
+ const codomain_type& co_val )
+ {
+ iterator inserted_
+ = this->_map.insert(prior_, value_type(inter_val, co_val));
+
+ if(inserted_ == prior_)
+ return std::pair<iterator,bool>(inserted_, false);
+ else if(inserted_->first == inter_val)
+ return std::pair<iterator,bool>(inserted_, true);
+ else
+ return std::pair<iterator,bool>(inserted_, false);
+ }
+
+
+protected:
+ sub_type* that() { return static_cast<sub_type*>(this); }
+ const sub_type* that()const { return static_cast<const sub_type*>(this); }
+
+protected:
+ ImplMapT _map;
+
+
+private:
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total_invertible>
+ struct on_invertible;
+
+ template<class Type>
+ struct on_invertible<Type, true>
+ {
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::inverse_codomain_combine inverse_codomain_combine;
+
+ static void subtract(Type& object, const segment_type& operand)
+ { object.template _add<inverse_codomain_combine>(operand); }
+ };
+
+ template<class Type>
+ struct on_invertible<Type, false>
+ {
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::inverse_codomain_combine inverse_codomain_combine;
+
+ static void subtract(Type& object, const segment_type& operand)
+ { object.template _subtract<inverse_codomain_combine>(operand); }
+ };
+
+ friend struct on_invertible<type, true>;
+ friend struct on_invertible<type, false>;
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total>
+ struct on_definedness;
+
+ template<class Type>
+ struct on_definedness<Type, true>
+ {
+ static void add_intersection(Type& section, const Type& object,
+ const segment_type& operand)
+ { object.total_add_intersection(section, operand); }
+ };
+
+ template<class Type>
+ struct on_definedness<Type, false>
+ {
+ static void add_intersection(Type& section, const Type& object,
+ const segment_type& operand)
+ { object.partial_add_intersection(section, operand); }
+ };
+
+ friend struct on_definedness<type, true>;
+ friend struct on_definedness<type, false>;
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool has_set_semantics>
+ struct on_codomain_model;
+
+ template<class Type>
+ struct on_codomain_model<Type, true>
+ {
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::codomain_combine codomain_combine;
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+
+ static void add(Type& intersection, interval_type& common_interval,
+ const codomain_type& flip_value, const codomain_type& co_value)
+ {
+ codomain_type common_value = flip_value;
+ inverse_codomain_intersect()(common_value, co_value);
+ intersection.template
+ _add<codomain_combine>(segment_type(common_interval, common_value));
+ }
+ };
+
+ template<class Type>
+ struct on_codomain_model<Type, false>
+ {
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::codomain_combine codomain_combine;
+
+ static void add(Type& intersection, interval_type& common_interval,
+ const codomain_type&, const codomain_type&)
+ {
+ intersection.template
+ _add<codomain_combine>(segment_type(common_interval,
+ identity_element<codomain_type>::value()));
+ }
+ };
+
+ friend struct on_codomain_model<type, true>;
+ friend struct on_codomain_model<type, false>;
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total, bool absorbs_identities>
+ struct on_total_absorbable;
+
+ template<class Type>
+ struct on_total_absorbable<Type, true, true>
+ {
+ static void flip(Type& object, const typename Type::segment_type& operand)
+ { icl::clear(object); }
+ };
+
+ template<class Type>
+ struct on_total_absorbable<Type, true, false>
+ {
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::codomain_type codomain_type;
+
+ static void flip(Type& object, const segment_type& operand)
+ {
+ object += operand;
+ ICL_FORALL(typename Type, it_, object)
+ it_->second = identity_element<codomain_type>::value();
+
+ if(mpl::not_<is_interval_splitter<Type> >::value)
+ icl::join(object);
+ }
+ };
+
+ template<class Type, bool absorbs_identities>
+ struct on_total_absorbable<Type, false, absorbs_identities>
+ {
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::set_type set_type;
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+
+ static void flip(Type& object, const segment_type& interval_value_pair)
+ {
+ // That which is common shall be subtracted
+ // That which is not shall be added
+ // So interval_value_pair has to be 'complementary added' or flipped
+ interval_type span = interval_value_pair.first;
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(span);
+
+ const_iterator first_ = exterior.first;
+ const_iterator end_ = exterior.second;
+
+ interval_type covered, left_over, common_interval;
+ const codomain_type& x_value = interval_value_pair.second;
+ const_iterator it_ = first_;
+
+ set_type eraser;
+ Type intersection;
+
+ while(it_ != end_ )
+ {
+ const codomain_type& co_value = it_->second;
+ covered = (*it_++).first;
+ //[a ... : span
+ // [b ... : covered
+ //[a b) : left_over
+ left_over = right_subtract(span, covered);
+
+ //That which is common ...
+ common_interval = span & covered;
+ if(!icl::is_empty(common_interval))
+ {
+ // ... shall be subtracted
+ icl::add(eraser, common_interval);
+
+ on_codomain_model<Type, has_set_semantics<codomain_type>::value>
+ ::add(intersection, common_interval, x_value, co_value);
+ }
+
+ icl::add(object, value_type(left_over, x_value)); //That which is not shall be added
+ // Because this is a collision free addition I don't have to distinguish codomain_types.
+
+ //... d) : span
+ //... c) : covered
+ // [c d) : span'
+ span = left_subtract(span, covered);
+ }
+
+ //If span is not empty here, it is not in the set so it shall be added
+ icl::add(object, value_type(span, x_value));
+
+ //finally rewrite the common segments
+ icl::erase(object, eraser);
+ object += intersection;
+ }
+ };
+ //--------------------------------------------------------------------------
+} ;
+
+
+//==============================================================================
+//= Addition detail
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::add_front(const interval_type& inter_val, iterator& first_)
+{
+ // If the collision sequence has a left residual 'left_resid' it will
+ // be split, to provide a standardized start of algorithms:
+ // The addend interval 'inter_val' covers the beginning of the collision sequence.
+
+ // only for the first there can be a left_resid: a part of *first_ left of inter_val
+ interval_type left_resid = right_subtract(first_->first, inter_val);
+
+ if(!icl::is_empty(left_resid))
+ { // [------------ . . .
+ // [left_resid---first_ --- . . .
+ iterator prior_ = cyclic_prior(*this, first_);
+ const_cast<interval_type&>(first_->first)
+ = left_subtract(first_->first, left_resid);
+ //NOTE: Only splitting
+ this->_map.insert(prior_, segment_type(left_resid, first_->second));
+ }
+ //POST:
+ // [----- inter_val ---- . . .
+ // ...[-- first_ --...
+}
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_)
+{
+ interval_type lead_gap = right_subtract(inter_val, it_->first);
+ if(!icl::is_empty(lead_gap))
+ {
+ // [lead_gap--- . . .
+ // [-- it_ ...
+ iterator prior_ = prior(it_);
+ iterator inserted_ = this->template gap_insert<Combiner>(prior_, lead_gap, co_val);
+ that()->handle_inserted(prior_, inserted_);
+ }
+
+ // . . . --------- . . . addend interval
+ // [-- it_ --) has a common part with the first overval
+ Combiner()(it_->second, co_val);
+ that()->template handle_left_combined<Combiner>(it_++);
+}
+
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::add_main(interval_type& inter_val, const CodomainT& co_val,
+ iterator& it_, const iterator& last_)
+{
+ interval_type cur_interval;
+ while(it_!=last_)
+ {
+ cur_interval = it_->first ;
+ add_segment<Combiner>(inter_val, co_val, it_);
+ // shrink interval
+ inter_val = left_subtract(inter_val, cur_interval);
+ }
+}
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_)
+{
+ iterator prior_ = cyclic_prior(*that(), it_);
+ interval_type cur_itv = it_->first ;
+
+ interval_type lead_gap = right_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(lead_gap))
+ { // [lead_gap--- . . .
+ // [prior) [-- it_ ...
+ iterator inserted_ = this->template gap_insert<Combiner>(prior_, lead_gap, co_val);
+ that()->handle_inserted(prior_, inserted_);
+ }
+
+ interval_type end_gap = left_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(end_gap))
+ {
+ // [----------------end_gap)
+ // . . . -- it_ --)
+ Combiner()(it_->second, co_val);
+ that()->template gap_insert_at<Combiner>(it_, prior_, end_gap, co_val);
+ }
+ else
+ {
+ // only for the last there can be a right_resid: a part of *it_ right of x
+ interval_type right_resid = left_subtract(cur_itv, inter_val);
+
+ if(icl::is_empty(right_resid))
+ {
+ // [---------------)
+ // [-- it_ ---)
+ Combiner()(it_->second, co_val);
+ that()->template handle_preceeded_combined<Combiner>(prior_, it_);
+ }
+ else
+ {
+ // [--------------)
+ // [-- it_ --right_resid)
+ const_cast<interval_type&>(it_->first) = right_subtract(it_->first, right_resid);
+
+ //NOTE: This is NOT an insertion that has to take care for correct application of
+ // the Combiner functor. It only reestablished that state after splitting the
+ // 'it_' interval value pair. Using _map_insert<Combiner> does not work here.
+ iterator insertion_ = this->_map.insert(it_, value_type(right_resid, it_->second));
+ that()->handle_reinserted(insertion_);
+
+ Combiner()(it_->second, co_val);
+ that()->template handle_preceeded_combined<Combiner>(insertion_, it_);
+ }
+ }
+}
+
+
+//==============================================================================
+//= Addition
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator
+ interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::_add(const segment_type& addend)
+{
+ typedef typename on_absorbtion<type,Combiner,
+ absorbs_identities<type>::value>::type on_absorbtion_;
+
+ const interval_type& inter_val = addend.first;
+ if(icl::is_empty(inter_val))
+ return this->_map.end();
+
+ const codomain_type& co_val = addend.second;
+ if(on_absorbtion_::is_absorbable(co_val))
+ return this->_map.end();
+
+ std::pair<iterator,bool> insertion
+ = this->_map.insert(value_type(inter_val, version<Combiner>()(co_val)));
+
+ if(insertion.second)
+ return that()->handle_inserted(insertion.first);
+ else
+ {
+ // Detect the first and the end iterator of the collision sequence
+ iterator first_ = this->_map.lower_bound(inter_val),
+ last_ = insertion.first;
+ //assert(end_ == this->_map.upper_bound(inter_val));
+ iterator it_ = first_;
+ interval_type rest_interval = inter_val;
+
+ add_front (rest_interval, it_ );
+ add_main<Combiner>(rest_interval, co_val, it_, last_);
+ add_rear<Combiner>(rest_interval, co_val, it_ );
+ return it_;
+ }
+}
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator
+ interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::_add(iterator prior_, const segment_type& addend)
+{
+ typedef typename on_absorbtion<type,Combiner,
+ absorbs_identities<type>::value>::type on_absorbtion_;
+
+ const interval_type& inter_val = addend.first;
+ if(icl::is_empty(inter_val))
+ return prior_;
+
+ const codomain_type& co_val = addend.second;
+ if(on_absorbtion_::is_absorbable(co_val))
+ return prior_;
+
+ std::pair<iterator,bool> insertion
+ = add_at<Combiner>(prior_, inter_val, co_val);
+
+ if(insertion.second)
+ return that()->handle_inserted(insertion.first);
+ else
+ {
+ // Detect the first and the end iterator of the collision sequence
+ std::pair<iterator,iterator> overlap = this->_map.equal_range(inter_val);
+ iterator it_ = overlap.first,
+ last_ = prior(overlap.second);
+ interval_type rest_interval = inter_val;
+
+ add_front (rest_interval, it_ );
+ add_main<Combiner>(rest_interval, co_val, it_, last_);
+ add_rear<Combiner>(rest_interval, co_val, it_ );
+ return it_;
+ }
+}
+
+//==============================================================================
+//= Subtraction detail
+//==============================================================================
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::subtract_front(const interval_type& inter_val, iterator& it_)
+{
+ interval_type left_resid = right_subtract(it_->first, inter_val);
+
+ if(!icl::is_empty(left_resid)) // [--- inter_val ---)
+ { //[prior_) [left_resid)[--- it_ . . .
+ iterator prior_ = cyclic_prior(*this, it_);
+ const_cast<interval_type&>(it_->first) = left_subtract(it_->first, left_resid);
+ this->_map.insert(prior_, value_type(left_resid, it_->second));
+ // The segemnt *it_ is split at inter_val.first(), so as an invariant
+ // segment *it_ is always "under" inter_val and a left_resid is empty.
+ }
+}
+
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_)
+{
+ while(it_ != last_)
+ {
+ Combiner()(it_->second, co_val);
+ that()->template handle_left_combined<Combiner>(it_++);
+ }
+}
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_)
+{
+ interval_type right_resid = left_subtract(it_->first, inter_val);
+
+ if(icl::is_empty(right_resid))
+ {
+ Combiner()(it_->second, co_val);
+ that()->template handle_combined<Combiner>(it_);
+ }
+ else
+ {
+ const_cast<interval_type&>(it_->first) = right_subtract(it_->first, right_resid);
+ iterator next_ = this->_map.insert(it_, value_type(right_resid, it_->second));
+ Combiner()(it_->second, co_val);
+ that()->template handle_succeeded_combined<Combiner>(it_, next_);
+ }
+}
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+ template<class Combiner>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::_subtract(const segment_type& minuend)
+{
+ interval_type inter_val = minuend.first;
+ if(icl::is_empty(inter_val))
+ return;
+
+ const codomain_type& co_val = minuend.second;
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val))
+ return;
+
+ std::pair<iterator, iterator> exterior = this->_map.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return;
+
+ iterator last_ = prior(exterior.second);
+ iterator it_ = exterior.first;
+ subtract_front (inter_val, it_ );
+ subtract_main <Combiner>( co_val, it_, last_);
+ subtract_rear <Combiner>(inter_val, co_val, it_ );
+}
+
+//==============================================================================
+//= Insertion
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::insert_main(const interval_type& inter_val, const CodomainT& co_val,
+ iterator& it_, const iterator& last_)
+{
+ iterator end_ = boost::next(last_);
+ iterator prior_ = it_, inserted_;
+ if(prior_ != this->_map.end())
+ --prior_;
+ interval_type rest_interval = inter_val, left_gap, cur_itv;
+ interval_type last_interval = last_ ->first;
+
+ while(it_ != end_ )
+ {
+ cur_itv = it_->first ;
+ left_gap = right_subtract(rest_interval, cur_itv);
+
+ if(!icl::is_empty(left_gap))
+ {
+ inserted_ = this->_map.insert(prior_, value_type(left_gap, co_val));
+ it_ = that()->handle_inserted(inserted_);
+ }
+
+ // shrink interval
+ rest_interval = left_subtract(rest_interval, cur_itv);
+ prior_ = it_;
+ ++it_;
+ }
+
+ //insert_rear(rest_interval, co_val, last_):
+ interval_type end_gap = left_subtract(rest_interval, last_interval);
+ if(!icl::is_empty(end_gap))
+ {
+ inserted_ = this->_map.insert(prior_, value_type(end_gap, co_val));
+ it_ = that()->handle_inserted(inserted_);
+ }
+ else
+ it_ = prior_;
+}
+
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator
+ interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::_insert(const segment_type& addend)
+{
+ interval_type inter_val = addend.first;
+ if(icl::is_empty(inter_val))
+ return this->_map.end();
+
+ const codomain_type& co_val = addend.second;
+ if(on_codomain_absorbtion::is_absorbable(co_val))
+ return this->_map.end();
+
+ std::pair<iterator,bool> insertion = this->_map.insert(addend);
+
+ if(insertion.second)
+ return that()->handle_inserted(insertion.first);
+ else
+ {
+ // Detect the first and the end iterator of the collision sequence
+ iterator first_ = this->_map.lower_bound(inter_val),
+ last_ = insertion.first;
+ //assert((++last_) == this->_map.upper_bound(inter_val));
+ iterator it_ = first_;
+ insert_main(inter_val, co_val, it_, last_);
+ return it_;
+ }
+}
+
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator
+ interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::_insert(iterator prior_, const segment_type& addend)
+{
+ interval_type inter_val = addend.first;
+ if(icl::is_empty(inter_val))
+ return prior_;
+
+ const codomain_type& co_val = addend.second;
+ if(on_codomain_absorbtion::is_absorbable(co_val))
+ return prior_;
+
+ std::pair<iterator,bool> insertion = insert_at(prior_, inter_val, co_val);
+
+ if(insertion.second)
+ return that()->handle_inserted(insertion.first);
+ {
+ // Detect the first and the end iterator of the collision sequence
+ std::pair<iterator,iterator> overlap = this->_map.equal_range(inter_val);
+ iterator it_ = overlap.first,
+ last_ = prior(overlap.second);
+ insert_main(inter_val, co_val, it_, last_);
+ return it_;
+ }
+}
+
+//==============================================================================
+//= Erasure segment_type
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::erase_rest(interval_type& inter_val, const CodomainT& co_val,
+ iterator& it_, const iterator& last_)
+{
+ // For all intervals within loop: it_->first are contained_in inter_val
+ while(it_ != last_)
+ if(it_->second == co_val)
+ this->_map.erase(it_++);
+ else it_++;
+
+ //erase_rear:
+ if(it_->second == co_val)
+ {
+ interval_type right_resid = left_subtract(it_->first, inter_val);
+ if(icl::is_empty(right_resid))
+ this->_map.erase(it_);
+ else
+ const_cast<interval_type&>(it_->first) = right_resid;
+ }
+}
+
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::erase(const segment_type& minuend)
+{
+ interval_type inter_val = minuend.first;
+ if(icl::is_empty(inter_val))
+ return *that();
+
+ const codomain_type& co_val = minuend.second;
+ if(on_codomain_absorbtion::is_absorbable(co_val))
+ return *that();
+
+ std::pair<iterator,iterator> exterior = this->_map.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return *that();
+
+ iterator first_ = exterior.first, end_ = exterior.second,
+ last_ = cyclic_prior(*this, end_);
+ iterator second_= first_; ++second_;
+
+ if(first_ == last_)
+ { // [----inter_val----)
+ // .....first_==last_.....
+ // only for the last there can be a right_resid: a part of *it_ right of minuend
+ interval_type right_resid = left_subtract(first_->first, inter_val);
+
+ if(first_->second == co_val)
+ {
+ interval_type left_resid = right_subtract(first_->first, inter_val);
+ if(!icl::is_empty(left_resid)) // [----inter_val----)
+ { // [left_resid)..first_==last_......
+ const_cast<interval_type&>(first_->first) = left_resid;
+ if(!icl::is_empty(right_resid))
+ this->_map.insert(first_, value_type(right_resid, co_val));
+ }
+ else if(!icl::is_empty(right_resid))
+ const_cast<interval_type&>(first_->first) = right_resid;
+ else
+ this->_map.erase(first_);
+ }
+ }
+ else
+ {
+ // first AND NOT last
+ if(first_->second == co_val)
+ {
+ interval_type left_resid = right_subtract(first_->first, inter_val);
+ if(icl::is_empty(left_resid))
+ this->_map.erase(first_);
+ else
+ const_cast<interval_type&>(first_->first) = left_resid;
+ }
+
+ erase_rest(inter_val, co_val, second_, last_);
+ }
+
+ return *that();
+}
+
+//==============================================================================
+//= Erasure key_type
+//==============================================================================
+template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+ ::erase(const interval_type& minuend)
+{
+ if(icl::is_empty(minuend))
+ return *that();
+
+ std::pair<iterator, iterator> exterior = this->_map.equal_range(minuend);
+ if(exterior.first == exterior.second)
+ return *that();
+
+ iterator first_ = exterior.first,
+ end_ = exterior.second,
+ last_ = prior(end_);
+
+ interval_type left_resid = right_subtract(first_->first, minuend);
+ interval_type right_resid = left_subtract(last_ ->first, minuend);
+
+ if(first_ == last_ )
+ if(!icl::is_empty(left_resid))
+ {
+ const_cast<interval_type&>(first_->first) = left_resid;
+ if(!icl::is_empty(right_resid))
+ this->_map.insert(first_, value_type(right_resid, first_->second));
+ }
+ else if(!icl::is_empty(right_resid))
+ const_cast<interval_type&>(first_->first) = left_subtract(first_->first, minuend);
+ else
+ this->_map.erase(first_);
+ else
+ { // [-------- minuend ---------)
+ // [left_resid fst) . . . . [lst right_resid)
+ iterator second_= first_; ++second_;
+
+ iterator start_ = icl::is_empty(left_resid)? first_: second_;
+ iterator stop_ = icl::is_empty(right_resid)? end_ : last_ ;
+ this->_map.erase(start_, stop_); //erase [start_, stop_)
+
+ if(!icl::is_empty(left_resid))
+ const_cast<interval_type&>(first_->first) = left_resid;
+
+ if(!icl::is_empty(right_resid))
+ const_cast<interval_type&>(last_ ->first) = right_resid;
+ }
+
+ return *that();
+}
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template
+<
+ class SubType,
+ class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc
+>
+struct is_map<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_map<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template
+<
+ class SubType,
+ class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc
+>
+struct has_inverse<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef has_inverse<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value));
+};
+
+template
+<
+ class SubType,
+ class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc
+>
+struct is_interval_container<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template
+<
+ class SubType,
+ class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc
+>
+struct absorbs_identities<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef absorbs_identities<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities));
+};
+
+template
+<
+ class SubType,
+ class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc
+>
+struct is_total<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_total<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total));
+};
+
+
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/interval_base_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_base_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,552 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223
+#define BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223
+
+#include <boost/icl/impl_config.hpp>
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#include <boost/interprocess/containers/set.hpp>
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#include <boost/container/set.hpp>
+#else
+#include <set>
+#endif
+
+#include <limits>
+#include <boost/next_prior.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl/interval.hpp>
+#include <boost/icl/type_traits/infinity.hpp>
+#include <boost/icl/type_traits/is_interval_joiner.hpp>
+#include <boost/icl/type_traits/is_interval_separator.hpp>
+#include <boost/icl/type_traits/is_interval_splitter.hpp>
+#include <boost/icl/detail/interval_set_algo.hpp>
+#include <boost/icl/detail/exclusive_less_than.hpp>
+
+#include <boost/icl/associative_interval_container.hpp>
+
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/continuous_interval.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/element_iterator.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief Implements a set as a set of intervals (base class) */
+template
+<
+ typename SubType,
+ typename DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class interval_base_set
+{
+public:
+ //==========================================================================
+ //= Associated types
+ //==========================================================================
+ typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> type;
+
+ /// The designated \e derived or \e sub_type of this base class
+ typedef SubType sub_type;
+
+ /// Auxilliary type for overloadresolution
+ typedef type overloadable_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Data
+ //--------------------------------------------------------------------------
+ /// The domain type of the set
+ typedef DomainT domain_type;
+ /// 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 ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ /// The segment type of the set
+ typedef interval_type segment_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Size
+ //--------------------------------------------------------------------------
+ /// The difference type of an interval which is sometimes different form the data_type
+ typedef typename difference_type_of<domain_type>::type difference_type;
+
+ /// The size type of an interval which is mostly std::size_t
+ typedef typename size_type_of<domain_type>::type size_type;
+
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Order
+ //--------------------------------------------------------------------------
+ /// Comparison functor for domain values
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef ICL_COMPARE_DOMAIN(Compare,segment_type) segment_compare;
+ /// Comparison functor for intervals
+ typedef exclusive_less_than<interval_type> interval_compare;
+
+ /// Comparison functor for keys
+ typedef exclusive_less_than<interval_type> key_compare;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Related types
+ //--------------------------------------------------------------------------
+ /// The atomized type representing the corresponding container of elements
+ typedef typename ICL_IMPL_SPACE::set<DomainT,domain_compare,Alloc<DomainT> > atomized_type;
+
+ //--------------------------------------------------------------------------
+ //- Associated types: Implementation and stl related
+ //--------------------------------------------------------------------------
+ /// The allocator type of the set
+ typedef Alloc<interval_type> allocator_type;
+
+ /// allocator type of the corresponding element set
+ typedef Alloc<DomainT> domain_allocator_type;
+
+ /// Container type for the implementation
+ typedef typename ICL_IMPL_SPACE::set<interval_type,key_compare,allocator_type> ImplSetT;
+
+ /// key type of the implementing container
+ typedef typename ImplSetT::key_type key_type;
+ /// data type of the implementing container
+ typedef typename ImplSetT::key_type data_type;
+ /// value type of the implementing container
+ typedef typename ImplSetT::value_type value_type;
+
+ /// pointer type
+ typedef typename ImplSetT::pointer pointer;
+ /// const pointer type
+ typedef typename ImplSetT::const_pointer const_pointer;
+ /// reference type
+ typedef typename ImplSetT::reference reference;
+ /// const reference type
+ typedef typename ImplSetT::const_reference const_reference;
+
+ /// iterator for iteration over intervals
+ typedef typename ImplSetT::iterator iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplSetT::const_iterator const_iterator;
+ /// iterator for reverse iteration over intervals
+ typedef typename ImplSetT::reverse_iterator reverse_iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplSetT::const_reverse_iterator const_reverse_iterator;
+
+ /// element iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<iterator> element_iterator;
+ /// element const iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<const_iterator> element_const_iterator;
+ /// element reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<reverse_iterator> element_reverse_iterator;
+ /// element const reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::element_iterator<const_reverse_iterator> element_const_reverse_iterator;
+
+ BOOST_STATIC_CONSTANT(int, fineness = 0);
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor for the empty object */
+ interval_base_set(){}
+
+ /** Copy constructor */
+ interval_base_set(const interval_base_set& src): _set(src._set){}
+
+ /** Assignment operator */
+ interval_base_set& operator = (const interval_base_set& src)
+ {
+ this->_set = src._set;
+ return *this;
+ }
+
+ /** swap the content of containers */
+ void swap(interval_base_set& operand) { _set.swap(operand._set); }
+
+ //==========================================================================
+ //= Containedness
+ //==========================================================================
+ /** sets the container empty */
+ void clear() { icl::clear(*that()); }
+ /** is the container empty? */
+ bool empty()const { return icl::is_empty(*that()); }
+
+ //==========================================================================
+ //= Size
+ //==========================================================================
+ /** An interval set's size is it's cardinality */
+ size_type size()const
+ {
+ return icl::cardinality(*that());
+ }
+
+ /** Size of the iteration over this container */
+ std::size_t iterative_size()const
+ {
+ return _set.size();
+ }
+
+ //==========================================================================
+ //= Selection
+ //==========================================================================
+
+ /** Find the interval value pair, that contains element \c key */
+ const_iterator find(const element_type& key)const
+ {
+ return this->_set.find(icl::singleton<segment_type>(key));
+ }
+
+ const_iterator find(const segment_type& segment)const
+ {
+ return this->_set.find(segment);
+ }
+
+ //==========================================================================
+ //= Addition
+ //==========================================================================
+
+ /** Add a single element \c key to the set */
+ SubType& add(const element_type& key)
+ {
+ return icl::add(*that(), key);
+ }
+
+ /** Add an interval of elements \c inter_val to the set */
+ SubType& add(const segment_type& inter_val)
+ {
+ _add(inter_val);
+ return *that();
+ }
+
+ /** Add an interval of elements \c inter_val to the set. Iterator
+ \c prior_ is a hint to the position \c inter_val can be
+ inserted after. */
+ iterator add(iterator prior_, const segment_type& inter_val)
+ {
+ return _add(prior_, inter_val);
+ }
+
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
+
+ /** Subtract a single element \c key from the set */
+ SubType& subtract(const element_type& key)
+ {
+ return icl::subtract(*that(), key);
+ }
+
+ /** Subtract an interval of elements \c inter_val from the set */
+ SubType& subtract(const segment_type& inter_val);
+
+ //==========================================================================
+ //= Insertion
+ //==========================================================================
+ /** Insert an element \c key into the set */
+ SubType& insert(const element_type& key)
+ {
+ return add(key);
+ }
+
+ /** Insert an interval of elements \c inter_val to the set */
+ SubType& insert(const segment_type& inter_val)
+ {
+ return add(inter_val);
+ }
+
+ /** Insert an interval of elements \c inter_val to the set. Iterator
+ \c prior_ is a hint to the position \c inter_val can be
+ inserted after. */
+ iterator insert(iterator prior_, const segment_type& inter_val)
+ {
+ return add(prior_, inter_val);
+ }
+
+
+
+ //==========================================================================
+ //= Erasure
+ //==========================================================================
+ /** Erase an element \c key from the set */
+ SubType& erase(const element_type& key)
+ {
+ return subtract(key);
+ }
+
+ /** Erase an interval of elements \c inter_val from the set */
+ SubType& erase(const segment_type& inter_val)
+ {
+ return subtract(inter_val);
+ }
+
+ /** Erase the interval that iterator \c position points to. */
+ void erase(iterator position)
+ {
+ _set.erase(position);
+ }
+
+ /** Erase all intervals in the range <tt>[first,past)</tt> of iterators. */
+ void erase(iterator first, iterator past)
+ {
+ _set.erase(first, past);
+ }
+
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+ /** If \c *this set contains \c key it is erased, otherwise it is added. */
+ SubType& flip(const element_type& key)
+ {
+ return icl::flip(*that(), key);
+ }
+
+ /** If \c *this set contains \c inter_val it is erased, otherwise it is added. */
+ SubType& flip(const segment_type& inter_val)
+ {
+ return icl::flip(*that(), inter_val);
+ }
+
+ //==========================================================================
+ //= Iterator related
+ //==========================================================================
+
+ iterator begin() { return _set.begin(); }
+ iterator end() { return _set.end(); }
+ const_iterator begin()const { return _set.begin(); }
+ const_iterator end()const { return _set.end(); }
+ reverse_iterator rbegin() { return _set.rbegin(); }
+ reverse_iterator rend() { return _set.rend(); }
+ const_reverse_iterator rbegin()const { return _set.rbegin(); }
+ const_reverse_iterator rend()const { return _set.rend(); }
+
+ iterator lower_bound(const value_type& interval)
+ { return _set.lower_bound(interval); }
+
+ iterator upper_bound(const value_type& interval)
+ { return _set.upper_bound(interval); }
+
+ const_iterator lower_bound(const value_type& interval)const
+ { return _set.lower_bound(interval); }
+
+ const_iterator upper_bound(const value_type& interval)const
+ { return _set.upper_bound(interval); }
+
+ std::pair<iterator,iterator> equal_range(const key_type& interval)
+ { return _set.equal_range(interval); }
+
+ std::pair<const_iterator,const_iterator> equal_range(const key_type& interval)const
+ { return _set.equal_range(interval); }
+
+private:
+ iterator _add(const segment_type& addend);
+ iterator _add(iterator prior, const segment_type& addend);
+
+protected:
+ void add_front(const interval_type& inter_val, iterator& first_);
+ void add_main(interval_type& inter_val, iterator& it_, const iterator& last_);
+ void add_segment(const interval_type& inter_val, iterator& it_);
+ void add_rear(const interval_type& inter_val, iterator& it_);
+
+protected:
+ sub_type* that() { return static_cast<sub_type*>(this); }
+ const sub_type* that()const { return static_cast<const sub_type*>(this); }
+
+protected:
+ ImplSetT _set;
+} ;
+
+
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::add_front(const interval_type& inter_val, iterator& first_)
+{
+ // If the collision sequence has a left residual 'left_resid' it will
+ // be split, to provide a standardized start of algorithms:
+ // The addend interval 'inter_val' covers the beginning of the collision sequence.
+
+ // only for the first there can be a left_resid: a part of *first_ left of inter_val
+ interval_type left_resid = right_subtract(*first_, inter_val);
+
+ if(!icl::is_empty(left_resid))
+ { // [------------ . . .
+ // [left_resid---first_ --- . . .
+ iterator prior_ = cyclic_prior(*this, first_);
+ const_cast<interval_type&>(*first_) = left_subtract(*first_, left_resid);
+ //NOTE: Only splitting
+ this->_set.insert(prior_, left_resid);
+ }
+
+ //POST:
+ // [----- inter_val ---- . . .
+ // ...[-- first_ --...
+}
+
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::add_segment(const interval_type& inter_val, iterator& it_)
+{
+ interval_type lead_gap = right_subtract(inter_val, *it_);
+ if(!icl::is_empty(lead_gap))
+ // [lead_gap--- . . .
+ // [prior_) [-- it_ ...
+ this->_set.insert(prior(it_), lead_gap);
+
+ // . . . --------- . . . addend interval
+ // [-- it_ --) has a common part with the first overval
+ ++it_;
+}
+
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::add_main(interval_type& rest_interval, iterator& it_, const iterator& last_)
+{
+ interval_type cur_interval;
+ while(it_ != last_)
+ {
+ cur_interval = *it_ ;
+ add_segment(rest_interval, it_);
+ // shrink interval
+ rest_interval = left_subtract(rest_interval, cur_interval);
+ }
+}
+
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::add_rear(const interval_type& inter_val, iterator& it_)
+{
+ iterator prior_ = cyclic_prior(*this, it_);
+ interval_type cur_itv = *it_;
+
+ interval_type lead_gap = right_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(lead_gap))
+ // [lead_gap--- . . .
+ // [prior_) [-- it_ ...
+ this->_set.insert(prior_, lead_gap);
+
+ interval_type end_gap = left_subtract(inter_val, cur_itv);
+ if(!icl::is_empty(end_gap))
+ // [---------------end_gap)
+ // [-- it_ --)
+ it_ = this->_set.insert(it_, end_gap);
+ else
+ {
+ // only for the last there can be a right_resid: a part of *it_ right of addend
+ interval_type right_resid = left_subtract(cur_itv, inter_val);
+
+ if(!icl::is_empty(right_resid))
+ {
+ // [--------------)
+ // [-- it_ --right_resid)
+ const_cast<interval_type&>(*it_) = right_subtract(*it_, right_resid);
+ it_ = this->_set.insert(it_, right_resid);
+ }
+ }
+}
+
+//==============================================================================
+//= Addition
+//==============================================================================
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline typename interval_base_set<SubType,DomainT,Compare,Interval,Alloc>::iterator
+ interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::_add(const segment_type& addend)
+{
+ if(icl::is_empty(addend))
+ return this->_set.end();
+
+ std::pair<iterator,bool> insertion = this->_set.insert(addend);
+
+ if(insertion.second)
+ return that()->handle_inserted(insertion.first);
+ else
+ return that()->add_over(addend, insertion.first);
+}
+
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline typename interval_base_set<SubType,DomainT,Compare,Interval,Alloc>::iterator
+ interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::_add(iterator prior_, const segment_type& addend)
+{
+ if(icl::is_empty(addend))
+ return prior_;
+
+ iterator insertion = this->_set.insert(prior_, addend);
+
+ if(*insertion == addend)
+ return that()->handle_inserted(insertion);
+ else
+ return that()->add_over(addend);
+}
+
+//==============================================================================
+//= Subtraction
+//==============================================================================
+template <class SubType, class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+inline SubType& interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+ ::subtract(const segment_type& minuend)
+{
+ if(icl::is_empty(minuend))
+ return *that();
+
+ std::pair<iterator, iterator> exterior = this->_set.equal_range(minuend);
+ if(exterior.first == exterior.second)
+ return *that();
+
+ iterator first_ = exterior.first;
+ iterator end_ = exterior.second;
+ iterator last_ = prior(end_);
+
+ interval_type left_resid = right_subtract(*first_, minuend);
+ interval_type right_resid;
+ if(first_ != end_)
+ right_resid = left_subtract(*last_ , minuend);
+
+ this->_set.erase(first_, end_);
+
+ if(!icl::is_empty(left_resid))
+ this->_set.insert(left_resid);
+
+ if(!icl::is_empty(right_resid))
+ this->_set.insert(right_resid);
+
+ return *that();
+}
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template<class SubType,
+ class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_set<icl::interval_base_set<SubType,DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_set<icl::interval_base_set<SubType,DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<class SubType,
+ class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::interval_base_set<SubType,DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::interval_base_set<SubType,DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/interval_bounds.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_bounds.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,80 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330
+#define BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/icl/detail/design_config.hpp>
+
+namespace boost{namespace icl
+{
+
+typedef unsigned char bound_type;
+
+class interval_bounds
+{
+public:
+ BOOST_STATIC_CONSTANT(bound_type, static_open = 0);
+ BOOST_STATIC_CONSTANT(bound_type, static_left_open = 1);
+ BOOST_STATIC_CONSTANT(bound_type, static_right_open = 2);
+ BOOST_STATIC_CONSTANT(bound_type, static_closed = 3);
+ BOOST_STATIC_CONSTANT(bound_type, dynamic = 4);
+ BOOST_STATIC_CONSTANT(bound_type, undefined = 5);
+
+ BOOST_STATIC_CONSTANT(bound_type, _open = 0);
+ BOOST_STATIC_CONSTANT(bound_type, _left_open = 1);
+ BOOST_STATIC_CONSTANT(bound_type, _right_open = 2);
+ BOOST_STATIC_CONSTANT(bound_type, _closed = 3);
+
+ BOOST_STATIC_CONSTANT(bound_type, _right = 1);
+ BOOST_STATIC_CONSTANT(bound_type, _left = 2);
+ BOOST_STATIC_CONSTANT(bound_type, _all = 3);
+
+public:
+ interval_bounds():_bits(){}
+ explicit interval_bounds(bound_type bounds): _bits(bounds){}
+ interval_bounds all ()const { return interval_bounds(_bits & _all ); }
+ interval_bounds left ()const { return interval_bounds(_bits & _left ); }
+ interval_bounds right()const { return interval_bounds(_bits & _right); }
+ interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); }
+ interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); }
+
+ bound_type bits()const{ return _bits; }
+
+ static interval_bounds open() { return interval_bounds(_open); }
+ static interval_bounds left_open() { return interval_bounds(_left_open); }
+ static interval_bounds right_open(){ return interval_bounds(_right_open);}
+ static interval_bounds closed() { return interval_bounds(_closed); }
+
+public:
+ bound_type _bits;
+};
+
+
+template<class DomainT>
+class bounded_value
+{
+public:
+ typedef DomainT domain_type;
+ typedef bounded_value<DomainT> type;
+public:
+ bounded_value(const domain_type& value, interval_bounds bound)
+ : _value(value), _bound(bound) {}
+
+ domain_type value()const { return _value; }
+ interval_bounds bound()const { return _bound; }
+
+private:
+ domain_type _value;
+ interval_bounds _bound;
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/interval_combining_style.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_combining_style.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,28 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_INTERVAL_COMBINING_STYLE_HPP_JOFA_100906
+#define BOOST_ICL_INTERVAL_COMBINING_STYLE_HPP_JOFA_100906
+
+namespace boost{ namespace icl
+{
+
+namespace interval_combine
+{
+ BOOST_STATIC_CONSTANT(int, unknown = 0);
+ BOOST_STATIC_CONSTANT(int, joining = 1);
+ BOOST_STATIC_CONSTANT(int, separating = 2);
+ BOOST_STATIC_CONSTANT(int, splitting = 3);
+ BOOST_STATIC_CONSTANT(int, elemental = 4);
+
+} // namespace interval_combine
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/interval_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,264 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_INTERVAL_MAP_HPP_JOFA_080705
+#define BOOST_ICL_INTERVAL_MAP_HPP_JOFA_080705
+
+#include <boost/assert.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/interval_base_map.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class DomainT, class CodomainT, class Traits,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+class split_interval_map;
+
+/** \brief implements a map as a map of intervals - on insertion
+ overlapping intervals are split and associated values are combined.*/
+template
+<
+ typename DomainT,
+ typename CodomainT,
+ class Traits = icl::partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class interval_map:
+
+ public interval_base_map<interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+{
+public:
+ typedef Traits traits;
+ typedef interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> type;
+ typedef split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> split_type;
+ typedef type overloadable_type;
+ typedef type joint_type;
+ typedef interval_base_map<type,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> base_type;
+
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::element_type element_type;
+ typedef typename base_type::segment_type segment_type;
+ typedef typename base_type::domain_type domain_type;
+ typedef typename base_type::codomain_type codomain_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;
+
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::codomain_combine codomain_combine;
+
+ typedef interval_set<DomainT,Compare,Interval,Alloc> interval_set_type;
+ typedef interval_set_type set_type;
+ typedef set_type key_object_type;
+
+ enum { fineness = 1 };
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /// Default constructor for the empty object
+ interval_map(): base_type() {}
+ /// Copy constructor
+ interval_map(const interval_map& src): base_type(src) {}
+
+
+ /// Copy constructor for base_type
+ template<class SubType>
+ explicit interval_map
+ (const interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>& src)
+ { assign(src); }
+
+ explicit interval_map(domain_mapping_type& base_pair): base_type()
+ { add(base_pair); }
+
+ explicit interval_map(const value_type& value_pair): base_type()
+ { add(value_pair); }
+
+ /// Assignment operator
+ template<class SubType>
+ interval_map& operator =
+ (const interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>& src)
+ { assign(src); return *this; }
+
+ /// Assignment from a base interval_map.
+ template<class SubType>
+ void assign(const interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>& src)
+ {
+ typedef interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc> base_map_type;
+ this->clear();
+ // Can be implemented via _map.insert: Interval joining not necessary.
+ iterator prior_ = this->_map.end();
+ ICL_const_FORALL(typename base_map_type, it_, src)
+ prior_ = this->add(prior_, *it_);
+ }
+
+private:
+ // Private functions that shall be accessible by the baseclass:
+ friend class
+ interval_base_map <interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>;
+
+ iterator handle_inserted(iterator it_)
+ {
+ return segmental::join_neighbours(*this, it_);
+ }
+
+ void handle_inserted(iterator prior_, iterator it_)
+ {
+ if(prior_ != this->_map.end() && segmental::joinable(*this, prior_, it_))
+ segmental::join_on_right(*this, prior_, it_);
+ }
+
+ template<class Combiner>
+ void handle_left_combined(iterator it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ this->_map.erase(it_);
+ else
+ segmental::join_left(*this, it_);
+ }
+
+ template<class Combiner>
+ void handle_combined(iterator it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ this->_map.erase(it_);
+ else
+ segmental::join_neighbours(*this, it_);
+ }
+
+ template<class Combiner>
+ void handle_preceeded_combined(iterator prior_, iterator& it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ {
+ this->_map.erase(it_);
+ it_ = prior_;
+ }
+ else // After a new combination (e.g. combiner=max) joining neighbours may be possible
+ segmental::join_neighbours(*this, it_);
+ }
+
+ template<class Combiner>
+ void handle_succeeded_combined(iterator it_, iterator next_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ {
+ this->_map.erase(it_);
+ segmental::join_right(*this, next_);
+ }
+ else
+ {
+ segmental::join_left(*this, it_);
+ segmental::join_neighbours(*this, next_);
+ }
+ }
+
+
+
+ void handle_reinserted(iterator insertion_)
+ {
+ segmental::join_right(*this, insertion_);
+ }
+
+
+ template<class Combiner>
+ void gap_insert_at(iterator& it_, iterator prior_,
+ const interval_type& end_gap, const codomain_type& co_val)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ {
+ this->_map.erase(it_);
+ it_ = this->template gap_insert<Combiner>(prior_, end_gap, co_val);
+ segmental::join_right(*this, it_);
+ }
+ else
+ {
+ segmental::join_left(*this, it_);
+ iterator inserted_ = this->template gap_insert<Combiner>(it_, end_gap, co_val);
+ it_ = segmental::join_neighbours(*this, inserted_);
+ }
+ }
+
+} ;
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_map<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_map<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct has_inverse<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef has_inverse<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value));
+};
+
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct absorbs_identities<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef absorbs_identities<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities));
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_total<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_total<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total));
+};
+
+
+//-----------------------------------------------------------------------------
+// type representation
+//-----------------------------------------------------------------------------
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ static std::string apply()
+ {
+ return "itv_map<"+ type_to_string<DomainT>::apply() + ","
+ + type_to_string<CodomainT>::apply() + ","
+ + type_to_string<Traits>::apply() + ">";
+ }
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/interval_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,204 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_INTERVAL_SET_HPP_JOFA_990223
+#define BOOST_ICL_INTERVAL_SET_HPP_JOFA_990223
+
+#include <boost/assert.hpp>
+#include <boost/icl/type_traits/is_interval_joiner.hpp>
+#include <boost/icl/interval_base_set.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief Implements a set as a set of intervals - merging adjoining intervals */
+template
+<
+ typename DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class interval_set:
+ public interval_base_set<interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>
+{
+public:
+
+ typedef interval_set<DomainT,Compare,Interval,Alloc> type;
+
+ /// The base_type of this class
+ typedef interval_base_set<type,DomainT,Compare,Interval,Alloc> base_type;
+
+ typedef type overloadable_type;
+
+ typedef type joint_type;
+
+ typedef type key_object_type;
+
+ /// The domain type of the set
+ typedef DomainT domain_type;
+ /// 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 ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ /// The segment type of the set
+ typedef interval_type segment_type;
+
+ /// Comparison functor for domain values
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ /// Comparison functor for intervals
+ typedef exclusive_less_than<interval_type> interval_compare;
+
+ /// Comparison functor for keys
+ typedef exclusive_less_than<interval_type> key_compare;
+
+ /// The allocator type of the set
+ typedef Alloc<interval_type> allocator_type;
+
+ /// allocator type of the corresponding element set
+ typedef Alloc<DomainT> domain_allocator_type;
+
+ /// The corresponding atomized type representing this interval container of elements
+ typedef typename base_type::atomized_type atomized_type;
+
+ /// Container type for the implementation
+ typedef typename base_type::ImplSetT ImplSetT;
+
+ /// key type of the implementing container
+ typedef typename ImplSetT::key_type key_type;
+ /// data type of the implementing container
+ typedef typename ImplSetT::value_type data_type;
+ /// value type of the implementing container
+ typedef typename ImplSetT::value_type value_type;
+
+ /// iterator for iteration over intervals
+ typedef typename ImplSetT::iterator iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplSetT::const_iterator const_iterator;
+
+ enum { fineness = 1 };
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /// Default constructor for the empty object
+ interval_set(): base_type() {}
+ /// Copy constructor
+ interval_set(const interval_set& src): base_type(src) {}
+
+ /// Copy constructor for base_type
+ template<class SubType>
+ explicit interval_set
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ assign(src);
+ }
+
+ /// Constructor for a single element
+ explicit interval_set(const domain_type& value): base_type()
+ { add(interval_type(value)); }
+ /// Constructor for a single interval
+ explicit interval_set(const interval_type& itv): base_type()
+ {
+ add(itv);
+ }
+
+ /// Assignment operator
+ template<class SubType>
+ interval_set& operator =
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ assign(src);
+ return *this;
+ }
+
+
+ /// Assignment from a base interval_set.
+ template<class SubType>
+ void assign(const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> base_set_type;
+ this->clear();
+ // Has to be implemented via add. there might be touching borders to be joined
+ iterator prior_ = this->_set.end();
+ ICL_const_FORALL(typename base_set_type, it_, src)
+ prior_ = this->add(prior_, *it_);
+ }
+
+
+private:
+ // Private functions that shall be accessible by the baseclass:
+ friend class
+ interval_base_set <interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>;
+
+ iterator handle_inserted(iterator it_)
+ {
+ return segmental::join_neighbours(*this, it_);
+ }
+
+ iterator add_over(const interval_type& addend, iterator last_)
+ {
+ iterator joined_ = segmental::join_under(*this, addend, last_);
+ return segmental::join_neighbours(*this, joined_);
+ }
+
+ iterator add_over(const interval_type& addend)
+ {
+ iterator joined_ = segmental::join_under(*this, addend);
+ return segmental::join_neighbours(*this, joined_);
+ }
+
+} ;
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_set<icl::interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_set<icl::interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_joiner<icl::interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_joiner<icl::interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+//-----------------------------------------------------------------------------
+// type representation
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ static std::string apply()
+ { return "itv_set<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/interval_traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/interval_traits.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,58 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_INTERVAL_TRAITS_HPP_JOFA_100926
+#define BOOST_ICL_INTERVAL_TRAITS_HPP_JOFA_100926
+
+#include <boost/icl/type_traits/domain_type_of.hpp>
+#include <boost/icl/type_traits/difference_type_of.hpp>
+#include <boost/icl/type_traits/size_type_of.hpp>
+
+namespace boost{ namespace icl
+{
+
+template<class Type> struct interval_traits;
+
+template<class Type>
+struct domain_type_of<interval_traits<Type> >
+{
+ typedef typename interval_traits<Type>::domain_type type;
+};
+
+//------------------------------------------------------------------------------
+//- Adapter class
+//------------------------------------------------------------------------------
+template<class Type> struct interval_traits
+{
+ typedef interval_traits type;
+ typedef typename domain_type_of<Type>::type domain_type;
+
+ static Type construct(const domain_type& lo, const domain_type& up);
+
+ static domain_type upper(const Type& inter_val);
+ static domain_type lower(const Type& inter_val);
+};
+
+template<class Type>
+struct difference_type_of<interval_traits<Type> >
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ typedef typename difference_type_of<domain_type>::type type;
+};
+
+template<class Type>
+struct size_type_of<interval_traits<Type> >
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ typedef typename size_type_of<domain_type>::type type;
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/iterator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,103 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_ITERATOR_HPP_JOFA_091003
+#define BOOST_ICL_ITERATOR_HPP_JOFA_091003
+
+#include <iterator>
+#include <boost/config/warning_disable.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief Performes an addition using a container's memberfunction add, when operator= is called. */
+template<class ContainerT> class add_iterator
+ : public std::iterator<std::output_iterator_tag, void, void, void, void>
+{
+public:
+ /// The container's type.
+ typedef ContainerT container_type;
+ typedef std::output_iterator_tag iterator_category;
+
+ /** An add_iterator is constructed with a container and a position
+ that has to be maintained. */
+ add_iterator(ContainerT& cont, typename ContainerT::iterator iter)
+ : _cont(&cont), _iter(iter) {}
+
+ /** This assignment operator adds the \c value before the current position.
+ It maintains it's position by incrementing after addition. */
+ add_iterator& operator=(typename ContainerT::const_reference value)
+ {
+ _iter = _cont->add(_iter, value);
+ if(_iter != _cont->end())
+ ++_iter;
+ return *this;
+ }
+
+ add_iterator& operator*() { return *this; }
+ add_iterator& operator++() { return *this; }
+ add_iterator& operator++(int){ return *this; }
+
+private:
+ ContainerT* _cont;
+ typename ContainerT::iterator _iter;
+};
+
+
+/** Function adder creates and initializes an add_iterator */
+template<class ContainerT, typename IteratorT>
+inline add_iterator<ContainerT> adder(ContainerT& cont, IteratorT iter_)
+{
+ return add_iterator<ContainerT>(cont, typename ContainerT::iterator(iter_));
+}
+
+/** \brief Performes an insertion using a container's memberfunction add, when operator= is called. */
+template<class ContainerT> class insert_iterator
+ : public std::iterator<std::output_iterator_tag, void, void, void, void>
+{
+public:
+ /// The container's type.
+ typedef ContainerT container_type;
+ typedef std::output_iterator_tag iterator_category;
+
+ /** An insert_iterator is constructed with a container and a position
+ that has to be maintained. */
+ insert_iterator(ContainerT& cont, typename ContainerT::iterator iter)
+ : _cont(&cont), _iter(iter) {}
+
+ /** This assignment operator adds the \c value before the current position.
+ It maintains it's position by incrementing after addition. */
+ insert_iterator& operator=(typename ContainerT::const_reference value)
+ {
+ _iter = _cont->insert(_iter, value);
+ if(_iter != _cont->end())
+ ++_iter;
+ return *this;
+ }
+
+ insert_iterator& operator*() { return *this; }
+ insert_iterator& operator++() { return *this; }
+ insert_iterator& operator++(int){ return *this; }
+
+private:
+ ContainerT* _cont;
+ typename ContainerT::iterator _iter;
+};
+
+
+/** Function inserter creates and initializes an insert_iterator */
+template<class ContainerT, typename IteratorT>
+inline insert_iterator<ContainerT> inserter(ContainerT& cont, IteratorT iter_)
+{
+ return insert_iterator<ContainerT>(cont, typename ContainerT::iterator(iter_));
+}
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_ITERATOR_HPP_JOFA_091003
+
+

Added: sandbox/icl/boost/icl/left_open_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/left_open_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,117 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930
+
+#include <functional>
+#include <boost/concept/assert.hpp>
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class left_open_interval
+{
+public:
+ typedef left_open_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>(0,0]</tt>. */
+ left_open_interval()
+ : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for a left-open singleton interval <tt>(val-1,val]</tt> */
+ explicit left_open_interval(const DomainT& val)
+ : _lwb(pred(val)), _upb(val)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ // Only for discrete types this ctor creates an interval containing
+ // a single element only.
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ BOOST_ASSERT((numeric_minimum<DomainT, is_numeric<DomainT>::value >::is_less_than(val) ));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ left_open_interval(const DomainT& low, const DomainT& up) :
+ _lwb(low), _upb(up)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ DomainT lower()const{ return _lwb; }
+ DomainT upper()const{ return _upb; }
+
+private:
+ DomainT _lwb;
+ DomainT _upb;
+};
+
+//==============================================================================
+//=T left_open_interval -> concept intervals
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::left_open_interval<DomainT, Compare> >
+{
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::left_open_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< left_open_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_left_open);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::left_open_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "(I]<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT, ICL_COMPARE Compare>
+struct value_size<icl::left_open_interval<DomainT,Compare> >
+{
+ static std::size_t apply(const icl::left_open_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,665 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: 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 BOOST_ICL_MAP_HPP_JOFA_070519
+#define BOOST_ICL_MAP_HPP_JOFA_070519
+
+#include <boost/icl/impl_config.hpp>
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#include <boost/interprocess/containers/map.hpp>
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#include <boost/container/map.hpp>
+#else
+#include <map>
+#endif
+
+#include <string>
+#include <boost/type_traits/ice.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/detail/concept_check.hpp>
+#include <boost/icl/detail/on_absorbtion.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/type_traits/absorbs_identities.hpp>
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/icl/type_traits/is_element_container.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+
+#include <boost/icl/associative_element_container.hpp>
+
+namespace boost{namespace icl
+{
+
+struct partial_absorber
+{
+ enum { absorbs_identities = true };
+ enum { is_total = false };
+};
+
+template<>
+inline std::string type_to_string<partial_absorber>::apply() { return "@0"; }
+
+struct partial_enricher
+{
+ enum { absorbs_identities = false };
+ enum { is_total = false };
+};
+
+template<>
+inline std::string type_to_string<partial_enricher>::apply() { return "e0"; }
+
+struct total_absorber
+{
+ enum { absorbs_identities = true };
+ enum { is_total = true };
+};
+
+template<>
+inline std::string type_to_string<total_absorber>::apply() { return "^0"; }
+
+struct total_enricher
+{
+ enum { absorbs_identities = false };
+ enum { is_total = true };
+};
+
+template<>
+inline std::string type_to_string<total_enricher>::apply() { return "e^0"; }
+
+
+
+/** \brief Addable, subractable and intersectable maps */
+template
+<
+ typename DomainT,
+ typename CodomainT,
+ class Traits = icl::partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT),
+ ICL_ALLOC Alloc = std::allocator
+>
+class map: private ICL_IMPL_SPACE::map<DomainT, CodomainT, ICL_COMPARE_DOMAIN(Compare,DomainT),
+ Alloc<std::pair<const DomainT, CodomainT> > >
+{
+public:
+ typedef Alloc<typename std::pair<const DomainT, CodomainT> > allocator_type;
+
+ typedef typename icl::map<DomainT,CodomainT,Traits, Compare,Combine,Section,Alloc> type;
+ typedef typename ICL_IMPL_SPACE::map<DomainT, CodomainT, ICL_COMPARE_DOMAIN(Compare,DomainT),
+ allocator_type> base_type;
+
+ typedef Traits traits;
+
+public:
+ typedef DomainT domain_type;
+ typedef typename boost::call_traits<DomainT>::param_type domain_param;
+ typedef DomainT key_type;
+ 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 ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine;
+ typedef domain_compare key_compare;
+ typedef ICL_COMPARE_DOMAIN(Compare,element_type) element_compare;
+ typedef typename inverse<codomain_combine >::type inverse_codomain_combine;
+ typedef typename mpl::if_
+ <has_set_semantics<codomain_type>
+ , ICL_SECTION_CODOMAIN(Section,CodomainT)
+ , codomain_combine
+ >::type codomain_intersect;
+ typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect;
+ typedef typename base_type::value_compare value_compare;
+
+ typedef typename ICL_IMPL_SPACE::set<DomainT, domain_compare, Alloc<DomainT> > set_type;
+ typedef set_type key_object_type;
+
+
+ BOOST_STATIC_CONSTANT(bool, _total = (Traits::is_total));
+ BOOST_STATIC_CONSTANT(bool, _absorbs = (Traits::absorbs_identities));
+ BOOST_STATIC_CONSTANT(bool,
+ total_invertible = (mpl::and_<is_total<type>, has_inverse<codomain_type> >::value));
+
+ typedef on_absorbtion<type,codomain_combine,Traits::absorbs_identities>
+ on_identity_absorbtion;
+
+public:
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::const_pointer const_pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::difference_type difference_type;
+ typedef typename base_type::reverse_iterator reverse_iterator;
+ typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+
+public:
+ BOOST_STATIC_CONSTANT(bool,
+ is_total_invertible = ( Traits::is_total
+ && has_inverse<codomain_type>::value));
+
+ BOOST_STATIC_CONSTANT(int, fineness = 4);
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ map()
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>));
+ BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>));
+ }
+
+ map(const key_compare& comp): base_type(comp){}
+
+ template <class InputIterator>
+ map(InputIterator first, InputIterator past)
+ : base_type(first,past){}
+
+ template <class InputIterator>
+ map(InputIterator first, InputIterator past, const key_compare& comp)
+ : base_type(first,past,comp)
+ {}
+
+ map(const map& src): base_type::map(src)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>));
+ BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>));
+ }
+
+ 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); }
+
+ //==========================================================================
+ using base_type::empty;
+ using base_type::clear;
+
+ using base_type::begin;
+ using base_type::end;
+ using base_type::rbegin;
+ using base_type::rend;
+
+ using base_type::size;
+ using base_type::max_size;
+
+ using base_type::key_comp;
+ using base_type::value_comp;
+
+ using base_type::insert;
+ using base_type::erase;
+ using base_type::find;
+ using base_type::count;
+
+ using base_type::lower_bound;
+ using base_type::upper_bound;
+ using base_type::equal_range;
+
+ using base_type::operator[];
+
+public:
+ //==========================================================================
+ //= Containedness
+ //==========================================================================
+
+ template<class SubObject>
+ bool contains(const SubObject& sub)const
+ { return icl::contains(*this, sub); }
+
+ bool within(const map& super)const
+ { return icl::contains(super, *this); }
+
+ //==========================================================================
+ //= Size
+ //==========================================================================
+ /** \c iterative_size() yields the number of elements that is visited
+ throu complete iteration. For interval sets \c iterative_size() is
+ different from \c size(). */
+ std::size_t iterative_size()const { return base_type::size(); }
+
+ //==========================================================================
+ //= Selection
+ //==========================================================================
+
+ /** Total select function. */
+ codomain_type operator()(const domain_type& key)const
+ {
+ const_iterator it = find(key);
+ return it==end() ? identity_element<codomain_type>::value()
+ : it->second;
+ }
+
+ //==========================================================================
+ //= Addition
+ //==========================================================================
+ /** \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
+ value is added to the data value already found in the map. */
+ map& add(const value_type& value_pair)
+ {
+ return _add<codomain_combine>(value_pair);
+ }
+
+ /** \c add add \c value_pair into the map using \c prior as a hint to
+ insert \c value_pair after the position \c prior is pointing to. */
+ iterator add(iterator prior, const value_type& value_pair)
+ {
+ return _add<codomain_combine>(prior, value_pair);
+ }
+
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
+ /** If the \c value_pair's key value is in the map, it's data value is
+ subtraced from the data value stored in the map. */
+ map& subtract(const element_type& value_pair)
+ {
+ on_invertible<type, is_total_invertible>
+ ::subtract(*this, value_pair);
+ return *this;
+ }
+
+ map& subtract(const domain_type& key)
+ {
+ icl::erase(*this, key);
+ return *this;
+ }
+
+ //==========================================================================
+ //= Insertion, erasure
+ //==========================================================================
+ std::pair<iterator,bool> insert(const value_type& value_pair)
+ {
+ if(on_identity_absorbtion::is_absorbable(value_pair.second))
+ return std::pair<iterator,bool>(end(),true);
+ else
+ return base_type::insert(value_pair);
+ }
+
+ iterator insert(iterator prior, const value_type& value_pair)
+ {
+ if(on_identity_absorbtion::is_absorbable(value_pair.second))
+ return end();
+ else
+ return base_type::insert(prior, value_pair);
+ }
+
+ /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */
+ map& set(const element_type& key_value_pair)
+ {
+ return icl::set_at(*this, key_value_pair);
+ }
+
+ /** erase \c key_value_pair from the map.
+ Erase only if, the exact value content \c val is stored for the given key. */
+ size_type erase(const element_type& key_value_pair)
+ {
+ return icl::erase(*this, key_value_pair);
+ }
+
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
+ /** The intersection of \c key_value_pair and \c *this map is added to \c section. */
+ void add_intersection(map& section, const element_type& key_value_pair)const
+ {
+ on_definedness<type, Traits::is_total>
+ ::add_intersection(section, *this, key_value_pair);
+ }
+
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+
+ map& flip(const element_type& operand)
+ {
+ on_total_absorbable<type,_total,_absorbs>::flip(*this, operand);
+ return *this;
+ }
+
+private:
+ template<class Combiner>
+ map& _add(const element_type& value_pair);
+
+ template<class Combiner>
+ iterator _add(iterator prior, const element_type& value_pair);
+
+ template<class Combiner>
+ map& _subtract(const element_type& value_pair);
+
+ template<class FragmentT>
+ void total_add_intersection(type& section, const FragmentT& fragment)const
+ {
+ section += *this;
+ section.add(fragment);
+ }
+
+ void partial_add_intersection(type& section, const element_type& operand)const
+ {
+ const_iterator it_ = find(operand.first);
+ if(it_ != end())
+ {
+ section.template _add<codomain_combine >(*it_);
+ section.template _add<codomain_intersect>(operand);
+ }
+ }
+
+
+private:
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total_invertible>
+ struct on_invertible;
+
+ template<class Type>
+ struct on_invertible<Type, true>
+ {
+ typedef typename Type::element_type element_type;
+ typedef typename Type::inverse_codomain_combine inverse_codomain_combine;
+
+ static void subtract(Type& object, const element_type& operand)
+ { object.template _add<inverse_codomain_combine>(operand); }
+ };
+
+ template<class Type>
+ struct on_invertible<Type, false>
+ {
+ typedef typename Type::element_type element_type;
+ typedef typename Type::inverse_codomain_combine inverse_codomain_combine;
+
+ static void subtract(Type& object, const element_type& operand)
+ { object.template _subtract<inverse_codomain_combine>(operand); }
+ };
+
+ friend struct on_invertible<type, true>;
+ friend struct on_invertible<type, false>;
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total>
+ struct on_definedness;
+
+ template<class Type>
+ struct on_definedness<Type, true>
+ {
+ static void add_intersection(Type& section, const Type& object,
+ const element_type& operand)
+ { object.total_add_intersection(section, operand); }
+ };
+
+ template<class Type>
+ struct on_definedness<Type, false>
+ {
+ static void add_intersection(Type& section, const Type& object,
+ const element_type& operand)
+ { object.partial_add_intersection(section, operand); }
+ };
+
+ friend struct on_definedness<type, true>;
+ friend struct on_definedness<type, false>;
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool has_set_semantics, bool absorbs_identities>
+ struct on_codomain_model;
+
+ template<class Type>
+ struct on_codomain_model<Type, false, false>
+ { // !codomain_is_set, !absorbs_identities
+ static void subtract(Type&, typename Type::iterator it_,
+ const typename Type::codomain_type& )
+ { it_->second = identity_element<typename Type::codomain_type>::value(); }
+ };
+
+ template<class Type>
+ struct on_codomain_model<Type, false, true>
+ { // !codomain_is_set, absorbs_identities
+ static void subtract(Type& object, typename Type::iterator it_,
+ const typename Type::codomain_type& )
+ { object.erase(it_); }
+ };
+
+ template<class Type>
+ struct on_codomain_model<Type, true, false>
+ { // !codomain_is_set, !absorbs_identities
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+ static void subtract(Type&, typename Type::iterator it_,
+ const typename Type::codomain_type& co_value)
+ {
+ inverse_codomain_intersect()(it_->second, co_value);
+ }
+ };
+
+ template<class Type>
+ struct on_codomain_model<Type, true, true>
+ { // !codomain_is_set, absorbs_identities
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+ static void subtract(Type& object, typename Type::iterator it_,
+ const typename Type::codomain_type& co_value)
+ {
+ inverse_codomain_intersect()(it_->second, co_value);
+ if(it_->second == identity_element<codomain_type>::value())
+ object.erase(it_);
+ }
+ };
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ template<class Type, bool is_total, bool absorbs_identities>
+ struct on_total_absorbable;
+
+ template<class Type>
+ struct on_total_absorbable<Type, true, true>
+ {
+ typedef typename Type::element_type element_type;
+ static void flip(Type& object, const typename Type::element_type&)
+ { icl::clear(object); }
+ };
+
+ template<class Type>
+ struct on_total_absorbable<Type, true, false>
+ {
+ typedef typename Type::element_type element_type;
+ typedef typename Type::codomain_type codomain_type;
+
+ static void flip(Type& object, const element_type& operand)
+ {
+ object.add(operand);
+ ICL_FORALL(typename Type, it_, object)
+ it_->second = identity_element<codomain_type>::value();
+ }
+ };
+
+ template<class Type>
+ struct on_total_absorbable<Type, false, true>
+ { // !is_total, absorbs_identities
+ typedef typename Type::element_type element_type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::iterator iterator;
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+
+ static void flip(Type& object, const element_type& operand)
+ {
+ std::pair<iterator,bool> insertion = object.insert(operand);
+ if(!insertion.second)
+ on_codomain_model<Type, has_set_semantics<codomain_type>::value, true>
+ ::subtract(object, insertion.first, operand.second);
+ }
+ };
+
+ template<class Type>
+ struct on_total_absorbable<Type, false, false>
+ { // !is_total !absorbs_identities
+ typedef typename Type::element_type element_type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::iterator iterator;
+ typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect;
+
+ static void flip(Type& object, const element_type& operand)
+ {
+ std::pair<iterator,bool> insertion = object.insert(operand);
+ if(!insertion.second)
+ on_codomain_model<Type, has_set_semantics<codomain_type>::value, false>
+ ::subtract(object, insertion.first, operand.second);
+ }
+ };
+
+ friend struct on_total_absorbable<type, true, true >;
+ friend struct on_total_absorbable<type, false, true >;
+ friend struct on_total_absorbable<type, true, false>;
+ friend struct on_total_absorbable<type, false, false>;
+ //--------------------------------------------------------------------------
+};
+
+
+
+//==============================================================================
+//= Addition<ElementMap>
+//==============================================================================
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+ template <class Combiner>
+map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
+ map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
+ ::_add(const element_type& addend)
+{
+ typedef typename on_absorbtion
+ <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_;
+
+ const codomain_type& co_val = addend.second;
+ if(on_absorbtion_::is_absorbable(co_val))
+ return *this;
+
+ std::pair<iterator,bool> insertion
+ = base_type::insert(value_type(addend.first, version<Combiner>()(co_val)));
+
+ if(!insertion.second)
+ {
+ iterator it = insertion.first;
+ Combiner()((*it).second, co_val);
+
+ if(on_absorbtion_::is_absorbable((*it).second))
+ erase(it);
+ }
+ return *this;
+}
+
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+ template <class Combiner>
+typename map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::iterator
+ map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
+ ::_add(iterator prior_, const value_type& addend)
+{
+ typedef typename on_absorbtion
+ <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_;
+
+ const codomain_type& co_val = addend.second;
+ if(on_absorbtion_::is_absorbable(co_val))
+ return end();
+
+ iterator inserted_
+ = base_type::insert(prior_,
+ value_type(addend.first, Combiner::identity_element()));
+ Combiner()(inserted_->second, addend.second);
+
+ if(on_absorbtion_::is_absorbable(inserted_->second))
+ {
+ erase(inserted_);
+ return end();
+ }
+ else
+ return inserted_;
+}
+
+
+//==============================================================================
+//= Subtraction<ElementMap>
+//==============================================================================
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_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& minuend)
+{
+ typedef typename on_absorbtion
+ <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_;
+
+ iterator it_ = find(minuend.first);
+ if(it_ != end())
+ {
+ Combiner()(it_->second, minuend.second);
+ if(on_absorbtion_::is_absorbable(it_->second))
+ erase(it_);
+ }
+ return *this;
+}
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+struct is_map<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> >
+{
+ typedef is_map<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+struct has_inverse<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> >
+{
+ typedef has_inverse<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value));
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+struct absorbs_identities<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> >
+{
+ typedef absorbs_identities type;
+ BOOST_STATIC_CONSTANT(int, value = Traits::absorbs_identities);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+struct is_total<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> >
+{
+ typedef is_total type;
+ BOOST_STATIC_CONSTANT(int, value = Traits::is_total);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc>
+struct type_to_string<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> >
+{
+ static std::string apply()
+ {
+ return "map<"+ type_to_string<DomainT>::apply() + ","
+ + type_to_string<CodomainT>::apply() + ","
+ + type_to_string<Traits>::apply() +">";
+ }
+};
+
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_MAP_HPP_JOFA_070519
+

Added: sandbox/icl/boost/icl/open_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/open_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,117 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_OPEN_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_OPEN_INTERVAL_HPP_JOFA_100930
+
+#include <functional>
+#include <boost/concept/assert.hpp>
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class open_interval
+{
+public:
+ typedef open_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>(0,0)</tt>. */
+ open_interval()
+ : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for an open singleton interval <tt>(val-1,val+1)</tt> */
+ explicit open_interval(const DomainT& val)
+ : _lwb(pred(val)), _upb(succ(val))
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ // Only for discrete types this ctor creates an interval containing
+ // a single element only.
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ BOOST_ASSERT((numeric_minimum<DomainT, is_numeric<DomainT>::value >::is_less_than(val) ));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ open_interval(const DomainT& low, const DomainT& up) :
+ _lwb(low), _upb(up)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ DomainT lower()const{ return _lwb; }
+ DomainT upper()const{ return _upb; }
+
+private:
+ DomainT _lwb;
+ DomainT _upb;
+};
+
+//==============================================================================
+//=T open_interval -> concept intervals
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::open_interval<DomainT, Compare> >
+{
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::open_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< open_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_open);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::open_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "(I)<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT, ICL_COMPARE Compare>
+struct value_size<icl::open_interval<DomainT,Compare> >
+{
+ static std::size_t apply(const icl::open_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/predicates.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/predicates.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,137 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_PREDICATES_HPP_JOFA_990224
+#define BOOST_ICL_PREDICATES_HPP_JOFA_990224
+
+#include <functional>
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{namespace icl
+{
+ // naming convention
+ // predicate: n-ary predicate
+ // property: unary predicate
+ // relation: binary predicate
+
+ // Unary predicates
+
+ template <class Type>
+ class property : public std::unary_function<Type,bool>{};
+
+ template <class Type>
+ class member_property : public property<Type>
+ {
+ public:
+ member_property( bool(Type::* pred)()const ): property<Type>(), m_pred(pred){}
+ bool operator()(const Type& x)const { return (x.*m_pred)(); }
+ private:
+ bool(Type::* m_pred)()const;
+ } ;
+
+ template <class Type>
+ struct is_identity_element: public property<Type>
+ {
+ bool operator() (const Type& x)const { return x == Type(); }
+ } ;
+
+ template <class Type>
+ class content_is_identity_element: public property<Type>
+ {
+ public:
+ bool operator() (const Type& x)const
+ { return x.second == Type::second_type(); }
+ } ;
+
+
+ // Binary predicates: relations
+
+ template <class LeftT, class RightT>
+ class relation : public std::binary_function<LeftT,RightT,bool>{};
+
+ template <class Type> struct std_equal : public relation<Type,Type>
+ {
+ bool operator()(const Type& lhs, const Type& rhs)const
+ {
+ return lhs == rhs;
+ }
+ };
+
+ //-----------------------------------------------------------------------------
+
+ template<>
+ inline std::string unary_template_to_string<icl::std_equal>::apply()
+ { return "=="; }
+
+ template <class Type>
+ struct element_equal : public relation<Type,Type>
+ {
+ bool operator()(const Type& lhs, const Type& rhs)const
+ {
+ return is_element_equal(lhs, rhs);
+ }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<icl::element_equal>::apply()
+ { return "="; }
+
+ template <class Type>
+ struct distinct_equal : public relation<Type,Type>
+ {
+ bool operator()(const Type& lhs, const Type& rhs)const
+ {
+ return is_distinct_equal(lhs, rhs);
+ }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<icl::distinct_equal>::apply()
+ { return "==/0"; }
+
+
+
+ /// Functor class template contained_in implements the subset relation.
+ template<class Type>
+ struct sub_super_set : public relation<Type,Type>
+ {
+ /// Apply the subset relation.
+ /** <tt>contained_in(sub, super)</tt> is true if <tt>sub</tt>
+ is contained in <tt>super</tt> */
+ bool operator()(const Type& sub, const Type& super)const
+ {
+ return contains(super, sub);
+ }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<icl::sub_super_set>::apply()
+ { return "C="; }
+
+ /// Functor class template <b>contains</b> implements the superset relation.
+ template<class Type>
+ struct super_sub_set : public relation<Type,Type>
+ {
+ /// Apply the superset relation.
+ /** <tt>contains(super, sub)</tt> is true if <tt>super</tt> containes
+ <tt>sub</tt> */
+ bool operator()(const Type& super, const Type& sub)const
+ {
+ return contains(super, sub);
+ }
+ };
+
+ template<>
+ inline std::string unary_template_to_string<icl::super_sub_set>::apply()
+ { return "D="; }
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/ptime.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/ptime.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,98 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+itl_ptime provides adapter code for boost::posix_time::ptime.
+It implements incrementation (++) decrementation (--) and a neutral element
+w.r.t. addition (identity_element()).
+------------------------------------------------------------------------------*/
+
+#ifndef BOOST_ICL_PTIME_HPP_JOFA_080416
+#define BOOST_ICL_PTIME_HPP_JOFA_080416
+
+#include <stdio.h>
+#include <string>
+#include <sstream>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4100) // boost/date_time/time.hpp(80) : warning C4100: 'as_offset' : unreferenced formal parameter
+#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data
+#pragma warning(disable:4702) // boost\lexical_cast.hpp(1159) : warning C4702: unreachable code
+#endif
+#include <boost/date_time/posix_time/posix_time.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/difference_type_of.hpp>
+#include <boost/icl/type_traits/size_type_of.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+
+namespace boost{namespace icl
+{
+ template<> struct is_discrete<boost::posix_time::ptime>
+ {
+ typedef is_discrete type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<>
+ inline boost::posix_time::ptime identity_element<boost::posix_time::ptime>::value()
+ {
+ return boost::posix_time::ptime(boost::posix_time::min_date_time);
+ }
+
+ template<>
+ struct has_difference<boost::posix_time::ptime>
+ {
+ typedef has_difference type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<>
+ struct difference_type_of<boost::posix_time::ptime>
+ {
+ typedef boost::posix_time::time_duration type;
+ };
+
+ template<>
+ struct size_type_of<boost::posix_time::ptime>
+ {
+ typedef boost::posix_time::time_duration type;
+ };
+
+ // ------------------------------------------------------------------------
+ boost::posix_time::ptime operator ++(boost::posix_time::ptime& x)
+ {
+ return x += boost::posix_time::ptime::time_duration_type::unit();
+ }
+
+ boost::posix_time::ptime operator --(boost::posix_time::ptime& x)
+ {
+ return x -= boost::posix_time::ptime::time_duration_type::unit();
+ }
+
+ // ------------------------------------------------------------------------
+ boost::posix_time::time_duration operator ++(boost::posix_time::time_duration& x)
+ {
+ return x += boost::posix_time::ptime::time_duration_type::unit();
+ }
+
+ boost::posix_time::time_duration operator --(boost::posix_time::time_duration& x)
+ {
+ return x -= boost::posix_time::ptime::time_duration_type::unit();
+ }
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/rational.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/rational.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,70 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+itl_rational provides adapter code for boost::rational.
+------------------------------------------------------------------------------*/
+
+#ifndef BOOST_ICL_RATIONAL_HPP_JOFA_080913
+#define BOOST_ICL_RATIONAL_HPP_JOFA_080913
+
+#include <boost/config.hpp> // For BOOST_MSVC and more
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#pragma warning(disable:4512) // 'boost::detail::resetter' : assignment operator could not be generated
+#pragma warning(disable:4800) // 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)
+#endif
+
+#include <boost/rational.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/type_traits/is_numeric.hpp>
+
+namespace boost{namespace icl
+{
+ template<class Integral>
+ struct is_numeric<boost::rational<Integral> >
+ {
+ typedef is_numeric type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<class Integral>
+ struct is_continuous<boost::rational<Integral> >
+ {
+ typedef is_continuous type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<class Integral>
+ struct is_discrete<boost::rational<Integral> >
+ {
+ typedef is_discrete type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template<class Integral>
+ struct has_inverse<boost::rational<Integral> >
+ {
+ typedef has_inverse type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_signed<Integral>::value));
+ };
+
+}} // namespace icl boost
+
+
+#endif
+
+

Added: sandbox/icl/boost/icl/right_open_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/right_open_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,116 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323
+#define BOOST_ICL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323
+
+#include <functional>
+#include <boost/concept/assert.hpp>
+#include <boost/icl/concept/interval.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+class right_open_interval
+{
+public:
+ typedef right_open_interval<DomainT,Compare> type;
+ typedef DomainT domain_type;
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /** Default constructor; yields an empty interval <tt>[0,0)</tt>. */
+ right_open_interval()
+ : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ //NOTE: Compiler generated copy constructor is used
+
+ /** Constructor for a singleton interval <tt>[val,val+1)</tt> */
+ explicit right_open_interval(const DomainT& val)
+ : _lwb(val), _upb(succ(val))
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ // Only for discrete types this ctor creates an interval containing
+ // a single element only.
+ BOOST_STATIC_ASSERT((icl::is_discrete<DomainT>::value));
+ }
+
+ /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
+ right_open_interval(const DomainT& low, const DomainT& up) :
+ _lwb(low), _upb(up)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ domain_type lower()const{ return _lwb; }
+ domain_type upper()const{ return _upb; }
+
+private:
+ domain_type _lwb;
+ domain_type _upb;
+};
+
+//==============================================================================
+//=T right_open_interval -> concept intervals
+//==============================================================================
+template<class DomainT, ICL_COMPARE Compare>
+struct interval_traits< icl::right_open_interval<DomainT, Compare> >
+{
+ typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef icl::right_open_interval<DomainT, Compare> interval_type;
+
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ {
+ return interval_type(lo, up);
+ }
+
+ static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
+};
+
+
+//==============================================================================
+//= Type traits
+//==============================================================================
+template <class DomainT, ICL_COMPARE Compare>
+struct interval_bound_type< right_open_interval<DomainT,Compare> >
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open);
+};
+
+template <class DomainT, ICL_COMPARE Compare>
+struct type_to_string<icl::right_open_interval<DomainT,Compare> >
+{
+ static std::string apply()
+ { return "[I)<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+template<class DomainT, ICL_COMPARE Compare>
+struct value_size<icl::right_open_interval<DomainT,Compare> >
+{
+ static std::size_t apply(const icl::right_open_interval<DomainT>& value)
+ { return 2; }
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl/separate_interval_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/separate_interval_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,191 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608
+#define BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608
+
+#include <boost/assert.hpp>
+#include <boost/icl/type_traits/is_interval_separator.hpp>
+#include <boost/icl/interval_base_set.hpp>
+#include <boost/icl/interval_set.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief Implements a set as a set of intervals - leaving adjoining intervals separate */
+template
+<
+ typename DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class separate_interval_set:
+ public interval_base_set<separate_interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>
+{
+public:
+ typedef separate_interval_set<DomainT,Compare,Interval,Alloc> type;
+
+ typedef interval_base_set<type,DomainT,Compare,Interval,Alloc> base_type;
+
+ typedef type overloadable_type;
+ typedef type key_object_type;
+
+ typedef interval_set<DomainT,Compare,Interval,Alloc> joint_type;
+
+ /// The domain type of the set
+ typedef DomainT domain_type;
+ /// 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 ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ /// The segment type of the set
+ typedef interval_type segment_type;
+
+ /// Comparison functor for domain values
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ /// Comparison functor for intervals
+ typedef exclusive_less_than<interval_type> interval_compare;
+
+ /// Comparison functor for keys
+ typedef exclusive_less_than<interval_type> key_compare;
+
+ /// The allocator type of the set
+ typedef Alloc<interval_type> allocator_type;
+
+ /// allocator type of the corresponding element set
+ typedef Alloc<DomainT> domain_allocator_type;
+
+ /// The corresponding atomized type representing this interval container of elements
+ typedef typename base_type::atomized_type atomized_type;
+
+ /// Container type for the implementation
+ typedef typename base_type::ImplSetT ImplSetT;
+
+ /// key type of the implementing container
+ typedef typename ImplSetT::key_type key_type;
+ /// data type of the implementing container
+ typedef typename ImplSetT::value_type data_type;
+ /// value type of the implementing container
+ typedef typename ImplSetT::value_type value_type;
+
+ /// iterator for iteration over intervals
+ typedef typename ImplSetT::iterator iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplSetT::const_iterator const_iterator;
+
+
+ enum { fineness = 2 };
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /// Default constructor for the empty object
+ separate_interval_set(): base_type() {}
+ /// Copy constructor
+ separate_interval_set(const separate_interval_set& src): base_type(src) {}
+
+ /// Copy constructor for base_type
+ template<class SubType>
+ separate_interval_set
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ assign(src);
+ }
+
+ /// Constructor for a single element
+ explicit separate_interval_set(const domain_type& elem): base_type() { add(elem); }
+ /// Constructor for a single interval
+ explicit separate_interval_set(const interval_type& itv): base_type() { add(itv); }
+
+ /// Assignment operator
+ template<class SubType>
+ separate_interval_set& operator =
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ assign(src);
+ return *this;
+ }
+
+ /// Assignment from a base interval_set.
+ template<class SubType>
+ void assign(const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ this->clear();
+ this->_set.insert(src.begin(), src.end());
+ }
+
+
+private:
+ // Private functions that shall be accessible by the baseclass:
+ friend class
+ interval_base_set<separate_interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>;
+
+ iterator handle_inserted(iterator inserted_)
+ {
+ return inserted_;
+ }
+
+ iterator add_over(const interval_type& addend, iterator last_)
+ {
+ return segmental::join_under(*this, addend, last_);
+ }
+
+ iterator add_over(const interval_type& addend)
+ {
+ return segmental::join_under(*this, addend);
+ }
+
+} ;
+
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_set<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_set<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_separator<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_separator<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//-----------------------------------------------------------------------------
+// type representation
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ static std::string apply()
+ { return "se_itv_set<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,27 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: 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 BOOST_ICL_SET_HPP_JOFA_070519
+#define BOOST_ICL_SET_HPP_JOFA_070519
+
+#include <boost/icl/impl_config.hpp>
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#include <boost/interprocess/containers/set.hpp>
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#include <boost/container/set.hpp>
+#else
+#include <set>
+#endif
+
+#include <boost/icl/concept/associative_element_container.hpp>
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_SET_HPP_JOFA_070519
+

Added: sandbox/icl/boost/icl/split_interval_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/split_interval_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,213 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_SPLIT_INTERVAL_MAP_HPP_JOFA_000706
+#define BOOST_ICL_SPLIT_INTERVAL_MAP_HPP_JOFA_000706
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/interval_base_map.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief implements a map as a map of intervals - on insertion
+ overlapping intervals are split and associated values are combined. */
+template
+<
+ typename DomainT,
+ typename CodomainT,
+ class Traits = icl::partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class split_interval_map:
+ public interval_base_map<split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+{
+public:
+ typedef Traits traits;
+ typedef split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> type;
+ typedef interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> joint_type;
+ typedef type overloadable_type;
+
+ typedef interval_base_map <type,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> base_type;
+
+ typedef DomainT domain_type;
+ typedef CodomainT codomain_type;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::element_type element_type;
+ typedef typename base_type::segment_type segment_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;
+
+ typedef typename base_type::codomain_combine codomain_combine;
+
+ typedef interval_set<DomainT,Compare,Interval,Alloc> interval_set_type;
+ typedef interval_set_type set_type;
+ typedef set_type key_object_type;
+
+ enum { fineness = 3 };
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /// Default constructor for the empty object
+ split_interval_map(): base_type() {}
+ /// Copy constructor
+ split_interval_map(const split_interval_map& src): base_type(src) {}
+
+ explicit split_interval_map(domain_mapping_type& base_pair): base_type()
+ { add(base_pair); }
+
+ explicit split_interval_map(const value_type& value_pair): base_type()
+ { add(value_pair); }
+
+ /// Assignment operator
+ template<class SubType>
+ split_interval_map& operator =
+ (const interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>& src)
+ { assign(src); return *this; }
+
+ /// Assignment from a base interval_map.
+ template<class SubType>
+ void assign(const interval_base_map<SubType,DomainT,CodomainT,
+ Traits,Compare,Combine,Section,Interval,Alloc>& src)
+ {
+ this->clear();
+ this->_map.insert(src.begin(), src.end());
+ }
+
+private:
+ // Private functions that shall be accessible by the baseclass:
+ friend class
+ interval_base_map <split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>,
+ DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>;
+
+ iterator handle_inserted(iterator it_)const { return it_; }
+ void handle_inserted(iterator, iterator)const{ }
+
+ template<class Combiner>
+ void handle_left_combined(iterator it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ this->_map.erase(it_);
+ }
+
+ template<class Combiner>
+ void handle_combined(iterator it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ this->_map.erase(it_);
+ }
+
+ template<class Combiner>
+ void handle_preceeded_combined(iterator prior_, iterator& it_)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ {
+ this->_map.erase(it_);
+ it_ = prior_;
+ }
+ }
+
+ template<class Combiner>
+ void handle_succeeded_combined(iterator it_, iterator)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ this->_map.erase(it_);
+ }
+
+ void handle_reinserted(iterator){}
+
+ template<class Combiner>
+ void gap_insert_at(iterator& it_, iterator prior_,
+ const interval_type& end_gap, const codomain_type& co_val)
+ {
+ if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(it_->second))
+ {
+ this->_map.erase(it_);
+ it_ = this->template gap_insert<Combiner>(prior_, end_gap, co_val);
+ }
+ else
+ it_ = this->template gap_insert<Combiner>(it_, end_gap, co_val);
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_map<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_map<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct has_inverse<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef has_inverse<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value));
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_splitter<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_interval_splitter<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct absorbs_identities<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef absorbs_identities<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities));
+};
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_total<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ typedef is_total<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total));
+};
+
+
+template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> >
+{
+ static std::string apply()
+ {
+ return "sp_itv_map<"+ type_to_string<DomainT>::apply() + ","
+ + type_to_string<CodomainT>::apply() + ","
+ + type_to_string<Traits>::apply() +">";
+ }
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/split_interval_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/split_interval_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 __split_interval_set_JOFA_990223__
+#define __split_interval_set_JOFA_990223__
+
+#include <boost/icl/type_traits/is_interval_splitter.hpp>
+#include <boost/icl/interval_base_set.hpp>
+#include <boost/icl/interval_set.hpp>
+
+namespace boost{namespace icl
+{
+
+/** \brief implements a set as a set of intervals - on insertion
+ overlapping intervals are split */
+template
+<
+ typename DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class split_interval_set:
+ public interval_base_set<split_interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>
+{
+public:
+ typedef split_interval_set<DomainT,Compare,Interval,Alloc> type;
+ typedef interval_base_set<type,DomainT,Compare,Interval,Alloc> base_type;
+
+ typedef interval_set<DomainT,Compare,Interval,Alloc> joint_type;
+ typedef type overloadable_type;
+ typedef type key_object_type;
+
+ /// The domain type of the set
+ typedef DomainT domain_type;
+ /// 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 ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
+ /// The segment type of the set
+ typedef interval_type segment_type;
+
+ /// Comparison functor for domain values
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ /// Comparison functor for intervals
+ typedef exclusive_less_than<interval_type> interval_compare;
+
+ /// Comparison functor for keys
+ typedef exclusive_less_than<interval_type> key_compare;
+
+ /// The allocator type of the set
+ typedef Alloc<interval_type> allocator_type;
+
+ /// allocator type of the corresponding element set
+ typedef Alloc<DomainT> domain_allocator_type;
+
+ /// The corresponding atomized type representing this interval container of elements
+ typedef typename base_type::atomized_type atomized_type;
+
+ /// Container type for the implementation
+ typedef typename base_type::ImplSetT ImplSetT;
+
+ /// key type of the implementing container
+ typedef typename ImplSetT::key_type key_type;
+ /// data type of the implementing container
+ typedef typename ImplSetT::value_type data_type;
+ /// value type of the implementing container
+ typedef typename ImplSetT::value_type value_type;
+
+ /// iterator for iteration over intervals
+ typedef typename ImplSetT::iterator iterator;
+ /// const_iterator for iteration over intervals
+ typedef typename ImplSetT::const_iterator const_iterator;
+
+ enum { fineness = 3 };
+
+public:
+ //==========================================================================
+ //= Construct, copy, destruct
+ //==========================================================================
+ /// Default constructor for the empty object
+ split_interval_set(): base_type() {}
+
+ /// Copy constructor
+ split_interval_set(const split_interval_set& src): base_type(src) {}
+
+ /// Copy constructor for base_type
+ template<class SubType>
+ split_interval_set
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ { assign(src); }
+
+ /// Constructor for a single element
+ explicit split_interval_set(const interval_type& elem): base_type() { add(elem); }
+ /// Constructor for a single interval
+ explicit split_interval_set(const domain_type& itv): base_type() { add(itv); }
+
+ /// Assignment operator
+ template<class SubType>
+ split_interval_set& operator =
+ (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ { assign(src); return *this; }
+
+ /// Assignment from a base interval_set.
+ template<class SubType>
+ void assign(const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src)
+ {
+ this->clear();
+ this->_set.insert(src.begin(), src.end());
+ }
+
+
+private:
+ // Private functions that shall be accessible by the baseclass:
+ friend class
+ interval_base_set<split_interval_set<DomainT,Compare,Interval,Alloc>,
+ DomainT,Compare,Interval,Alloc>;
+
+ iterator handle_inserted(iterator inserted_)
+ {
+ return inserted_;
+ }
+
+ iterator add_over(const interval_type& addend, iterator last_)
+ {
+ iterator first_ = this->_set.lower_bound(addend);
+ //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val));
+
+ iterator it_ = first_;
+ interval_type rest_interval = addend;
+
+ add_front(rest_interval, it_);
+ add_main (rest_interval, it_, last_);
+ add_rear (rest_interval, it_);
+ return it_;
+ }
+
+ iterator add_over(const interval_type& addend)
+ {
+ std::pair<iterator,iterator> overlap = this->_set.equal_range(addend);
+ iterator first_ = overlap.first,
+ end_ = overlap.second,
+ last_ = end_; --last_;
+
+ iterator it_ = first_;
+ interval_type rest_interval = addend;
+
+ add_front(rest_interval, it_);
+ add_main (rest_interval, it_, last_);
+ add_rear (rest_interval, it_);
+
+ return it_;
+ }
+
+} ;
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_set<icl::split_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_set<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_container<icl::split_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_container<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct is_interval_splitter<icl::split_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ typedef is_interval_splitter<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//-----------------------------------------------------------------------------
+// type representation
+//-----------------------------------------------------------------------------
+template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::split_interval_set<DomainT,Compare,Interval,Alloc> >
+{
+ static std::string apply()
+ { return "sp_itv_set<"+ type_to_string<DomainT>::apply() +">"; }
+};
+
+
+}} // namespace icl boost
+
+#endif
+
+
+

Added: sandbox/icl/boost/icl/type_traits/absorbs_identities.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/absorbs_identities.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,23 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 BOOST_ICL_TYPE_TRAITS_ABSORBS_IDENTITIES_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_ABSORBS_IDENTITIES_HPP_JOFA_081004
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct absorbs_identities
+ {
+ typedef absorbs_identities<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/adds_inversely.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/adds_inversely.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,29 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829
+#define BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829
+
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{ namespace icl
+{
+
+template<class Type, class Combiner>
+struct adds_inversely
+{
+ typedef adds_inversely type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<has_inverse<Type>, is_negative<Combiner> >::value));
+};
+
+}} // namespace boost icl
+
+#endif // BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829
+
+

Added: sandbox/icl/boost/icl/type_traits/codomain_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/codomain_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,64 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_CODOMAIN_TYPE_OF_HPP_JOFA_100829
+#define BOOST_ICL_TYPE_TRAITS_CODOMAIN_TYPE_OF_HPP_JOFA_100829
+
+#include <set>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/icl/type_traits/no_type.hpp>
+#include <boost/icl/type_traits/is_container.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(codomain_type)
+ }
+
+ template <class Type>
+ struct has_codomain_type
+ : mpl::bool_<detail::has_codomain_type<Type>::value>
+ {};
+
+ template <class Type, bool has_codomain_type, bool is_std_set>
+ struct get_codomain_type;
+
+ template <class Type>
+ struct get_codomain_type<Type, false, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type, bool is_std_set>
+ struct get_codomain_type<Type, true, is_std_set>
+ {
+ typedef typename Type::codomain_type type;
+ };
+
+ template <class Type>
+ struct get_codomain_type<Type, false, true>
+ {
+ typedef typename Type::value_type type;
+ };
+
+ template <class Type>
+ struct codomain_type_of
+ {
+ typedef typename
+ get_codomain_type< Type
+ , has_codomain_type<Type>::value
+ , is_std_set<Type>::value
+ >::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/difference.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/difference.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,19 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911
+#define BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct difference{ typedef Type type; };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/difference_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/difference_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_DIFFERENCE_TYPE_OF_HPP_JOFA_080911
+#define BOOST_ICL_TYPE_TRAITS_DIFFERENCE_TYPE_OF_HPP_JOFA_080911
+
+#include <boost/config.hpp> // For macro BOOST_STATIC_CONSTANT
+#include <boost/icl/type_traits/no_type.hpp>
+#include <boost/icl/type_traits/is_numeric.hpp>
+
+namespace boost{ namespace icl
+{
+ //--------------------------------------------------------------------------
+ template<class Type>
+ struct has_difference
+ {
+ typedef has_difference type;
+ BOOST_STATIC_CONSTANT(bool, value = is_numeric<Type>::value);
+ };
+
+ //--------------------------------------------------------------------------
+ template <class Type, bool has_difference>
+ struct get_difference_type;
+
+ template <class Type>
+ struct get_difference_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_difference_type<Type, true>
+ {
+ typedef Type type;
+ };
+
+ //--------------------------------------------------------------------------
+ template<class Type>
+ struct difference_type_of
+ {
+ typedef typename
+ get_difference_type<Type, has_difference<Type>::value>::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/domain_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/domain_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,54 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_DOMAIN_TYPE_OF_HPP_JOFA_100902
+#define BOOST_ICL_TYPE_TRAITS_DOMAIN_TYPE_OF_HPP_JOFA_100902
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/icl/type_traits/no_type.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(domain_type)
+ }
+
+ template <class Type>
+ struct has_domain_type
+ : mpl::bool_<detail::has_domain_type<Type>::value>
+ {};
+
+
+ template <class Type, bool has_domain_type>
+ struct get_domain_type;
+
+ template <class Type>
+ struct get_domain_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_domain_type<Type, true>
+ {
+ typedef typename Type::domain_type type;
+ };
+
+ template <class Type>
+ struct domain_type_of
+ {
+ typedef typename
+ get_domain_type<Type, has_domain_type<Type>::value>::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/element_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/element_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,112 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_ELEMENT_TYPE_OF_HPP_JOFA_100902
+#define BOOST_ICL_TYPE_TRAITS_ELEMENT_TYPE_OF_HPP_JOFA_100902
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/icl/type_traits/no_type.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(element_type)
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(key_type)
+ }
+
+ //--------------------------------------------------------------------------
+ template <class Type>
+ struct has_element_type
+ : mpl::bool_<detail::has_element_type<Type>::value>
+ {};
+
+ template <class Type, bool has_element_type>
+ struct get_element_type;
+
+ template <class Type>
+ struct get_element_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_element_type<Type, true>
+ {
+ typedef typename Type::element_type type;
+ };
+
+ template <class Type>
+ struct element_type_of
+ {
+ typedef typename
+ get_element_type<Type, has_element_type<Type>::value>::type type;
+ };
+
+ //--------------------------------------------------------------------------
+ template <class Type>
+ struct has_value_type
+ : mpl::bool_<detail::has_value_type<Type>::value>
+ {};
+
+ template <class Type, bool has_value_type>
+ struct get_value_type;
+
+ template <class Type>
+ struct get_value_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_value_type<Type, true>
+ {
+ typedef typename Type::value_type type;
+ };
+
+ template <class Type>
+ struct value_type_of
+ {
+ typedef typename
+ get_value_type<Type, has_value_type<Type>::value>::type type;
+ };
+
+ //--------------------------------------------------------------------------
+ template <class Type>
+ struct has_key_type
+ : mpl::bool_<detail::has_key_type<Type>::value>
+ {};
+
+ template <class Type, bool has_key_type>
+ struct get_key_type;
+
+ template <class Type>
+ struct get_key_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_key_type<Type, true>
+ {
+ typedef typename Type::key_type type;
+ };
+
+ template <class Type>
+ struct key_type_of
+ {
+ typedef typename
+ get_key_type<Type, has_key_type<Type>::value>::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/has_inverse.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/has_inverse.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,29 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205
+#define BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205
+
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+namespace boost{ namespace icl
+{
+
+ template <class Type> struct has_inverse
+ {
+ typedef has_inverse<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (type_traits::ice_or<is_signed<Type>::value,
+ is_floating_point<Type>::value>::value));
+ };
+
+}} // namespace boost icl
+
+#endif // BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205
+
+

Added: sandbox/icl/boost/icl/type_traits/has_set_semantics.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/has_set_semantics.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829
+#define BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+#include <boost/icl/type_traits/codomain_type_of.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct has_set_semantics
+ {
+ typedef has_set_semantics<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::or_< is_set<Type>
+ , mpl::and_< is_map<Type>
+ , has_set_semantics
+ <typename codomain_type_of<Type>::type >
+ >
+ >::value));
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/identity_element.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/identity_element.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912
+#define BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912
+
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct identity_element
+ {
+ static Type value();
+ Type operator()()const { return value(); }
+ };
+
+ template <class Type>
+ inline Type identity_element<Type>::value()
+ {
+ return Type();
+ }
+
+ template<>
+ inline std::string unary_template_to_string<identity_element>::apply() { return "0"; }
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/infinity.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/infinity.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,59 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_INFINITY_HPP_JOFA_100322
+#define BOOST_ICL_TYPE_TRAITS_INFINITY_HPP_JOFA_100322
+
+#include <string>
+#include <boost/icl/type_traits/is_numeric.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost{ namespace icl
+{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+ template <class Type> struct numeric_infinity
+ {
+ typedef numeric_infinity type;
+
+ static Type value()
+ {
+ BOOST_CONCEPT_ASSERT((is_numeric<Type>));
+ if(std::numeric_limits<Type>::has_infinity)
+ return std::numeric_limits<Type>::infinity();
+ else
+ return (std::numeric_limits<Type>::max)();
+ }
+ };
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+ template <class Type> struct infinity
+ {
+ typedef infinity type;
+
+ static Type value()
+ {
+ return
+ mpl::if_<is_numeric<Type>,
+ numeric_infinity<Type>,
+ identity_element<Type> >::type::value();
+ }
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/interval_type_default.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/interval_type_default.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,55 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403
+#define BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403
+
+#include <boost/mpl/if.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/continuous_interval.hpp>
+#include <boost/icl/discrete_interval.hpp>
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/left_open_interval.hpp>
+#include <boost/icl/closed_interval.hpp>
+#include <boost/icl/open_interval.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+
+namespace boost{ namespace icl
+{
+
+ template <class DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
+ struct interval_type_default
+ {
+#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+ typedef
+ typename mpl::if_< is_discrete<DomainT>
+# ifdef BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT
+ , BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT<DomainT,Compare>
+# else
+ , right_open_interval<DomainT,Compare>
+# endif
+
+# ifdef BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT
+ , BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT<DomainT,Compare>
+# else
+ , right_open_interval<DomainT,Compare>
+# endif
+ >::type type;
+#else
+ typedef
+ typename mpl::if_< is_discrete<DomainT>
+ , discrete_interval<DomainT,Compare>
+ , continuous_interval<DomainT,Compare> >::type type;
+#endif
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/interval_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/interval_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_OF_HPP_JOFA_100910
+#define BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_OF_HPP_JOFA_100910
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/icl/type_traits/no_type.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(interval_type)
+ }
+
+ template <class Type>
+ struct has_interval_type
+ : mpl::bool_<detail::has_interval_type<Type>::value>
+ {};
+
+ template <class Type, bool has_interval_type>
+ struct get_interval_type;
+
+ template <class Type>
+ struct get_interval_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_interval_type<Type, true>
+ {
+ typedef typename Type::interval_type type;
+ };
+
+ template <class Type>
+ struct interval_type_of
+ {
+ typedef typename
+ get_interval_type<Type, has_interval_type<Type>::value>::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_associative_element_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_associative_element_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,32 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831
+#define BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_element_container.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type>
+ struct is_associative_element_container
+ {
+ typedef is_associative_element_container type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<is_element_set<Type>, is_element_map<Type> >::value));
+ };
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_asymmetric_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_asymmetric_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,54 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327
+#define BOOST_ICL_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327
+
+#include <boost/icl/type_traits/is_interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template <class Type> struct is_asymmetric_interval
+{
+ typedef is_asymmetric_interval<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<
+ is_interval<Type>
+ , has_static_bounds<Type>
+ , has_asymmetric_bounds<Type>
+ >::value)
+ );
+};
+
+template <class Type> struct is_continuous_asymmetric
+{
+ typedef is_continuous_asymmetric<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<
+ is_asymmetric_interval<Type>
+ , is_continuous<typename domain_type_of<interval_traits<Type> >::type>
+ >::value)
+ );
+};
+
+template <class Type> struct is_discrete_asymmetric
+{
+ typedef is_discrete_asymmetric<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<
+ is_asymmetric_interval<Type>
+ , mpl::not_<is_continuous<typename domain_type_of<interval_traits<Type> >::type> >
+ >::value)
+ );
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_combinable.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_combinable.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,568 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_IS_COMBINABLE_HPP_JOFA_090115
+#define BOOST_ICL_IS_COMBINABLE_HPP_JOFA_090115
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/icl/type_traits/is_concept_equivalent.hpp>
+#include <boost/icl/type_traits/is_interval_container.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class Type>
+struct is_overloadable
+{
+ typedef is_overloadable<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (is_same<Type, typename Type::overloadable_type>::value)
+ );
+};
+
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+struct is_codomain_equal
+{
+ typedef is_codomain_equal<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (is_same<typename LeftT::codomain_type,
+ typename RightT::codomain_type>::value)
+ );
+};
+
+//NOTE: Equality of compare order implies the equality of the domain_types
+template<class LeftT, class RightT>
+struct is_key_compare_equal
+{
+ typedef is_key_compare_equal<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (is_same<typename LeftT::key_compare,
+ typename RightT::key_compare>::value)
+ );
+};
+
+template<class LeftT, class RightT>
+struct is_codomain_type_equal
+{
+ typedef is_codomain_type_equal<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<is_key_compare_equal<LeftT, RightT>,
+ is_codomain_equal<LeftT, RightT> >::value)
+ );
+};
+
+
+// For equal containers concepts, domain order and codomain type must match.
+template<template<class>class IsConcept, class LeftT, class RightT>
+struct is_concept_compatible
+{
+ typedef is_concept_compatible<IsConcept, LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<
+ IsConcept<LeftT>
+ , IsConcept<RightT>
+ , is_codomain_type_equal<LeftT, RightT>
+ >::value)
+ );
+};
+
+template<template<class>class LeftConcept,
+ template<class>class RightConcept,
+ class LeftT, class RightT>
+struct is_concept_combinable
+{
+ typedef is_concept_combinable<LeftConcept, RightConcept, LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<
+ LeftConcept<LeftT>
+ , RightConcept<RightT>
+ , is_key_compare_equal<LeftT, RightT>
+ >::value)
+ );
+};
+
+template<class LeftT, class RightT>
+struct is_intra_combinable
+{
+ typedef is_intra_combinable<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<
+ is_concept_compatible<is_interval_set, LeftT, RightT>
+ , is_concept_compatible<is_interval_map, LeftT, RightT>
+ >::value)
+ );
+};
+
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+template<class LeftT, class RightT>
+struct is_cross_combinable
+{
+ typedef is_cross_combinable<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<
+ is_concept_combinable<is_interval_set, is_interval_map, LeftT, RightT>
+ , is_concept_combinable<is_interval_map, is_interval_set, LeftT, RightT>
+ >::value)
+ );
+};
+
+template<class LeftT, class RightT>
+struct is_inter_combinable
+{
+ typedef is_inter_combinable<LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<is_intra_combinable<LeftT,RightT>,
+ is_cross_combinable<LeftT,RightT> >::value)
+ );
+};
+
+//------------------------------------------------------------------------------
+// is_fragment_of
+//------------------------------------------------------------------------------
+template<class FragmentT, class Type>
+struct is_fragment_of
+{
+ typedef is_fragment_of type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template<class Type>
+struct is_fragment_of<typename Type::element_type, Type>
+{
+ typedef is_fragment_of type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<class Type>
+struct is_fragment_of<typename Type::segment_type, Type>
+{
+ typedef is_fragment_of type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//------------------------------------------------------------------------------
+// is_key_of
+//------------------------------------------------------------------------------
+template<class KeyT, class Type>
+struct is_key_of
+{
+ typedef is_key_of type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template<class Type>
+struct is_key_of<typename Type::domain_type, Type>
+{
+ typedef is_key_of type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<class Type>
+struct is_key_of<typename Type::interval_type, Type>
+{
+ typedef is_key_of type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//------------------------------------------------------------------------------
+// is_interval_set_derivative
+//------------------------------------------------------------------------------
+template<class Type, class AssociateT>
+struct is_interval_set_derivative;
+
+template<class Type>
+struct is_interval_set_derivative<Type, typename Type::domain_type>
+{
+ typedef is_interval_set_derivative type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_interval_container<Type>::value));
+};
+
+template<class Type>
+struct is_interval_set_derivative<Type, typename Type::interval_type>
+{
+ typedef is_interval_set_derivative type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_interval_container<Type>::value));
+};
+
+template<class Type, class AssociateT>
+struct is_interval_set_derivative
+{
+ typedef is_interval_set_derivative<Type, AssociateT> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+//------------------------------------------------------------------------------
+// is_interval_map_derivative
+//------------------------------------------------------------------------------
+template<class Type, class AssociateT>
+struct is_interval_map_derivative;
+
+template<class Type>
+struct is_interval_map_derivative<Type, typename Type::domain_mapping_type>
+{
+ typedef is_interval_map_derivative type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_interval_container<Type>::value));
+};
+
+template<class Type>
+struct is_interval_map_derivative<Type, typename Type::interval_mapping_type>
+{
+ typedef is_interval_map_derivative type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_interval_container<Type>::value));
+};
+
+template<class Type>
+struct is_interval_map_derivative<Type, typename Type::value_type>
+{
+ typedef is_interval_map_derivative type;
+ BOOST_STATIC_CONSTANT(bool, value = (is_interval_container<Type>::value));
+};
+
+template<class Type, class AssociateT>
+struct is_interval_map_derivative
+{
+ typedef is_interval_map_derivative<Type, AssociateT> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+//------------------------------------------------------------------------------
+// is_intra_derivative
+//------------------------------------------------------------------------------
+template<class Type, class AssociateT>
+struct is_intra_derivative
+{
+ typedef is_intra_derivative<Type, AssociateT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ mpl::and_<is_interval_set<Type>,
+ is_interval_set_derivative<Type, AssociateT> >
+ , mpl::and_<is_interval_map<Type>,
+ is_interval_map_derivative<Type, AssociateT> >
+ >::value)
+ );
+};
+
+template<class Type, class AssociateT>
+struct is_cross_derivative
+{
+ typedef is_cross_derivative<Type, AssociateT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<
+ is_interval_map<Type>
+ , is_interval_set_derivative<Type, AssociateT>
+ >::value)
+ );
+};
+
+template<class Type, class AssociateT>
+struct is_inter_derivative
+{
+ typedef is_inter_derivative<Type, AssociateT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<
+ is_intra_derivative<Type, AssociateT>
+ , is_cross_derivative<Type, AssociateT>
+ >::value)
+ );
+};
+
+//------------------------------------------------------------------------------
+//- right combinable
+//------------------------------------------------------------------------------
+
+template<class GuideT, class CompanionT>
+struct is_interval_set_right_combinable
+{
+ typedef is_interval_set_right_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_set<GuideT>
+ , mpl::or_
+ <
+ is_interval_set_derivative<GuideT, CompanionT>
+ , is_concept_compatible<is_interval_set, GuideT, CompanionT>
+ >
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_interval_map_right_intra_combinable //NOTE equivalent to is_fragment_type_of
+{
+ typedef is_interval_map_right_intra_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_map<GuideT>
+ , mpl::or_
+ <
+ is_interval_map_derivative<GuideT, CompanionT>
+ , is_concept_compatible<is_interval_map, GuideT, CompanionT>
+ >
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_interval_map_right_cross_combinable //NOTE equivalent to key_type_of<Comp, Guide>
+{
+ typedef is_interval_map_right_cross_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_map<GuideT>
+ , mpl::or_
+ <
+ is_cross_derivative<GuideT, CompanionT>
+ , is_concept_combinable<is_interval_map, is_interval_set, GuideT, CompanionT>
+ >
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_interval_map_right_inter_combinable
+{
+ typedef is_interval_map_right_inter_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<
+ is_interval_map_right_intra_combinable<GuideT, CompanionT>
+ , is_interval_map_right_cross_combinable<GuideT, CompanionT>
+ >::value)
+ );
+};
+
+
+template<class GuideT, class CompanionT>
+struct is_right_intra_combinable
+{
+ typedef is_right_intra_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ is_interval_set_right_combinable<GuideT, CompanionT>
+ , is_interval_map_right_intra_combinable<GuideT, CompanionT>
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_right_inter_combinable
+{
+ typedef is_right_inter_combinable<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ is_interval_set_right_combinable<GuideT, CompanionT>
+ , is_interval_map_right_inter_combinable<GuideT, CompanionT>
+ >::value)
+ );
+};
+
+template<class GuideT, class IntervalSetT>
+struct combines_right_to_interval_set
+{
+ typedef combines_right_to_interval_set<GuideT, IntervalSetT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (is_concept_combinable<is_interval_container, is_interval_set,
+ GuideT, IntervalSetT>::value)
+ );
+};
+
+template<class GuideT, class IntervalMapT>
+struct combines_right_to_interval_map
+{
+ typedef combines_right_to_interval_map<GuideT, IntervalMapT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (is_concept_compatible<is_interval_map, GuideT, IntervalMapT>::value) );
+};
+
+template<class GuideT, class IntervalContainerT>
+struct combines_right_to_interval_container
+{
+ typedef combines_right_to_interval_container<GuideT, IntervalContainerT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<combines_right_to_interval_set<GuideT, IntervalContainerT>,
+ combines_right_to_interval_map<GuideT, IntervalContainerT> >::value)
+ );
+};
+
+
+
+//------------------------------------------------------------------------------
+//- segmentational_fineness
+//------------------------------------------------------------------------------
+template<class Type> struct unknown_fineness
+{
+ typedef unknown_fineness<Type> type;
+ static const int value = 0;
+};
+
+template<class Type> struct known_fineness
+{
+ typedef known_fineness<Type> type;
+ static const int value = Type::fineness;
+};
+
+template<class Type>struct segmentational_fineness
+{
+ typedef segmentational_fineness<Type> type;
+ static const int value =
+ mpl::if_<is_interval_container<Type>,
+ known_fineness<Type>,
+ unknown_fineness<Type>
+ >::type::value;
+};
+
+
+//------------------------------------------------------------------------------
+// is_interval_set_companion
+//------------------------------------------------------------------------------
+
+// CompanionT is either an interval_set or a derivative of set level:
+// element_type=domain_type, segment_type=interval_type
+template<class GuideT, class CompanionT> struct is_interval_set_companion
+{
+ typedef is_interval_set_companion<GuideT,CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ combines_right_to_interval_set<GuideT,CompanionT>
+ , is_interval_set_derivative<GuideT,CompanionT>
+ >::value)
+ );
+};
+
+
+//------------------------------------------------------------------------------
+// is_interval_map_companion
+//------------------------------------------------------------------------------
+
+template<class GuideT, class CompanionT> struct is_interval_map_companion
+{
+ typedef is_interval_map_companion<GuideT,CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ combines_right_to_interval_map<GuideT,CompanionT>
+ , is_interval_map_derivative<GuideT,CompanionT>
+ >::value)
+ );
+};
+
+
+//------------------------------------------------------------------------------
+//- is_coarser_interval_{set,map}_companion
+//------------------------------------------------------------------------------
+template<class GuideT, class CompanionT>
+struct is_coarser_interval_set_companion
+{
+ typedef is_coarser_interval_set_companion<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_set_companion<GuideT, CompanionT>
+ , mpl::bool_<( segmentational_fineness<GuideT>::value
+ > segmentational_fineness<CompanionT>::value)>
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_coarser_interval_map_companion
+{
+ typedef is_coarser_interval_map_companion<GuideT, CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_map_companion<GuideT, CompanionT>
+ , mpl::bool_<( segmentational_fineness<GuideT>::value
+ > segmentational_fineness<CompanionT>::value)>
+ >::value)
+ );
+};
+
+//------------------------------------------------------------------------------
+// is_binary_interval_{set,map}_combinable
+//------------------------------------------------------------------------------
+template<class GuideT, class CompanionT>
+struct is_binary_interval_set_combinable
+{
+ typedef is_binary_interval_set_combinable<GuideT,CompanionT> type;
+ static const int value =
+ mpl::and_< is_interval_set<GuideT>
+ , is_coarser_interval_set_companion<GuideT, CompanionT>
+ >::value;
+};
+
+template<class GuideT, class CompanionT>
+struct is_binary_interval_map_combinable
+{
+ typedef is_binary_interval_map_combinable<GuideT,CompanionT> type;
+ static const int value =
+ mpl::and_< is_interval_map<GuideT>
+ , is_coarser_interval_map_companion<GuideT, CompanionT>
+ >::value;
+};
+
+template<class GuideT, class CompanionT>
+struct is_binary_intra_combinable
+{
+ typedef is_binary_intra_combinable<GuideT,CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<is_binary_interval_set_combinable<GuideT, CompanionT>,
+ is_binary_interval_map_combinable<GuideT, CompanionT>
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_binary_cross_combinable
+{
+ typedef is_binary_cross_combinable<GuideT,CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ < is_interval_map<GuideT>
+ , mpl::or_< is_coarser_interval_map_companion<GuideT, CompanionT>
+ , is_interval_set_companion<GuideT, CompanionT> >
+ >::value)
+ );
+};
+
+template<class GuideT, class CompanionT>
+struct is_binary_inter_combinable
+{
+ typedef is_binary_inter_combinable<GuideT,CompanionT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_
+ <
+ mpl::and_<is_interval_map<GuideT>,
+ is_binary_cross_combinable<GuideT, CompanionT> >
+ , mpl::and_<is_interval_set<GuideT>,
+ is_binary_intra_combinable<GuideT, CompanionT> >
+ >::value)
+ );
+};
+
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_concept_equivalent.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_concept_equivalent.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830
+#define BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830
+
+#include <boost/mpl/and.hpp>
+
+namespace boost{ namespace icl
+{
+
+ template<template<class>class IsConcept, class LeftT, class RightT>
+ struct is_concept_equivalent
+ {
+ typedef is_concept_equivalent<IsConcept, LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<IsConcept<LeftT>, IsConcept<RightT> >::value)
+ );
+ };
+
+ template<template<class>class IsConcept, class LeftT, class RightT>
+ struct has_same_concept
+ {
+ typedef has_same_concept<IsConcept, LeftT, RightT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<IsConcept<LeftT>, is_concept_equivalent<IsConcept, LeftT, RightT> >::value)
+ );
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,56 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_CONTAINER_HPP_JOFA_100828
+#define BOOST_ICL_TYPE_TRAITS_IS_CONTAINER_HPP_JOFA_100828
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/icl/type_traits/element_type_of.hpp>
+#include <boost/icl/type_traits/segment_type_of.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator)
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(size_type)
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
+ }
+
+ template <class Type>
+ struct is_container
+ : mpl::bool_<
+ detail::has_value_type<Type>::value &&
+ detail::has_iterator<Type>::value &&
+ detail::has_size_type<Type>::value &&
+ detail::has_reference<Type>::value>
+ {};
+
+ template <class Type>
+ struct is_std_set
+ {
+ typedef is_std_set type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_< is_container<Type>
+ , detail::has_key_type<Type>
+ , is_same< typename key_type_of<Type>::type
+ , typename value_type_of<Type>::type >
+ , mpl::not_<detail::has_segment_type<Type> >
+ >::value )
+ );
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_continuous.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_continuous.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_HPP_JOFA_080910
+#define BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_HPP_JOFA_080910
+
+#include <string>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_discrete.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_continuous
+ {
+ typedef is_continuous type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = mpl::not_<is_discrete<Type> >::value);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_continuous_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_continuous_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_INTERVAL_HPP_JOFA_100331
+#define BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_INTERVAL_HPP_JOFA_100331
+
+#include <boost/icl/type_traits/is_interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template <class Type> struct is_continuous_interval
+{
+ typedef is_continuous_interval<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_discrete.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_discrete.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,46 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410
+#define BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410
+
+#include <string>
+#include <boost/config.hpp> // For macro BOOST_STATIC_CONSTANT
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
+#endif
+
+#include <boost/detail/is_incrementable.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_discrete
+ {
+ typedef is_discrete type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_< boost::detail::is_incrementable<Type>
+ , mpl::not_<is_floating_point<Type> >
+ >::value)
+ );
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_discrete_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_discrete_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_INTERVAL_HPP_JOFA_100327
+#define BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_INTERVAL_HPP_JOFA_100327
+
+#include <boost/icl/type_traits/is_interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template <class Type> struct is_discrete_interval
+{
+ typedef is_discrete_interval<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_element_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_element_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_ELEMENT_CONTAINER_HPP_JOFA_090830
+#define BOOST_ICL_TYPE_TRAITS_IS_ELEMENT_CONTAINER_HPP_JOFA_090830
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_container.hpp>
+#include <boost/icl/type_traits/is_interval_container.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+
+namespace boost{ namespace icl
+{
+ template<class Type>
+ struct is_element_map
+ {
+ typedef is_element_map<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<is_map<Type>, mpl::not_<is_interval_container<Type> > >::value)
+ );
+ };
+
+ template<class Type>
+ struct is_element_set
+ {
+ typedef is_element_set<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_< mpl::and_< is_set<Type>
+ , mpl::not_<is_interval_container<Type> > >
+ , is_std_set<Type>
+ >::value)
+ );
+ };
+
+ template <class Type>
+ struct is_element_container
+ {
+ typedef is_element_container<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_<is_element_set<Type>, is_element_map<Type> >::value)
+ );
+ };
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_icl_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_icl_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_ICL_CONTAINER_HPP_JOFA_100831
+#define BOOST_ICL_TYPE_TRAITS_IS_ICL_CONTAINER_HPP_JOFA_100831
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_element_container.hpp>
+#include <boost/icl/type_traits/is_interval_container.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type>
+ struct is_icl_container
+ {
+ typedef is_icl_container<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_< is_element_container<Type>
+ , is_interval_container<Type> >::value));
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,171 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_HPP_JOFA_100327
+#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_HPP_JOFA_100327
+
+#include <boost/mpl/or.hpp>
+#include <boost/icl/interval_bounds.hpp>
+#include <boost/icl/interval_traits.hpp>
+
+namespace boost{ namespace icl
+{
+
+template <class Type>
+struct interval_bound_type
+{
+ typedef interval_bound_type type;
+ BOOST_STATIC_CONSTANT(bound_type, value = (interval_bounds::undefined));
+};
+
+template <class Type> struct is_interval
+{
+ typedef is_interval<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value < interval_bounds::undefined));
+};
+
+
+template <class Type> struct has_static_bounds
+{
+ typedef has_static_bounds<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value < interval_bounds::dynamic));
+};
+
+template <class Type> struct has_dynamic_bounds
+{
+ typedef has_dynamic_bounds<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value == interval_bounds::dynamic));
+};
+
+template <class Type> struct has_asymmetric_bounds
+{
+ typedef has_asymmetric_bounds<Type> type;
+ BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type<Type>::value));
+ BOOST_STATIC_CONSTANT(bool,
+ value = ( bounds == interval_bounds::static_left_open
+ || bounds == interval_bounds::static_right_open));
+};
+
+template <class Type> struct has_symmetric_bounds
+{
+ typedef has_symmetric_bounds<Type> type;
+ BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type<Type>::value));
+ BOOST_STATIC_CONSTANT(bool,
+ value = ( bounds == interval_bounds::static_closed
+ || bounds == interval_bounds::static_open));
+};
+
+//------------------------------------------------------------------------------
+template <class Type> struct is_discrete_static
+{
+ typedef is_discrete_static type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_< has_static_bounds<Type>
+ , is_discrete<domain_type> >::value) );
+};
+
+//------------------------------------------------------------------------------
+template <class Type> struct is_continuous_static
+{
+ typedef is_continuous_static type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_< has_static_bounds<Type>
+ , is_continuous<domain_type>
+ , has_asymmetric_bounds<Type> >::value) );
+};
+
+//------------------------------------------------------------------------------
+template <class Type> struct is_static_right_open
+{
+ typedef is_static_right_open<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value == interval_bounds::static_right_open));
+};
+
+template <class Type> struct is_static_left_open
+{
+ typedef is_static_left_open<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value == interval_bounds::static_left_open));
+};
+
+template <class Type> struct is_static_open
+{
+ typedef is_static_open<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value == interval_bounds::static_open));
+};
+
+template <class Type> struct is_static_closed
+{
+ typedef is_static_closed<Type> type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (interval_bound_type<Type>::value == interval_bounds::static_closed));
+};
+
+template <class Type> struct is_discrete_static_closed
+{
+ typedef is_static_closed<Type> type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+
+ BOOST_STATIC_CONSTANT( bool,
+ value = (mpl::and_< is_static_closed<Type>
+ , is_discrete<domain_type> >::value) );
+};
+
+template <class Type> struct is_discrete_static_open
+{
+ typedef is_static_closed<Type> type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+
+ BOOST_STATIC_CONSTANT( bool,
+ value = (mpl::and_< is_static_open<Type>
+ , is_discrete<domain_type> >::value) );
+};
+
+//------------------------------------------------------------------------------
+template <class Type> struct is_continuous_right_open
+{
+ typedef is_continuous_right_open<Type> type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<is_static_right_open<Type>, is_continuous<domain_type> >::value));
+};
+
+template <class Type> struct is_continuous_left_open
+{
+ typedef is_continuous_left_open<Type> type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ BOOST_STATIC_CONSTANT(bool,
+ value = (mpl::and_<is_static_left_open<Type>, is_continuous<domain_type> >::value));
+};
+
+//------------------------------------------------------------------------------
+
+template <class Type> struct is_singelizable
+{
+ typedef is_singelizable type;
+ typedef typename interval_traits<Type>::domain_type domain_type;
+
+ BOOST_STATIC_CONSTANT(bool,
+ value =
+ (mpl::or_< has_dynamic_bounds<Type>
+ , is_discrete<domain_type>
+ >::value)
+ );
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_interval_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_interval_container.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,47 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_CONTAINER_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_CONTAINER_HPP_JOFA_081004
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/icl/type_traits/is_map.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_interval_container
+ {
+ typedef is_interval_container<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template<class Type>
+ struct is_interval_map
+ {
+ typedef is_interval_map<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_<is_interval_container<Type>, is_map<Type> >::value)
+ );
+ };
+
+ template<class Type>
+ struct is_interval_set
+ {
+ typedef is_interval_set<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_< is_interval_container<Type>,
+ mpl::not_<is_interval_map<Type> > >::value)
+ );
+ };
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_interval_joiner.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_interval_joiner.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,25 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_JOINER_HPP_JOFA_100901
+#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_JOINER_HPP_JOFA_100901
+
+#include <boost/config.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_interval_joiner
+ {
+ typedef is_interval_joiner<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_interval_separator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_interval_separator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,23 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SEPARATOR_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SEPARATOR_HPP_JOFA_081004
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_interval_separator
+ {
+ typedef is_interval_separator<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_interval_splitter.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_interval_splitter.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,25 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SPLITTER_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SPLITTER_HPP_JOFA_081004
+
+#include <boost/config.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_interval_splitter
+ {
+ typedef is_interval_splitter<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_key_container_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_key_container_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,88 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829
+#define BOOST_ICL_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829
+
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/type_traits/is_container.hpp>
+
+namespace boost{ namespace icl
+{
+ //--------------------------------------------------------------------------
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(key_object_type)
+ }
+
+ //--------------------------------------------------------------------------
+ template <class Type>
+ struct has_key_object_type
+ : mpl::bool_<detail::has_key_object_type<Type>::value>
+ {};
+
+ template <class Type, bool HasKeyContainerType, bool IsSet>
+ struct get_key_object_type;
+
+ template <class Type>
+ struct get_key_object_type<Type, false, false>
+ {
+ typedef Type no_type;
+ };
+
+ template <class Type>
+ struct get_key_object_type<Type, false, true>
+ {
+ typedef Type type;
+ };
+
+ template <class Type, bool IsSet>
+ struct get_key_object_type<Type, true, IsSet>
+ {
+ typedef typename Type::key_object_type type;
+ };
+
+ template <class Type>
+ struct key_container_type_of
+ {
+ typedef typename
+ get_key_object_type
+ < Type
+ , has_key_object_type<Type>::value
+ , mpl::or_<is_set<Type>, is_map<Type> >::value
+ >::type type;
+ };
+
+ //--------------------------------------------------------------------------
+ template<class KeyT, class ObjectT>
+ struct is_strict_key_container_of // set is_strict_key_container_of map
+ {
+ typedef is_strict_key_container_of<KeyT, ObjectT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_< is_map<ObjectT>
+ , is_same<KeyT, typename key_container_type_of<ObjectT>::type> >::value)
+ );
+ };
+
+ template<class KeyT, class ObjectT>
+ struct is_key_container_of // set is_key_container_of (set or map)
+ {
+ typedef is_key_container_of<KeyT, ObjectT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::or_< is_strict_key_container_of<KeyT, ObjectT>
+ , mpl::and_< mpl::or_<is_set<ObjectT>, is_map<ObjectT> >
+ , is_same<ObjectT, KeyT> > >::value)
+ );
+ };
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,25 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_MAP_HPP_JOFA_081107
+#define BOOST_ICL_TYPE_TRAITS_IS_MAP_HPP_JOFA_081107
+
+#include <boost/config.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_map
+ {
+ typedef is_map<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_numeric.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_numeric.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,54 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ICL_TYPE_TRAITS_IS_NUMERIC_HPP_JOFA_100322
+#define BOOST_ICL_TYPE_TRAITS_IS_NUMERIC_HPP_JOFA_100322
+
+#include <limits>
+#include <complex>
+
+namespace boost{ namespace icl
+{
+
+template <class Type> struct is_numeric
+{
+ typedef is_numeric type;
+ BOOST_STATIC_CONSTANT(bool, value = (0 < std::numeric_limits<Type>::digits));
+};
+
+template <class Type>
+struct is_numeric<std::complex<Type> >
+{
+ typedef is_numeric type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+//--------------------------------------------------------------------------
+template<class Type, bool Enable = false> struct numeric_minimum;
+
+template<class Type>
+struct numeric_minimum<Type, false>
+{
+ static bool is_less_than(Type){ return true; }
+ static bool is_less_than_or(Type, bool){ return true; }
+};
+
+template<class Type>
+struct numeric_minimum<Type, true>
+{
+ static bool is_less_than(Type value)
+ { return (std::numeric_limits<Type>::min)() < value; }
+
+ static bool is_less_than_or(Type value, bool cond)
+ { return cond || is_less_than(value); }
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_SET_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_IS_SET_HPP_JOFA_081004
+
+#include <boost/config.hpp>
+#include <boost/icl/type_traits/is_container.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_set
+ {
+ typedef is_set<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = is_std_set<Type>::value);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/is_total.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/is_total.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,23 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_TOTAL_HPP_JOFA_081004
+#define BOOST_ICL_TYPE_TRAITS_IS_TOTAL_HPP_JOFA_081004
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct is_total
+ {
+ typedef is_total<Type> type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/no_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/no_type.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,19 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_NO_TYPE_HPP_JOFA_100902
+#define BOOST_ICL_TYPE_TRAITS_NO_TYPE_HPP_JOFA_100902
+
+namespace boost{ namespace icl
+{
+ struct no_type{};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/segment_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/segment_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_SEGMENT_TYPE_OF_HPP_JOFA_100902
+#define BOOST_ICL_TYPE_TRAITS_SEGMENT_TYPE_OF_HPP_JOFA_100902
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/icl/type_traits/no_type.hpp>
+
+namespace boost{ namespace icl
+{
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(segment_type)
+ }
+
+ template <class Type>
+ struct has_segment_type
+ : mpl::bool_<detail::has_segment_type<Type>::value>
+ {};
+
+ template <class Type, bool has_segment_type>
+ struct get_segment_type;
+
+ template <class Type>
+ struct get_segment_type<Type, false>
+ {
+ typedef no_type type;
+ };
+
+ template <class Type>
+ struct get_segment_type<Type, true>
+ {
+ typedef typename Type::segment_type type;
+ };
+
+ template <class Type>
+ struct segment_type_of
+ {
+ typedef typename
+ get_segment_type<Type, has_segment_type<Type>::value>::type type;
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/size.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/size.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,18 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911
+#define BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct size{ typedef std::size_t type; };
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/size_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/size_type_of.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,18 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_SIZE_TYPE_OF_HPP_JOFA_080911
+#define BOOST_ICL_TYPE_TRAITS_SIZE_TYPE_OF_HPP_JOFA_080911
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct size_type_of{ typedef std::size_t type; };
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/succ_pred.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/succ_pred.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,23 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913
+#define BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913
+
+namespace boost{ namespace icl
+{
+ template <class IncrementableT>
+ inline static IncrementableT succ(IncrementableT x) { return ++x; }
+
+ template <class DecrementableT>
+ inline static DecrementableT pred(DecrementableT x) { return --x; }
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/to_string.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/to_string.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------
+Function-templates for discrete Datatypes like int, unsigned or
+ any class that provides a ++ operator c.f. iterators
+-----------------------------------------------------------------------------*/
+
+#ifndef BOOST_ICL_TO_STRING_HPP_JOFA_000712
+#define BOOST_ICL_TO_STRING_HPP_JOFA_000712
+
+#include <stdio.h>
+#include <string>
+#include <sstream>
+
+namespace boost{ namespace icl
+{
+
+/// Static class template for the string representation of values
+template <class Type>
+struct to_string
+{
+ /** Converts all values of types to std::string that implement an operator << */
+ static std::string apply(const Type& value)
+ {
+ std::stringstream repr;
+ repr << value;
+ return repr.str();
+ }
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/type_to_string.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/type_to_string.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,85 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TO_STRING_HPP_JOFA_080416
+#define BOOST_ICL_TYPE_TO_STRING_HPP_JOFA_080416
+
+#include <stdio.h>
+#include <string>
+#include <sstream>
+
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost{ namespace icl
+{
+ //--------------------------------------------------------------------------
+ template<class Type>
+ struct type_to_string
+ {
+ /** Convert the type to it's typestring */
+ static std::string apply();
+ };
+
+
+ //--------------------------------------------------------------------------
+ template<>inline std::string type_to_string<bool>::apply() { return "bool"; }
+ template<>inline std::string type_to_string<char>::apply() { return "char"; }
+ template<>inline std::string type_to_string<short>::apply(){ return "short"; }
+ template<>inline std::string type_to_string<int>::apply() { return "int"; }
+ template<>inline std::string type_to_string<long>::apply() { return "long"; }
+ template<>inline std::string type_to_string<long long>::apply(){ return "Long"; }
+
+ template<>inline std::string type_to_string<unsigned char>::apply(){ return "char+"; }
+ template<>inline std::string type_to_string<unsigned short>::apply(){ return "short+"; }
+ template<>inline std::string type_to_string<unsigned int>::apply() { return "int+"; }
+ template<>inline std::string type_to_string<unsigned long>::apply() { return "long+"; }
+ template<>inline std::string type_to_string<unsigned long long>::apply(){ return "Long+"; }
+
+ template<>inline std::string type_to_string<float>::apply() { return "flt"; }
+ template<>inline std::string type_to_string<double>::apply() { return "dbl"; }
+ template<>inline std::string type_to_string<std::string>::apply() { return "string"; }
+
+ //-------------------------------------------------------------------------
+ template<template<class> class Templ>
+ struct unary_template_to_string
+ {
+ static std::string apply();
+ };
+
+ template <template<class>class Unary, class Type>
+ struct type_to_string<Unary<Type> >
+ {
+ static std::string to_string()
+ {
+ return unary_template_to_string<Unary>::apply()+"<"+type_to_string<Type>::apply()+">";
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template<template<class,class>class Templ>
+ struct binary_template_to_string
+ {
+ static std::string apply();
+ };
+
+ template <template<class Type1, class Type2>class Binary, class Type1, class Type2>
+ struct type_to_string<Binary<Type1, Type2> >
+ {
+ static std::string apply()
+ {
+ return binary_template_to_string<Binary>::apply()+
+ "<"+type_to_string<Type1>::apply()+","+type_to_string<Type2>::apply()+">";
+ }
+ };
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/unit_element.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/unit_element.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 BOOST_ICL_TYPE_TRAITS_UNIT_ELEMENT_HPP_JOFA_080912
+#define BOOST_ICL_TYPE_TRAITS_UNIT_ELEMENT_HPP_JOFA_080912
+
+#include <string>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/type_traits/succ_pred.hpp>
+
+namespace boost{ namespace icl
+{
+ template <class Type> struct unit_element{ static Type value(); };
+
+ template<> inline bool unit_element<bool>::value() { return true;}
+ template<> inline float unit_element<float>::value() { return 1.0; }
+ template<> inline double unit_element<double>::value() { return 1.0; }
+ template<> inline long double unit_element<long double>::value()
+ { return 1.0; }
+
+ // Smallest 'visible' string that is greater than the empty string.
+ template <>
+ inline std::string unit_element<std::string>::value()
+ { return std::string(" "); }
+
+ template <class Type>
+ inline Type unit_element<Type>::value()
+ { return icl::succ(identity_element<Type>::value()); }
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl/type_traits/value_size.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/value_size.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,52 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_VALUE_SIZE_HPP_JOFA_081004
+#define BOOST_ICL_VALUE_SIZE_HPP_JOFA_081004
+
+namespace boost{ namespace icl
+{
+
+template <typename Type>
+Type abs(Type val) { return val < 0 ? -val : val; }
+
+/// static class template for the size of a type's value
+/** This function is needed to be able to order values according
+ to their size. This is used to e.g. prefer simple test
+ instances and to express this simplicity independent of the
+ type of the test case.
+
+ @author Joachim Faulhaber
+*/
+template <class Type>
+struct value_size
+{
+ /** The size of a value is used to be able to order values according to
+ their simplicity */
+ static std::size_t apply(const Type& val);
+};
+
+
+template<> inline std::size_t value_size<int>::apply(const int& value)
+{ return abs(value); }
+
+template<> inline std::size_t value_size<double>::apply(const double& value)
+{ return static_cast<int>(abs(value)); }
+
+template <typename Type>
+inline std::size_t value_size<Type>::apply(const Type& value)
+{ return icl::iterative_size(value); }
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/bits.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/bits.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,253 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_BITS_HPP_JOFA_091023
+#define BOOST_ICL_XT_BITS_HPP_JOFA_091023
+
+#include <limits>
+#include <boost/static_assert.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/operators.hpp>
+#include <boost/icl_xt/meta_log.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/type_traits/has_set_semantics.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+
+namespace boost{namespace icl
+{
+
+// A bit_range_type is supposed to cover the range of bits including endings.
+// rend() end()
+// -1 <= b <= BitsT::digits
+typedef short bit_range_type;
+
+namespace bitcount
+{
+ template<typename WordT, bit_range_type Digits>
+ struct count
+ {
+ BOOST_STATIC_ASSERT((std::numeric_limits<WordT>::digits == Digits));
+ typedef WordT word_type;
+ typedef count<word_type,Digits> type;
+
+ static bit_range_type apply(WordT value);
+ };
+}
+
+
+template<class NaturalT> class bits
+ : equality_comparable < bits<NaturalT>
+ , less_than_comparable < bits<NaturalT>
+ , incrementable < bits<NaturalT>
+ , decrementable < bits<NaturalT>
+ , addable < bits<NaturalT>
+ , orable < bits<NaturalT>
+ , subtractable < bits<NaturalT>
+ , andable < bits<NaturalT>
+ , xorable < bits<NaturalT>
+
+ , addable2 < bits<NaturalT>, bit_range_type
+ , orable2 < bits<NaturalT>, bit_range_type
+ , subtractable2 < bits<NaturalT>, bit_range_type
+ , andable2 < bits<NaturalT>, bit_range_type
+ , xorable2 < bits<NaturalT>, bit_range_type
+ > > > > > > > > > > > > > >
+ //^ & - | + ^ & - | + ++ -- < ==
+ //element container
+{
+public:
+ typedef NaturalT word_type;
+ typedef bit_range_type bit_type;
+ typedef bit_type element_type; // pretty short: 0 <= max < digits
+ typedef bit_type size_type;
+ BOOST_STATIC_CONSTANT(bit_type, digits = std::numeric_limits<NaturalT>::digits);
+ BOOST_STATIC_CONSTANT(word_type, w1 = static_cast<word_type>(1) );
+
+ bits():_bits(){}
+ explicit bits(word_type value):_bits(value){}
+
+ word_type word()const{ return _bits; }
+
+ bits& add(bit_type value){_bits |= (1 << value); return *this; }
+ bits& subtract(bit_type value){_bits &= ~(1 << value); return *this; }
+ bits& intersect(bit_type value){_bits &= (1 << value); return *this; }
+ bits& flip(bit_type value){_bits ^= (1 << value); return *this; }
+
+ bits& operator += (bit_type value){ return add(value); }
+ bits& operator |= (bit_type value){ return add(value); }
+ bits& operator -= (bit_type value){ return subtract(value); }
+ bits& operator &= (bit_type value){ return intersect(value); }
+ bits& operator ^= (bit_type value){ return flip(value); }
+
+ bits& operator += (const bits& value){_bits |= value._bits; return *this;}
+ bits& operator |= (const bits& value){_bits |= value._bits; return *this;}
+ bits& operator &= (const bits& value){_bits &= value._bits; return *this;}
+ bits& operator ^= (const bits& value){_bits ^= value._bits; return *this;}
+ bits operator ~ ()const { return bits(~_bits); }
+ bool operator < (const bits& value)const{return _bits < value._bits;}
+ bool operator == (const bits& value)const{return _bits == value._bits;}
+
+ bool empty()const { return _bits == 0; }
+ bool contains(element_type element)const { return 0 != ((w1 << element) & _bits); }
+ bool contains(const bits& sub)const { return inclusion::subset==inclusion_compare(sub,*this); }
+ size_type cardinality()const{ return bitcount::count<word_type, digits>::apply(_bits); }
+ size_type size()const { return cardinality(); }
+
+ std::string as_string(const char off_on[2] = " 1")const;
+
+private:
+ word_type _bits;
+};
+
+
+typedef unsigned int nat;
+
+#ifdef _MSC_VER
+typedef unsigned char nat8;
+typedef unsigned short nat16;
+typedef unsigned long nat32;
+typedef unsigned long long nat64;
+#else
+typedef boost::uint8_t nat8;
+typedef boost::uint16_t nat16;
+typedef boost::uint32_t nat32;
+typedef boost::uint64_t nat64;
+#endif
+
+typedef bits<nat8> bits8;
+typedef bits<nat16> bits16;
+typedef bits<nat32> bits32;
+typedef bits<nat64> bits64;
+
+template<class NaturalT>
+int inclusion_compare(icl::bits<NaturalT> left, icl::bits<NaturalT> right)
+{
+ if(0 ==(left.word() & right.word())) return inclusion::unrelated;
+ else if(left.word() < right.word() ) return inclusion::subset;
+ else if(left.word() > right.word() ) return inclusion::superset;
+ else return inclusion::equal;
+}
+
+template<class NaturalT>
+std::string bits<NaturalT>::as_string(const char off_on[2])const
+{
+ std::string sequence;
+ for(int bit=0; bit < digits; bit++)
+ sequence += contains(bit) ? off_on[1] : off_on[0];
+ return sequence;
+}
+
+
+template<class CharType, class CharTraits, class NaturalT>
+std::basic_ostream<CharType, CharTraits>& operator <<
+(std::basic_ostream<CharType, CharTraits>& stream, const icl::bits<NaturalT>& object)
+{
+ return stream << object.word();
+}
+
+namespace bitcount
+{
+
+static unsigned char table[] =
+{
+ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
+};
+
+
+template<typename Nat8>
+struct count<Nat8, 8>
+{
+ typedef Nat8 word_type;
+ typedef count<word_type,8> type;
+ BOOST_STATIC_ASSERT((std::numeric_limits<word_type>::digits == 8));
+
+ static bit_range_type apply(word_type value){ return table[value];}
+};
+
+template<typename Nat16>
+struct count<Nat16, 16>
+{
+ typedef Nat16 word_type;
+ typedef count<word_type,16> type;
+ BOOST_STATIC_ASSERT((std::numeric_limits<word_type>::digits ==16));
+
+ static bit_range_type apply(word_type value)
+ {
+ return table[ value & 0xff]
+ + table[(value >> 8) & 0xff];
+ }
+};
+
+template<typename Nat32>
+struct count<Nat32, 32>
+{
+ typedef Nat32 word_type;
+ typedef count<word_type,32> type;
+ BOOST_STATIC_ASSERT((std::numeric_limits<word_type>::digits == 32));
+
+ static bit_range_type apply(word_type value)
+ {
+ return table[ value & 0xfful]
+ + table[(value >> 8) & 0xfful]
+ + table[(value >> 16) & 0xfful]
+ + table[(value >> 24) & 0xfful];
+ }
+
+};
+
+template<typename Nat64>
+struct count<Nat64, 64>
+{
+ typedef Nat64 word_type;
+ typedef count<word_type,64> type;
+ BOOST_STATIC_ASSERT((std::numeric_limits<word_type>::digits == 64));
+
+ static bit_range_type apply(word_type value)
+ {
+ return table[ value & 0xffull]
+ + table[(value >> 8) & 0xffull]
+ + table[(value >> 16) & 0xffull]
+ + table[(value >> 24) & 0xffull]
+ + table[(value >> 32) & 0xffull]
+ + table[(value >> 40) & 0xffull]
+ + table[(value >> 48) & 0xffull]
+ + table[(value >> 56) & 0xffull];
+ ;
+ }
+};
+
+} // namespace bitcount
+
+
+template<class NaturalT>
+struct is_set<bits<NaturalT> >
+{
+ typedef is_set<bits<NaturalT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+template <>struct type_to_string<icl::bits<unsigned char > >{static std::string apply(){ return "bit8"; }};
+template <>struct type_to_string<icl::bits<unsigned short> >{static std::string apply(){ return "bit16"; }};
+template <>struct type_to_string<icl::bits<unsigned int > >{static std::string apply(){ return "bit_32"; }};
+template <>struct type_to_string<icl::bits<unsigned long > >{static std::string apply(){ return "bit32"; }};
+template <>struct type_to_string<icl::bits<unsigned long long> >{static std::string apply(){ return "bit64"; }};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_BITS_HPP_JOFA_091023

Added: sandbox/icl/boost/icl_xt/bits_gentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/bits_gentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_BITS_GENTOR_HPP_JOFA_091009
+#define BOOST_ICL_XT_BITS_GENTOR_HPP_JOFA_091009
+
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/bits.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class NaturalT>
+class bits_gentor: public RandomGentorAT<icl::bits<NaturalT> >
+{
+public:
+ typedef typename icl::interval<NaturalT>::type range_type;
+ typedef icl::bits<NaturalT> bits_type;
+
+ void some(bits_type& value)
+ {
+ value = bits_type(_natural_gentor(_value_range));
+ };
+
+ void set_range(const range_type& range)
+ { _value_range = range; }
+
+private:
+ NumberGentorT<NaturalT> _natural_gentor;
+ range_type _value_range;
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/detail/bit_element_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/detail/bit_element_iterator.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,518 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-2009: Joachim Faulhaber
+Copyright (c) 1998: Charles E. Leiserson, Harald Prokop, Keith H. Randall
+ (Bit sequencing using DeBruin sequence
+ http://supertech.csail.mit.edu/papers/debruijn.pdf)
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_XT_DETAIL_BIT_ELEMENT_ITERATOR_HPP_JOFA_091109
+#define BOOST_ICL_XT_DETAIL_BIT_ELEMENT_ITERATOR_HPP_JOFA_091109
+
+#include <boost/icl_xt/bits.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost{namespace icl
+{
+
+//------------------------------------------------------------------------------
+template<class SegmentT> struct bitwise;
+
+template<class DomainT, ICL_COMPARE Compare, template<class, ICL_COMPARE>class Interval, class BitSetT>
+struct bitwise<std::pair<Interval<DomainT,Compare>const, BitSetT> >
+{
+ typedef bitwise type;
+ typedef DomainT domain_type;
+ typedef DomainT codomain_type;
+ typedef DomainT element_type;
+ typedef BitSetT bitset_type;
+ typedef typename BitSetT::word_type word_type;
+
+ BOOST_STATIC_CONSTANT(bit_range_type, digits = BitSetT::digits);
+};
+
+namespace biterate
+{ template<class IteratorT, bool Forward> struct proceed; }
+
+template <class SegmentIteratorT>
+class bit_element_iterator
+ : public boost::iterator_facade<
+ bit_element_iterator<SegmentIteratorT>
+ , typename bitwise<typename SegmentIteratorT::value_type>::element_type
+ , boost::bidirectional_traversal_tag
+ , typename bitwise<typename SegmentIteratorT::value_type>::element_type
+ >
+{
+public:
+ typedef SegmentIteratorT segment_iterator;
+ typedef typename SegmentIteratorT::value_type segment_type;
+ typedef typename first_element<segment_type>::type interval_type;
+ typedef typename bitwise<segment_type>::bitset_type bitset_type;
+ typedef typename bitwise<segment_type>::word_type word_type;
+ typedef typename bitwise<segment_type>::domain_type domain_type;
+ typedef typename bitwise<segment_type>::codomain_type codomain_type;
+ typedef typename bitwise<segment_type>::element_type element_type;
+ typedef element_type value_type;
+ typedef element_type key_type;
+ typedef element_type data_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ domain_difference_type;
+
+ BOOST_STATIC_CONSTANT(bit_range_type, digits = bitwise<segment_type>::digits );
+ BOOST_STATIC_CONSTANT(bool, is_forward = mpl::not_<is_reverse<SegmentIteratorT> >::value );
+
+ typedef typename biterate::proceed<segment_iterator,is_forward> Proceed;
+
+ BOOST_STATIC_CONSTANT(bit_range_type, before = Proceed::before );
+ BOOST_STATIC_CONSTANT(bit_range_type, ante = Proceed::ante );
+ BOOST_STATIC_CONSTANT(bit_range_type, past = Proceed::past );
+ BOOST_STATIC_CONSTANT(bit_range_type, beyond = Proceed::beyond );
+
+private:
+ struct enabler{};
+
+public:
+
+ bit_element_iterator()
+ : _saltator(identity_element<segment_iterator>::value())
+ , _reptator(identity_element<domain_difference_type>::value())
+ , _on_bit(before)
+ {}
+
+ bit_element_iterator(segment_iterator jumper, bit_range_type start_pos)
+ : _saltator(jumper)
+ , _reptator(identity_element<domain_difference_type>::value())
+ , _on_bit(start_pos)
+ {}
+
+ template <class SaltatorT>
+ bit_element_iterator
+ ( bit_element_iterator<SaltatorT> const& other
+ , typename enable_if<boost::is_convertible<SaltatorT*,SegmentIteratorT*>, enabler>::type = enabler())
+ : _saltator(other._saltator)
+ , _reptator(other._reptator)
+ , _on_bit(other._on_bit)
+ {}
+
+private:
+ BOOST_STATIC_CONSTANT(bit_range_type, shift = log2_<digits>::value );
+
+ friend class boost::iterator_core_access;
+ template <class> friend class bit_element_iterator;
+
+ template <class SaltatorT>
+ bool equal(bit_element_iterator<SaltatorT> const& other) const
+ {
+ if( _saltator != other._saltator)
+ return false;
+ else if(_reptator != other._reptator)
+ return false;
+ else if(_on_bit == ante)
+ return other._on_bit == beyond || other.is_segment_begin();
+ else if(ante == other._on_bit)
+ return _on_bit == beyond || is_segment_begin();
+ else
+ return _on_bit == other._on_bit;
+ }
+
+ void increment()
+ {
+ if(_on_bit == ante)
+ first_bit();
+
+ next_bit();
+ if(_on_bit == past)
+ { // The current bitset passed the end
+ if(_reptator < pred(icl::length(_saltator->first)))
+ {
+ ++_reptator;
+ _on_bit = ante;
+ }
+ else
+ {
+ ++_saltator;
+ // NOTE: increment and dereference are unsecure now, because
+ // _saltator can (finally) be end here. decrement is secure.
+ _reptator = identity_element<domain_difference_type>::value();
+ _on_bit = ante;
+ }
+ }
+ }
+
+ void decrement()
+ {
+ prev_bit();
+ if(_on_bit == ante)
+ { // The current bitset passed the beginning
+ if(identity_element<domain_difference_type>::value() < _reptator)
+ {
+ --_reptator;
+ _on_bit = past;
+ }
+ else
+ {
+ //assert: _saltator is not at begin here.
+ --_saltator;
+ // NOW: decrement insecure, because _saltator can (finally) be
+ // begin here. increment and dereference are secure.
+ _reptator = icl::length(_saltator->first);
+ --_reptator;
+ _on_bit = past;
+ }
+ }
+ }
+
+ element_type dereference()const
+ {
+ if(_on_bit == ante)
+ first_bit();
+ else if(_on_bit == past)
+ last_bit();
+
+ return (Proceed::inter_value(_reptator, _saltator->first) << shift) + _on_bit;
+ }
+
+ void first_bit()const
+ {
+ // Because interval_bitsets are identity absorbers, _saltator->second.word() is not an identity element
+ _on_bit = Proceed::first_bit(_saltator->second.word());
+ }
+
+ void last_bit()const
+ {
+ // Because interval_bitsets are identity absorbers, _saltator->second.word() is not an identity element
+ _on_bit = Proceed::last_bit(_saltator->second.word());
+ }
+
+ bool next_bit()
+ {
+ if(_on_bit == before)
+ {
+ ++_saltator;
+ _reptator = identity_element<domain_difference_type>::value();
+ _on_bit = Proceed::first_bit(_saltator->second.word());
+ }
+ else
+ _on_bit = Proceed::next_bit(_saltator->second.word(), _on_bit);
+
+ return _on_bit != past;
+ }
+
+ bool prev_bit()
+ {
+ if(_on_bit == beyond)
+ {
+ --_saltator;
+ _reptator = icl::length(_saltator->first);
+ --_reptator;
+ _on_bit = Proceed::last_bit(_saltator->second.word());
+ }
+ else
+ _on_bit = Proceed::prev_bit(_saltator->second.word(), _on_bit);
+
+ return _on_bit != ante;
+ }
+
+ bool is_segment_begin()const
+ {
+ return _reptator == identity_element<domain_difference_type>::value()
+ && 0 <= _on_bit && _on_bit < digits
+ && _on_bit == Proceed::first_bit(_saltator->second.word());
+ }
+
+private:
+ segment_iterator _saltator; // satltare: to jump : the fast moving iterator
+ mutable domain_difference_type _reptator; // reptare: to sneak : the slow moving iterator 0 based
+ mutable bit_range_type _on_bit; // position of the current on bit.
+ // -1 <= _on_bit <= digits
+ // rend() end()
+
+};
+
+namespace biterate
+{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4146) // unary minus operator applied to unsigned type, result still unsigned
+#pragma warning(disable:4706) // assignment within conditional expression
+#endif
+
+
+/* Bit-iteration is coded on the bases of the work of
+Charles E. Leiserson, Harald Prokop, Keith H. Randall
+ http://supertech.csail.mit.edu/papers/debruijn.pdf
+
+and also Sean Eron Anderson:
+http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn
+*/
+
+//DeBruin sequence
+static unsigned char index32[] =
+{
+ 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
+ 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
+};
+
+inline static nat32 high_bit(nat32 v)
+{
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ return (v >> 1) + 1;
+}
+
+template<typename WordT, bit_range_type Digits>
+struct forward
+{
+ typedef nat32 word_type;
+ typedef forward<WordT, Digits> type;
+
+ BOOST_STATIC_CONSTANT( word_type, digits = Digits );
+ BOOST_STATIC_CONSTANT( word_type, w1 = static_cast<word_type>(1) );
+ BOOST_STATIC_CONSTANT( word_type, top = w1 << (digits-w1) );
+ BOOST_STATIC_CONSTANT( word_type, factor = 0x077CB531U );
+ BOOST_STATIC_CONSTANT( word_type, shift = 27 );
+ BOOST_STATIC_CONSTANT( bit_range_type, ante = -1 );
+ BOOST_STATIC_CONSTANT( bit_range_type, past = digits );
+ BOOST_STATIC_CONSTANT( bit_range_type, last = past-1 );
+
+ static bit_range_type first_bit(word_type value)
+ {
+ return index32[(((value & -value) * factor)) >> shift];
+ }
+
+ static bit_range_type next_bit(word_type value, bit_range_type cur_pos)
+ {
+ if(cur_pos == last)
+ return past;
+ else
+ {
+ // next contains all bits of value above cur_pos
+ word_type next = value & ~((1<<(cur_pos+1))-1);
+ if(!next)
+ return past;
+ else
+ return index32[(((next & -next) * factor)) >> shift];
+ }
+ }
+
+ static bit_range_type last_bit(word_type value)
+ {
+ return index32[((high_bit(value) * factor)) >> shift];
+ }
+
+ static bit_range_type prev_bit(word_type value, bit_range_type cur_pos)
+ {
+ if(cur_pos == 0)
+ return ante;
+ else
+ {
+ // next contains all bits of value above cur_pos
+ word_type prev = value & ((1<<cur_pos)-1);
+ if(!prev)
+ return ante;
+ else
+ return index32[((high_bit(prev) * factor)) >> shift];
+ }
+ }
+};
+
+
+template<> struct forward<nat64, 64>
+{
+ typedef nat64 word_type;
+ typedef nat32 half_type;
+ typedef forward<word_type,64> type;
+
+ BOOST_STATIC_CONSTANT( word_type, digits = 64 );
+ BOOST_STATIC_CONSTANT( word_type, w1 = static_cast<word_type>(1) );
+ BOOST_STATIC_CONSTANT( word_type, top = w1 << (digits-w1) );
+ BOOST_STATIC_CONSTANT( half_type, factor = 0x077CB531U );
+ BOOST_STATIC_CONSTANT( half_type, shift = 27 );
+ BOOST_STATIC_CONSTANT( bit_range_type, ante = -1 );
+ BOOST_STATIC_CONSTANT( bit_range_type, past = digits );
+ BOOST_STATIC_CONSTANT( bit_range_type, last = past-1 );
+ BOOST_STATIC_CONSTANT( bit_range_type, half = 32 );
+ BOOST_STATIC_CONSTANT( word_type, lower_mask = (w1 << 32)-w1 );
+
+
+ static half_type lower_next(word_type value, bit_range_type cur_pos)
+ {
+ return static_cast<half_type>(lower_mask & (value & ~((1<<(cur_pos+1))-1)));
+ }
+
+ static half_type upper_next(word_type value, bit_range_type cur_pos)
+ {
+ return static_cast<half_type>(value >> half) & ~((1<<(cur_pos-half+1))-1);
+ }
+
+ static bit_range_type first_bit(word_type value)
+ {
+ half_type lower = static_cast<half_type>(lower_mask & value);
+ if(lower)
+ return index32[(((lower & -lower) * factor)) >> shift];
+ else
+ {
+ half_type upper = static_cast<half_type>(value >> half);
+ return half + index32[(((upper & -upper) * factor)) >> shift];
+ }
+ }
+
+
+ static bit_range_type next_bit(word_type value, bit_range_type cur_pos)
+ {
+ if(cur_pos == last)
+ return past;
+ else
+ {
+ half_type low_next, up_next;
+ if(half-1 <= cur_pos)
+ if((up_next = upper_next(value, cur_pos)))
+ return half + index32[(((up_next & -up_next) * factor)) >> shift];
+ else
+ return past;
+ else
+ if((low_next = lower_next(value, cur_pos)))
+ return index32[(((low_next & -low_next) * factor)) >> shift];
+ else if(half_type up_next = upper_next(value, cur_pos))
+ return half + index32[(((up_next & -up_next) * factor)) >> shift];
+ else
+ return past;
+ }
+ }
+
+ static half_type lower_previous(word_type value, bit_range_type cur_pos)
+ {
+ return static_cast<half_type>(lower_mask & (value & ((1<<(cur_pos))-1)));
+ }
+
+ static half_type upper_previous(word_type value, bit_range_type cur_pos)
+ {
+ return static_cast<half_type>(value >> half) & ((1<<(cur_pos-half))-1);
+ }
+
+ static bit_range_type last_bit(word_type value)
+ {
+ half_type upper = static_cast<half_type>(value >> half);
+ if(upper)
+ return half + index32[((high_bit(upper) * factor)) >> shift];
+ else
+ {
+ half_type lower = static_cast<half_type>(value & lower_mask);
+ return index32[((high_bit(lower) * factor)) >> shift];
+ }
+ }
+
+ static bit_range_type prev_bit(word_type value, bit_range_type cur_pos)
+ {
+ if(cur_pos == 0)
+ return ante;
+ else
+ {
+ half_type up_prev, low_prev;
+ if(half == cur_pos)
+ if((low_prev = static_cast<half_type>(lower_mask & value)))
+ return index32[((high_bit(low_prev) * factor)) >> shift];
+ else
+ return ante;
+ else if(cur_pos < half || !(up_prev = upper_previous(value, cur_pos)))
+ if((low_prev = lower_previous(value,cur_pos)))
+ return index32[((high_bit(low_prev) * factor)) >> shift];
+ else
+ return ante;
+ else
+ return half + index32[((high_bit(up_prev) * factor)) >> shift];
+ }
+ }
+};
+
+template<class IteratorT, bool Forward>
+struct proceed{};
+
+template<class IteratorT>
+struct proceed<IteratorT,true>
+{
+ typedef IteratorT iterator;
+ typedef typename iterator::value_type segment_type;
+ typedef typename first_element<segment_type>::type interval_type;
+ typedef typename bitwise<segment_type>::word_type word_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ difference_type;
+
+ BOOST_STATIC_CONSTANT(bit_range_type, digits = bitwise<segment_type>::digits );
+ BOOST_STATIC_CONSTANT(bit_range_type, before = -2 );
+ BOOST_STATIC_CONSTANT(bit_range_type, ante = -1 );
+ BOOST_STATIC_CONSTANT(bit_range_type, past = digits );
+ BOOST_STATIC_CONSTANT(bit_range_type, beyond = digits+1 );
+
+ static bit_range_type first_bit(word_type value)
+ { return forward<word_type,digits>::first_bit(value); }
+
+ static bit_range_type last_bit(word_type value)
+ { return forward<word_type,digits>::last_bit(value); }
+
+ static bit_range_type next_bit(word_type value, bit_range_type cur_pos)
+ { return forward<word_type,digits>::next_bit(value, cur_pos); }
+
+ static bit_range_type prev_bit(word_type value, bit_range_type cur_pos)
+ { return forward<word_type,digits>::prev_bit(value, cur_pos); }
+
+ static difference_type inter_value(difference_type reptator, const interval_type inter_val)
+ { return first(inter_val) + reptator; }
+
+ static difference_type inter_base(const iterator& iter)
+ { return identity_element<difference_type>::value(); }
+
+ static difference_type inter_ceil(const iterator& iter)
+ { return iter->first.length(); }
+};
+
+template<class IteratorT>
+struct proceed<IteratorT,false>
+{
+ typedef IteratorT iterator;
+ typedef typename iterator::value_type segment_type;
+ typedef typename first_element<segment_type>::type interval_type;
+ typedef typename bitwise<segment_type>::word_type word_type;
+ typedef typename difference_type_of<interval_traits<interval_type> >::type
+ difference_type;
+
+ BOOST_STATIC_CONSTANT(bit_range_type, digits = bitwise<segment_type>::digits );
+ BOOST_STATIC_CONSTANT(bit_range_type, beyond = -2 );
+ BOOST_STATIC_CONSTANT(bit_range_type, past = -1 );
+ BOOST_STATIC_CONSTANT(bit_range_type, ante = digits );
+ BOOST_STATIC_CONSTANT(bit_range_type, before = digits+1 );
+
+ static bit_range_type first_bit(word_type value)
+ { return forward<word_type,digits>::last_bit(value); }
+
+ static bit_range_type last_bit(word_type value)
+ { return forward<word_type,digits>::first_bit(value); }
+
+ static bit_range_type next_bit(word_type value, bit_range_type cur_pos)
+ { return forward<word_type,digits>::prev_bit(value, cur_pos); }
+
+ static bit_range_type prev_bit(word_type value, bit_range_type cur_pos)
+ { return forward<word_type,digits>::next_bit(value, cur_pos); }
+
+ static difference_type inter_value(difference_type reptator, const interval_type inter_val)
+ { return last(inter_val) - reptator; }
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} //namespace biterate
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_DETAIL_BIT_ELEMENT_ITERATOR_HPP_JOFA_091109
+
+
+

Added: sandbox/icl/boost/icl_xt/enum_bitset.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/enum_bitset.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,61 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_ENUM_BITSET_HPP_JOFA_021204
+#define BOOST_ICL_ENUM_BITSET_HPP_JOFA_021204
+
+#include <bitset>
+#include <boost/icl/detail/notate.hpp>
+namespace boost{namespace icl
+{
+
+
+ template <class EnumT, size_t EnumSize>
+ class enum_bitset: public std::bitset<EnumSize>
+ {
+ public:
+ /// Default Ctor
+ enum_bitset() : std::bitset<EnumSize>(){}
+
+ /// Copy Ctor
+ enum_bitset(const enum_bitset& src): std::bitset<EnumSize>(src){}
+
+ /// Construct from unsigned
+ enum_bitset(unsigned long val): std::bitset<EnumSize>(val){}
+
+ /** Add the bit 'bit' to the set. This enables shorthand notation
+ myBitSet.add(bit_1).add(bit_2). ... .add(bit_n); */
+ enum_bitset& add(int bit){this->set(bit); return *this;}
+ };
+
+}} // namespace icl boost
+
+
+#endif // BOOST_ICL_ENUM_BITSET_HPP_JOFA_021204
+

Added: sandbox/icl/boost/icl_xt/episode_product.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/episode_product.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,313 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_EPISODE_PRODUCT_HPP_HPP_JOFA_011005
+#define BOOST_ICL_EPISODE_PRODUCT_HPP_HPP_JOFA_011005
+
+#include <boost/icl/map.hpp>
+#include <boost/icl_xt/episode_set.hpp>
+
+namespace boost{namespace icl
+{
+
+/// A collection (product) of episodes of different types that do not change for a period of time
+/**
+ <b>Eine Klasse zur Sammlung von Episoden unterschiedlichen Typs</b>
+
+ episode_product ist so benannt nach dem mathematischen Ding
+ (T1 e1, ... Tn en), was gelegentlich Produkt oder Tupel (in der Informatik
+ auch struct (c), record (pascal)) genannt wird. Beim EpisodenProdukt
+ sind Ti Typen und ei Episoden-Mengen. Die Elemente der Episodenmengen sind
+ vom Typ Ti. Implementiert wird das Ganze als Map
+
+ { T1->e1, ... , Tn->en }. Es müssen also nicht alle Komponenten vorhanden sein.
+
+ Template-Parameter <b>TimeT</b>: Domain-Typ der Episoden-Intervalle
+ (z.B. Tage, Sekunden, Monate, int u.ä.). Episoden haben ja ein Intervall, das
+ Anfang und Ende der Episode angibt.
+
+ Template-Parameter <b>TypeDomain</b>: TypeDomain ist der Definitionsbereich (Domain)
+ der Typen von Episoden, die in der Produkt-Historie verwendet werden können.
+
+ Ein Episoden-Produkt ist ein Map (partielle Abbildung). Der Definitionbereich
+ des Map ist ein Aufzählungstyp TypeDomain::DomainET. Das Map ist hierdurch auf ganz
+ spezifische Werte und eine maximale Anzahl beschränkt.
+
+ Der Wertebereich (CoDomain) sind Mengen von Episoden. Diese Episoden sind
+ 'getypte' \ref typed_episode, die ihren Typ kennen. Eine Episode aus einer
+ Episodenmenge ei
+ hat immer den gleichen Typ aus TypeDomain::DomainET wie ihr Schlüssels Ti
+ eines Wertepaares (Ti, ei).
+
+ Im Kontext von Produkthistorien repräsentieren die Episoden-Mengen die
+ Episoden eines Typs, die sich überlappen. Eine einelementige Menge ist
+ eine nichtüberlappende Episode eines Typs.
+
+
+ Im Kontext von Produkthistorien kann man das EpisodenProdukt auch als
+ <b>Episoden-Aufsammelobjekt für zeitliche Überlappung</b> betrachten:
+
+ Eine Episodenmenge mit mehreren Elementen repräsentiert zeiliche Überlappung
+ von Episoden gleichen Typs: Beispiel:
+
+ { KUE -> { kueEpi_Bfa, kueEpi_Aok } }
+
+ Episoden unterschiedlichen Typs repräsentieren Überlappung von Episoden
+ unterschidlichen Typs: Beispiel:
+
+ { AUFENTH -> {aufentEpi}, KUE -> {kueEpi} }
+
+
+ @author Joachim Faulhaber
+*/
+
+template <class TimeT, class TypeDomain>
+class episode_product : public boost::icl::map<typename TypeDomain::DomainET, episode_set<TimeT,TypeDomain> >
+{
+public:
+ typedef boost::icl::map<typename TypeDomain::DomainET, episode_set<TimeT,TypeDomain> > base_type;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::data_type data_type;
+ typedef typename base_type::data_type EpisodeSetTD;
+ typedef typename episode_set<TimeT,TypeDomain>::value_type EpisodePTD;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+
+public:
+
+ /// Zu einem Episoden-Typ wird ein Pointer auf die erste Episode einer Episoden-Menge
+ /// zurückgegeben. Wenn die Menge leer ist liefert die Funktion NULL.
+ EpisodePTD getFirst(typename TypeDomain::DomainET type)const
+ {
+ const_iterator epiSet_ = find(type);
+ if(epiSet_ == this->end())
+ return NULL;
+ else return *((*epiSet_).second.begin());
+ }
+
+ EpisodePTD getLast(typename TypeDomain::DomainET type)const
+ {
+ const_iterator epiSet_ = find(type);
+ if(epiSet_ == this->end())
+ return NULL;
+ else return *((*epiSet_).second.rbegin());
+ }
+
+ EpisodeSetTD* getEpisodeSetPtr(typename TypeDomain::DomainET type)
+ {
+ iterator epiSet_ = find(type);
+ if(epiSet_ == this->end())
+ return NULL;
+ else return &((*epiSet_).second);
+ }
+
+ int size(typename TypeDomain::DomainET type)const
+ {
+ const_iterator epiSet_ = find(type);
+ if(epiSet_ == this->end())
+ return 0;
+ else return (*epiSet_).second.size();
+ }
+
+ bool insert(EpisodePTD pEpisode)
+ {
+ EpisodeSetTD sglSet;
+ sglSet.insert(pEpisode);
+ typename TypeDomain::DomainET type = pEpisode->type();
+ return base_type::insert(value_type(type,sglSet)).second;
+ }
+
+ void leftAlignedEpisodes(episode_product& syncProd, const TimeT& start)
+ {
+ ICL_const_FORALL_THIS(elem_)
+ {
+ TypeDomain type = (*elem_).first;
+ EpisodeSetTD& epiSet = (*elem_).first;
+
+ EpisodeSetTD syncSet;
+ ICL_const_FORALL(typename EpisodeSetTD, epi_, epiSet)
+ {
+ if((*epi_)->interval().first()==start)
+ syncSet.insert(*epi_);
+ }
+ syncProd.insert(episode_product::value_type(type, syncSet));
+ }
+ }
+
+
+ std::string as_string()const
+ {
+ std::string str;
+ const_iterator it = this->begin();
+
+ if(it == this->end())
+ return std::string("");
+ else
+ {
+ std::string str( TypeDomain::as_string((*it).first) );
+ str += ("{"+((*it).second).as_string()+"}");
+ it++;
+
+ while(it != this->end()) {
+ str += ", "; str += TypeDomain::as_string((*it).first);
+ str += ("{"+((*it).second).as_string()+"}");
+ it++;
+ }
+ return str;
+ }
+ }
+
+};
+
+
+template <class TimeT, class TypeDomain>
+bool operator == (const episode_product<TimeT,TypeDomain>& left,
+ const episode_product<TimeT,TypeDomain>& right)
+{
+ typedef typename episode_product<TimeT,TypeDomain>::base_type base_type;
+ return dynamic_cast<const base_type&>(left) == dynamic_cast<const base_type&>(right);
+}
+
+template <class TimeT, class TypeDomain>
+struct is_map<episode_product<TimeT,TypeDomain> >
+{
+ typedef is_map type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+/* KEEP Eigentlich bessere Implementierung exemplarisch für 'using' in Verbindung
+ private inheritence. Müsste aber wg. Rückwärtskompatibilität sorgfältig
+ eingepflegt werden (eigentlich nur StatPflege)
+NOTE MEMO DESIGN USING PRIVATE INHERITENCE
+
+template <class TimeT, class TypeDomain>
+class episode_product : private icl::MapT<TypeDomain::DomainET, episode_set<TimeT,TypeDomain> >
+{
+public:
+ typedef icl::MapT<TypeDomain::DomainET, episode_set<TimeT,TypeDomain> > BaseTD;
+ typedef BaseTD::value_type value_type;
+ typedef BaseTD::data_type data_type;
+ typedef BaseTD::data_type EpisodeSetTD;
+ typedef episode_set<TimeT,TypeDomain>::value_type EpisodePTD;
+
+ typedef BaseTD::iterator iterator;
+ typedef BaseTD::const_iterator const_iterator;
+
+public:
+
+ using BaseTD::find;
+ using BaseTD::begin;
+ using BaseTD::end;
+
+ using BaseTD::contains;
+
+ episode_product& operator += (const episode_product& rhs) { BaseTD::operator += (rhs); return *this; }
+ episode_product& operator -= (const episode_product& rhs) { BaseTD::operator -= (rhs); return *this; }
+
+ /// Zu einem Episoden-Typ wird ein Pointer auf die erste Episode einer Episoden-Menge
+ /// zurückgegeben. Wenn die Menge leer ist liefert die Funktion NULL.
+ EpisodePTD getFirst(TypeDomain::DomainET type)const
+ {
+ const_iterator epiSet_ = find(type);
+ if(epiSet_==end()) return NULL;
+ else return *((*epiSet_).second.begin());
+ }
+
+ int size()const { return BaseTD::size(); }
+
+ int size(TypeDomain::DomainET type)const
+ {
+ const_iterator epiSet_ = find(type);
+ if(epiSet_==end()) return 0;
+ else return (*epiSet_).second.size();
+ }
+
+
+
+ bool insert(EpisodePTD pEpisode)
+ {
+ EpisodeSetTD sglSet;
+ sglSet.insert(pEpisode);
+ TypeDomain::DomainET type = pEpisode->type();
+ return BaseTD::insert(value_type(type,sglSet)).second;
+ }
+
+ std::string as_string()const
+ {
+ std::string str;
+ const_iterator it = begin();
+
+ if(it==end()) return std::string("");
+ else
+ {
+ std::string str( TypeDomain::as_string((*it).first) );
+ str += ("{"+((*it).second).as_string()+"}");
+ it++;
+
+ while(it != end()) {
+ str += ", "; str += TypeDomain::as_string((*it).first);
+ str += ("{"+((*it).second).as_string()+"}");
+ it++;
+ }
+ return str;
+ }
+ }
+
+};
+
+
+template <class TimeT, class TypeDomain>
+inline bool operator == (const episode_product<TimeT,TypeDomain>& lhs,
+ const episode_product<TimeT,TypeDomain>& rhs)
+{
+ if(lhs.size() != rhs.size())
+ return false;
+
+ episode_product<TimeT,TypeDomain>::const_iterator lhs_ = lhs.begin(), rhs_ = rhs.begin();
+
+ while(lhs_ != lhs.end())
+ {
+ if(!((*lhs_).first == (*rhs_).first))
+ return false;
+ else if (!((*lhs_).second == (*rhs_).second))
+ return false;
+
+ lhs_++; rhs_++;
+ }
+
+ return true;
+}
+*/
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_EPISODE_PRODUCT_HPP_HPP_JOFA_011005
+
+

Added: sandbox/icl/boost/icl_xt/episode_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/episode_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,136 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_EPISODE_SET_HPP_HPP_JOFA_011015
+#define BOOST_ICL_EPISODE_SET_HPP_HPP_JOFA_011015
+
+#include <string>
+#include <boost/icl_xt/set.hpp>
+#include <boost/icl_xt/typed_episode.hpp>
+
+namespace boost{namespace icl
+{
+ template <typename EpisodePointer>
+ class Less_TypedEpisodeATP
+ {
+ public:
+ bool operator ()(const EpisodePointer& rhs, const EpisodePointer& lhs)const
+ {
+ return rhs->isLess(lhs);
+ }
+ };
+
+/// A set of episodes
+/**
+ <b>Eine Menge von Episoden</b>
+
+ Template-Parameter <b>TimeT</b>: Domain-Typ der Episoden-Intervalle
+ (z.B. Tage, Sekunden, Monate, int u.ä.). Episoden haben ja ein Intervall, das
+ Anfang und Ende der Episode angibt.
+
+ Template-Parameter <b>TypeDomain</b>: TypeDomain ist der Definitionsbereich (Domain)
+ der Typen von Episoden, die in der Menge verwendet werden können.
+
+ Die Episonden-Menge darf nur Episoden enthalten, die vom gleichen
+ Episoden-Typ sind. Dieser Episodentyp wird durch einen Wert aus dem
+ Template-Parameter TypeDomain repräsentiert.
+
+ JODO: Diese Eigenschaft sollte man durch eine geeignete Implementierung
+ der Klasse sicherstellen. Enfällt bislang wg. Zeitmangels
+
+ @author Joachim Faulhaber
+*/
+template <class TimeT, class TypeDomain>
+class episode_set : public icl::set<typed_episode<TimeT, TypeDomain>*,
+#ifdef ICL_USE_COMPARE_TEMPLATE_TEMPLATE
+ Less_TypedEpisodeATP
+#else
+ Less_TypedEpisodeATP<typed_episode<TimeT, TypeDomain>*>
+#endif
+ >
+{
+ // all elements must have the same type from TypeDomain
+public:
+ typedef typed_episode<TimeT, TypeDomain>* episode_type;
+ typedef icl::set<typed_episode<TimeT, TypeDomain>*,
+ ICL_COMPARE_INSTANCE(Less_TypedEpisodeATP,episode_type)> base_type;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+
+public:
+ bool isMonoTyped()const;
+
+ std::string as_string(const char* sep = " ")const
+ {
+ const_iterator it = this->begin();
+
+ if(it == this->end()) return std::string("");
+ else
+ {
+ std::string y = (**it).as_string(); it++;
+ while(it != this->end())
+ {
+ y += sep;
+ y += (**it).as_string();
+ it++;
+ }
+ return y;
+ }
+ }
+};
+
+
+//JODO Aufrufmechnismus für stl::container operator ==.verstehen. Eigener
+// == operator sollte überflüssig sein. Korrektes Type-Konzept für Pointertypen etc.
+template <class TimeT, class TypeDomain>
+inline bool operator == (const episode_set<TimeT,TypeDomain>& lhs,
+ const episode_set<TimeT,TypeDomain>& rhs)
+{
+ if(lhs.size() != rhs.size())
+ return false;
+
+ typename episode_set<TimeT,TypeDomain>::const_iterator
+ lhs_ = lhs.begin(),
+ rhs_ = rhs.begin();
+
+ while(lhs_ != lhs.end())
+ {
+ if(!(**lhs_ == **rhs_))
+ return false;
+ lhs_++; rhs_++;
+ }
+
+ return true;
+}
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_EPISODE_SET_HPP_HPP_JOFA_011015
+
+

Added: sandbox/icl/boost/icl_xt/fixtupelconst.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/fixtupelconst.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,48 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+#ifndef BOOST_ICL_FIXTUPELCONSTT_HPP_JOFA_040621
+#define BOOST_ICL_FIXTUPELCONSTT_HPP_JOFA_040621
+
+#include <boost/icl/detail/notate.hpp>
+
+#define FOREACH_VAR(idx) for(VarEnumTD idx=0; idx < varCountV; idx++)
+#define FOREACH_VAR_TO(idx, upb) for(VarEnumTD idx=0; idx < upb; idx++)
+
+namespace boost{namespace icl
+{
+ typedef int VarEnumTD;
+ typedef int StatVarTD;
+ typedef int GroupVarTD;
+
+ const GroupVarTD UNDEFINED_GROUP = -1;
+}} // namespace icl boost
+
+#endif // BOOST_ICL_FIXTUPELCONSTT_HPP_JOFA_040621
+
+

Added: sandbox/icl/boost/icl_xt/gentorit.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/gentorit.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,58 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class GentorT
+--------------------------------------------------------------------*/
+#ifndef __GENTORIT_H_JOFA_000714__
+#define __GENTORIT_H_JOFA_000714__
+
+
+#include <boost/icl_xt/random.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class TypeT> class RandomGentorProfile{};
+
+template <class TypeTV> class GentorIT
+{
+public:
+ virtual ~GentorIT(){}
+ //JODO virtual void calibrate(const RandomGentorProfile& profile);
+ virtual void some(TypeTV& x)=0;
+};
+
+
+template <class TypeTV> class RandomGentorAT : public GentorIT<TypeTV>
+{
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl_xt/group_order.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/group_order.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,92 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+#ifndef __group_order_JOFA_040621_H__
+#define __group_order_JOFA_040621_H__
+
+#include <functional>
+#include <boost/icl_xt/fixtupelconst.hpp>
+#include <boost/icl/map.hpp>
+
+namespace boost{namespace icl
+{
+ template <int VarCount> class var_tuple;
+
+ /// Strict weak ordering on var_tuple that defines grouping via induced equivalence
+ /** Gruppierung kann man so ausdrücken, dass alle Werte, die in gleiche Gruppen
+ zusammenfallen, äquivalent sind.
+
+ Werte, die nicht in Gruppen zusammenfallen sind nicht äquivalent.
+
+ Wir erhalten diese Äquivalenz auch durch eine strikt schwachen Ordnung <.
+ Denn wenn !(x < y) && !(y < x) dann gilt x ~= y. Wenn also zwei Werte weder
+ kleiner noch grösser bzgl. einer strikt schwachen Ordnung sind, dann sind sie
+ äquivalent.
+
+ Diesen Zusammenhang machen wir uns zunutze, um möglichst viel (wenn nicht sogar
+ alles) was mit Äquivalenzen zu tun hat auch durch strikt schwache Ordnungen und
+ stl-containern ausdrücken zu können.
+
+ Wegen des allgemeinen Falls, einer bedingten Gruppierung, bei dem die
+ Gruppierung einer Variable von den Werten anderer Variablen abhängt,
+ definieren wir die GroupOrder nicht als
+
+ binary_function<StatVarTD, StatVarTD, bool> sondern als
+ binary_function<var_tuple, var_tuple, bool>
+ */
+ template <int VarCount>
+ class group_order : public std::binary_function<var_tuple<VarCount>, var_tuple<VarCount>, bool>
+ {
+ public:
+ typedef var_tuple<VarCount> var_tupleD;
+ public:
+ /** Die strikt schwache Ordnung, die auch die Äquivalenz induziert! Sie wird
+ in abgeleiteten Klassen implementiert. */
+ virtual bool operator() (const var_tupleD& lhs, const var_tupleD& rhs)const=0;
+
+ /// Get the index of the variable that is grouped by the order.
+ virtual VarEnumTD getVarIndex()const=0;
+
+ /** Die Äquivalenz ergibt sich aus der Ordnung (operator()). Deshalb
+ besitzt die Funktion eine entsprechende Default-implementierung.
+ Wir können aber oft eine effizientere Implementierung in der
+ abgeleiteten Klasse angeben.
+ */
+ virtual bool areEquivalent(const var_tupleD& lhs, const var_tupleD& rhs)const
+ {
+ return !operator()(lhs, rhs) && !operator()(rhs, lhs);
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // __group_order_JOFA_040621_H__
+
+

Added: sandbox/icl/boost/icl_xt/grouping.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/grouping.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,86 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+#ifndef __grouping_JOFA_040621_H__
+#define __grouping_JOFA_040621_H__
+
+#include <functional>
+#include <boost/icl_xt/fixtupelconst.hpp>
+#include <boost/icl_xt/group_order.hpp>
+#include <boost/icl/map.hpp>
+
+namespace boost{namespace icl
+{
+ template <int varCountV>
+ class grouping
+ {
+ public:
+ typedef group_order<varCountV> group_orderT;
+ public:
+ grouping();
+ grouping(const grouping&);
+ grouping& operator = (const grouping&);
+
+ const group_orderT* operator[] (StatVarTD permIdx)const { return m_GroupOrder[permIdx]; }
+ void setGrouper(group_orderT* grouper, int idx) { m_GroupOrder[idx] = grouper; }
+
+ private:
+ group_orderT* m_GroupOrder[varCountV];
+ };
+
+ template <int varCountV>
+ icl::grouping<varCountV>::grouping ()
+ {
+ FOREACH_VAR(idx)
+ m_GroupOrder[idx] = NULL;
+ }
+
+
+ template <int varCountV>
+ icl::grouping<varCountV>::grouping (const grouping<varCountV>& src)
+ {
+ FOREACH_VAR(idx)
+ m_GroupOrder[idx] = src.m_GroupOrder[idx];
+ }
+
+ template <int varCountV>
+ grouping<varCountV>& icl::grouping<varCountV>::operator = (const grouping<varCountV>& src)
+ {
+ if(&src != this)
+ {
+ FOREACH_VAR(idx)
+ m_GroupOrder[idx] = src.m_GroupOrder[idx];
+ }
+ return *this;
+ }
+
+
+}} // namespace icl boost
+
+#endif // __grouping_JOFA_040621_H__
+

Added: sandbox/icl/boost/icl_xt/interval_bitset.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/interval_bitset.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,550 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_INTERVAL_BITSET_HPP_JOFA_091023
+#define BOOST_ICL_XT_INTERVAL_BITSET_HPP_JOFA_091023
+
+#include <iostream> // to organize output
+#include <boost/cstdint.hpp> // portable boost integers
+#include <boost/operators.hpp> // to define operators with minimal effort
+#include <boost/icl/interval_map.hpp> // base of large bitsets
+#include <boost/icl_xt/meta_log.hpp> // a meta logarithm
+#include <boost/icl_xt/bits.hpp> // a bitset implementation
+#include <boost/icl_xt/detail/bit_element_iterator.hpp>
+
+#include <boost/icl/detail/interval_morphism.hpp> //JODO Separate aspects and concerns
+
+
+
+namespace boost{namespace icl
+{
+
+/** \brief Large bitsets that combine interval compression and bitcompression.
+
+ Class interval_bitset implements a set as an interval_map of bitsets.
+ An interval_bitset is selfcompressing in two ways.
+ Large contiguous runs of bits can be represented by intervals in the
+ same way as for icl::interval_set or icl::interval_map (interval compression).
+ Individual bits that spread over narrow ranges are represented in
+ machine words as bitsets (bit compression).
+
+ There is a datailed description on how an interval_bitset is
+ implemented using icl::interval_map in the project section
+ of the boost book documentation here:
+ http://www.joachim-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/projects.html
+*/
+template
+<
+ typename DomainT = unsigned long,
+ typename BitSetT = icl::bits<unsigned long>,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), //JODO change to right_open_interval
+ ICL_ALLOC Alloc = std::allocator
+>
+class interval_bitset
+ : boost::equality_comparable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::less_than_comparable< interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+
+ , boost::addable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::orable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::subtractable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::andable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::xorable < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+
+ , boost::addable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::orable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::subtractable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::andable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::xorable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+
+ , boost::addable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::orable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::subtractable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::andable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::xorable2 < interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ > > > > > > > > > > > > > > > > >
+ //^ & - | + ^ & - | + ^ & - | + < ==
+ //segment element container
+{
+public:
+ typedef boost::icl::interval_map
+ <DomainT, BitSetT, boost::icl::partial_absorber,
+ std::less, boost::icl::inplace_bit_add, boost::icl::inplace_bit_and> interval_bitmap_type;
+
+ typedef DomainT domain_type;
+ typedef DomainT codomain_type;
+ typedef DomainT element_type; // 0 .. 2^digits(element_type)-1
+ typedef DomainT condensed_type; // 0 .. (2^digits(element_type)-1)/digits(word_type)
+ typedef typename BitSetT::word_type word_type; // 0 .. 2^digits(word_type)-1
+ typedef typename BitSetT::bit_type bit_type; // 0 .. digits(word_type)
+ typedef short narrow_type; // small signed type that includes bit_type
+ typedef BitSetT bitset_type;
+ typedef BitSetT data_type;
+ typedef typename std::size_t size_type;
+ typedef typename interval_bitmap_type::interval_type interval_type;
+ typedef interval_type segment_type;
+
+ typedef typename interval_bitmap_type::key_type key_type;
+ typedef typename interval_bitmap_type::value_type value_type;
+
+ typedef typename interval_bitmap_type::domain_compare domain_compare;
+ typedef typename std::set<DomainT,domain_compare,Alloc<DomainT> > atomized_type;
+
+ typedef typename interval_bitmap_type::iterator iterator;
+ typedef typename interval_bitmap_type::const_iterator const_iterator;
+ typedef typename interval_bitmap_type::reverse_iterator reverse_iterator;
+ typedef typename interval_bitmap_type::const_reverse_iterator const_reverse_iterator;
+
+ /// element iterator: Depreciated, see documentation.
+ typedef boost::icl::bit_element_iterator<iterator> element_iterator;
+ /// element const iterator: Depreciated, see documentation.
+ typedef boost::icl::bit_element_iterator<const_iterator> element_const_iterator;
+ /// element reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::bit_element_iterator<reverse_iterator> element_reverse_iterator;
+ /// element const reverse iterator: Depreciated, see documentation.
+ typedef boost::icl::bit_element_iterator<const_reverse_iterator> element_const_reverse_iterator;
+
+ typedef typename interval_bitmap_type::pointer pointer;
+ typedef typename interval_bitmap_type::const_pointer const_pointer;
+ typedef typename interval_bitmap_type::reference reference;
+ typedef typename interval_bitmap_type::const_reference const_reference;
+
+
+public:
+ bool operator ==(const interval_bitset& rhs)const{ return _map == rhs._map; }
+ bool operator < (const interval_bitset& rhs)const{ return _map < rhs._map; }
+
+ interval_bitset& operator +=(const interval_bitset& rhs) {_map += rhs._map; return *this;}
+ interval_bitset& operator |=(const interval_bitset& rhs) {_map |= rhs._map; return *this;}
+ interval_bitset& operator -=(const interval_bitset& rhs) {_map -= rhs._map; return *this;}
+ interval_bitset& operator &=(const interval_bitset& rhs) {_map &= rhs._map; return *this;}
+ interval_bitset& operator ^=(const interval_bitset& rhs) {_map ^= rhs._map; return *this;}
+
+ interval_bitset& operator +=(const element_type& rhs) {return add(interval_type(rhs, rhs)); }
+ interval_bitset& operator |=(const element_type& rhs) {return add(interval_type(rhs, rhs)); }
+ interval_bitset& operator -=(const element_type& rhs) {return subtract(interval_type(rhs, rhs)); }
+ interval_bitset& operator &=(const element_type& rhs) {return intersect(interval_type(rhs, rhs));}
+ interval_bitset& operator ^=(const element_type& rhs) {return flip(interval_type(rhs, rhs)); }
+
+ interval_bitset& operator +=(const interval_type& rhs){return add(rhs); }
+ interval_bitset& operator |=(const interval_type& rhs){return add(rhs); }
+ interval_bitset& operator -=(const interval_type& rhs){return subtract(rhs); }
+ interval_bitset& operator &=(const interval_type& rhs){return intersect(rhs);}
+ interval_bitset& operator ^=(const interval_type& rhs){return flip(rhs); }
+
+ interval_bitset& operator +=(const value_type& rhs) {_map += rhs; return *this;}
+
+ interval_bitset& add (const interval_type& rhs){return segment_apply(&interval_bitset::add_, rhs);}
+ interval_bitset& subtract (const interval_type& rhs){return segment_apply(&interval_bitset::subtract_, rhs);}
+ interval_bitset& intersect(const interval_type& rhs){return segment_apply(&interval_bitset::intersect_,rhs);}
+ interval_bitset& flip (const interval_type& rhs){return segment_apply(&interval_bitset::flip_, rhs);}
+
+ interval_bitset& add (const element_type& rhs) {return segment_apply(&interval_bitset::add_, interval_type(rhs));}
+ interval_bitset& subtract (const element_type& rhs) {return segment_apply(&interval_bitset::subtract_, interval_type(rhs));}
+ interval_bitset& intersect(const element_type& rhs) {return segment_apply(&interval_bitset::intersect_,interval_type(rhs));}
+ interval_bitset& flip (const element_type& rhs) {return segment_apply(&interval_bitset::flip_, interval_type(rhs));}
+
+ void clear() { icl::clear(_map); }
+ bool empty()const { return icl::is_empty(_map); }
+ size_type cardinality()const;
+ size_type size()const { return cardinality(); }
+ size_type interval_count()const { return interval_count(_map); }
+ size_type iterative_size()const { return _map.iterative_size(); }
+
+ bool contains(element_type element)const{ return _map(element>>shift).contains(element & mask); }
+ bool contains(const segment_type& segment)const;
+ bool contains(const interval_bitset& sub)const { return icl::contains(_map, sub._map); }
+ bool contained_in(const interval_bitset& super)const{ return icl::within(_map, super._map); }
+
+ void show_segments()const;
+ void show_matrix(const char off_on[2] = " 1")const;
+ std::string as_string()const{ return _map.as_string(); }
+
+ //==========================================================================
+ //= Iterator related
+ //==========================================================================
+
+ iterator begin() { return _map.begin(); }
+ const_iterator begin()const { return _map.begin(); }
+ iterator end() { return _map.end(); }
+ const_iterator end()const { return _map.end(); }
+
+ reverse_iterator rbegin() { return _map.rbegin(); }
+ reverse_iterator rend() { return _map.rend(); }
+ const_reverse_iterator rbegin()const { return _map.rbegin(); }
+ const_reverse_iterator rend()const { return _map.rend(); }
+
+ //==========================================================================
+ //= Element iterator related
+ //==========================================================================
+ element_iterator elements_begin()
+ {
+ if(this->begin()==this->end())
+ return element_iterator(this->begin(), element_iterator::beyond);
+ else
+ return element_iterator(this->begin(), element_iterator::ante );
+ }
+
+ element_iterator elements_end()
+ { return element_iterator(this->end(), element_iterator::beyond); }
+
+ element_const_iterator elements_begin()const
+ {
+ if(this->begin()==this->end())
+ return element_const_iterator(this->begin(), element_iterator::beyond);
+ else
+ return element_const_iterator(this->begin(), element_iterator::ante );
+ }
+
+ element_const_iterator elements_end()const
+ { return element_const_iterator(this->end(), element_iterator::beyond); }
+
+ element_reverse_iterator elements_rbegin()
+ {
+ if(this->rbegin()==this->rend())
+ return element_reverse_iterator(this->rbegin(), element_iterator::before);
+ else
+ return element_reverse_iterator(this->rbegin(), element_iterator::past );
+ }
+
+ element_reverse_iterator elements_rend()
+ { return element_reverse_iterator(this->rend(), element_iterator::before); }
+
+ element_const_reverse_iterator elements_rbegin()const
+ {
+ if(this->rbegin()==this->rend())
+ return element_const_reverse_iterator(this->rbegin(), element_iterator::before);
+ else
+ return element_const_reverse_iterator(this->rbegin(), element_iterator::past );
+ }
+
+ element_const_reverse_iterator elements_rend()const
+ { return element_const_reverse_iterator(this->rend(), element_iterator::before); }
+
+private:
+ typedef typename interval_bitmap_type::segment_type seg_type;
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4245) //'initializing' : conversion from 'int' to 'const unsigned char', signed/unsigned mismatch
+#endif
+
+ BOOST_STATIC_CONSTANT( word_type, digits = bitset_type::digits );
+ BOOST_STATIC_CONSTANT( word_type, divisor = digits );
+ BOOST_STATIC_CONSTANT( word_type, last = digits-1 );
+ BOOST_STATIC_CONSTANT( word_type, shift = log2_<divisor>::value );
+ BOOST_STATIC_CONSTANT( word_type, w1 = static_cast<word_type>(1) );
+ BOOST_STATIC_CONSTANT( word_type, mask = divisor - w1 );
+ BOOST_STATIC_CONSTANT( word_type, all = ~static_cast<word_type>(0));
+ BOOST_STATIC_CONSTANT( word_type, top = w1 << (digits-w1) );
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+ typedef icl::bits<unsigned char> PartsT;
+ enum { inner_part = 0, sub_part = 1, super_part = 2, inter_part = 4 };
+
+ typedef void (interval_bitset::*segment_combiner)(element_type, element_type, bitset_type);
+
+ static word_type from_lower_to(word_type bit){return bit==last ? all : (w1<<(bit+w1))-w1;}
+ static word_type to_upper_from(word_type bit){return bit==last ? top : ~((w1<<bit)-w1); }
+
+ interval_bitset& segment_apply(segment_combiner combine, const interval_type& operand)
+ { // same as
+ condensed_type base = operand.first() >> shift, // operand.first()/ divisor
+ ceil = operand.last() >> shift; // operand.last() / divisor
+ word_type base_rest = operand.first() & mask , // operand.first()% divisor
+ ceil_rest = operand.last() & mask ; // operand.last() % divisor
+
+ if(base == ceil) // [first, last] are within one bitset (chunk)
+ (this->*combine)(base, base+1, bitset_type( to_upper_from(base_rest)
+ & from_lower_to(ceil_rest)));
+ else // [first, last] spread over more than one bitset (chunk)
+ {
+ element_type mid_low = base_rest == 0 ? base : base+1, // begin of mid part
+ mid_up = ceil_rest == all ? ceil+1 : ceil ; // end of mid part
+
+ if(base_rest > 0) // Bitset of base interval has to be filled from base_rest to last
+ (this->*combine)(base, base+1, bitset_type(to_upper_from(base_rest)));
+ if(ceil_rest < all) // Bitset of ceil interval has to be filled from first to ceil_rest
+ (this->*combine)(ceil, ceil+1, bitset_type(from_lower_to(ceil_rest)));
+ if(mid_low < mid_up) // For the middle part all bits have to set.
+ (this->*combine)(mid_low, mid_up, bitset_type(all));
+ }
+ return *this;
+ }
+
+ PartsT partition(bitset_type& sub, condensed_type& lo,
+ bitset_type& inter,
+ condensed_type& up, bitset_type& super,
+ const segment_type& segment)const;
+
+ void add_(DomainT lo, DomainT up, BitSetT bits){_map += value_type(interval_type::right_open(lo,up), bits);}
+ void subtract_(DomainT lo, DomainT up, BitSetT bits){_map -= value_type(interval_type::right_open(lo,up), bits);}
+ void intersect_(DomainT lo, DomainT up, BitSetT bits){_map &= value_type(interval_type::right_open(lo,up), bits);}
+ void flip_(DomainT lo, DomainT up, BitSetT bits){_map ^= value_type(interval_type::right_open(lo,up), bits);}
+
+private:
+ interval_bitmap_type _map;
+};
+
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::PartsT
+interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::partition
+(
+ bitset_type& sub, condensed_type& lo,
+ bitset_type& inter,
+ condensed_type& up, bitset_type& super,
+ const segment_type& segment
+)const
+{
+ if(segment.empty())
+ return PartsT();
+
+ condensed_type base = segment.first() >> shift, // segment.first()/ divisor
+ ceil = segment.last() >> shift; // segment.last() / divisor
+ word_type base_rest = segment.first() & mask , // segment.first()% divisor
+ ceil_rest = segment.last() & mask ; // segment.last() % divisor
+
+ if(base == ceil) // [first, last] are within one bitset
+ {
+ inter = bitset_type(to_upper_from(base_rest) & from_lower_to(ceil_rest));
+ lo = base; up = ceil;
+ return PartsT(inner_part);
+ }
+ else // [first, last] spread over more than one bitset (chunk)
+ {
+ PartsT parts;
+ lo = base_rest == 0 ? base : base+1, // begin of mid part
+ up = ceil_rest == mask ? ceil+1 : ceil ; // end of mid part
+
+ word_type dbg_all = all;
+ condensed_type dbg_up = up;
+
+ if(base_rest > 0) // Bitset of base interval has to be filled from base_rest to last
+ {
+ sub = bitset_type(to_upper_from(base_rest));
+ parts.add(sub_part);
+ }
+ if(ceil_rest < mask) // Bitset of ceil interval has to be filled from first to ceil_rest
+ {
+ super = bitset_type(from_lower_to(ceil_rest));
+ parts += super_part;
+ }
+ if(lo < up) // For the middle part all bits have to be set.
+ {
+ inter = bitset_type(all);
+ parts |= inter_part;
+ }
+ return parts;
+ }
+}
+
+
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::contains(const segment_type& segment)const
+{
+ if(segment.empty())
+ return true; // Emptieness is contained in everything
+
+ condensed_type lo, up ;
+ bitset_type subs, inters, supers;
+ PartsT parts = partition(subs, lo, inters, up, supers, segment);
+
+ if(parts.contains(inner_part))
+ return _map(lo).contains(inters);
+ else
+ {
+ if(parts.contains(sub_part) && !_map(lo-1).contains(subs))
+ return false;
+ if(parts.contains(super_part) && !_map(up).contains(supers))
+ return false;
+ if(parts.contains(inter_part) && !_map.contains(seg_type(interval_type::right_open(lo,up), inters)) )
+ return false;
+
+ return true;
+ }
+}
+
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::size_type
+ interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::cardinality()const
+{
+ size_type cardinality = 0;
+ ICL_const_FORALL(typename interval_bitmap_type, it_, _map)
+ cardinality += (it_->second.cardinality() * icl::cardinality(it_->first));
+ return cardinality;
+}
+
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+void interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::show_segments()const
+{
+ for(typename interval_bitmap_type::const_iterator it_ = _map.begin();
+ it_ != _map.end(); ++it_)
+ {
+ interval_type itv = it_->first;
+ bitset_type bits = it_->second;
+ std::cout << itv << "->" << bits.as_string("01") << std::endl;
+ }
+}
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+void interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::show_matrix(const char off_on[2])const
+{
+ typename interval_bitmap_type::const_iterator iter = _map.begin();
+ while(iter != _map.end())
+ {
+ element_type fst = iter->first.first(), lst = iter->first.last();
+ for(element_type chunk = fst; chunk <= lst; chunk++)
+ std::cout << iter->second.as_string(off_on) << std::endl;
+ ++iter;
+ }
+}
+
+//------------------------------------------------------------------------------
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator
+elements_begin(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_begin(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_iterator
+elements_end(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_end(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator
+elements_begin(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_begin(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_iterator
+elements_end(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_end(); }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator
+elements_rbegin(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_rbegin(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_reverse_iterator
+elements_rend(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_rend(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator
+elements_rbegin(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_rbegin(); }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_const_reverse_iterator
+elements_rend(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{ return object.elements_rend(); }
+
+//------------------------------------------------------------------------------
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool is_element_equal(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& left,
+ const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& right)
+{ return left == right; }
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+void clear(interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{
+ object.clear();
+}
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool is_empty(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{
+ return object.empty();
+}
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool contains(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& super,
+ const typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::element_type& sub )
+{
+ return super.contains(sub);
+}
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool contains(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& super,
+ const typename interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>::segment_type& sub )
+{
+ return super.contains(sub);
+}
+
+template<class DomainT, class BitSetT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc>
+bool contains(const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& super,
+ const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& sub )
+{
+ return super.contains(sub);
+}
+
+
+template<class CharType, class CharTraits,
+ class DomainT, class BitSetT,
+ ICL_COMPARE Compare, template<class,ICL_COMPARE>class Interval, ICL_ALLOC Alloc>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream,
+ const interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc>& object)
+{
+ typedef interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc> ObjectT;
+ stream << "{";
+ ICL_const_FORALL(typename ObjectT, it_, object)
+ stream << "(" << it_->first << "->" << it_->second << ")";
+
+ return stream << "}";
+}
+
+
+//-----------------------------------------------------------------------------
+// type representation
+//-----------------------------------------------------------------------------
+template <class DomainT, class BitSetT, ICL_COMPARE Compare, template<class,ICL_COMPARE>class Interval, ICL_ALLOC Alloc>
+struct type_to_string<icl::interval_bitset<DomainT,BitSetT,Compare,Interval,Alloc> >
+{
+ static std::string apply()
+ {
+ return "itv_bitset<"+ type_to_string<DomainT>::apply() + ","
+ + type_to_string<BitSetT>::apply() + ">";
+ }
+};
+
+namespace segmental
+{
+ template <typename DomainT, typename BitSetT>
+ struct atomizer<std::set<DomainT>, interval_bitset<DomainT, BitSetT> >
+ {
+ void operator()( std::set<DomainT>& atomized,
+ const interval_bitset<DomainT, BitSetT>& clustered)
+ {
+ typedef interval_bitset<DomainT, BitSetT> InterBitsetT;
+ typename InterBitsetT::element_const_iterator bit_ = elements_begin(clustered);
+ while(bit_ != elements_end(clustered))
+ atomized.insert(*bit_++);
+ }
+ };
+
+} // namespace segmental
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_INTERVAL_BITSET_HPP_JOFA_091023
+
+
+

Added: sandbox/icl/boost/icl_xt/itvgentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/itvgentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,130 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class ItvGentorT
+--------------------------------------------------------------------*/
+#ifndef __ITVGENTOR_H_JOFA_000714__
+#define __ITVGENTOR_H_JOFA_000714__
+
+#undef min
+#undef max
+
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/seqgentor.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class ItvDomTV, class ItvTV=typename icl::interval<ItvDomTV>::type>
+class ItvGentorT: public RandomGentorAT<ItvTV>
+{
+public:
+ typedef typename icl::interval<ItvDomTV>::type range_type;
+
+ virtual void some(ItvTV& x);
+
+ void setRange(const range_type& range)
+ { m_valueRange = range; }
+
+ void setValueRange(ItvDomTV low, ItvDomTV up)
+ {
+ m_valueRange = icl::construct<range_type>(low, up);
+ }
+
+ void setMaxIntervalLength(ItvDomTV len) { m_maxIntervalLength=len; }
+ void setProbDerivation();
+
+private:
+ NumberGentorT<ItvDomTV> m_ItvDomTVGentor;
+
+ range_type m_valueRange;
+ ItvDomTV m_maxIntervalLength;
+
+private:
+ template<class IntervalT, bool has_static_bounds>
+ struct construct_interval;
+
+ template<class IntervalT>
+ struct construct_interval<IntervalT, true>
+ {
+ typedef typename IntervalT::domain_type domain_type;
+ static IntervalT apply(const domain_type& lo, const domain_type& up,
+ interval_bounds)
+ {
+ return construct<IntervalT>(lo, up);
+ }
+ };
+
+ template<class IntervalT>
+ struct construct_interval<IntervalT, false>
+ {
+ typedef typename IntervalT::domain_type domain_type;
+ static IntervalT apply(const domain_type& lo, const domain_type& up,
+ interval_bounds bounds)
+ {
+ return construct<IntervalT>(lo, up, bounds);
+ }
+ };
+};
+
+
+template <class ItvDomTV, class ItvTV>
+void ItvGentorT<ItvDomTV,ItvTV>::some(ItvTV& x)
+{
+ NumberGentorT<unsigned> NATGentor;
+ ItvDomTV x1 = m_ItvDomTVGentor(m_valueRange);
+ icl::bound_type bndTypes = NATGentor(4);
+ unsigned upOrDown = NATGentor(1);
+ unsigned decideEmpty = NATGentor(2);
+
+ if(decideEmpty==0)
+ {
+ ItvDomTV x2 = m_ItvDomTVGentor(m_valueRange);
+ x = construct_interval<ItvTV, has_static_bounds<ItvTV>::value>
+ ::apply(x1, x1-x2, interval_bounds(bndTypes));
+ }
+ else if(upOrDown==0) {
+ ItvDomTV up
+ = m_ItvDomTVGentor(x1, static_cast<ItvDomTV>((std::min)(m_valueRange.upper(), x1+m_maxIntervalLength)));
+ x = construct_interval<ItvTV, has_static_bounds<ItvTV>::value>
+ ::apply(x1, up, interval_bounds(bndTypes));
+ } else {
+ ItvDomTV low
+ = m_ItvDomTVGentor(static_cast<ItvDomTV>((std::max)(m_valueRange.lower(), x1-m_maxIntervalLength)), x1);
+ x = construct_interval<ItvTV, has_static_bounds<ItvTV>::value>
+ ::apply(low, x1, interval_bounds(bndTypes));
+ }
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/list.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/list.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,457 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class icl::list
+ a general list class that extends stl-lists
+ for concepts InplaceAddable and InplaceSubtractable
+--------------------------------------------------------------------*/
+#ifndef BOOST_ICL_LIST_HPP_JOFA_070519
+#define BOOST_ICL_LIST_HPP_JOFA_070519
+
+#include <string>
+#include <list>
+#include <algorithm>
+#include <boost/assert.hpp>
+#include <boost/icl_xt/std/pair.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+#include <boost/icl/predicates.hpp>
+
+
+namespace boost{namespace icl
+{
+ //JODO 1_0_1 documentation
+ /// an stl based list implementing inplace addition operators +=
+ /**
+
+ @author Joachim Faulhaber
+ */
+ template <typename DataT, ICL_ALLOC Alloc = std::allocator>
+ class list: private std::list<DataT, Alloc<DataT> >
+ {
+ public:
+ typedef DataT value_type;
+ typedef Alloc<DataT> allocator_type;
+
+ private:
+ typedef typename icl::list<DataT, Alloc> type;
+ typedef typename std::list<DataT, allocator_type> base_type;
+
+ public:
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::difference_type difference_type;
+ typedef typename base_type::reverse_iterator reverse_iterator;
+ typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+
+ public:
+ list(){}
+ list(size_type size): base_type(size){}
+ list(size_type size, const DataT value): base_type(size, value){}
+
+ template <class InputIterator>
+ list(InputIterator f, InputIterator l): base_type(f,l) {}
+
+ list(const list& src): base_type::list(src){}
+
+ list& operator=(const list& src) { base_type::operator=(src); return *this; }
+ void swap(list& src) { base_type::swap(src); }
+
+ using base_type::begin;
+ using base_type::end;
+ using base_type::rbegin;
+ using base_type::rend;
+
+ using base_type::size;
+ using base_type::max_size;
+ using base_type::empty;
+
+ using base_type::front;
+ using base_type::back;
+ using base_type::push_front;
+ using base_type::push_back;
+ using base_type::pop_front;
+ using base_type::pop_back;
+
+ using base_type::insert;
+ using base_type::erase;
+ using base_type::clear;
+
+ using base_type::resize;
+ using base_type::splice;
+
+ using base_type::remove;
+ using base_type::unique;
+ using base_type::merge;
+ using base_type::sort;
+
+ public:
+ // --------------------------------------------------------------------
+ // itl specific extensions
+ // --------------------------------------------------------------------
+
+ /** Find the element \c x and return a \c const_iterator to that element,
+ if it exists. If \c is not found in the list return <tt>const_iterator
+ end()</tt> */
+ const_iterator find(const DataT& x)const { return std::find(begin(), end(), x); }
+
+ /** Find the element \c x and return a \c iterator to that element,
+ if it exists. If \c is not found in the list return <tt>iterator
+ end()</tt> */
+ iterator find(const DataT& x) { return std::find(begin(), end(), x); }
+
+ /// Checks if the element \c x is in the list
+ bool contains(const DataT& x)const { return !(find(x) == end()); }
+
+ /** <tt>this->contained_in(super)</tt>, if \c *this is a list that is contained as
+ sublist in the list \c super */
+ bool contained_in(const list& super)const { return is_subsequence(super); }
+
+ size_t iterative_size()const{ return size(); }
+
+ //JODO concept InplaceAddable
+ /// Add a list \c tail to this list.
+ list& operator += (const list& tail)
+ {
+ list rear(tail);
+ splice(end(), rear);
+ return *this;
+ }
+
+ /** yields true if any of the elements in \c *this has the property \c prop */
+ bool any(const property<DataT>& prop)const;
+
+ //JODO concept StringRepresentable
+ /** Represent this list as a string */
+ std::string as_string(const char* sep = " ")const;
+
+ /** Function add is mainly a convenience function allowing for a compact
+ denotation of lists like in:
+ <code>
+ list<std::string> note;
+ note.add("A").add("compact").add("denotation").add("for").add("lists");
+ </code>
+ */
+ list& add(const DataT& val) { push_back(val); return *this; }
+
+
+ // --------------------------------------------------------------------
+ //JODO: sequence specific algorithms should be moved to a file seq_algo
+ // just as this has been done for sets. seq_algos can then be applied
+ // to other containers, that share sequence properties, like e.g. vectors
+
+ /** Check, if every element of the list occurs only once */
+ bool is_unique()const;
+
+ /** Insert sequence \c seq as a \e consequent subsequence into \c *this.
+
+ Whereby \c sub is a <em>consequent subsequence</em> of \c super, if
+ \c sub is contained as a (possibly non contingent) subsequence of
+ \c super without permuting elements:
+
+ <code>
+ super: my big new ball is light and blue
+ sub1 : my new ball is blue
+ sub2 : my big ball is light
+ nosub: my ball is big // NO consequent subsequence
+ </code>
+ */
+ void interlace(const list& seq);
+
+
+ /** \c *this is supersequence of \c subSeq, if \c subSeq is
+ contained in \c *this without permutations of elements. */
+ bool is_supersequence(const list& subSeq)const;
+
+ /** \c *this is subsequence of \c superSeq, if \c *this is
+ contained in \c superSeq without permutations of elements. */
+ bool is_subsequence(const list& superSeq)const
+ { return superSeq.is_supersequence(*this); }
+
+ /** \c *this is consequent to \c seq, if there are no elements in \c *this that
+ occur in different order in \c seq */
+ bool is_consequent(const list& seq)const;
+
+ /** \c perm is a permutation of \c seq that is consequent to \c *this */
+ void consequent_permutation(list& perm, list& seq);
+
+ iterator first_common_element(iterator& beg1_, iterator& end1_,
+ iterator& beg2_, iterator& end2_)const;
+
+ private:
+ void interlace(list& seq, typename list::iterator& inPos);
+ bool is_supersequence(list& seq, typename list::const_iterator& pos)const;
+ bool is_consequent(list& seq, typename list::const_iterator& pos)const;
+ void consequent_permutation(list& perm, iterator& perm_, list& seq, iterator& seq_);
+
+ };
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ inline bool operator == (const icl::list<DataT,Alloc>& lhs,
+ const icl::list<DataT,Alloc>& rhs)
+ {
+ typedef std::list<DataT,Alloc<DataT> > base_type;
+ return operator==((const base_type&)lhs, (const base_type&)rhs);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ inline bool operator < (const icl::list<DataT,Alloc>& lhs,
+ const icl::list<DataT,Alloc>& rhs)
+ {
+ typedef std::list<DataT,Alloc<DataT> > base_type;
+ return operator<((const base_type&)lhs, (const base_type&)rhs);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ inline bool operator <= (const icl::list<DataT,Alloc>& lhs,
+ const icl::list<DataT,Alloc>& rhs)
+ {
+ typedef std::list<DataT,Alloc<DataT> > base_type;
+ return operator<=((const base_type&)lhs, (const base_type&)rhs);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::is_unique()const
+ {
+ //JODO implement via std-algorithm of directly
+ list self = *this;
+ self.unique();
+ return (*this) == self;
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::is_supersequence(const list& subSeq)const
+ {
+ list sub = subSeq;
+ typename list::const_iterator pos = begin();
+ return is_supersequence(sub, pos);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::is_supersequence(list& subtee, const_iterator& pos)const
+ {
+ if(subtee.empty())
+ return true;
+ else
+ {
+ DataT fst = *subtee.begin();
+ const_iterator val_ = std::find(pos, end(), fst);
+ if(val_==end())
+ return false;
+ else
+ {
+ subtee.pop_front();
+ return is_supersequence(subtee, ++val_);
+ }
+ }
+ }
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::is_consequent(const list& conSeq)const
+ {
+ list seq = conSeq;
+ typename list::const_iterator pos = begin();
+ return is_consequent(seq, pos);
+ }
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::is_consequent(list& seq, const_iterator& pos)const
+ {
+ if(seq.empty())
+ return true;
+ else
+ {
+ DataT fst = *seq.begin();
+ const_iterator val_ = std::find(begin(), pos, fst);
+ if(val_==end())
+ {
+ seq.pop_front();
+ return this->is_consequent(seq, ++val_);
+ }
+ else
+ return false;
+
+ }
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ void list<DataT,Alloc>::consequent_permutation(list& perm, list& seq)
+ {
+ perm.clear();
+ iterator this_ = begin();
+ iterator seq_ = seq.begin();
+ consequent_permutation(perm, this_, seq, seq_);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ void list<DataT,Alloc>::consequent_permutation(list& perm, iterator& this_, list& seq, iterator& seq_)
+ {
+ if(seq_ == seq.end())
+ return;
+ else
+ {
+ DataT cand = *seq_;
+ iterator cur_ = std::find(begin(), this_, cand);
+ if(cur_ == this_)
+ {
+ // Next cand is not found in 'front' of *this. Oh happy day.
+ // No element swapping is necessary. We can collect 'cand'
+ perm.push_back(cand); seq_++;
+
+ // See if 'cand' is found in rear
+ cur_ = std::find(this_, end(), cand);
+
+ if(cur_ == end())
+ consequent_permutation(perm, this_, seq, seq_);
+ else
+ {
+ this_ = cur_;
+ consequent_permutation(perm, this_, seq, seq_);
+ }
+ }
+ else
+ {
+ iterator fromThis_ = cur_; fromThis_++;
+ iterator perm_ = first_common_element(fromThis_, end(), perm.begin(), perm.end());
+ if(perm_ == perm.end())
+ perm.push_front(cand);
+ else
+ perm.insert(perm_, cand);
+ seq_++;
+ consequent_permutation(perm, this_, seq, seq_);
+ }
+ }
+ }
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ typename list<DataT,Alloc>::iterator list<DataT,Alloc>::first_common_element
+ (iterator& beg1_, iterator& end1_, iterator& beg2_, iterator& end2_)const
+ {
+ iterator it1_, it2_ = beg2_;
+ for(it1_=beg1_; it1_ != end1_; it1_++)
+ for(it2_=beg2_; it2_ != end2_; it2_++)
+ if(*it1_ == *it2_)
+ return it2_;
+
+ return it2_;
+ }
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ void list<DataT,Alloc>::interlace(const list& inList)
+ {
+ BOOST_ASSERT(is_unique());
+ BOOST_ASSERT(inList.is_unique());
+ list seq = inList;
+ iterator inPos = begin();
+ interlace(seq, inPos);
+ }
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ void list<DataT,Alloc>::interlace(list& seq, iterator& inPos)
+ {
+ if(seq.empty())
+ return;
+ else
+ {
+ const DataT& cand = *seq.begin();
+ iterator cur_ = std::find(inPos, end(), cand);
+
+ if(cur_ == end())
+ {
+ // cand war nirgends in *this Liste
+ insert(inPos, cand);
+ seq.pop_front();
+ interlace(seq, inPos);
+ }
+ else
+ {
+ // cand ist schon in rear also auch in master. Die Einfuegeposition
+ // wird hinter das eingefuegte Element cand hochgezogen. Dabei ueberspringen
+ // wir allerdings Elemente, die spaeter in front gesucht werden muessen
+ seq.pop_front();
+ interlace(seq, ++cur_);
+ }
+ }
+ }
+
+
+ // THINK: here codereplication occurs at the next level of abstraction (cf. SetT)
+ template <typename DataT, ICL_ALLOC Alloc>
+ bool list<DataT,Alloc>::any(const property<DataT>& pred)const
+ {
+ const_iterator it = begin();
+ while(it != end() && ! pred(*it)) ++it;
+ if(it==end()) return false; else return true;
+ }
+
+
+ template <typename DataT, ICL_ALLOC Alloc>
+ std::string list<DataT,Alloc>::as_string(const char* sep /* =" " */)const
+ {
+ const_iterator it=begin();
+ if(it == end()) return std::string("");
+ else
+ {
+ std::string y = "{"+to_string<DataT>::apply(*it);
+ it++;
+ while(it != end())
+ {
+ y+=sep;
+ y += to_string<DataT>::apply(*it);
+ it++;
+ }
+ y += "}";
+ return y;
+ }
+ }
+
+//==============================================================================
+//= Streaming
+//==============================================================================
+template<class CharType, class CharTraits,
+ class DataT, ICL_ALLOC Alloc>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream,
+ const icl::list<DataT,Alloc>& object)
+{
+ typedef icl::list<DataT,Alloc> ObjectT;
+ stream << "[";
+ typename ObjectT::const_iterator it = object.begin();
+ if(it != object.end())
+ stream << *it++;
+ while(it != object.end())
+ stream << " " << *it++;
+ return stream << "]";
+}
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class Type>
+struct type_to_string<icl::list<Type> >
+{
+ static std::string apply()
+ { return "list<"+ type_to_string<Type>::apply() +">"; }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_LIST_HPP_JOFA_070519
+

Added: sandbox/icl/boost/icl_xt/map_segment_gentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/map_segment_gentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,76 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_MAP_SEGMENT_GENTOR_HPP_JOFA_091004
+#define BOOST_ICL_XT_MAP_SEGMENT_GENTOR_HPP_JOFA_091004
+
+
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/itvgentor.hpp>
+#include <boost/icl_xt/seqgentor.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class DomainT, class CodomainT, class IntervalT = icl::interval<DomainT>::type >
+class map_segment_gentor: public RandomGentorAT<std::pair<IntervalT, CodomainT> >
+{
+public:
+ typedef DomainT domain_type;
+ typedef CodomainT codomain_type;
+ typedef IntervalT interval_type;
+ typedef typename icl::interval<domain_type>::type range_type;
+ typedef typename icl::interval<codomain_type>::type co_range_type;
+ //typedef typename icl::interval<codomain_type>::type co_range_type;
+ typedef std::pair<IntervalT, CodomainT> segment_type;
+
+public:
+ map_segment_gentor(): _codomain_gentor(NULL){}
+ ~map_segment_gentor(){ delete _codomain_gentor; }
+
+ virtual void some(segment_type& x);
+
+ void set_range(const range_type& range)
+ { _interval_gentor.setRange(range); }
+
+ void set_corange(const co_range_type& range)
+ { _covalue_range = range; }
+
+ void setMaxIntervalLength(domain_type max_itv_length)
+ { _interval_gentor.setMaxIntervalLength(max_itv_length); }
+
+ void setCodomainGentor(RandomGentorAT<codomain_type>* gentor)
+ {
+ delete _codomain_gentor;
+ _codomain_gentor = gentor;
+ }
+
+private:
+ ItvGentorT<domain_type,IntervalT> _interval_gentor;
+ RandomGentorAT<codomain_type>* _codomain_gentor;
+ co_range_type _covalue_range;
+};
+
+
+template <class DomainT, class CodomainT, class IntervalT>
+void map_segment_gentor<DomainT,CodomainT,IntervalT>::some(segment_type& value)
+{
+ interval_type inter_val;
+ codomain_type co_val;
+ _interval_gentor.some(inter_val);
+ _codomain_gentor->some(co_val);
+ value = segment_type(inter_val, co_val);
+};
+
+}} // BOOST_ICL_XT_MAP_SEGMENT_GENTOR_HPP_JOFA_091004
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/mapgentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/mapgentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,135 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_XT_MAPGENTOR_HPP_JOFA_000724
+#define BOOST_ICL_XT_MAPGENTOR_HPP_JOFA_000724
+
+#include <boost/icl_xt/list.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class MapTV>
+class MapGentorT: public RandomGentorAT<MapTV>
+{
+public:
+ typedef typename MapTV::value_type ValueTypeTD;
+ typedef typename MapTV::key_type DomainTD;
+ typedef typename MapTV::data_type CodomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+ typedef typename icl::interval<int>::type sample_range_type;
+
+ MapGentorT(): p_domainGentor(NULL), p_codomainGentor(NULL) {}
+ ~MapGentorT() { delete p_domainGentor; delete p_codomainGentor; }
+
+ virtual void some(MapTV& x);
+ void last(MapTV& x)const;
+ void last_permuted(MapTV& x)const;
+
+ void setDomainGentor(RandomGentorAT<DomainTD>* gentor)
+ {
+ delete p_domainGentor;
+ p_domainGentor = gentor;
+ }
+ void setCodomainGentor(RandomGentorAT<CodomainTD>* gentor)
+ {
+ delete p_codomainGentor;
+ p_codomainGentor = gentor;
+ }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_sampleSizeRange = icl::interval<int>::right_open(lwb,upb); }
+
+ void setRangeOfSampleSize(const icl::interval<int>::type& szRange)
+ {
+ BOOST_ASSERT(icl::bounds(szRange) == interval_bounds::right_open());
+ m_sampleSizeRange = szRange;
+ }
+
+private:
+ RandomGentorAT<DomainTD>* p_domainGentor;
+ RandomGentorAT<CodomainTD>* p_codomainGentor;
+ sample_range_type m_sampleSizeRange;
+ SampleTypeTD m_sample;
+ int m_sampleSize;
+};
+
+
+template <class MapTV>
+void MapGentorT<MapTV>::some(MapTV& x)
+{
+ NumberGentorT<int> intGentor;
+ icl::clear(x);
+ m_sample.clear();
+ m_sampleSize = intGentor(m_sampleSizeRange);
+
+ for(int i=0; i<m_sampleSize; i++)
+ {
+ DomainTD key;
+ p_domainGentor->some(key);
+ CodomainTD val;
+ p_codomainGentor->some(val);
+ x += ValueTypeTD(key,val);
+ m_sample.push_back(ValueTypeTD(key,val));
+ }
+}
+
+
+template <class MapTV>
+void MapGentorT<MapTV>::last(MapTV& x)const
+{
+ x.clear();
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ x += *it;
+}
+
+template <class MapTV>
+void MapGentorT<MapTV>::last_permuted(MapTV& x)const
+{
+ x.clear();
+
+ SampleTypeTD perm;
+
+ NumberGentorT<int> intGentor;
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor(2) ) perm.push_back(*it);
+ else perm.push_front(*it);
+ }
+
+ ICL_const_FORALL(typename SampleTypeTD, pit, perm)
+ x += *pit;
+}
+
+
+/*
+template <class MapTV>
+void MapGentorT<MapTV>::lastSample(SampleTypeTD& sam)const
+{ sam = m_sample; }
+
+
+template <class MapTV>
+void MapGentorT<MapTV>::lastSample_permuted(SampleTypeTD& sam)
+{
+ NumberGentorT<unsigned> intGentor;
+ x.clear();
+ int coin = intGentor.some(2); // gives 0 or 1
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor.some(2) ) sam.push_back(*it);
+ else sam.push_front(*it);
+ }
+}
+*/
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_MAPGENTOR_HPP_JOFA_000724
+
+

Added: sandbox/icl/boost/icl_xt/meta_log.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/meta_log.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,30 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_META_LOG_HPP_JOFA_091023
+#define BOOST_ICL_XT_META_LOG_HPP_JOFA_091023
+
+namespace boost{namespace icl
+{
+
+// A meta implementation of an the logarithm function on integrals
+template <size_t Argument, size_t Base=2>
+struct log_{ enum { value = 1 + log_<Argument/Base, Base>::value }; };
+
+template <size_t Base>struct log_<1, Base>{ enum { value = 0 }; };
+template <size_t Base>struct log_<0, Base>{ enum { value = 0 }; };
+
+template <size_t Argument>
+struct log2_{ enum { value = log_<Argument, 2>::value }; };
+
+template <size_t Argument>
+struct power2_{ enum { value = 1 << Argument }; };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_META_LOG_HPP_JOFA_091023

Added: sandbox/icl/boost/icl_xt/numbergentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/numbergentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,262 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 __NUMBERGENTORT_H_JOFA_000725__
+#define __NUMBERGENTORT_H_JOFA_000725__
+
+#if defined(_MSC_VER)
+#pragma warning( disable : 4244 ) //warning C4244: 'argument' : conversion from 'T1' to 'T2', possible loss of data
+#endif
+
+#include <stdlib.h>
+#include <vector>
+#include <boost/validate/type/nat.hpp>
+#include <boost/icl/type_traits/unit_element.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+
+using namespace boost::icl;
+
+#define RND_1_TO(y) (1+(int)((double)(y)*rand()/(RAND_MAX+1.0)))
+#define RND_0_TO(y) ((int)((double)((y)+1)*rand()/(RAND_MAX+1.0)))
+#define RND_WITHIN(x,y) ((x)+(int)((double)((y)-(x)+1)*rand()/(RAND_MAX+1.0)))
+
+// -----------------------------------------------------------
+
+#define RND_O_TO_EXCL(y) (((double)(y))*rand()/(RAND_MAX+1.0))
+
+#define RND_WITHIN_EXUPB(x,y) ((x)+((double)((y)-(x))*rand()/(RAND_MAX+1.0)))
+
+namespace boost{namespace icl
+{
+
+template <class NumTV>
+inline NumTV rnd_0_to_excl(NumTV exclusive_upb)
+{ return (NumTV)RND_O_TO_EXCL(exclusive_upb); }
+
+
+template <class NumTV>
+inline NumTV rnd_within_exUpb(NumTV lwb, NumTV exclusive_upb)
+{
+ return static_cast<NumTV>(RND_WITHIN_EXUPB(lwb,exclusive_upb));
+}
+
+template <class NumTV>
+inline NumTV rnd_within(NumTV lwb, NumTV upb)
+{
+ NumTV some = (NumTV)RND_WITHIN(lwb,upb);
+ return some;
+}
+
+template <class NumT>
+class NumberGentorProfile : public RandomGentorProfile<NumT>
+{
+public:
+ typedef typename icl::interval<NumT>::type range_type;
+private:
+ range_type _range;
+};
+
+template <class NumTV>
+class NumberGentorT : public RandomGentorAT<NumTV>
+{
+public:
+ typedef typename icl::interval<NumTV>::type range_type;
+public:
+ NumberGentorT():
+ m_valueRange( NumTV(), unit_element<NumTV>::value() ) {}
+
+ NumTV operator() (NumTV upb) { return rnd_0_to_excl<NumTV>(upb); }
+ NumTV operator() (NumTV lwb, NumTV upb) { return rnd_within_exUpb<NumTV>(lwb,upb); }
+ NumTV operator() (range_type rng)
+ {
+ BOOST_ASSERT( icl::bounds(rng) == interval_bounds::right_open()
+ || icl::bounds(rng) == interval_bounds::closed());
+ if(icl::bounds(rng) == interval_bounds::right_open())
+ return rnd_within_exUpb<NumTV>(rng.lower(), rng.upper());
+ else
+ return rnd_within<NumTV>(rng.lower(), rng.upper());
+ }
+
+ void setRange(range_type rng) { m_valueRange = rng; }
+ void setRange(NumTV lwb, NumTV upb) { m_valueRange = icl::interval<NumTV>::right_open(lwb,upb); }
+
+ void calibrate(const RandomGentorProfile<NumTV>& profile)
+ {
+ m_valueRange = profile.getValueRange();
+ }
+
+ void some(NumTV& x) { x = (*this)(m_valueRange); }
+
+ std::string as_string()const { return "NumberGentorT";}
+
+private:
+ range_type m_valueRange;
+};
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+template <typename WeightsT>
+class WeightedNumberGentor : public RandomGentorAT<int>
+{
+public:
+ WeightedNumberGentor(): _size(0), _maxWeights(0){}
+
+ WeightedNumberGentor(int size, WeightsT maxWeights):
+ _size(size), _maxWeights(maxWeights),
+ _weights(size, WeightsT()), _kumWeights(size+1, WeightsT()),
+ _typeNames(size, std::string())
+ {}
+
+ WeightedNumberGentor(int size):
+ _size(size), _maxWeights(1000),
+ _weights(size, WeightsT()), _kumWeights(size+1, WeightsT()),
+ _typeNames(size, std::string())
+ {}
+
+ void setSize(int size);
+ int size()const { return _size; }
+
+ void setMaxWeights(int maxWeights) { _maxWeights = maxWeights; }
+ WeightsT maxWeights()const { return _maxWeights; }
+ WeightsT chosenValue()const { return _chosenValue; }
+
+ void setTypeNames(const std::vector<std::string>& names)
+ { _typeNames = names ; }
+
+ void setTypeNames(const char* denotation[])
+ {
+ for(int idx=0; idx < size(); idx++)
+ _typeNames[idx] = std::string(denotation[idx]);
+ }
+
+ WeightsT& operator[](int idx)
+ { BOOST_ASSERT(0<=idx && idx<_size); return _weights[idx]; }
+
+ void setWeight(int idx, WeightsT val) { BOOST_ASSERT(0<=idx && idx<_size); _weights[idx] = val; }
+
+ WeightsT getKumWeight(int idx)const { return _kumWeights[idx]; }
+
+ WeightsT sumOfWeights()const;
+
+ void init();
+
+ int some();
+ void some(int& index){ index = some(); }
+
+ int lower_bound_index(int low, int up, WeightsT val);
+
+ bool isRangeValid()const
+ { return _kumWeights[_chosenIndex] <= _chosenValue && _chosenValue < _kumWeights[_chosenIndex+1]; }
+
+ std::string asString()const;
+
+ bool is_consistent()const { return sumOfWeights() == _maxWeights; }
+
+ std::string inconsitencyMessage(const std::string& location)const;
+
+private:
+ int _size;
+ WeightsT _maxWeights;
+ std::vector<WeightsT> _weights;
+ std::vector<WeightsT> _kumWeights;
+ NumberGentorT<int> _numgentor;
+ WeightsT _chosenValue;
+ int _chosenIndex;
+ std::vector<std::string> _typeNames;
+};
+
+
+template <typename WeightsT>
+void WeightedNumberGentor<WeightsT>::setSize(int size)
+{
+ _size = size;
+ _weights.resize(_size, WeightsT());
+ _kumWeights.resize(_size+1, WeightsT());
+}
+
+
+template <typename WeightsT>
+void WeightedNumberGentor<WeightsT>::init()
+{
+ _kumWeights[0] = WeightsT();
+ for(int idx=1; idx < _size; idx++)
+ _kumWeights[idx] = static_cast<WeightsT>((std::min)(_kumWeights[idx-1]+_weights[idx-1], _maxWeights));
+
+ _kumWeights[_size] = _maxWeights;
+}
+
+template <typename WeightsT>
+WeightsT WeightedNumberGentor<WeightsT>::sumOfWeights()const
+{
+ WeightsT weightSum = WeightsT();
+ for(int idx=0; idx < _size; idx++)
+ weightSum += _weights[idx];
+
+ return weightSum;
+}
+
+template <typename WeightsT>
+int WeightedNumberGentor<WeightsT>::some()
+{
+ _chosenValue = _numgentor(_maxWeights);
+ _chosenIndex = lower_bound_index(0, _size, _chosenValue);
+ return _chosenIndex;
+}
+
+template <typename WeightsT>
+int WeightedNumberGentor<WeightsT>::lower_bound_index(int low, int up, WeightsT val)
+{
+ int mid = (low+up)/2;
+ if(_kumWeights[mid] <= val && val < _kumWeights[mid+1])
+ return mid;
+ else if(val < _kumWeights[mid])
+ return lower_bound_index(low, mid, val);
+ else
+ return lower_bound_index(mid+1, up, val);
+}
+
+
+template <typename WeightsT>
+std::string WeightedNumberGentor<WeightsT>::asString()const
+{
+ std::string result;
+ for(int idx=0; idx < size(); idx++)
+ {
+ result += to_string<int>::apply(idx);
+ result += ":";
+ result += _typeNames[idx];
+ result += "(";
+ result += to_string<int>::apply(_weights[idx]);
+ result += ")\n";
+ }
+ return result;
+}
+
+template <typename WeightsT>
+std::string WeightedNumberGentor<WeightsT>::inconsitencyMessage(const std::string& location)const
+{
+ std::string message;
+ message += "Inconsistent typechoice in ";
+ message += location + ":\n";
+ message += "The sum of weights must be ";
+ message += to_string<int>::apply(maxWeights());
+ message += " but is ";
+ message += to_string<int>::apply(sumOfWeights());
+ message += "\n";
+ message += "The weights defined are:\n";
+ message += asString();
+ return message;
+}
+
+}} // namespace icl boost
+
+#endif // __NUMBERGENTORT_H_JOFA_000725__
+
+
+
+

Added: sandbox/icl/boost/icl_xt/ordered_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/ordered_type.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,147 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __ordered_type_h_JOFA_011005_H__
+#define __ordered_type_h_JOFA_011005_H__
+
+#include <string>
+
+namespace boost{namespace icl
+{
+
+/// an enumeration ordered class type
+/**
+ class template <b>ordered_type</b> defines objects
+ that can be ordered by an enumeration type that
+ is associated to the template parameter TypeDomain.
+ Every object of this class exposes a value of
+ that enumeration type by a function <b>type()</b>
+
+ @author Joachim Faulhaber
+*/
+template <class TypeDomain>
+class ordered_type
+{
+public:
+ typedef ordered_type* OrderedTypePIT;
+
+public:
+ /// virtual destructors to avoid memory leaks
+ virtual ~ordered_type(){}
+ /// the objects type
+ virtual typename TypeDomain::DomainET type()const=0;
+
+ /// the objects value
+ virtual const typename TypeDomain::ValueBaseTD* value()const=0;
+
+ /// Comparison on type level
+ virtual bool isLessOnType(const ordered_type* x2)const=0;
+ /// Equivalece relation <tt>this->type()==x2->type()</tt>
+ virtual bool isTypeEquivalent(const ordered_type* x2)const=0;
+
+ /// comparisons on value level
+ virtual bool isEqual(const ordered_type* x2)const=0;
+
+ virtual bool isLess(const ordered_type* x2)const=0;
+
+ /// equality on value-level using == operator
+ virtual bool operator == (const ordered_type& x2)const=0;
+
+ //JODO Aufrufmechnismus für stl::container operator ==.verstehen
+ //virtual bool operator == (const OrderedTypePIT& x2)const=0;
+
+ //KEEP JODO einpflegen
+ // virtual bool isLess(const ordered_type* x2)const=0;
+ // virtual bool operator < (const ordered_type& x2)const=0;
+
+ /// string representation
+ virtual std::string as_string()const=0 ;
+};
+
+
+template <class TypeDomain>
+class ordered_type_base : public ordered_type<TypeDomain>
+{
+public:
+ typedef ordered_type<TypeDomain>* OrderedTypeOfDomPIT;
+
+public:
+ virtual bool isLessOnType (const ordered_type<TypeDomain>* x2)const
+ { return this->type() < x2->type(); }
+ virtual bool isTypeEquivalent (const ordered_type<TypeDomain>* x2)const
+ { return this->type() == x2->type(); }
+
+ // comparisons on value level
+ bool isEqual(const ordered_type<TypeDomain>* x2)const
+ {
+ return isTypeEquivalent(x2) && isValueEqual(x2);
+ }
+
+ bool operator == (const ordered_type<TypeDomain>& x2)const
+ {
+ return isEqual(&x2);
+ }
+
+ bool isLess(const ordered_type<TypeDomain>* x2)const
+ {
+ return this < x2;
+ }
+
+ /*JODO Aufrufmechnismus für stl::container operator ==.verstehen
+ bool operator == (const OrderedTypeOfDomPIT& x2)const
+ {
+ return isEqual(x2);
+ }
+ */
+
+ /*KEEP JODO Einfplegen
+ bool isLess(const ordered_type<TypeDomain>* x2)const
+ {
+ return isLessOnType(x2) && isValueLess(x2);
+ }
+
+ bool operator < (const ordered_type<TypeDomain>& x2)const
+ {
+ return isLess(&x2);
+ }
+ */
+
+protected:
+ /// Gleichheit der Werte
+ virtual bool isValueEqual(const ordered_type<TypeDomain>* x2)const=0;
+
+ //KEEP JODO Einfplegen
+ //virtual bool isValueLess(const ordered_type<TypeDomain>* x2)const=0;
+};
+
+}} // namespace icl boost
+
+#endif // __ordered_type_h_JOFA_011005_H__
+
+

Added: sandbox/icl/boost/icl_xt/prefix_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/prefix_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,80 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#include <stdafx.h>
+#include "prefix_set.h"
+
+using namespace boost::icl;
+
+
+int prefix_set::compareStrings(int& comSize, const char* s1, const char* s2)
+{
+ int i=0;
+ while(s1[i] != NULL && s2[i] != NULL)
+ {
+ if(s1[i] < s2[i])
+ {
+ comSize = i;
+ return -1;
+ }
+ if(s1[i] > s2[i])
+ {
+ comSize = i;
+ return 1;
+ }
+
+ // Gleichheit: weitermachen
+ i++;
+ }
+
+ comSize = i;
+ if(s1[i] == NULL || s2[i] == NULL)
+ return 0; // Gleichheit
+ if (s1[i] != NULL)
+ return 1; // s1 ist größer
+ else
+ return -1; // s2 ist größer
+
+}
+
+
+void prefix_set::insert(const std::string& val)
+{
+ pair<iterator, bool> insertion = m_.insert(val);
+ if(!insertion.second)
+ {
+ if(val.size() < (*insertion.first).size())
+ {
+ m_.erase(insertion.first);
+ insert(val);
+ }
+ }
+}
+
+

Added: sandbox/icl/boost/icl_xt/prefix_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/prefix_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,114 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_PREFIX_SET_HPP_JOFA_040902
+#define BOOST_ICL_PREFIX_SET_HPP_JOFA_040902
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/string_set.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename StringT>
+ struct PrefixLess : public binary_function<StringT, StringT, bool>
+ {
+ // Wenn einer von lhs & rhs ein echter Prefix des anderen ist, ist er kleiner.
+ // Ansonsten lexikografischer Vergleich
+ bool operator() (const StringT& lhs, const StringT& rhs)const;
+ };
+
+ /// represents a set of strings by means of prefixes
+ /** Ein prefix_set repraesentiert eine Menge von Strings mit Hilfe von
+ Prefixen.
+
+ Zum Beispiel repraesentiert das
+ prefix_set {Ha} die Menge {Hans, Hallo, Harald, ...} also alle Strings,
+ die mit 'Ha' beginnen.
+
+ Entsprechend
+ {Har, Hal}.contains(Haribo) == true
+ {Har, Hal}.contains(Hallenbad) == true
+ {Har, Hal}.contains(Hugo) == false
+
+ Einfuegen eines gemeinsamen Praefix, einer PraefixSetT verkleinert es:
+ {Har, Hal}.insert(Ha) == {Ha}
+
+ PrefixSetTs sind sehr praktisch fuer die Behandlung unserer Gruppierungen
+ von Kategoriestrings aus den Cfg-Files, die ja mittels Prefix-Listen
+ ausgedrueckt werden.
+
+ Hierfuer gibt es noch die Klasse StringPatternSetT, die die ensprechenden
+ prefix_set m_Includes;
+ prefix_set m_Excludes;
+ enthaelt.
+ */
+ class prefix_set
+ {
+ public:
+ typedef string_set<PrefixLess> PrefixSetTD;
+ typedef PrefixSetTD::iterator iterator;
+ typedef PrefixSetTD::const_iterator const_iterator;
+
+ public:
+ static int compareStrings(int& comSize, const char* s1, const char* s2);
+
+ public:
+ void insert(const std::string& val);
+
+ const_iterator find(const std::string& val)const { return m_.find(val); }
+ bool contains(const std::string& val)const { return m_.find(val)!=m_.end(); }
+
+ std::string as_string()const { return m_.as_string(); }
+
+ private:
+ string_set<PrefixLess> m_;
+ };
+
+
+
+ template <typename StringT>
+ bool PrefixLess<StringT>::operator() (const StringT& lhs, const StringT& rhs)const
+ {
+ int commonPrefixLength;
+ int compareResult
+ = prefix_set::compareStrings(commonPrefixLength, lhs.c_str(), rhs.c_str());
+
+ if(compareResult == 0) // Gleichheit
+ return false;
+ if(commonPrefixLength == lhs.size())
+ return true; // lhs istEchterPrefix rhs
+ // OTHERWISE
+ return compareResult == -1;
+ }
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_PREFIX_SET_HPP_JOFA_040902
+

Added: sandbox/icl/boost/icl_xt/product_history.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/product_history.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,81 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 __product_history_h_JOFA_011005_H__
+#define __product_history_h_JOFA_011005_H__
+
+
+#include <boost/icl/interval_map.hpp>
+
+namespace boost{namespace icl
+{
+
+/// Adds episodes of different types into a single history of episode_products
+/**
+ A class to merge episodes of different types into a common history object.
+
+ Template parameter ItvDomTV contains the domain_type of the history. This
+ will be an integer or a time type in most cases.
+
+ Template parameter TypeDomTV denotes the kinds of episodes that can be
+ used for the given product_history. TypeDomTV encapsulated an enumeration
+ that denotes the different kinds of episodes.
+
+ Every element of a product history is an interval value pairs whose
+ associated value is a tuple of product of episodes, which is called
+ episode_product. The intervals are giving the time periods where all
+ episodes are contstant.
+
+ On insertion of a new episode, intervals are split at those points in
+ time where the new epiosode causes inequalities in the associated
+ episodes.
+
+ @author Joachim Faulhaber
+*/
+template <class ItvDomTV, class TypeDomTV>
+class product_history : public interval_map<ItvDomTV, episode_product<ItvDomTV,TypeDomTV> >
+{
+public:
+ typedef episode_product<ItvDomTV,TypeDomTV> EpisodeProductTD;
+ typedef interval_map<ItvDomTV, EpisodeProductTD> BaseTypeTD;
+ typedef typename BaseTypeTD::value_type value_type;
+ typedef typename BaseTypeTD::interval_type IntervalTD;
+ typedef typename BaseTypeTD::domain_type DomainTD;
+
+ typedef typename BaseTypeTD::data_type data_type;
+ typedef typename EpisodeProductTD::EpisodePTD EpisodePTD;
+
+public:
+
+ void add(EpisodePTD epi)
+ {
+ EpisodeProductTD epiRec;
+ epiRec.insert(epi);
+ BaseTypeTD::add(value_type(epi->interval(), epiRec));
+ }
+
+ product_history& operator +=(EpisodePTD epi)
+ {
+ add(epi);
+ return *this;
+ }
+
+
+protected:
+
+ void add(const value_type& val)
+ {
+ BaseTypeTD::add(val);
+ }
+};
+
+}} // namespace icl boost
+
+#endif // __product_history_h_JOFA_011005_H__
+
+

Added: sandbox/icl/boost/icl_xt/random.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/random.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,75 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __RANDOM_H_JOFA_990223__
+#define __RANDOM_H_JOFA_990223__
+
+
+#include <functional>
+#include <stdlib.h>
+#include <boost/assert.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl/interval.hpp>
+
+namespace boost{namespace icl
+{
+
+class random
+{
+public:
+ //JODO subtractive_rng random generator is only an sgi extension of std-lib
+ //unsigned rnd(unsigned upb) { return m_random(upb); };
+
+ unsigned rnd(unsigned upb)
+ {
+ return static_cast<int>(upb * (::rand() / static_cast<double>(RAND_MAX)));
+ //JODO return m_random(upb);
+ };
+
+
+ unsigned rnd(unsigned lwb, unsigned upb)
+ {
+ BOOST_ASSERT(0<=lwb && lwb <= upb);
+ unsigned len = upb - lwb ;
+ unsigned some = rnd(len);
+ return some + lwb;
+ }
+
+ unsigned rnd(const icl::interval<unsigned>::type& rng)
+ {
+ BOOST_ASSERT(icl::bounds(rng) == interval_bounds::right_open());
+ return rnd(rng.lower(),rng.upper());
+ }
+
+private:
+ //JODO subtractive_rng m_random;
+};
+
+}} // namespace icl boost
+
+#endif
+

Added: sandbox/icl/boost/icl_xt/randomnumber.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/randomnumber.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,58 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __RANDOMNUMBER_H_JOFA_990223__
+#define __RANDOMNUMBER_H_JOFA_990223__
+
+
+#include <functional>
+#include <boost/icl/random.hpp>
+namespace boost{namespace icl
+{
+
+ template <class NumTV>
+ class RandomNumberT
+ {
+ public:
+ // JODO later more sophisticated versions!
+ NumTV rnd(NumTV upb)
+ { return _random.rnd(upb);}
+
+ NumTV rnd(NumTV lwb, NumTV upb)
+ { return _random.rnd(lwb, upb);}
+
+ NumTV rnd(const IntervalT<NumTV>& rng)
+ { BOOST_ASSERT( rng.isROpen() ); return rnd(rng.lower(),rng.upper()); }
+
+ private:
+ random _random;
+ };
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/seqgentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/seqgentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,156 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class SeqGentorT
+ A random generator for Sequences.
+--------------------------------------------------------------------*/
+#ifndef __SeqGentorT_H_JOFA_000724__
+#define __SeqGentorT_H_JOFA_000724__
+
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/list.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class SeqTV>
+class SeqGentorT: public RandomGentorAT<SeqTV>
+{
+public:
+ typedef typename SeqTV::value_type ValueTypeTD;
+ typedef typename SeqTV::value_type DomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+ typedef typename icl::interval<int>::type sample_range_type;
+
+ SeqGentorT(): p_domainGentor(NULL), m_unique(false){}
+ ~SeqGentorT(){ delete p_domainGentor; }
+
+ virtual void some(SeqTV& x);
+ void last(SeqTV& x)const;
+ void last_permuted(SeqTV& x)const;
+
+ void setDomainGentor(RandomGentorAT<DomainTD>* gentor)
+ {
+ delete p_domainGentor;
+ p_domainGentor = gentor;
+ }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_sampleSizeRange = icl::interval<int>::right_open(lwb,upb); }
+ void setRangeOfSampleSize(const icl::interval<int>::type& szRange)
+ {
+ BOOST_ASSERT(icl::bounds(szRange) == interval_bounds::right_open());
+ m_sampleSizeRange = szRange;
+ }
+
+ void setUnique(bool truth) { m_unique = truth; }
+
+private:
+ RandomGentorAT<DomainTD>* p_domainGentor;
+ sample_range_type m_sampleSizeRange;
+ SampleTypeTD m_sample;
+ int m_sampleSize;
+ bool m_unique;
+};
+
+
+template <class SeqTV>
+void SeqGentorT<SeqTV>::some(SeqTV& x)
+{
+ NumberGentorT<int> intGentor;
+ x.clear();
+ m_sample.clear();
+ m_sampleSize = intGentor(m_sampleSizeRange);
+
+ for(int i=0; i<m_sampleSize; i++)
+ {
+ DomainTD key;
+ p_domainGentor->some(key);
+
+ if(m_unique)
+ {
+ typename SeqTV::iterator pos_ = std::find(x.begin(), x.end(), key);
+ if(pos_ == x.end())
+ x.push_back(key);
+ }
+ else x.push_back(key);
+
+ m_sample.push_back(key);
+ }
+}
+
+
+template <class SeqTV>
+void SeqGentorT<SeqTV>::last(SeqTV& x)const
+{
+ x.clear();
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample) x.insert(*it);
+}
+
+template <class SeqTV>
+void SeqGentorT<SeqTV>::last_permuted(SeqTV& x)const
+{
+ x.clear();
+
+ SampleTypeTD perm;
+
+ NumberGentorT<int> intGentor;
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor(2) ) perm.push_back(*it);
+ else perm.push_front(*it);
+ }
+
+ ICL_const_FORALL(typename SampleTypeTD, pit, perm) x.insert(*pit);
+}
+
+
+/*
+template <class SeqTV>
+void SeqGentorT<SeqTV>::lastSample(SampleTypeTD& sam)const
+{ sam = m_sample; }
+
+
+template <class SeqTV>
+void SeqGentorT<SeqTV>::lastSample_permuted(SampleTypeTD& sam)
+{
+ NumberGentorT<unsigned> intGentor;
+ x.clear();
+ int coin = intGentor.some(2); // gives 0 or 1
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor.some(2) ) sam.push_back(*it);
+ else sam.push_front(*it);
+ }
+}
+*/
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,223 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2010: 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 BOOST_ICL_XT_SET_HPP_JOFA_070519
+#define BOOST_ICL_XT_SET_HPP_JOFA_070519
+
+#include <boost/icl/impl_config.hpp>
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#include <boost/interprocess/containers/set.hpp>
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#include <boost/container/set.hpp>
+#else
+#include <set>
+#endif
+
+#include <string>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/detail/concept_check.hpp>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/detail/subset_comparer.hpp>
+#include <boost/icl/detail/set_algo.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/icl/concept/container.hpp>
+#include <boost/icl/concept/element_set.hpp>
+#include <boost/icl/concept/element_associator.hpp>
+#include <boost/icl/concept/comparable.hpp>
+
+
+namespace boost{namespace icl
+{
+
+/** \brief Addable, subtractable and intersectable sets. */
+template
+<
+ typename DomainT,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_ALLOC Alloc = std::allocator
+>
+class set: private ICL_IMPL_SPACE::set<DomainT, ICL_COMPARE_DOMAIN(Compare,DomainT), Alloc<DomainT> >
+{
+public:
+ typedef typename icl::set<DomainT, Compare, Alloc> type;
+ typedef typename ICL_IMPL_SPACE::set<DomainT, ICL_COMPARE_DOMAIN(Compare,DomainT), Alloc<DomainT> > base_type;
+ typedef type key_object_type;
+
+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;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
+ typedef domain_compare element_compare;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) key_compare;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) value_compare;
+ typedef Alloc<DomainT> allocator_type;
+
+public:
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::const_pointer const_pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::difference_type difference_type;
+ 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
+ //==========================================================================
+ set()
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ explicit set(const domain_compare& comp): base_type(comp){}
+
+ template <class InputIterator>
+ set(InputIterator first, InputIterator past)
+ : base_type(first,past){}
+
+ template <class InputIterator>
+ set(InputIterator first, InputIterator past, const key_compare& comp)
+ : base_type(first, past, comp){}
+
+ set(const set& src): base_type::set(src)
+ {
+ BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
+ }
+
+ 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); }
+
+ /** Copy the elements in set \c src to which property \c hasProperty applies
+ into \c *this set. */
+ template<class Predicate>
+ set& assign_if(const set& src, const Predicate&);
+
+ //==========================================================================
+ using base_type::empty;
+ using base_type::clear;
+
+ using base_type::begin;
+ using base_type::end;
+ using base_type::rbegin;
+ using base_type::rend;
+
+ using base_type::size;
+ using base_type::max_size;
+
+ using base_type::key_comp;
+ using base_type::value_comp;
+
+ using base_type::insert;
+ using base_type::erase;
+ using base_type::find;
+ using base_type::count;
+
+ using base_type::lower_bound;
+ using base_type::upper_bound;
+ using base_type::equal_range;
+
+public:
+ //==========================================================================
+ //= Containedness
+ //==========================================================================
+
+ /// Checks if the element \c value is in the set
+ bool contains(const element_type& value)const
+ { return icl::contains(*this, value); }
+
+ /** Does <tt>*this</tt> contain <tt>sub</tt>? */
+ bool contains(const set& sub)const
+ { return icl::contains(*this, sub); }
+
+ /** Is <tt>*this</tt> contained in <tt>super</tt>? */
+ bool within(const set& super)const
+ { return icl::within(*this, super); }
+
+ /** <tt>*this</tt> and <tt>x2</tt> are disjoint, if their intersection is empty */
+ bool disjoint(const set& x2)const
+ { return icl::disjoint(*this, x2); }
+
+ //==========================================================================
+ //= Size
+ //==========================================================================
+ /** \c iterative_size() yields the number of elements that is visited
+ throu complete iteration. For interval sets \c iterative_size() is
+ different from \c size(). */
+ std::size_t iterative_size()const { return base_type::size(); }
+
+ size_t cardinality()const { return base_type::size(); }
+
+ //==========================================================================
+ //= Addition, subtraction
+ //==========================================================================
+ /** Add an \c element to the set. */
+ set& add(const element_type& element)
+ { return icl::insert(*this, element); }
+
+ /** Add an element \c element after \c prior to the set. */
+ iterator add(iterator prior, const element_type& element)
+ { return icl::insert(*this, prior, element); }
+
+ /** Subtract an \c element from the set. */
+ set& subtract(const element_type& element)
+ { return icl::subtract(*this, element); }
+
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+ /** If \c *this set contains \c element it is erased, otherwise it is added. */
+ set& flip(const element_type& element)
+ { return icl::flip(*this, element); }
+};
+
+
+
+//-----------------------------------------------------------------------------
+// type traits
+//-----------------------------------------------------------------------------
+template <class Type>
+struct is_set<icl::set<Type> >
+{
+ typedef is_set<icl::set<Type> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+template <class Type>
+struct type_to_string<icl::set<Type> >
+{
+ static std::string apply()
+ { return "set<"+ type_to_string<Type>::apply() +">"; }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_XT_SET_HPP_JOFA_070519
+

Added: sandbox/icl/boost/icl_xt/setgentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/setgentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,153 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class SetGentorT
+ A random generator for Sets.
+--------------------------------------------------------------------*/
+#ifndef __SETGENTOR_H_JOFA_000724__
+#define __SETGENTOR_H_JOFA_000724__
+
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/list.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class SetTV>
+class SetGentorT: public RandomGentorAT<SetTV>
+{
+public:
+ typedef typename SetTV::value_type ValueTypeTD;
+ typedef typename SetTV::key_type DomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+ typedef RandomGentorAT<DomainTD> DomainGentorT;
+ typedef DomainGentorT* DomainGentorPT;
+ typedef typename icl::interval<int>::type sample_range_type;
+
+ SetGentorT(): p_domainGentor(NULL) {}
+ ~SetGentorT() { delete p_domainGentor; }
+
+ virtual void some(SetTV& x);
+ void last(SetTV& x)const;
+ void last_permuted(SetTV& x)const;
+
+ void setDomainGentor(RandomGentorAT<DomainTD>* gentor)
+ {
+ delete p_domainGentor;
+ p_domainGentor = gentor;
+ }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_sampleSizeRange = interval<int>::right_open(lwb,upb); }
+ void setRangeOfSampleSize(const icl::interval<int>::type& szRange)
+ {
+ BOOST_ASSERT(icl::bounds(szRange) == interval_bounds::right_open());
+ m_sampleSizeRange = szRange;
+ }
+
+ DomainGentorPT domainGentor()const { return p_domainGentor; }
+
+private:
+ RandomGentorAT<DomainTD>* p_domainGentor;
+ sample_range_type m_sampleSizeRange;
+ SampleTypeTD m_sample;
+ int m_sampleSize;
+};
+
+
+template <class SetTV>
+void SetGentorT<SetTV>::some(SetTV& x)
+{
+ NumberGentorT<int> intGentor;
+ icl::clear(x);
+ m_sample.clear();
+ m_sampleSize = intGentor(m_sampleSizeRange);
+
+ for(int i=0; i<m_sampleSize; i++)
+ {
+ DomainTD key;
+ domainGentor()->some(key);
+ x += key;
+//JODO URG REV m_sample.push_back(key);
+ }
+}
+
+
+template <class SetTV>
+void SetGentorT<SetTV>::last(SetTV& x)const
+{
+ x.clear();
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ x += *it;
+}
+
+template <class SetTV>
+void SetGentorT<SetTV>::last_permuted(SetTV& x)const
+{
+ x.clear();
+
+ SampleTypeTD perm;
+
+ NumberGentorT<int> intGentor;
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor(2) ) perm.push_back(*it);
+ else perm.push_front(*it);
+ }
+
+ ICL_const_FORALL(typename SampleTypeTD, pit, perm)
+ x += *pit;
+}
+
+
+/*
+template <class SetTV>
+void SetGentorT<SetTV>::lastSample(SampleTypeTD& sam)const
+{ sam = m_sample; }
+
+
+template <class SetTV>
+void SetGentorT<SetTV>::lastSample_permuted(SampleTypeTD& sam)
+{
+ NumberGentorT<unsigned> intGentor;
+ x.clear();
+ int coin = intGentor.some(2); // gives 0 or 1
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor.some(2) ) sam.push_back(*it);
+ else sam.push_front(*it);
+ }
+}
+*/
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/statvardesct.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/statvardesct.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,82 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __StatVarDescT_JOFA_040614_H__
+#define __StatVarDescT_JOFA_040614_H__
+
+#include <boost/icl_xt/enum_bitset.hpp>
+namespace boost{namespace icl
+{
+
+ /// Skalenniveau der Skala
+ enum KindOfScaleET { nominal_scale, ordinal_scale, interval_scale, ratio_scale };
+
+ //JODO Noch nicht ganz klar ob wirs so brauchen
+ // Konzept: Zähltupeln sind immer interger-codier
+ /// Werte der Skala
+ enum VarValueET
+ {
+ integer_value,
+ interval_value,
+ string_value,
+ class_value,
+ VarValueET_size
+ };
+
+ /// Flags für eine Variable
+ enum StatVarPropertyET
+ {
+ dependent, // Abhängige Variable
+ // independent, // Unabhängige Variable ?? JODO Können beide gleichzeitig false sein? (nur restricting)
+ restricting, // Restriktionsvariable
+ StatVarPropertyET_size
+ };
+
+ typedef enum_bitset<StatVarPropertyET, StatVarPropertyET_size> StatVarPropertySetTD ;
+
+
+ /* class StatVarDescT: Beschreibung der Eigenschaften von Variablen einer Statistik
+ (auch bekannt als Stochastische Variable).
+
+ Zuständigkeit: Beschreibt wichtige Eigenschaften von Datenbank-Feldern im Kontext
+ von Statistischen Auswertungen.
+
+ Zusammenarbeit:
+ */
+ class StatVarDescT
+ {
+ public:
+ bool isDependent()const;
+
+ private:
+ };
+
+
+}} // namespace icl boost
+
+#endif // __StatVarDescT_JOFA_040614_H__
+

Added: sandbox/icl/boost/icl_xt/std/pair.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/std/pair.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,40 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+Additions to std::pair
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_STD_PAIR_HPP_JOFA_091006
+#define BOOST_ICL_XT_STD_PAIR_HPP_JOFA_091006
+
+#include <boost/icl/type_traits/type_to_string.hpp>
+
+namespace std {
+
+template<class CharType, class CharTraits, class FirstT, class SecondT>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream, const std::pair<FirstT,SecondT>& object)
+{
+ return stream << "(" << object.first << "," << object.second << ")";
+}
+
+} //namespace std
+
+namespace boost{namespace icl
+{
+
+template<>
+inline std::string binary_template_to_string<std::pair>::apply() { return "p"; }
+
+}} // namespace icl boost
+
+
+#endif // BOOST_ICL_XT_STD_PAIR_HPP_JOFA_091006
+

Added: sandbox/icl/boost/icl_xt/std/pair_gentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/std/pair_gentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,57 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_XT_STD_PAIR_GENTOR_HPP_JOFA_091009
+#define BOOST_ICL_XT_STD_PAIR_GENTOR_HPP_JOFA_091009
+
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl_xt/std/pair.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+
+namespace boost{namespace icl
+{
+
+
+template <class FirstT, class SecondT>
+class std_pair_gentor: public RandomGentorAT<std::pair<FirstT,SecondT> >
+{
+public:
+
+ typedef std::pair<FirstT,SecondT> pair_type;
+
+ std_pair_gentor(): _first_gentor(NULL), _second_gentor(NULL) {}
+ ~std_pair_gentor() { delete _first_gentor; delete _second_gentor; }
+
+ void set_first_gentor(RandomGentorAT<FirstT>* gentor)
+ {
+ delete _first_gentor;
+ _first_gentor = gentor;
+ }
+
+ void set_second_gentor(RandomGentorAT<SecondT>* gentor)
+ {
+ delete _second_gentor;
+ _second_gentor = gentor;
+ }
+
+ void some(pair_type& value)
+ {
+ _first_gentor->some(value.first);
+ _second_gentor->some(value.second);
+ };
+
+private:
+ RandomGentorAT<FirstT>* _first_gentor;
+ RandomGentorAT<SecondT>* _second_gentor;
+};
+
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/string_list.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_list.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,177 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------
+A general list of strings
+---------------------------------------------------------------------------------*/
+#include <boost/icl/string_list.hpp>
+
+using namespace std;
+using namespace boost::icl;
+
+string_list::string_list(const char* const deno[], int nOfDeno): list<std::string>()
+{
+ for(int i=0; i<nOfDeno; i++) push_back(std::string(deno[i]));
+}
+
+int string_list::split(const std::string& arg, const char* sep /* =" " */)
+{
+ clear(); // get rid of old stuff
+ int sepLen = strlen(sep), empty_count = 0;
+ int search_from = 0, idx_fst = 0, cur_len = 0, found_idx = string::npos;
+
+ while((found_idx = arg.find(sep, search_from)) != string::npos)
+ {
+ cur_len = found_idx - idx_fst;
+ if(cur_len == 0) empty_count++;
+ push_back(arg.substr(idx_fst, cur_len));
+ idx_fst = found_idx + sepLen;
+ search_from = idx_fst;
+ }
+
+ cur_len = arg.length()-search_from;
+ if(cur_len == 0) empty_count++;
+ push_back(arg.substr(search_from, cur_len));
+
+ return empty_count;
+}
+
+int string_list::separate(const std::string& arg, const char* sep /* =" " */)
+{
+ clear(); // get rid of old stuff
+ int sepLen = strlen(sep), empty_count = 0;
+ int search_from = 0, idx_fst = 0, cur_len = 0, found_idx = string::npos;
+
+ while((found_idx = arg.find(sep, search_from)) != string::npos)
+ {
+ cur_len = found_idx - idx_fst;
+ if(cur_len > 0)
+ push_back(arg.substr(idx_fst, cur_len));
+ else empty_count++;
+ idx_fst = found_idx + sepLen;
+ search_from = idx_fst;
+ }
+
+ cur_len = arg.length()-search_from;
+ if(cur_len > 0)
+ push_back(arg.substr(search_from, cur_len));
+ else empty_count++;
+
+ return empty_count;
+}
+
+int string_list::separateForAny(const std::string& arg, const char* sep /* =" " */)
+{
+ clear(); // get rid of old stuff
+ int sepLen = 1 /*strlen(sep)*/, empty_count = 0;
+ int search_from = 0, idx_fst = 0, cur_len = 0, found_idx = string::npos;
+
+ while((found_idx = arg.find_first_of(sep, search_from)) != string::npos)
+ {
+ cur_len = found_idx - idx_fst;
+ if(cur_len > 0)
+ push_back(arg.substr(idx_fst, cur_len));
+ else empty_count++;
+ idx_fst = found_idx + sepLen;
+ search_from = idx_fst;
+ }
+
+ cur_len = arg.length()-search_from;
+ if(cur_len > 0)
+ push_back(arg.substr(search_from, cur_len));
+ else empty_count++;
+
+ return empty_count;
+}
+
+int string_list::separateForNull(const char * txtbuf, int maxlen /* = -1 */)
+{
+ clear(); // get rid of old stuff
+ string working_copy;
+ const char * p_start = txtbuf;
+ const char * p_run = NULL;
+ // make a length limited copy terminated by double zero if neccessary
+ if (maxlen != -1)
+ {
+ working_copy.assign(txtbuf, maxlen);
+ // null bytes can be appended this way += "\0" doesnt work
+ working_copy += '\0';
+ working_copy += '\0';
+ p_start = working_copy.c_str();
+ }
+ p_run = p_start;
+
+ while (true)
+ {
+ int curlen = strlen(p_run);
+ if (curlen == 0)
+ // end reached -- 0-byte at start not allowed
+ // no empty strings possible
+ break;
+ push_back(p_run);
+ p_run += curlen + 1;
+ }
+ return size();
+}
+
+std::string string_list::join(const char* sep /* =" " */)const
+{
+ // NOTE: algorithm is homomorphic with StringMapT<X>::domainAsString
+ const_iterator it=begin();
+ if(it == end()) return std::string("");
+ else
+ {
+ std::string y(*it++);
+ while(it != end()) { y+=sep; y += *it++; }
+ return y;
+ }
+}
+
+// like join, but sorting out empty elements
+std::string string_list::merge(const char* sep /* =" "*/)const
+{
+ const_iterator it=begin();
+ if(it == end()) return std::string("");
+ else
+ {
+ while(it != end() && (*it).empty()) it++;
+ if(it == end()) return std::string("");
+ std::string y(*it++);
+
+ while(it != end())
+ {
+ if((*it).empty()) it++;
+ else {y+=sep; y += *it++;}
+ }
+ return y;
+ }
+}
+
+
+

Added: sandbox/icl/boost/icl_xt/string_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_list.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,115 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class icl::string_list
+ A List of Strings.
+ Can be useful for string split and join.
+ Also simple text-formating can be done.
+--------------------------------------------------------------------*/
+#ifndef BOOST_ICL_STRING_LIST_HPP_JOFA_990603
+#define BOOST_ICL_STRING_LIST_HPP_JOFA_990603
+
+#include <string>
+#include <list>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/itl_list.hpp>
+
+namespace boost{namespace icl
+{
+
+/// providing split, join and basic text processing
+/** class string_list implements a list of strings that provide split and
+ join functions and basic text formatting.
+
+ @author Joachim Faulhaber
+*/
+class string_list: public icl::list<std::string> //JODO URG no inhertiance from base container
+{
+public:
+ /** Empty string_list (default-Ctor) */
+ string_list(): list<std::string>() {}
+
+ /** Construction from an array of strings and an int 'nOfDeno' which must be the
+ number of array elements */
+ string_list(const char* const deno[], int nOfDeno);
+
+ /** Split stringT arg at spearators 'separator' to buid string_list *this.
+ Returns the number of empty strings within the List
+ */
+ int split(const std::string& arg, const char* separator = " ");
+
+ /** Works like split but sort out empty strings.
+ Returns the number of empty strings that have been sorted out.
+ */
+ int separate(const std::string& arg, const char* separator = " ");
+
+ /** Separates for ANY character, which is found in the separator string. */
+ int separateForAny(const std::string& arg, const char* separator = " ");
+
+ //The resulting list contains the sequence of null-terminated strings
+ //out of the buffer txtbuf, limited by the maximal length maxlen, which
+ //can be omitted by specifying -1
+ //buffer layout: txt1\0txt2\0\txt3\0\0 <-- double null byte marks end
+ //return value: number of strings found
+ int separateForNull(const char * txtbuf, int maxlen = -1);
+
+ /* concatenate all strings of this list inserting 'separator' between elements */
+ std::string join(const char* separator = " ")const;
+ /* concatenate all strings like join but sort out empty elements */
+ std::string merge(const char* separator = " ")const;
+
+ /* split all blank-separated words in stringT text into this list of words.
+ Words exceeding maxLen are seperated and a hyphen (-) is inserted */
+ void wordify(const std::string& text, int maxLen);
+
+ /* break down a list of words into a text paragraph of width maxLen */
+ void lineify(string_list& words, int maxLen);
+
+ /* break down a flat list of words into this text paragraph of width maxLen */
+ void format(const std::string& flatText, int maxLen);
+
+ /** get the 0 based index of that element, compare ignoring case */
+ int index_IgnoreCase(const std::string& text)const;
+
+ /** pop n elements from the front */
+ string_list& popFront(int n);
+
+ /** pop k elements from the front to keep at least n elements from the back*/
+ string_list& keepBack(int n);
+
+ /** Set 'count' tail-Elements to empty strings */
+ string_list& emptyTail(int count);
+} ;
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/string_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,61 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_STRING_MAP_HPP_JOFA_021215
+#define BOOST_ICL_STRING_MAP_HPP_JOFA_021215
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/map.hpp>
+#include <string>
+
+namespace boost{namespace icl
+{
+ template <class CodomTV, class CompTV=less<std::string> >
+ class string_map : public MapT<std::string, CodomTV, CompTV>
+ {
+ };
+
+ // Compair class for Strings ingnoring case
+ struct string_ICLess {
+ bool operator() (const std::string& c1, const std::string& c2) const
+ {
+ //return c1.stricmp(c2)<0; //JODO URG
+ return c1 < c2; //JODO URG
+ }
+ };
+
+ // A template map class that's keys are handled case insensitive
+ template <class CodomTV>
+ class ICstring_map : public icl::string_map<CodomTV, string_ICLess>
+ {
+ };
+}} // namespace boost icl
+
+#endif // BOOST_ICL_STRING_MAP_HPP_JOFA_021215
+
+
+

Added: sandbox/icl/boost/icl_xt/string_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,108 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------
+set of strings
+---------------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_STRING_SET_HPP_JOFA_990318
+#define BOOST_ICL_STRING_SET_HPP_JOFA_990318
+
+#include <string>
+#include <string.h>
+#include <boost/icl_xt/set.hpp>
+
+namespace boost{namespace icl
+{
+ typedef std::string StringTD;
+ typedef StringTD (StringTD::* StringSelectorFPD)()const;
+
+ // Compare class for Strings ignoring case
+ template<typename StringT>
+ struct String_ICLess {
+ bool operator() (const StringT& c1, const StringT& c2) const
+ { return _stricmp(c1.c_str(), c2.c_str()) < 0; }
+ };
+
+ template<typename StringT>
+ struct String_Less {
+ bool operator() (const StringT& c1, const StringT& c2) const
+ { return c1 < c2; }
+ };
+
+ // ---------------------------------------------------------------------------------
+ // sets of strings
+ // ---------------------------------------------------------------------------------
+
+ template <ICL_COMPARE Compare = std::less>
+ class string_set: public icl::set<std::string, Compare>
+ {
+ public:
+ typedef icl::set<std::string, Compare> base_type;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+
+ public:
+ std::string as_string(char* sep = " ")const; // JODO URG Sync
+ std::string join(char* sep = " ")const { return as_string(sep); } // JODO URG Sync
+ void selectSet(string_set& selectees, StringSelectorFPD selector)const;
+ } ;
+
+
+ // ---------------------------------------------------------------------------------
+ // sets of strings ordered ignoring case
+ // ---------------------------------------------------------------------------------
+
+ typedef string_set<String_ICLess> ICstring_setD;
+
+
+ template <ICL_COMPARE Compare>
+ std::string string_set<Compare>::as_string(char* sep)const
+ {
+ const_iterator it = this->begin();
+ if(it == this->end()) return std::string("");
+ else
+ {
+ std::string y(*it++);
+ while(it != this->end()) { y += sep; y += (*it++); }
+ return y;
+ }
+ }
+
+
+ template <ICL_COMPARE Compare>
+ void string_set<Compare>::selectSet(string_set& selectees, StringSelectorFPD selector)const
+ {
+ selectees.clear();
+ ICL_const_FORALL_THIS(it)
+ selectees.insert(((*it).*selector)());
+ }
+}} // namespace boost icl
+
+
+#endif
+
+

Added: sandbox/icl/boost/icl_xt/string_sheet.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_sheet.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,124 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#include <stdafx.h>
+#include "string_sheet.h"
+#include <boost/icl/type_traits/to_string.hpp>
+
+using namespace boost::icl;
+
+
+string diff_desc::afxReport(const string& file)const
+{
+ string msg = "Difference in:\n";
+ msg += file + "\n";
+ msg += "d_size=" + value<int>::to_string(m_SizeDiff);
+ msg += " col=" + value<int>::to_string(m_RowSizeDiff) + "\n";
+ msg += "First Difference 1:ref 2:cur:\n";
+ msg += "First Difference 1:ref 2:cur:\n";
+ msg += m_Lhs + "\n";
+ msg += m_Rhs + "\n";
+
+ return msg;
+}
+
+
+void string_sheet::fprint(FILE* file, const char* sep)const
+{
+ ICL_const_FORALL_THIS(row_)
+ {
+ const string_list& row = (*row_);
+ fprintf(file, "%s\n", row.join(sep).c_str());
+ }
+}
+
+void string_sheet::fscan(ifstream& infile, const char* sep)
+{
+ char rawLine[MAX_INPUT_ROW_SIZE]; //JODO flex
+
+ while(!infile.eof())
+ {
+ infile.getline(rawLine, MAX_INPUT_ROW_SIZE);
+ string_list row;
+ row.split(rawLine, sep);
+ push_back(row);
+ }
+ pop_back(); // Schliessende Leerzeile wegnehmen
+}
+
+
+diff_desc string_sheet::diff(const string_sheet& rhs)const
+{
+ int thisSize = size();
+ int rhsSize = rhs.size();
+
+ diff_desc diff;
+ diff.setSizeDiff(thisSize - rhsSize);
+
+ int rowSize = std::min(thisSize, rhsSize);
+
+ string_sheet::const_iterator thisRow_ = begin();
+ string_sheet::const_iterator rhsRow_ = rhs.begin();
+
+ for(int rowIdx = 1; rowIdx <= rowSize; rowIdx++)
+ {
+ const string_list& thisRow = (*thisRow_);
+ const string_list& rhsRow = (*rhsRow_);
+
+ int lhsRowSize = thisRow.size();
+ int rhsRowSize = rhsRow.size();
+ if(lhsRowSize != rhsRowSize)
+ {
+ diff.setRow(rowIdx);
+ diff.setCol(std::min(lhsRowSize, rhsRowSize)+1);
+ diff.setRowSizeDiff(lhsRowSize - rhsRowSize);
+ return diff;
+ }
+
+ string_list::const_iterator lhsCol_ = thisRow.begin();
+ string_list::const_iterator rhsCol_ = rhsRow.begin();
+
+ for(int colIdx=1; colIdx <= lhsRowSize; colIdx++)
+ {
+ if((*lhsCol_) != (*rhsCol_))
+ {
+ diff.setRow(rowIdx);
+ diff.setCol(colIdx);
+ diff.setLhs(*lhsCol_);
+ diff.setRhs(*rhsCol_);
+ return diff;
+ }
+ lhsCol_++;
+ rhsCol_++;
+ }
+
+ thisRow_++;
+ rhsRow_++;
+ }
+
+ return diff;
+}

Added: sandbox/icl/boost/icl_xt/string_sheet.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/string_sheet.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,88 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_STRING_SHEET_HPP_JOFA_050209
+#define BOOST_ICL_STRING_SHEET_HPP_JOFA_050209
+
+#include <iostream>
+#include <fstream>
+#include <boost/icl/string_list.hpp>
+#include <boost/icl/detail/notate.hpp>
+
+namespace boost{namespace icl
+{
+
+ const int MAX_INPUT_ROW_SIZE = 10000;
+
+ class diff_desc
+ {
+ public:
+ diff_desc(): m_SizeDiff(0), m_RowSizeDiff(0), m_Row(0), m_Col(0), m_Lhs(), m_Rhs() {}
+
+ bool empty()const {
+ return m_SizeDiff==0 && m_RowSizeDiff==0 && m_Row==0;
+ }
+
+ int getSizeDiff()const {return m_SizeDiff;}
+ int getRowSizeDiff()const{return m_RowSizeDiff;}
+ int getRow()const {return m_Row;}
+ int getcol()const {return m_Col;}
+ std::string getLhs()const {return m_Lhs;}
+ std::string getRhs()const {return m_Rhs;}
+
+ void setSizeDiff (int SizeDiff){m_SizeDiff=SizeDiff;}
+ void setRowSizeDiff (int RowSizeDiff){m_RowSizeDiff=RowSizeDiff;}
+ void setRow (int Row){m_Row=Row;}
+ void setCol (int Col){m_Col=Col;}
+ void setLhs (std::string Lhs){m_Lhs=Lhs;}
+ void setRhs (std::string Rhs){m_Rhs=Rhs;}
+
+ std::string afxReport(const std::string& file)const;
+
+ private:
+ int m_SizeDiff;
+ int m_RowSizeDiff;
+ int m_Row;
+ int m_Col;
+ std::string m_Lhs;
+ std::string m_Rhs;
+ };
+
+ class string_sheet : public list<string_list>
+ {
+ public:
+ typedef list<string_list> string_sheetD;
+ public:
+ diff_desc diff(const string_sheet& rhs)const;
+
+ void fprint(FILE* file, const char* sep = "\t")const;
+ void fscan(std::ifstream& ifstr, const char* sep = "\t");
+ };
+}} // namespace icl boost
+
+#endif // BOOST_ICL_STRING_SHEET_HPP_JOFA_050209
+

Added: sandbox/icl/boost/icl_xt/stringpattern_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/stringpattern_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,72 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_STRINGPATTERN_SET_HPP_JOFA_040902
+#define BOOST_ICL_STRINGPATTERN_SET_HPP_JOFA_040902
+
+#include "prefix_set.h"
+namespace boost{namespace icl
+{
+ /// Specifies a set of strings via prefix_set s include and exclude
+ /** stringpattern_set repraesentiert eine Menge von Strings durch
+ zwei PrefixSetTs, der zugehoerigen und der nicht zugehoerigen
+ Strings.
+
+ Mit 'include' fuegt man Praefixe fuer zugehoerige Strings ein.
+ Mit 'exclude' fuegt man Praefixe fuer nicht zugehoerige Strings ein.
+
+ stringpattern_set s;
+ s.include("Han");
+ s.include("Har");
+ s.exclude("Hara");
+ s.contains("Hans")==true;
+ s.contains("Harald")==false;
+ */
+ class stringpattern_set
+ {
+ public:
+ void include(const string& val)
+ { m_Includes.insert(val); }
+
+ void exclude(const string& val)
+ { m_Excludes.insert(val); }
+
+ bool contains(const string& val)const
+ { return m_Includes.contains(val) && !m_Excludes.contains(val); }
+
+ private:
+ prefix_set m_Includes;
+ prefix_set m_Excludes;
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_STRINGPATTERN_SET_HPP_JOFA_040902
+
+

Added: sandbox/icl/boost/icl_xt/tuple_computer.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/tuple_computer.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,478 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 __tuple_computer_JOFA_040614_H__
+#define __tuple_computer_JOFA_040614_H__
+
+#include <boost/icl/map.hpp>
+#include <boost/icl_xt/set.hpp>
+#include <boost/icl_xt/var_tuple_order.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <int VarCount>
+ class tuple_computer_interface
+ {
+ public:
+ typedef var_tuple<VarCount> var_tuple_type;
+ typedef var_tuple_order<var_tuple_type> tuple_order_type;
+ typedef icl::set<var_tuple_type, var_tuple_order> tuple_set_type;
+
+ public:
+ virtual ~tuple_computer_interface(){};
+
+ //JODO Ergänzung + Comments + Zerlegung
+ virtual void domain(tuple_set_type&)const=0;
+
+ /// Add keyset of *this computer to tupelset 'accu'
+ virtual void addDomain(tuple_set_type& accu)const=0;
+
+ /** Load Computer from src. If *this has a different TupelOrder
+ *this is not a copy of 'src' but a recomputation according
+ to the different TupelOrder */
+ virtual void load(const tuple_computer_interface& src)=0;
+
+ /** Align *this TupelsComputers for domain such that this->domain()==domain.
+ Insert 0 or empty values for all tupels which are not in *this. */
+ virtual void alignFor(const tuple_set_type& domain)=0;
+
+ virtual std::string as_string()const=0;
+ };
+
+
+
+ /// Base class template for tuple computers aggregating values associated to tuples
+ /** On insertion of a (t1, ..., tn)->v tuple value pair, a value within
+ the tuple computer is summed by v, if the tuple t is already contained in
+ the tuple_computer_base.
+
+ Template parameter VarCount defines the size of the tuples.
+
+ Template parameter CounterT is the value type of the tuple_computer_base.
+ Those are the values to aggregated.
+ */
+ template <int VarCount, class CounterT>
+ class tuple_computer_base : public tuple_computer_interface<VarCount>
+ {
+ public:
+ typedef tuple_computer_interface<VarCount> base_type;
+ typedef typename base_type::tuple_set_type tuple_set_type;
+
+ public:
+
+ /** @name A: Type definitions for the template class
+ */
+ //@{
+ typedef var_tuple<VarCount> var_tuple_type;
+ typedef var_tuple_order<var_tuple_type> tuple_order_type;
+ /// Container type for the implementation
+ typedef icl::map<var_tuple_type, CounterT, partial_absorber, var_tuple_order> ImplMapTD;
+ /// iterator
+ typedef typename ImplMapTD::iterator iterator;
+ /// const_iterator
+ typedef typename ImplMapTD::const_iterator const_iterator;
+
+ /// value type of the implementing container
+ typedef typename ImplMapTD::value_type value_type;
+ /// key type of the implementing container
+ typedef typename ImplMapTD::key_type key_type;
+ /// data type of the implementing container
+ typedef typename ImplMapTD::data_type data_type;
+
+ /// Type of strict weak ordering
+ typedef typename ImplMapTD::key_compare key_compare;
+
+ typedef CounterT counter_type;
+ //@}
+
+ // B: Constructors, destructors, assignment
+ /// Default constructor for the empty map
+ tuple_computer_base(): m_map() {}
+ /// Copy constructor
+ tuple_computer_base(const tuple_computer_base& src): m_map(src.m_map) {}
+
+ /// Construct from order
+ tuple_computer_base(const key_compare& ord): m_map(ord) {}
+
+ /// Virtual destructor
+ virtual ~tuple_computer_base(){};
+
+
+ /// Assignment operator
+ tuple_computer_base& operator = (const tuple_computer_base& src)
+ {
+ m_map.ImplMapTD::operator=(src.m_map);
+ return *this;
+ }
+
+ // ------------------------------------------------------------------------
+ // Interface MapIT
+ // C:
+
+ /// Remove all elements from the map
+ void clear() { m_map.clear(); }
+ /// Is the map empty?
+ bool empty()const { return m_map.empty(); }
+ /// Does the map contain an element for key x
+ bool contains(const var_tuple_type& x)const { return m_map.contains(x); }
+ /// Does the map contain a valuepair (tupel, counter)
+ bool contains(const value_type& x)const;
+
+ /// Get the set of keys
+ void domain(tuple_set_type& domain)const;
+ ///
+ void addDomain(tuple_set_type& domain)const;
+
+
+ /** @name F: Tester
+ */
+ //@{
+ /// <tt>*this</tt> is subset of <tt>super</tt>
+ bool isSubsetOf(const tuple_computer_base& super)const;
+ /// <tt>*this</tt> is subset of <tt>super</tt>
+ bool operator <= (const tuple_computer_base& super)const;
+
+ /// Equality
+ bool isEqual(const tuple_computer_base& x2)const
+ { return isSubsetOf(x2) && x2.isSubsetOf(*this); }
+ /// Equality operator
+ bool operator == (const tuple_computer_base& x2)const { return isEqual(x2); }
+ /// Inequality operator
+ bool operator != (const tuple_computer_base& x2)const { return !isEqual(x2); }
+
+ //@}
+
+
+ /** @name G: Modificators
+ */
+ //@{
+ /** Insertion of a (tupel, content) pair <tt>(t,x)</tt> */
+ void insert(const var_tuple_type& t, CounterT x)
+ { insert( value_type(t, x) ); }
+
+ /** Insertion of a (tupel, content) pair as <tt>value_pair</tt> */
+ void insert(const value_type& vt);
+ //@}
+
+ /** @name H: value search
+ */
+ //@{
+ /** */
+ iterator find(const var_tuple_type& tupel) { return m_map.find(tupel); }
+ const_iterator find(const var_tuple_type& tupel)const { return m_map.find(tupel); }
+ //@}
+
+
+
+ /** @name I: Interval iterators
+ */
+ //@{
+ ///
+ iterator begin() { return m_map.begin(); }
+ ///
+ iterator end() { return m_map.end(); }
+ ///
+ const_iterator begin()const { return m_map.begin(); }
+ ///
+ const_iterator end()const { return m_map.end(); }
+ //@}
+
+ /** @name S: String representation
+ */
+ //@{
+ ///
+ std::string as_string()const
+ {
+ stringstream str;
+ str << m_map;
+ return str.str();
+ }
+ //@}
+
+
+ int size()const { return m_map.size(); }
+
+ // NOTE! Die Ordnung, die ein TupelComputer verwendet ist fest, wir können zwar eine
+ // Kopie dieses Ordnungs-Objektes bekommen, aber keine Referenz. Also sind alle
+ // möglichen Transformationen nur dadurch zu machen, dass wir einen neuen
+ // Tupelcomputer mit entsprechendem Ordnungsobjekt (Funktor) kreieren und es
+ // dann befüllen. Der OrdnungsFunktor muss alle Möglichkeiten zur Verfügung
+ // stellen, also Umsortierung (Permutation), Projektion und Gruppierung.
+ // Gruppierung beinhaltet auch bedingte Äquivalenz. Dazu brauchen wir noch
+ // Filter: Ausblenden von Wertemengen und bedingte Filter: Ausblenden von Werten
+ // in Abhängigkeit von den Werten anderer UVs (oder UV-Gruppierungen)
+
+ private:
+ ImplMapTD m_map;
+ };
+
+
+ template <int VarCount, class CounterT>
+ void tuple_computer_base<VarCount, CounterT>::domain(tuple_set_type& domain)const
+ {
+ domain.clear();
+ addDomain(domain);
+ }
+
+
+ template <int VarCount, class CounterT>
+ void tuple_computer_base<VarCount, CounterT>::addDomain(tuple_set_type& domain)const
+ {
+ ICL_const_FORALL_THIS(tupel_)
+ domain.insert((*tupel_).first);
+ }
+
+
+ template <int VarCount, class CounterT>
+ void tuple_computer_base<VarCount, CounterT>::insert(const value_type& val)
+ {
+ std::pair<typename ImplMapTD::iterator,bool> insertion = m_map.insert(val);
+
+ if(!insertion.second)
+ (*insertion.first).second += val.second;
+ }
+
+
+ // ------------------------------------------------------------------------
+ // JODO THINK: Es ist fraglich, ob wir überhaupt abgeleitete TupelComputer
+ // brauchen. Vielleicht lässt sich ja alles über entsprechende CounterT-
+ // Instanzen regeln.
+ // ------------------------------------------------------------------------
+
+ /// An amount_tuple_computer aggregates values (amounts) associated to tuples.
+ /** amount_tuple_computer is a TupleComputer that aggregates amounts
+ associated to tuples.
+
+ Template parameter VarCount defines the size of the used tuples.
+
+ CounteeT is the amount type, the type that is aggrgated.
+ Usually this shall be a numeric type. Yet it can also be
+ intantiated with any +=summable class type.
+ */
+ template <int VarCount, class CounteeT>
+ class amount_tuple_computer : public tuple_computer_base<VarCount, CounteeT>
+ {
+ public:
+ typedef tuple_computer_base<VarCount, CounteeT> base_type;
+ typedef typename base_type::key_type var_tuple_type;
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::key_compare key_compare;
+ typedef typename base_type::tuple_set_type tuple_set_type;
+
+ public:
+ // Default Ctor
+ amount_tuple_computer(): base_type() {}
+ // Copy Ctor
+ amount_tuple_computer(const amount_tuple_computer& src): base_type(src) {}
+ // Ctor from strict weak ordering
+ amount_tuple_computer(const key_compare& order): base_type(order) {}
+
+ public:
+ // Special interface that can not be expressed by TupelComputerT
+
+ void load(const tuple_computer_interface<VarCount>& srcI);
+
+ void alignFor(const tuple_set_type& domain)
+ {
+ ICL_const_FORALL(typename tuple_set_type, it_, domain)
+ this->insert(*it_, CounteeT());
+ }
+
+ };
+
+ template <int VarCount, class CounterT>
+ void amount_tuple_computer<VarCount, CounterT>::load(const tuple_computer_interface<VarCount>& srcI)
+ {
+ const amount_tuple_computer& src = dynamic_cast<const amount_tuple_computer&>(srcI);
+ ICL_const_FORALL(typename amount_tuple_computer, it_, src)
+ this->insert(*it_);
+ }
+
+
+
+ // ------------------------------------------------------------------------
+ /// A date_tuple_computer aggregates points in time (dates) associated to tuples.
+ /** class date_tuple_computer: Merkmalskombinationsrechner (flavor: Zeitpunktrechner)
+
+ Jedem Tupel (Merkmalskombination) wird ein Map assoziiert, das Zeitpunkte
+ (Dates) zählen kann.
+ */
+ template <int VarCount, class TimeT, class CounteeT>
+ class date_tuple_computer :
+ public tuple_computer_base<VarCount, icl::map<TimeT, CounteeT> >
+ {
+ public:
+ typedef typename icl::map<TimeT, CounteeT> counter_type;
+ typedef tuple_computer_base<VarCount, counter_type> base_type;
+ typedef typename base_type::var_tuple_type var_tuple_type;
+ typedef typename base_type::key_compare key_compare;
+ typedef typename icl::set<var_tuple_type, var_tuple_order> tuple_set_type;
+
+ public:
+ // Default Ctor
+ date_tuple_computer(): base_type() {}
+ // Copy Ctor
+ date_tuple_computer(const date_tuple_computer& src): base_type(src) {}
+ // Ctor from strict weak ordering
+ date_tuple_computer(const key_compare& order): base_type(order) {}
+
+ public:
+ // Special interface that can not be expressed by TupelComputerT
+
+ void load(const tuple_computer_interface<VarCount>& srcI);
+
+ void alignFor(const tuple_set_type& domain)
+ {
+ ICL_const_FORALL(typename tuple_set_type, it_, domain)
+ insert(*it_, counter_type());
+ }
+
+ };
+
+ template <int VarCount, class TimeT, class CounteeT>
+ void date_tuple_computer<VarCount,TimeT,CounteeT>::load(const tuple_computer_interface<VarCount>& srcI)
+ {
+ const date_tuple_computer& src = dynamic_cast<const date_tuple_computer&>(srcI);
+ ICL_const_FORALL(typename date_tuple_computer, it_, src)
+ insert(*it_);
+ }
+
+
+
+ // ------------------------------------------------------------------------
+ /// Aggregates intervals associated to tuples
+ /** class interval_tuple_computer: Merkmalskombinationsrechner (flavor:
+ Zeitraumrechner). Jedem Tupel (Merkmalskombination) wird ein
+ split_interval_map assoziiert, das Zeiträume (Itv=Interval) zählen
+ kann. Genauer gesagt werden Zustände gezählt, die für einen Zeitraum
+ anhalten. Bei Überlappungen der Zeiträume müssen die die Häufigkeiten
+ im split_interval_map entsprechend aufaddiert werden.
+ */
+ template <int VarCount, class TimeT, class CounteeT>
+ class interval_tuple_computer :
+ public tuple_computer_base<VarCount,
+ split_interval_map<TimeT, CounteeT> >
+ {
+ public:
+ typedef split_interval_map<TimeT, CounteeT> counter_type;
+ typedef tuple_computer_base<VarCount, counter_type> base_type;
+ typedef typename base_type::var_tuple_type var_tuple_type;
+ typedef typename base_type::key_compare key_compare;
+ typedef icl::set<var_tuple_type, var_tuple_order> tuple_set_type;
+ typedef typename base_type::counter_type::interval_type interval_type;
+
+ private:
+ typedef icl::map<TimeT, CounteeT> DateMapTD;
+
+ public:
+ // Default Ctor
+ interval_tuple_computer(): base_type() {}
+ // Copy Ctor
+ interval_tuple_computer(const interval_tuple_computer& src): base_type(src) {}
+ // Ctor from strict weak ordering
+ interval_tuple_computer(const key_compare& order): base_type(order) {}
+
+ public:
+ // Special interface that can not be expressed by TupelComputerT
+
+ void load(const tuple_computer_interface<VarCount>& srcI);
+
+ // Eine Menge von ZeitPUNKTEN einfügen. Diese werden in Intervalle gewandelt
+ void insertDateMap(const var_tuple_type tup, const DateMapTD& date);
+
+ void alignFor(const tuple_set_type& domain)
+ {
+ ICL_const_FORALL(typename tuple_set_type, it_, domain)
+ insert(*it_, counter_type());
+ }
+ };
+
+
+ template <int VarCount, class TimeT, class CounteeT>
+ void interval_tuple_computer<VarCount,TimeT,CounteeT>::load(const tuple_computer_interface<VarCount>& srcI)
+ {
+ const interval_tuple_computer& src = dynamic_cast<const interval_tuple_computer&>(srcI);
+ ICL_const_FORALL(typename interval_tuple_computer, it_, src)
+ insert(*it_);
+ }
+
+ template <int VarCount, class TimeT, class CounteeT>
+ void interval_tuple_computer<VarCount,TimeT,CounteeT>::insertDateMap(const var_tuple_type tup, const DateMapTD& date)
+ {
+ counter_type itvCounter;
+ ICL_const_FORALL(typename DateMapTD, date_, date)
+ {
+ itvCounter.insert(
+ counter_type::value_type(
+ counter_type::interval_type((*date_).first, (*date_).first),
+ (*date_).second
+ )
+ );
+ }
+
+ insert(value_type(tup, itvCounter));
+ }
+
+
+
+ //JODO: Where to put this kind of functionality
+ template <class SubType, class ItvDomTV, class CodomTV>
+ void intervalize(interval_base_map<SubType, ItvDomTV, CodomTV>& itvMap,
+ const icl::map<ItvDomTV, CodomTV>& dateMap)
+ {
+ typedef icl::map<ItvDomTV, CodomTV> DateMapTD;
+ typedef interval_base_map<SubType, ItvDomTV, CodomTV> ItvMapTD;
+
+ itvMap.clear();
+ ICL_const_FORALL(typename DateMapTD, date_, dateMap)
+ {
+ itvMap.insert(
+ ItvMapTD::value_type(
+ ItvMapTD::interval_type((*date_).first, (*date_).first),
+ (*date_).second
+ )
+ );
+ }
+ }
+
+ //JODO Move this;
+ //JODO DESIGN: Memfunction of interval_base_set? destructive + constructive. Self-deviding
+
+ //NOTE: ItvMap GridSum
+ template <class SubType, class ItvDomTV, class CodomTV>
+ void sumWithin(interval_base_map<SubType, ItvDomTV, CodomTV>& gridSums,
+ interval_base_map<SubType, ItvDomTV, CodomTV>& interSection,
+ const interval_base_map<SubType, ItvDomTV, CodomTV>& itvMap,
+ const split_interval_set<ItvDomTV>& grid)
+ {
+ typedef interval_base_map<SubType, ItvDomTV, CodomTV> ItvMapTD;
+ typedef split_interval_set<ItvDomTV> DiscItvSetTD;
+
+ gridSums.clear();
+ interSection.clear();
+ if(itvMap.empty()) return;
+
+ ItvMapTD* aux = itvMap.cons();
+ //JODO OPTI: optimize using the ordering: if intervalls are beyond borders we can terminate
+ ICL_const_FORALL(typename DiscItvSetTD, itv_, grid)
+ {
+ itvMap.intersect(*aux, *itv_);
+ gridSums.insert(ItvMapTD::value_type(*itv_, (*aux).volume()));
+ interSection += (*aux);
+ }
+
+ }
+
+}} // namespace icl boost
+
+#endif // __tuple_computer_JOFA_040614_H__
+
+
+

Added: sandbox/icl/boost/icl_xt/typed_episode.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/typed_episode.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,82 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPED_EPISODE_HPP_HPP_JOFA_011015
+#define BOOST_ICL_TYPED_EPISODE_HPP_HPP_JOFA_011015
+
+#include <boost/icl/type_traits/interval_type_default.hpp>
+//REV #include <boost/icl/interval.hpp>
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl_xt/ordered_type.hpp>
+
+namespace boost{namespace icl
+{
+
+/// Serves as a base class for the decomposition of histories in episodes
+/**
+ <b>Episoden-Intercace</b>
+
+ Eine Episode besitzt ein Intervall.
+
+ @author Joachim Faulhaber
+*/
+template <class TimeT>
+class episode_interface
+{
+public:
+
+ /// virtual dtor: cave leakem
+ virtual ~episode_interface(){}
+
+ /// das Intervall der Episode
+ //virtual icl::interval<TimeT> interval()const=0; //JODO make IntervalT a template param
+ virtual right_open_interval<TimeT> interval()const=0;
+};
+
+/// typed_episode is an episode that can be ordered wrt. it's type
+/**
+ <b>ein Episode mit Typ dazu</b>
+
+ Die Klasse typed_episode ist nach Typ sortierbar, denn sie
+ implementiert \ref ordered_type. Ausserdem ist es eine Episode, denn
+ sie implementiert \ref episode_interface.
+
+ @author Joachim Faulhaber
+*/
+template <class TimeT, class TypeDomain>
+class typed_episode : public ordered_type_base<TypeDomain>, public episode_interface<TimeT>
+{
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_TYPED_EPISODE_HPP_HPP_JOFA_011015
+
+
+

Added: sandbox/icl/boost/icl_xt/var_permutation.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/var_permutation.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,268 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __var_permutation_JOFA_040621_H__
+#define __var_permutation_JOFA_040621_H__
+
+#include <string.h>
+#include <boost/icl_xt/fixtupelconst.hpp>
+#include <boost/icl_xt/list.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <int varCountV>
+ class var_permutation
+ {
+ public:
+ typedef icl::list<VarEnumTD> ListTD;
+ public:
+ var_permutation(): m_Size(0) {}
+ var_permutation(const var_permutation&);
+ var_permutation& operator = (const var_permutation&);
+
+ /// Hinten anfuegen
+ var_permutation& add(VarEnumTD var);
+ /// Von hinten 'count' Elemente loeschen
+ var_permutation& del(int count = 1);
+
+ int size()const { return m_Size; }
+ void setIdentity();
+ var_permutation& clear() { m_Size = 0; return *this; }
+
+ /** Liefert zum Index 'permIdx' die unabhängige Variable var=permutation[permIdx].
+ Da es sich um eine schnelle Primitive handelt, wird der Gültigkeitsbereich des
+ Arguments 0 <= permIdx <m_Size nicht geprüft. */
+ VarEnumTD operator[] (VarEnumTD permIdx)const { return m_Permutation[permIdx]; }
+
+ /** Liefert zum Index 'permIdx' die unabhängige Variable var=permutation[permIdx].
+ Liefert -1, wenn permIdx kein gültiger Index ist. */
+ VarEnumTD getVar(VarEnumTD permIdx)
+ { return (0 <= permIdx && permIdx < m_Size) ? m_Permutation[permIdx] : UNDEFINED_INDEX; }
+
+ var_permutation operator() (VarEnumTD fst, VarEnumTD lst)const;
+
+ /** Index zur Variable 'var' finden. Liefert -1, wenn 'var' nicht gefunden.
+ index=find(var) ist hierbei der Index 0 <= index < m_Size der Permutation die den
+ Wert der unabhängigen Variable 'var' enthält. */
+ int find(VarEnumTD var)const;
+
+ /// Ist 'var' enthalten?
+ bool contains(VarEnumTD var)const { return 0 <= find(var); }
+
+ /// Fuege 'var' an der Stelle 'pos' ein. Liefert false, wenn insert scheitert.
+ bool insert(VarEnumTD var, int pos);
+
+ /// Das Element mit dem Wert 'val' loeschen
+ var_permutation& remove(VarEnumTD val);
+
+ /** 'perm' ist eine Permutation von 'seq', so dass perm eine Untersequenz
+ von *this ist, in der keine Vertauschungen der Reihenfolge von *this vorkommen.
+ 'perm' ist vertauschungsfreie Untersequenz von *this.
+ Voraussetzung ist, dass die Elemente von 'seq' in *this enthalten sind. */
+ void consequent_permutation(var_permutation& perm, const var_permutation& seq)const;
+
+ /** Liefert den reduzierten Aggregationsgrad einer Untersequenz 'subSeq'.
+ 'subSeq' hat natuerlich weniger Aggregationsgrade, als *this. Wir tun so,
+ als waeren alle Elemente von *this ausgeblendet. Jedes Element, das in
+ *this ausgebelendet ist, wird von grade abgezogen.
+ */
+ int gradeReduct(int grade, const var_permutation& subSeq)const;
+
+
+ ListTD asList()const;
+ std::string as_string()const;
+
+ private:
+ VarEnumTD m_Permutation[varCountV];
+ int m_Size;
+ };
+
+ template <int varCountV>
+ var_permutation<varCountV>::var_permutation (const var_permutation<varCountV>& src)
+ {
+ m_Size = src.m_Size;
+ FOREACH_VAR_TO(idx, m_Size)
+ m_Permutation[idx] = src.m_Permutation[idx];
+ }
+
+ template <int varCountV>
+ var_permutation<varCountV>& var_permutation<varCountV>::operator = (const var_permutation<varCountV>& src)
+ {
+ if(&src != this)
+ {
+ m_Size = src.m_Size;
+ FOREACH_VAR_TO(idx, m_Size)
+ m_Permutation[idx] = src.m_Permutation[idx];
+ }
+ return *this;
+ }
+
+
+ template <int varCountV>
+ void var_permutation<varCountV>::setIdentity()
+ {
+ FOREACH_VAR(idx)
+ m_Permutation[idx] = idx;
+ m_Size = varCountV;
+ }
+
+ template <int varCountV>
+ var_permutation<varCountV>& var_permutation<varCountV>::add(VarEnumTD var)
+ {
+ if(m_Size < varCountV)
+ {
+ m_Permutation[m_Size] = var;
+ m_Size++;
+ }
+ return *this;
+ }
+
+ template <int varCountV>
+ var_permutation<varCountV>& var_permutation<varCountV>::del(int count) // = 1 default
+ {
+ int back = std::min(count, m_Size);
+ m_Size -= back;
+ return *this;
+ }
+
+ template <int varCountV>
+ var_permutation<varCountV> var_permutation<varCountV>::operator() (VarEnumTD fst, VarEnumTD lst)const
+ {
+ var_permutation perm;
+ for(VarEnumTD idx = fst; idx < lst; idx++)
+ perm.add((*this)[idx]);
+
+ return perm;
+ }
+
+ template <int varCountV>
+ var_permutation<varCountV>& var_permutation<varCountV>::remove(VarEnumTD val)
+ {
+ int doomedIdx = find(val);
+ if(doomedIdx == UNDEFINED_INDEX)
+ return *this;
+
+ for(int idx=doomedIdx; idx < (m_Size-1); idx++)
+ m_Permutation[idx] = m_Permutation[idx+1];
+
+ m_Size--;
+
+ return *this;
+ }
+
+ template <int varCountV>
+ int var_permutation<varCountV>::find(VarEnumTD val)const
+ {
+ int hit = UNDEFINED_INDEX;
+ for(int idx=0; idx<m_Size; idx++)
+ if(m_Permutation[idx]==val)
+ return idx;
+
+ return hit;
+ }
+
+
+ template <int varCountV>
+ bool var_permutation<varCountV>::insert(VarEnumTD var, int pos)
+ {
+ //JODO URG untested
+ BOOST_ASSERT(!contains(var)); //var_permutation has to be unique;
+ if(varCountV <= var || varCountV == m_Size)
+ return false;
+
+ // Alle nach rechts schaufeln
+ for(int idx=pos; idx < m_Size; idx++)
+ m_Permutation[idx+1] = m_Permutation[idx];
+
+ m_Permutation[pos] = var;
+ }
+
+ template <int varCountV>
+ std::string var_permutation<varCountV>::as_string()const
+ {
+ std::string repr = "[";
+ int idx = 0;
+ if(m_Size>0)
+ repr += to_string<VarEnumTD>::apply(m_Permutation[idx++]);
+
+ while(idx<m_Size)
+ repr += to_string<VarEnumTD>::apply(m_Permutation[idx++]);
+
+ repr += "]";
+
+ return repr;
+ }
+
+
+ template <int varCountV>
+ typename icl::var_permutation<varCountV>::ListTD var_permutation<varCountV>::asList()const
+ {
+ ListTD seq;
+ int idx = 0;
+ while(idx < m_Size)
+ seq.push_back(m_Permutation[idx++]);
+ return seq;
+ }
+
+
+ template <int varCountV>
+ void var_permutation<varCountV>::consequent_permutation(var_permutation& perm, const var_permutation& seq)const
+ {
+ ListTD master = asList(),
+ conseq,
+ unseq = seq.asList();
+
+ master.consequent_permutation(conseq, unseq);
+
+ perm.clear();
+ ICL_const_FORALL(ListTD, it_, conseq)
+ perm.add(*it_);
+ }
+
+ template <int varCountV>
+ int var_permutation<varCountV>::gradeReduct(int grade, const var_permutation& subSeq)const
+ {
+ // subSeq ist echte Untersequenz von *this.
+ if(grade==0)
+ return 0;
+ int subIdx = 0;
+ for(int varIdx = 0; varIdx < size(); varIdx++)
+ {
+ if(subSeq[subIdx] == (*this)[varIdx])
+ subIdx++;
+ if(varIdx+1 == grade)
+ return subIdx;
+ }
+ }
+
+
+}} // namespace icl boost
+
+#endif // __var_permutation_JOFA_040621_H__
+
+

Added: sandbox/icl/boost/icl_xt/var_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/var_tuple.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,181 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+#ifndef __var_tuple_JOFA_040614_H__
+#define __var_tuple_JOFA_040614_H__
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl_xt/fixtupelconst.hpp>
+#include <string>
+#include <sstream>
+
+namespace boost{namespace icl
+{
+ /// tuple of independent variables
+ /** class var_tuple: Die Tupel unabhängiger Variablen. Beschreiben
+ die Zellen eines n-dimensionalen Zählwürfels
+
+ Zuständigkeit: Zellen eines n-dimensionalen Zählwürfels beschreiben. Als
+ Index für Merkmalskombinationsrechner dienen. (Um)Ordnen, Projizieren und
+ Gruppieren unterstützen.
+
+ Zusammenarbeit: Order, Projection, Grouping, Merkmalskombinationsrecher
+
+ FastVarTupel ist schnell (Fast), da es als einfaches array[int] implemetiert wird
+ */
+ template <int varCountV>
+ class var_tuple
+ {
+ public:
+ enum { var_count = varCountV };
+ public:
+ /// Default Ctor. Achtung absichtlich keine Initialisierung!
+ var_tuple(){};
+ /// Ctor initialisiere alle Elemente des Tupels auf einen Wert
+ var_tuple(StatVarTD);
+
+ /// Copy Ctor
+ var_tuple(const var_tuple&);
+
+ /// Assignment
+ var_tuple& operator = (const var_tuple&);
+
+ /// Größe des Tupels
+ int size()const { return varCountV; }
+
+ /// Gleichheit
+ bool operator == (const var_tuple&)const;
+
+ /// Standard-Ordnung
+ bool operator < (const var_tuple&)const;
+
+ /// Lesender Zugriff auf Elemente
+ StatVarTD operator [] (int idx)const { return m_tupel[idx]; }
+ /// Modifizierender Zugriff
+ StatVarTD& operator [] (int idx) { return m_tupel[idx]; }
+
+ ///
+ std::string as_string()const;
+
+ private:
+ StatVarTD m_tupel[varCountV];
+
+ };
+
+
+ template <int varCountV>
+ icl::var_tuple<varCountV>::var_tuple (StatVarTD val) // vor VC8: icl::var_tuple<varCountV>::var_tuple<varCountV>(StatVarTD val)
+ {
+ FOREACH_VAR(idx)
+ m_tupel[idx] = val;
+ }
+
+ template <int varCountV>
+ icl::var_tuple<varCountV>::var_tuple (const var_tuple<varCountV>& src)
+ {
+ FOREACH_VAR(idx)
+ m_tupel[idx] = src.m_tupel[idx];
+ }
+
+ template <int varCountV>
+ var_tuple<varCountV>& var_tuple<varCountV>::operator = (const var_tuple<varCountV>& src)
+ {
+ if(&src != this)
+ {
+ FOREACH_VAR(idx)
+ m_tupel[idx] = src.m_tupel[idx];
+ }
+ return *this;
+ }
+
+
+ template <int varCountV>
+ bool var_tuple<varCountV>::operator == (const var_tuple<varCountV>& rhs)const
+ {
+ for(int idx=0; idx < varCountV; idx++)
+ if(m_tupel[idx] != rhs.m_tupel[idx]) return false;
+
+ return true;
+ }
+
+
+ template <int varCountV>
+ bool var_tuple<varCountV>::operator < (const var_tuple<varCountV>& rhs)const
+ {
+ FOREACH_VAR(idx)
+ if(m_tupel[idx] < rhs.m_tupel[idx]) return true;
+ else if (m_tupel[idx] > rhs.m_tupel[idx]) return false;
+
+ // because all are equal
+ return false;
+ }
+
+ template <int varCountV>
+ std::string var_tuple<varCountV>::as_string()const
+ {
+ std::stringstream repr;
+ repr << "(";
+ for(int idx = 0; idx < varCountV-1; idx++)
+ repr << m_tupel[idx] << ",";
+
+ if(varCountV==0) repr << ")";
+ else repr << m_tupel[varCountV-1] << ")";
+
+ return repr.str();
+ }
+
+
+ //==============================================================================
+ //= Representation
+ //==============================================================================
+
+ template<class CharType, class CharTraits, int varCountV>
+ std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits> &stream, var_tuple<varCountV> const& tuple)
+ {
+ stream << "(";
+ for(int idx = 0; idx < varCountV-1; idx++)
+ stream << tuple[idx] << ",";
+
+ if(varCountV==0)
+ return stream << ")";
+ else
+ return stream << tuple[varCountV-1] << ")";
+ }
+
+
+
+}} // namespace icl boost
+
+
+
+#endif // __var_tuple_JOFA_040614_H__
+
+

Added: sandbox/icl/boost/icl_xt/var_tuple_inscriptor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/var_tuple_inscriptor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,91 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __var_tuple_inscriptor_JOFA_041006_H__
+#define __var_tuple_inscriptor_JOFA_041006_H__
+
+#include <boost/icl/string_list.hpp>
+#include <boost/icl/map.hpp>
+#include <boost/icl/var_permutation.hpp>
+#include <boost/icl/var_tuple.hpp>
+
+namespace boost{namespace icl
+{
+
+
+ template <int varCountV>
+ class var_tuple_inscriptor
+ {
+ private:
+ typedef var_tuple<varCountV> var_tupleT;
+ typedef var_permutation<varCountV> var_permutationT;
+ typedef MapT<int,int> OmissionMapTD;
+
+ public:
+ /** Die Permutation sorgt dafür, dass die Auswahl und Reihenfolge der Beschriftung
+ geändert werden kann. */
+ void setPermutation(const var_permutationT& perm) { m_Perm = perm; }
+ var_permutationT getPermutation()const { return m_Perm; }
+
+ /** Konvertiere einen Tupel von Werten unabhängiger Variablen in eine StringListe
+ von Beschriftungen: Diese dient als Zeilenbeschriftung für Statistikblätter
+ der Excelausgabe.
+
+ 'changeVar' ist der Index der Variablen, die sich bei einer Iteration aendert.
+ So haben wir die Moeglichkeit nur VariablenLabels bei Aenderung auszugeben.
+ changeVar=0 fuehrt dazu, dass alle Variablenabels fuer ein Tulel ausgegeben
+ werden.
+ */
+ virtual void getValueLabels(StringListT& valueLabels, const var_tupleT& tup,
+ VarEnumTD changeVar, int grade)const=0;
+
+ /** Die Liste der Variablentitel anfügen */
+ virtual void addVarTitles(StringListT& headers)const=0;
+
+ /** Nach der Variable 'permVar' werden 'count' spalten leer gelassen */
+ void addOmission(int permVar, int count)
+ { m_Omissions[permVar] = count; }
+
+ int omissionCount(int permVar)const
+ {
+ OmissionMapTD::const_iterator count_ = m_Omissions.find(permVar);
+ if(count_ == m_Omissions.end())
+ return 0;
+ else
+ return (*count_).second;
+ }
+
+ protected:
+ var_permutationT m_Perm;
+ OmissionMapTD m_Omissions;
+ };
+
+}} // namespace icl boost
+
+#endif // __var_tuple_inscriptor_JOFA_041006_H__
+
+

Added: sandbox/icl/boost/icl_xt/var_tuple_order.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl_xt/var_tuple_order.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,161 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+#ifndef __var_tuple_order_JOFA_040620_H__
+#define __var_tuple_order_JOFA_040620_H__
+
+#include <functional>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl_xt/fixtupelconst.hpp>
+#include <boost/icl_xt/var_tuple.hpp>
+#include <boost/icl_xt/var_permutation.hpp>
+#include <boost/icl_xt/grouping.hpp>
+
+namespace boost{namespace icl
+{
+
+ // template <typename VarTupleT> class var_permutation {};
+
+ template <typename VarTupleT>
+ class var_tuple_order : public std::binary_function<VarTupleT, VarTupleT, bool>
+ {
+ public:
+ enum { varCountV = VarTupleT::var_count };
+ typedef var_permutation<varCountV> var_permutationT;
+ typedef grouping<varCountV> groupingT;
+ typedef group_order<varCountV> group_orderT;
+
+ var_tuple_order();
+ var_tuple_order(const var_tuple_order&, const var_permutationT&);
+
+ bool operator() (const VarTupleT& x1, const VarTupleT& x2)const;
+
+ /** Index des ersten Unterschieds zweier Tupel (gemäss der permutierten Reihenfolge).
+ Die permutierte Reihenfolge ist ja die jeweils gültige Reihenfolge. */
+ VarEnumTD indexOfFirstDifference(const VarTupleT& x1, const VarTupleT& x2)const;
+
+ void setPermutation(const var_permutationT& perm) { m_Permutation = perm; }
+ var_permutationT getPermutation()const { return m_Permutation; }
+
+ void setGroupOrder(group_orderT* order) { m_Grouping.setGrouper(order, order->getVarIndex()); }
+
+ /** Liefert den reduzierten Aggregationsgrad einer Teilordnung, die in *this enthalten ist. */
+ int gradeReduct(int grade, const var_tuple_order& subOrder)const
+ { return m_Permutation.gradeReduct(grade, subOrder.getPermutation()); }
+
+ private:
+ // Permutation can also express projection. All independent vars not included in
+ // the permutation are switched off
+ var_permutationT m_Permutation;
+
+ // Conditional and unconditional Grouping
+ groupingT m_Grouping;
+ };
+
+ template <typename VarTupleT>
+ icl::var_tuple_order<VarTupleT>::var_tuple_order ()
+ {
+ m_Permutation.setIdentity();
+ }
+
+ template <typename VarTupleT>
+ icl::var_tuple_order<VarTupleT>::var_tuple_order (const var_tuple_order& order, const var_permutationT& perm):
+ m_Grouping(order.m_Grouping), m_Permutation(perm)
+ {}
+
+
+ template <typename VarTupleT>
+ bool icl::var_tuple_order<VarTupleT>::operator() (const VarTupleT& x1, const VarTupleT& x2)const
+ {
+ ICL_FORALL_VEC(permIdx, m_Permutation)
+ {
+ int idx = m_Permutation[permIdx];
+
+ // Den Pointer der Gruppierungsordnung besorgen
+ const group_orderT* groupedLess = m_Grouping[idx];
+
+ if(groupedLess == NULL)
+ {
+ if(x1[idx] < x2[idx])
+ return true;
+ if(x1[idx] > x2[idx])
+ return false;
+ // OTHERWISE (x1[idx] == x2[idx]): proceed to next variable
+ }
+ else
+ {
+ if((*groupedLess)(x1,x2))
+ return true;
+ if((*groupedLess)(x2,x1))
+ return false;
+ // OTHERWISE x1 and x2 belong to same group. Proceed to next var
+ }
+
+ }
+ // All components are equal
+ return false;
+ }
+
+ template <typename VarTupleT>
+ VarEnumTD icl::var_tuple_order<VarTupleT>::indexOfFirstDifference(const VarTupleT& x1, const VarTupleT& x2)const
+ {
+ ICL_FORALL_VEC(permIdx, m_Permutation)
+ {
+ int idx = m_Permutation[permIdx];
+
+ // Den Pointer der Gruppierungsordnung besorgen
+ const group_orderT* groupedLess = m_Grouping[idx];
+
+ if(groupedLess == NULL)
+ {
+ if(x1[idx] < x2[idx])
+ return permIdx;
+ if(x1[idx] > x2[idx])
+ return permIdx;
+ // OTHERWISE (x1[idx] == x2[idx]): proceed to next variable
+ }
+ else
+ {
+ if((*groupedLess)(x1,x2))
+ return permIdx;
+ if((*groupedLess)(x2,x1))
+ return permIdx;
+ // OTHERWISE x1 and x2 belong to same group. Proceed to next var
+ }
+
+ }
+ // All components are equal
+ return UNDEFINED_INDEX;
+ }
+
+}} // namespace icl boost
+
+#endif // __var_tuple_order_JOFA_040620_H__
+
+

Added: sandbox/icl/boost/validate/driver/abelian_monoid_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/abelian_monoid_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,95 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: 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 BOOST_VALIDATE_DRIVER_ABELIAN_MONOID_DRIVER_HPP_JOFA_100502
+#define BOOST_VALIDATE_DRIVER_ABELIAN_MONOID_DRIVER_HPP_JOFA_100502
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/abelian_monoid_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+ class abelian_monoid_driver : public icl_driver
+ {
+ public:
+ abelian_monoid_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 33;
+ _rootChoice[RootType::interval_set] = 33;
+ _rootChoice[RootType::split_interval_set] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 50;
+ _domainChoice[DomainType::Double] = 50;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("abelian_monoid_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("abelian_monoid_driver::setProfile()") << std::endl;
+ }
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::itl_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new abelian_monoid_validater<icl::set<int> >;
+ case DomainType::Double: return new abelian_monoid_validater<icl::set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new abelian_monoid_validater<interval_set<int> >;
+ case DomainType::Double: return new abelian_monoid_validater<interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new abelian_monoid_validater<split_interval_set<int> >;
+ case DomainType::Double: return new abelian_monoid_validater<split_interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_ABELIAN_MONOID_DRIVER_HPP_JOFA_100502

Added: sandbox/icl/boost/validate/driver/bit_collector_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/bit_collector_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,144 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_BIT_COLLECTOR_DRIVER_HPP_JOFA_091009
+#define BOOST_VALIDATE_DRIVER_BIT_COLLECTOR_DRIVER_HPP_JOFA_091009
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/icl_xt/bits.hpp>
+#include <boost/validate/validater/collector_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class bit_collector_driver : public icl_driver
+ {
+ public:
+ bit_collector_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 50;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 50;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 0;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 0;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("bit_collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("bit_collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("bit_collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("bit_collector_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ ////-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new collector_validater< icl::map<int, icl::bits8, partial_absorber, std::less, inplace_bit_add, inplace_bit_and> >;
+ case IdentityHandlerType::partial_enricher:
+ return new collector_validater< icl::map<int, icl::bits32, partial_enricher, std::less, inplace_bit_add, inplace_bit_and> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case itl_map
+ ////-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new collector_validater<interval_map<int, icl::bits64, partial_absorber, std::less, inplace_bit_add, inplace_bit_and> >;
+ case IdentityHandlerType::partial_enricher:
+ return new collector_validater<interval_map<int, icl::bits16, partial_enricher, std::less, inplace_bit_add, inplace_bit_and> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ ////-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new collector_validater<split_interval_map<int, icl::bits32, partial_absorber, std::less, inplace_bit_add, inplace_bit_and> >;
+ case IdentityHandlerType::partial_enricher:
+ return new collector_validater<split_interval_map<double, icl::bits8, partial_enricher, std::less, inplace_bit_add, inplace_bit_and> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_BIT_COLLECTOR_DRIVER_HPP_JOFA_091009

Added: sandbox/icl/boost/validate/driver/collector_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/collector_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,142 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_COLLECTOR_DRIVER_HPP_JOFA_091009
+#define BOOST_VALIDATE_DRIVER_COLLECTOR_DRIVER_HPP_JOFA_091009
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/validater/collector_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class collector_driver : public icl_driver
+ {
+ public:
+ collector_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 100;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 50;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 50;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 0;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 0;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new collector_validater<icl::map<int,std::set<int> > >;
+ case IdentityHandlerType::partial_enricher: return new collector_validater<icl::map<int,std::set<int>,partial_enricher> >;
+ //case IdentityHandlerType::total_absorber : return new collector_validater<icl::map<int,std::set<int>,total_absorber > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case itl_map
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new collector_validater<interval_map<double,std::set<int> > >;
+ case IdentityHandlerType::partial_enricher: return new collector_validater<interval_map<int,std::set<int>,partial_enricher> >;
+ //case IdentityHandlerType::total_absorber : return new collector_validater<interval_map<int,std::set<int>,total_absorber > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new collector_validater<split_interval_map<int,std::set<int> > >;
+ case IdentityHandlerType::partial_enricher: return new collector_validater<split_interval_map<double,std::set<int>,partial_enricher> >;
+ //case IdentityHandlerType::total_absorber : return new collector_validater<split_interval_map<int,std::set<int>,total_absorber > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_COLLECTOR_DRIVER_HPP_JOFA_091009

Added: sandbox/icl/boost/validate/driver/icl_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/icl_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,312 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_DRIVER_ICL_DRIVER_HPP_JOFA_090303
+#define BOOST_ICL_VALIDATE_DRIVER_ICL_DRIVER_HPP_JOFA_090303
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/validater/concept_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) // 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
+#endif
+
+namespace boost{namespace icl
+{
+ namespace RootType
+ {
+ enum RootTypes
+ {
+ itl_set, interval_set, separate_interval_set, split_interval_set,
+ itl_map, interval_map, split_interval_map,
+ Types_size
+ };
+ }
+
+ namespace DomainType
+ {
+ enum DomainTypes { Int, Double, DomainTypes_size };
+ }
+
+ namespace CodomainType
+ {
+ enum CodomainTypes { Nat, Int, Double, set_int, raw_bitset, CodomainTypes_size };
+ }
+
+ namespace IdentityHandlerType
+ {
+ enum IdentityHandlerTypes { partial_absorber, partial_enricher, total_absorber, total_enricher, IdentityHandlerTypes_size };
+ }
+
+ namespace FreeChoice
+ {
+ enum FreeChoice { _1, _2, _3, _4, _5, FreeChoice_size };
+ }
+
+
+ namespace inform
+ {
+ enum informs { never=0, rarely, frequently };
+ }
+
+
+ class icl_driver
+ {
+ public:
+ icl_driver()
+ : _required_law_validation_count(0)
+ , _required_law_count(0)
+ , _info_level(inform::frequently)
+ {
+ _laws_per_cycle = GentorProfileSgl::it()->laws_per_cycle();
+ }
+
+ bool hasValidProfile()const { return _isValid; }
+
+ virtual void setProfile() = 0;
+ virtual concept_validater* chooseValidater() = 0;
+
+ void require_validation_count(int count){ _required_law_validation_count = count; }
+ int required_validation_count()const { return _required_law_validation_count; }
+
+ void require_law_count(int count){ _required_law_count = count; }
+ int required_law_count()const { return _required_law_count; }
+
+ void terminate_at_law_count(int law_count, int instance_count = 1)
+ {
+ require_law_count(law_count);
+ require_validation_count(instance_count);
+ }
+
+ void set_information_level(int inform){ _info_level = inform; }
+
+ bool validate()
+ {
+ //srand(static_cast<unsigned>(time(NULL))); //Different numbers each run
+ srand(static_cast<unsigned>(1)); //Same numbers each run (std)
+ //srand(static_cast<unsigned>(4711)); //Same numbers each run (varying)
+
+ for(int idx=0; !terminates(); idx++)
+ {
+ if(idx>0 && idx % _laws_per_cycle == 0)
+ if(_info_level == inform::frequently)
+ reportFrequencies();
+ validateType();
+ }
+
+ if(_info_level >= inform::rarely)
+ reportFrequencies();
+
+ return icl::is_empty(_violationsCount);
+ }
+
+ void validateType()
+ {
+ _validater = chooseValidater();
+ if(_validater)
+ {
+ _validater->validate();
+ _validater->addFrequencies(_frequencies);
+ _validater->addViolations(_violationsCount, _violations);
+ delete _validater;
+ }
+ }
+
+ int least_law_validation_count()const
+ {
+ // The least count of validation cycles performed on a single law instance.
+ int min_test_count = 9999;
+
+ ICL_const_FORALL(ValidationCounterT, it, _frequencies)
+ min_test_count = min_test_count < it->second.count() ?
+ min_test_count : it->second.count() ;
+
+ return min_test_count;
+ }
+
+ void reportFrequencies()
+ {
+ std::cout << "------------------------------------------------------------------------------" << std::endl;
+ std::cout << "--- Successfully tested law instantiation -------------------------runs---time" << std::endl;
+ int valid_count = 1;
+ double avg_evaluation_time = 0.0;
+ long instance_count = 0;
+ ICL_FORALL(ValidationCounterT, it, _frequencies)
+ {
+ long law_validation_count = it->second.count();
+ double avg_law_evaluation_time =
+ it->second.time()/(law_validation_count);
+ printf("%3d %-58s%9ld%7.0lf\n",
+ valid_count, it->first.c_str(), law_validation_count, avg_law_evaluation_time);
+
+ avg_evaluation_time += avg_law_evaluation_time;
+ instance_count += law_validation_count;
+ valid_count++;
+ }
+
+ std::cout << "------------------------------------------------------------------------------" << std::endl;
+ // Summary for the current cycle
+ double avg_evaluation_time_per_law = avg_evaluation_time/icl::size(_frequencies);
+ printf( " %10.3lf%-53s%7ld%7.0lf\n",
+ avg_evaluation_time_per_law, " total avg of atomic evaluation (micro sec)", instance_count, avg_evaluation_time_per_law);
+
+ int violation_count = 1;
+ if(!icl::is_empty(_violations))
+ {
+ std::cout << "------------------------------------------------------------------------------" << std::endl;
+ std::cout << "--- Law violations -----------------------------------------------count-------" << std::endl;
+ }
+ ICL_FORALL(ViolationMapT, it, _violations)
+ {
+ printf("%3d %-59s%8d\n", violation_count, it->first.c_str(), it->second.getViolationsCount());
+ violation_count++;
+ }
+ if(!icl::is_empty(_violations))
+ std::cout << "------------------------------------------------------------------------------" << std::endl;
+ ICL_FORALL(ViolationMapT, it, _violations)
+ {
+ PolyLawViolations violas = it->second;
+ violas.reportFirst();
+ }
+ if(!icl::is_empty(_violations))
+ std::cout << "------------------------------------------------------------------------------" << std::endl;
+ }
+
+ void reportFrequencies(const std::string& filename)
+ {
+ FILE* fp = fopen(filename.c_str(), "w");
+ int valid_count = 1;
+ ICL_FORALL(ValidationCounterT, it, _frequencies)
+ {
+ fprintf(fp, "%3d %-66s\n", valid_count, it->first.c_str());
+ valid_count++;
+ }
+ }
+
+ void reportTypeChoiceError(const std::string& location, int rootChoice, const ChoiceT& chooser)const
+ {
+ std::cout << location
+ << "Type choice: " << rootChoice << " is out of range or unselectable in switch clause.\n"
+ << "Expected types and their weights are:\n"
+ << chooser.asString();
+ }
+
+
+ protected:
+ void setValid(bool truth)
+ {
+ _isValid = truth;
+ }
+
+ void setRootTypeNames()
+ {
+ std::vector<std::string> type_names(RootType::Types_size);
+ type_names[RootType::itl_set] = "itl_set";
+ type_names[RootType::interval_set] = "interval_set";
+ type_names[RootType::separate_interval_set] = "separate_interval_set";
+ type_names[RootType::split_interval_set] = "split_interval_set";
+ type_names[RootType::itl_map] = "itl_map";
+ type_names[RootType::interval_map] = "interval_map";
+ type_names[RootType::split_interval_map] = "split_interval_map";
+ _rootChoice.setTypeNames(type_names);
+ }
+ void setDomainTypeNames()
+ {
+ std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
+ type_names[CodomainType::Int] = "Int";
+ type_names[CodomainType::Double] = "Double";
+ _domainChoice.setTypeNames(type_names);
+ }
+ void setCodomainTypeNames()
+ {
+ std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
+ type_names[CodomainType::Int] = "Int";
+ type_names[CodomainType::Double] = "Double";
+ type_names[CodomainType::set_int] = "set_int";
+ type_names[CodomainType::raw_bitset] = "raw_bitset";
+ _codomainChoice.setTypeNames(type_names);
+ }
+ void setIdentityHandlerTypeNames()
+ {
+ std::vector<std::string> type_names(IdentityHandlerType::IdentityHandlerTypes_size);
+ type_names[IdentityHandlerType::partial_absorber] = "partial_absorber";
+ type_names[IdentityHandlerType::partial_enricher] = "partial_enricher";
+ type_names[IdentityHandlerType::total_absorber] = "total_absorber";
+ type_names[IdentityHandlerType::total_enricher] = "total_enricher";
+ _identityHandlerChoice.setTypeNames(type_names);
+ }
+ void setFreeChoiceNames()
+ {
+ std::vector<std::string> type_names(FreeChoice::FreeChoice_size);
+ type_names[FreeChoice::_1] = "_1";
+ type_names[FreeChoice::_2] = "_2";
+ type_names[FreeChoice::_3] = "_3";
+ type_names[FreeChoice::_4] = "_4";
+ _codomainChoice.setTypeNames(type_names);
+ }
+
+ concept_validater* choiceError(const std::string& location, int value, const ChoiceT& choice)
+ {
+ reportTypeChoiceError(location, value, choice);
+ setValid(false);
+ return NULL;
+ }
+
+ private:
+ bool terminates()const
+ {
+ if(!hasValidProfile())
+ return true;
+ else if(_required_law_count == 0 || _required_law_validation_count == 0)
+ return false; // If counts are not limited: Run for ever.
+ else if(icl::size(_frequencies) < static_cast<size_t>(_required_law_count))
+ return false; // Not yet reached all laws
+ else
+ // All laws reached. Enough validation cycles for every law?
+ return _required_law_validation_count <= least_law_validation_count();
+ }
+
+ protected:
+ ChoiceT _rootChoice;
+ ChoiceT _domainChoice;
+ ChoiceT _codomainChoice;
+ ChoiceT _identityHandlerChoice;
+ ChoiceT _freeChoice;
+
+ private:
+ concept_validater* _validater;
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
+ bool _isValid;
+
+ int _laws_per_cycle; // After _laws_per_cycle times a cycle is
+ // done and times and frequencies of law
+ // validations are reported for all instances.
+
+ int _required_law_validation_count;
+ int _required_law_count;
+ int _info_level;
+ };
+
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_ICL_VALIDATE_DRIVER_ICL_DRIVER_HPP_JOFA_090303
+
+

Added: sandbox/icl/boost/validate/driver/icl_morphic_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/icl_morphic_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,140 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/validater/interval_morphic_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+class icl_morphic_driver : public icl_driver
+{
+public:
+ icl_morphic_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 20;
+ _rootChoice[RootType::separate_interval_set] = 20;
+ _rootChoice[RootType::split_interval_set] = 20;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 20;
+ _rootChoice[RootType::split_interval_map] = 20;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 33;
+ _codomainChoice[CodomainType::Int] = 33;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 34;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("icl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("icl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("icl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("icl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ // Sets
+ //-----------------------------------------------------------------
+ case RootType::interval_set: return new interval_morphic_validater<interval_set<int> >;
+ case RootType::separate_interval_set: return new interval_morphic_validater<separate_interval_set<int> >;
+ case RootType::split_interval_set: return new interval_morphic_validater<split_interval_set<int> >;
+ //-----------------------------------------------------------------
+ // Maps
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ NEURONIZER_CASES(interval_morphic_validater, split_interval_map, int, int)
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"),
+ identityHandlerChoice, _identityHandlerChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ NEURONIZER_CASES(interval_morphic_validater, interval_map, int, int)
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch(rootChoice)
+
+ }
+
+};
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/driver/icl_relations_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/icl_relations_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,171 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/validater/icl_induced_relations.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class icl_relations_driver : public icl_driver
+ {
+ public:
+ icl_relations_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 10;
+ _rootChoice[RootType::separate_interval_set] = 10;
+ _rootChoice[RootType::split_interval_set] = 10;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 35;
+ _rootChoice[RootType::split_interval_map] = 35;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0; //NOTE: induced relations only
+ setDomainTypeNames(); // work for integral DomainType, because
+ _domainChoice.init(); // atomized_type needs to be finite.
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("icl_relations_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("icl_relations_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("icl_relations_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("icl_relations_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<separate_interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<split_interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new icl_induced_relations_validater<split_interval_map<int,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher:
+ return new icl_induced_relations_validater<split_interval_map<int,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber:
+ return new icl_induced_relations_validater<split_interval_map<int,int,total_absorber> >;
+ case IdentityHandlerType::total_enricher:
+ return new icl_induced_relations_validater<split_interval_map<int,int,total_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"),
+ identityHandlerChoice, _identityHandlerChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new icl_induced_relations_validater<interval_map<int,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher:
+ return new icl_induced_relations_validater<interval_map<int,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber:
+ return new icl_induced_relations_validater<interval_map<int,int,total_absorber> >;
+ case IdentityHandlerType::total_enricher:
+ return new icl_induced_relations_validater<interval_map<int,int,total_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"),
+ identityHandlerChoice, _identityHandlerChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/driver/icl_set_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/icl_set_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,111 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: 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 BOOST_VALIDATE_DRIVER_ICL_SET_DRIVER_HPP_JOFA_080405
+#define BOOST_VALIDATE_DRIVER_ICL_SET_DRIVER_HPP_JOFA_080405
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/icl_set_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class icl_set_driver : public icl_driver
+ {
+ public:
+ icl_set_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 25;
+ _rootChoice[RootType::interval_set] = 25;
+ _rootChoice[RootType::separate_interval_set] = 25;
+ _rootChoice[RootType::split_interval_set] = 25;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 50;
+ _domainChoice[DomainType::Double] = 50;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("icl_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("icl_set_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::itl_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_set_validater<std::set<int> >;
+ case DomainType::Double: return new icl_set_validater<std::set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_set_validater<interval_set<int> >;
+ case DomainType::Double: return new icl_set_validater<interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_set_validater<separate_interval_set<int> >;
+ case DomainType::Double: return new icl_set_validater<separate_interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_set_validater<split_interval_set<int> >;
+ case DomainType::Double: return new icl_set_validater<split_interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_ICL_SET_DRIVER_HPP_JOFA_080405

Added: sandbox/icl/boost/validate/driver/icl_single_law_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/icl_single_law_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,176 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SINGLE_LAW_DRIVER_HPP_JOFA_080405
+#define BOOST_VALIDATE_DRIVER_SINGLE_LAW_DRIVER_HPP_JOFA_080405
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/validater/icl_induced_relations.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ template<class Law>
+ class icl_single_law_driver : public icl_driver
+ {
+ public:
+ icl_single_law_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 10;
+ _rootChoice[RootType::separate_interval_set] = 10;
+ _rootChoice[RootType::split_interval_set] = 10;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 35;
+ _rootChoice[RootType::split_interval_map] = 35;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0; //NOTE: induced relations only
+ setDomainTypeNames(); // work for integral DomainType, because
+ _domainChoice.init(); // atomized_type needs to be finite.
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("icl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("icl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("icl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("icl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<separate_interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_induced_relations_validater<split_interval_set<int> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new icl_induced_relations_validater<split_interval_map<int,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher:
+ return new icl_induced_relations_validater<split_interval_map<int,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber:
+ return new icl_induced_relations_validater<split_interval_map<int,int,total_absorber> >;
+ case IdentityHandlerType::total_enricher:
+ return new icl_induced_relations_validater<split_interval_map<int,int,total_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"),
+ identityHandlerChoice, _identityHandlerChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber:
+ return new icl_induced_relations_validater<interval_map<int,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher:
+ return new icl_induced_relations_validater<interval_map<int,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber:
+ return new icl_induced_relations_validater<interval_map<int,int,total_absorber> >;
+ case IdentityHandlerType::total_enricher:
+ return new icl_induced_relations_validater<interval_map<int,int,total_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"),
+ identityHandlerChoice, _identityHandlerChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SINGLE_LAW_DRIVER_HPP_JOFA_080405
+

Added: sandbox/icl/boost/validate/driver/interval_bitset_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/interval_bitset_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,76 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_INTERVAL_BITSET_DRIVER_HPP_JOFA_091027
+#define BOOST_VALIDATE_DRIVER_INTERVAL_BITSET_DRIVER_HPP_JOFA_091027
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/icl_xt/interval_bitset.hpp>
+#include <boost/validate/validater/icl_set_validater.hpp>
+#include <boost/validate/validater/icl_order_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class interval_bitset_driver : public icl_driver
+ {
+ public:
+ interval_bitset_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _freeChoice.setSize(FreeChoice::FreeChoice_size);
+ _freeChoice.setMaxWeights(100);
+ _freeChoice[FreeChoice::_1] = 20;
+ _freeChoice[FreeChoice::_2] = 20;
+ _freeChoice[FreeChoice::_3] = 20;
+ _freeChoice[FreeChoice::_4] = 20;
+ _freeChoice[FreeChoice::_5] = 20;
+ setRootTypeNames();
+ _freeChoice.init();
+
+ if(!_freeChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _freeChoice.inconsitencyMessage("interval_bitset_driver::setProfile()") << std::endl;
+ }
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int freeChoice = _freeChoice.some();
+
+ switch(freeChoice)
+ {
+ case FreeChoice::_1:
+ return new icl_set_validater< interval_bitset<int, bits<unsigned char> > >;
+ case FreeChoice::_2:
+ return new icl_order_validater< interval_bitset<int, bits<unsigned short> > >;
+ case FreeChoice::_3:
+ return new icl_set_validater< interval_bitset<int, bits<unsigned int> > >;
+ case FreeChoice::_4:
+ return new icl_order_validater< interval_bitset<int, bits<unsigned long> > >;
+ case FreeChoice::_5:
+ return new icl_order_validater< interval_bitset<int, bits<unsigned long long> > >;
+ default: return choiceError(ICL_LOCATION("freeChoice:\n"), freeChoice, _freeChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_INTERVAL_BITSET_DRIVER_HPP_JOFA_091027

Added: sandbox/icl/boost/validate/driver/map_copy_conformity_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/map_copy_conformity_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,147 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_MAP_COPY_CONFORMITY_DRIVER_HPP_JOFA_091006
+#define BOOST_VALIDATE_DRIVER_MAP_COPY_CONFORMITY_DRIVER_HPP_JOFA_091006
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/icl_xt/list.hpp>
+#include <boost/validate/validater/function_equality_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class map_copy_conformity_driver : public icl_driver
+ {
+ public:
+ map_copy_conformity_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("map_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("map_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("map_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("map_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ typedef icl::interval<double>::type interval_double;
+ typedef icl::interval<int>::type interval_int;
+
+ int rootChoice = _rootChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new function_equality_validater<icl::list<std::pair<int,int> >, icl::map<int,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new function_equality_validater<icl::list<std::pair<int,int> >, icl::map<int,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new function_equality_validater<icl::list<std::pair<int,int> >, icl::map<int,int,total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new function_equality_validater<icl::list<std::pair<int,int> >, icl::map<int,int,total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case itl_map
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new function_equality_validater<icl::list<std::pair<interval_double,int> >, interval_map<double,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new function_equality_validater<icl::list<std::pair<interval_double,int> >, interval_map<double,int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new function_equality_validater<icl::list<std::pair<interval_int, int> >, interval_map<int, int,total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new function_equality_validater<icl::list<std::pair<interval_int, int> >, interval_map<int, int,total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new function_equality_validater<icl::list<std::pair<interval_double,int> >, split_interval_map<double,int,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new function_equality_validater<icl::list<std::pair<interval_int, int> >, split_interval_map<int, int,partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new function_equality_validater<icl::list<std::pair<interval_double,int> >, split_interval_map<double,int,total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new function_equality_validater<icl::list<std::pair<interval_int, int> >, split_interval_map<int, int,total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_MAP_COPY_CONFORMITY_DRIVER_HPP_JOFA_091006

Added: sandbox/icl/boost/validate/driver/map_order_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/map_order_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,183 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/utility.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/validater/icl_order_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ class map_order_driver : public icl_driver
+ {
+ public:
+ map_order_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 50;
+ _domainChoice[DomainType::Double] = 50;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 0;
+ _codomainChoice[CodomainType::Int] = 50;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 50;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 50;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 50;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 0;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 0;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("map_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("map_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("map_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("map_order_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ //int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<icl::map<int,nat,total_enricher> >;
+ case CodomainType::Int: return new icl_order_validater<icl::map<int,int,partial_absorber> >;
+ case CodomainType::set_int: return new icl_order_validater<icl::map<int,std::set<int>,partial_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }//switch codomain
+
+ case DomainType::Double:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<icl::map<double,nat,partial_enricher> >;
+ case CodomainType::Int: return new icl_order_validater<icl::map<double,int,total_absorber> >;
+ case CodomainType::set_int: return new icl_order_validater<icl::map<double,std::set<int>,partial_absorber> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }//switch codomain
+
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }//switch domain
+ }//case itl_map
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<interval_map<int,nat,partial_absorber> >;
+ case CodomainType::Int: return new icl_order_validater<interval_map<int,int,total_enricher> >;
+ case CodomainType::set_int: return new icl_order_validater<interval_map<int,std::set<int>,total_absorber> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }// switch codomain
+ case DomainType::Double:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<interval_map<double,nat,total_absorber> >;
+ case CodomainType::Int: return new icl_order_validater<interval_map<double,int,partial_enricher> >;
+ case CodomainType::set_int: return new icl_order_validater<interval_map<double,std::set<int>,total_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }// switch codomain
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }//switch domain
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<split_interval_map<int,nat,total_enricher> >;
+ case CodomainType::Int: return new icl_order_validater<split_interval_map<int,int,partial_absorber> >;
+ case CodomainType::set_int: return new icl_order_validater<split_interval_map<int,std::set<int>,partial_enricher> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }
+ case DomainType::Double:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new icl_order_validater<split_interval_map<double,nat,partial_enricher> >;
+ case CodomainType::Int: return new icl_order_validater<split_interval_map<double,int,total_absorber> >;
+ case CodomainType::set_int: return new icl_order_validater<split_interval_map<double,std::set<int>,partial_absorber> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }//switch domain
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/driver/set_copy_conformity_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/set_copy_conformity_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,118 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SET_COPY_CONFORMITY_DRIVER_HPP_JOFA_091013
+#define BOOST_VALIDATE_DRIVER_SET_COPY_CONFORMITY_DRIVER_HPP_JOFA_091013
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/icl_xt/list.hpp>
+#include <boost/validate/validater/function_equality_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class set_copy_conformity_driver : public icl_driver
+ {
+ public:
+ set_copy_conformity_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 25;
+ _rootChoice[RootType::interval_set] = 25;
+ _rootChoice[RootType::separate_interval_set] = 25;
+ _rootChoice[RootType::split_interval_set] = 25;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 0;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("set_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("set_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("set_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("set_copy_conformity_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_set: return new function_equality_validater<icl::list<int>, icl::set<int> >;
+ case RootType::interval_set: return new function_equality_validater<icl::list<ICL_INTERVAL_DEFAULT<int> >, interval_set<int> >;
+ case RootType::separate_interval_set: return new function_equality_validater<icl::list<ICL_INTERVAL_DEFAULT<int> >, separate_interval_set<int> >;
+ case RootType::split_interval_set: return new function_equality_validater<icl::list<ICL_INTERVAL_DEFAULT<int> >, split_interval_set<int> >;
+ //-----------------------------------------------------------------
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SET_COPY_CONFORMITY_DRIVER_HPP_JOFA_091013

Added: sandbox/icl/boost/validate/driver/set_order_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/set_order_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,142 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/utility.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/validater/icl_order_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ class set_order_driver : public icl_driver
+ {
+ public:
+ set_order_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 25;
+ _rootChoice[RootType::interval_set] = 25;
+ _rootChoice[RootType::separate_interval_set] = 25;
+ _rootChoice[RootType::split_interval_set] = 25;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 0;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 50;
+ _domainChoice[DomainType::Double] = 50;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 0;
+ _codomainChoice[CodomainType::Int] = 50;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 50;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 50;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 50;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 0;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 0;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("set_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("set_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("set_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("set_order_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ //int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::itl_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_order_validater<std::set<int> >;
+ case DomainType::Double: return new icl_order_validater<std::set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_order_validater<interval_set<int> >;
+ case DomainType::Double: return new icl_order_validater<interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_order_validater<separate_interval_set<int> >;
+ case DomainType::Double: return new icl_order_validater<separate_interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new icl_order_validater<split_interval_set<int> >;
+ case DomainType::Double: return new icl_order_validater<split_interval_set<double> >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/driver/signed_quantifier_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/signed_quantifier_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,146 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SIGNED_QUANTIFIER_DRIVER_HPP_JOFA_091013
+#define BOOST_VALIDATE_DRIVER_SIGNED_QUANTIFIER_DRIVER_HPP_JOFA_091013
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/signed_quantifier_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class signed_quantifier_driver : public icl_driver
+ {
+ public:
+ signed_quantifier_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 0;
+ _domainChoice[DomainType::Double] = 100;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new signed_quantifier_validater<icl::map<int, int, partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new signed_quantifier_validater<icl::map<int, double, partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new signed_quantifier_validater<icl::map<double, int, total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new signed_quantifier_validater<icl::map<double, double, total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case itl_map
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new signed_quantifier_validater<interval_map<double, double, partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new signed_quantifier_validater<interval_map<double, int, partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new signed_quantifier_validater<interval_map<int, double, total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new signed_quantifier_validater<interval_map<int, int, total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new signed_quantifier_validater<split_interval_map<double, int, partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new signed_quantifier_validater<split_interval_map<int, double, partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new signed_quantifier_validater<split_interval_map<double, int, total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new signed_quantifier_validater<split_interval_map<int, double, total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SIGNED_QUANTIFIER_DRIVER_HPP_JOFA_091013

Added: sandbox/icl/boost/validate/driver/sorted_associative_bitset_back_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_bitset_back_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,69 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_BACK_DRIVER_HPP_JOFA_091202
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_BACK_DRIVER_HPP_JOFA_091202
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_back_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_bitset_back_driver : public icl_driver
+ {
+ public:
+ sorted_associative_bitset_back_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ const int used_choices = 4;
+ setValid(true);
+ _freeChoice.setSize(used_choices);
+ _freeChoice.setMaxWeights(100);
+ _freeChoice[FreeChoice::_1] = 25;
+ _freeChoice[FreeChoice::_2] = 25;
+ _freeChoice[FreeChoice::_3] = 25;
+ _freeChoice[FreeChoice::_4] = 25;
+ setRootTypeNames();
+ _freeChoice.init();
+
+ if(!_freeChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _freeChoice.inconsitencyMessage("interval_bitset_driver::setProfile()") << std::endl;
+ }
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int freeChoice = _freeChoice.some();
+
+ switch(freeChoice)
+ {
+ case FreeChoice::_1:
+ return new sorted_associative_back_validater< interval_bitset<int, bits<unsigned char> >, icl::list<int> >;
+ case FreeChoice::_2:
+ return new sorted_associative_back_validater< interval_bitset<int, bits<unsigned short> >, icl::list<int> >;
+ case FreeChoice::_3:
+ return new sorted_associative_back_validater< interval_bitset<int, bits<unsigned long> >, icl::list<int> >;
+ case FreeChoice::_4:
+ return new sorted_associative_back_validater< interval_bitset<int, bits<unsigned long long> >, icl::list<int> >;
+ default: return choiceError(ICL_LOCATION("freeChoice:\n"), freeChoice, _freeChoice);
+ } //switch()
+
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_BACK_DRIVER_HPP_JOFA_091202

Added: sandbox/icl/boost/validate/driver/sorted_associative_bitset_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_bitset_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,69 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_DRIVER_HPP_JOFA_091126
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_DRIVER_HPP_JOFA_091126
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_bitset_driver : public icl_driver
+ {
+ public:
+ sorted_associative_bitset_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ const int used_choices = 4;
+ setValid(true);
+ _freeChoice.setSize(used_choices);
+ _freeChoice.setMaxWeights(100);
+ _freeChoice[FreeChoice::_1] = 25;
+ _freeChoice[FreeChoice::_2] = 25;
+ _freeChoice[FreeChoice::_3] = 25;
+ _freeChoice[FreeChoice::_4] = 25;
+ setRootTypeNames();
+ _freeChoice.init();
+
+ if(!_freeChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _freeChoice.inconsitencyMessage("interval_bitset_driver::setProfile()") << std::endl;
+ }
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int freeChoice = _freeChoice.some();
+
+ switch(freeChoice)
+ {
+ case FreeChoice::_1:
+ return new sorted_associative_validater< interval_bitset<int, bits<unsigned char> >, icl::list<int> >;
+ case FreeChoice::_2:
+ return new sorted_associative_validater< interval_bitset<int, bits<unsigned short> >, icl::list<int> >;
+ case FreeChoice::_3:
+ return new sorted_associative_validater< interval_bitset<int, bits<unsigned long> >, icl::list<int> >;
+ case FreeChoice::_4:
+ return new sorted_associative_validater< interval_bitset<int, bits<unsigned long long> >, icl::list<int> >;
+ default: return choiceError(ICL_LOCATION("freeChoice:\n"), freeChoice, _freeChoice);
+ } //switch()
+
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_BITSET_DRIVER_HPP_JOFA_091126

Added: sandbox/icl/boost/validate/driver/sorted_associative_map_back_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_map_back_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,134 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_BACK_DRIVER_HPP_JOFA_091202
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_BACK_DRIVER_HPP_JOFA_091202
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_back_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_map_back_driver : public icl_driver
+ {
+ public:
+ sorted_associative_map_back_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 50;
+ _rootChoice[RootType::split_interval_map] = 50;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("sorted_associative_map_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("sorted_associative_map_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("sorted_associative_map_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("sorted_associative_map_back_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new sorted_associative_back_validater<interval_map<int,int,partial_absorber>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::partial_enricher: return new sorted_associative_back_validater<interval_map<int,int,partial_enricher>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_absorber: return new sorted_associative_back_validater<interval_map<int,int,total_absorber >, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_enricher: return new sorted_associative_back_validater<interval_map<int,int,total_enricher >, icl::list<std::pair<int,int> > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new sorted_associative_back_validater<split_interval_map<int,int,partial_absorber>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::partial_enricher: return new sorted_associative_back_validater<split_interval_map<int,int,partial_enricher>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_absorber: return new sorted_associative_back_validater<split_interval_map<int,int,total_absorber >, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_enricher: return new sorted_associative_back_validater<split_interval_map<int,int,total_enricher >, icl::list<std::pair<int,int> > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_BACK_DRIVER_HPP_JOFA_091202

Added: sandbox/icl/boost/validate/driver/sorted_associative_map_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_map_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,134 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_DRIVER_HPP_JOFA_091126
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_DRIVER_HPP_JOFA_091126
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_map_driver : public icl_driver
+ {
+ public:
+ sorted_associative_map_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 50;
+ _rootChoice[RootType::split_interval_map] = 50;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("sorted_associative_map_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("sorted_associative_map_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("sorted_associative_map_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("sorted_associative_map_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new sorted_associative_validater<interval_map<int,int,partial_absorber>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::partial_enricher: return new sorted_associative_validater<interval_map<int,int,partial_enricher>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_absorber: return new sorted_associative_validater<interval_map<int,int,total_absorber >, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_enricher: return new sorted_associative_validater<interval_map<int,int,total_enricher >, icl::list<std::pair<int,int> > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new sorted_associative_validater<split_interval_map<int,int,partial_absorber>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::partial_enricher: return new sorted_associative_validater<split_interval_map<int,int,partial_enricher>, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_absorber: return new sorted_associative_validater<split_interval_map<int,int,total_absorber >, icl::list<std::pair<int,int> > >;
+ case IdentityHandlerType::total_enricher: return new sorted_associative_validater<split_interval_map<int,int,total_enricher >, icl::list<std::pair<int,int> > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_MAP_DRIVER_HPP_JOFA_091126

Added: sandbox/icl/boost/validate/driver/sorted_associative_set_back_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_set_back_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,113 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_BACK_DRIVER_HPP_JOFA_091202
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_BACK_DRIVER_HPP_JOFA_091202
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_back_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_set_back_driver : public icl_driver
+ {
+ public:
+ sorted_associative_set_back_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 33;
+ _rootChoice[RootType::separate_interval_set] = 33;
+ _rootChoice[RootType::split_interval_set] = 34;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 0;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("sorted_associative_set_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("sorted_associative_set_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("sorted_associative_set_back_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("sorted_associative_set_back_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ //int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType:: interval_set: return new sorted_associative_back_validater< interval_set<int>, icl::list<int> >;
+ case RootType::separate_interval_set: return new sorted_associative_back_validater<separate_interval_set<int>, icl::list<int> >;
+ case RootType:: split_interval_set: return new sorted_associative_back_validater< split_interval_set<int>, icl::list<int> >;
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_BACK_DRIVER_HPP_JOFA_091202

Added: sandbox/icl/boost/validate/driver/sorted_associative_set_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/sorted_associative_set_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,115 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_DRIVER_HPP_JOFA_091126
+#define BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_DRIVER_HPP_JOFA_091126
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/sorted_associative_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class sorted_associative_set_driver : public icl_driver
+ {
+ public:
+ sorted_associative_set_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 33;
+ _rootChoice[RootType::separate_interval_set] = 33;
+ _rootChoice[RootType::split_interval_set] = 34;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 0;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("sorted_associative_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("sorted_associative_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("sorted_associative_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("sorted_associative_set_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ //int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType:: interval_set: return new sorted_associative_validater< interval_set<int>, icl::list<int> >;
+ case RootType::separate_interval_set: return new sorted_associative_validater<separate_interval_set<int>, icl::list<int> >;
+ case RootType:: split_interval_set: return new sorted_associative_validater< split_interval_set<int>, icl::list<int> >;
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_DRIVER_SORTED_ASSOCIATIVE_SET_DRIVER_HPP_JOFA_091126

Added: sandbox/icl/boost/validate/driver/unsigned_quantifier_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/driver/unsigned_quantifier_driver.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,144 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/validater/unsigned_quantifier_validater.hpp>
+#include <boost/validate/driver/icl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace icl
+{
+
+ class unsigned_quantifier_driver : public icl_driver
+ {
+ public:
+ unsigned_quantifier_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _identityHandlerChoice.setSize(IdentityHandlerType::IdentityHandlerTypes_size);
+ _identityHandlerChoice.setMaxWeights(100);
+ _identityHandlerChoice[IdentityHandlerType::partial_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::partial_enricher] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_absorber] = 25;
+ _identityHandlerChoice[IdentityHandlerType::total_enricher] = 25;
+ setIdentityHandlerTypeNames();
+ _identityHandlerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_identityHandlerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _identityHandlerChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ concept_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ //int domainChoice = _domainChoice.some();
+ //int codomainChoice = _codomainChoice.some();
+ int identityHandlerChoice = _identityHandlerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ case RootType::itl_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new unsigned_quantifier_validater<icl::map<double,double,partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new unsigned_quantifier_validater<icl::map<double,nat, partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new unsigned_quantifier_validater<icl::map<int, double,total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new unsigned_quantifier_validater<icl::map<int, nat, total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::itl_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case itl_map
+ //-----------------------------------------------------------------
+ case RootType::interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new unsigned_quantifier_validater<interval_map<int, nat, partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new unsigned_quantifier_validater<interval_map<int, double,partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new unsigned_quantifier_validater<interval_map<double,nat, total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new unsigned_quantifier_validater<interval_map<double,double,total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case interval_map
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(identityHandlerChoice) {
+ case IdentityHandlerType::partial_absorber: return new unsigned_quantifier_validater<split_interval_map<int, nat, partial_absorber> >;
+ case IdentityHandlerType::partial_enricher: return new unsigned_quantifier_validater<split_interval_map<double,nat, partial_enricher> >;
+ case IdentityHandlerType::total_absorber: return new unsigned_quantifier_validater<split_interval_map<int, double,total_absorber > >;
+ case IdentityHandlerType::total_enricher: return new unsigned_quantifier_validater<split_interval_map<double,double,total_enricher > >;
+ default: return choiceError(ICL_LOCATION("\nRootType::split_interval_map: identityHandlerChoice:\n"), identityHandlerChoice, _identityHandlerChoice);
+ }//switch identityHandlerChoice
+ }//case split_interval_map
+ //-----------------------------------------------------------------
+
+ default: return choiceError(ICL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ }
+
+ };
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/gentor/gentorprofile.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/gentor/gentorprofile.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,191 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <math.h>
+#include <boost/validate/type/nat.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl/interval.hpp>
+
+namespace boost{namespace icl
+{
+
+ class GentorProfile
+ {
+ public:
+ GentorProfile();
+
+ void set_defaults();
+ void set_debug_defaults();
+ void set_release_defaults();
+
+ void set_std_profile(int unit, int factor = 1);
+ void set_polygon_profile(int max_polygon_set_size, int max_polygon_size, int min_coord, int max_coord);
+
+ void set_range_int(int lwb, int upb)
+ { _range_int = icl::interval<int>::right_open(lwb, upb); }
+ void set_range_nat(cnat lwb, cnat upb)
+ { _range_nat = icl::interval<cnat>::right_open(lwb, upb); }
+ void set_range_double(double lwb, double upb)
+ { _range_double = icl::interval<double>::right_open(lwb, upb); }
+ void set_range_ContainerSize(int lwb, int upb)
+ { _range_ContainerSize = icl::interval<int>::right_open(lwb, upb); }
+ void set_range_interval_int(int lwb, int upb)
+ { _range_interval_int = icl::interval<int>::right_open(lwb, upb); }
+ void set_range_interval_double(double lwb, double upb)
+ { _range_interval_double = icl::interval<double>::right_open(lwb, upb); }
+ void set_maxIntervalLength(int val)
+ { _maxIntervalLength = val; }
+ void set_range_codomain_ContainerSize(int lwb, int upb)
+ { _range_codomain_ContainerSize = icl::interval<int>::right_open(lwb, upb); }
+ void set_repeat_count(int repeat) { _repeat_count = repeat; }
+ void set_trials_count(int trials) { _trials_count = trials; }
+ void set_trials_count_release(int trials) { _trials_count_release = trials; }
+ void set_laws_per_cycle(int count){ _laws_per_cycle = count; }
+ void set_debug_slowdown(double factor){ _debug_slowdown = factor; }
+
+ icl::interval<int>::type range_int() { return _range_int; }
+ icl::interval<cnat>::type range_nat() { return _range_nat; }
+ icl::interval<double>::type range_double() { return _range_double; }
+ icl::interval<int>::type range_ContainerSize() { return _range_ContainerSize; }
+ icl::interval<int>::type range_interval_int() { return _range_interval_int; }
+ icl::interval<double>::type range_interval_double() { return _range_interval_double; }
+ int maxIntervalLength() { return _maxIntervalLength; }
+ icl::interval<int>::type range_codomain_ContainerSize()
+ { return _range_codomain_ContainerSize; }
+ int repeat_count() { return _repeat_count; }
+ int trials_count() { return _trials_count; }
+ int trials_count_release() { return _trials_count_release; }
+ int laws_per_cycle() { return _laws_per_cycle; }
+
+ int unit() { return _unit; }
+ int scaling() { return _scaling; }
+
+ double debug_slowdown()const { return _debug_slowdown; }
+
+ int adjusted_trials_count()const;
+
+ void report_profile();
+
+ private:
+ icl::interval<int>::type _range_int;
+ icl::interval<cnat>::type _range_nat;
+ icl::interval<double>::type _range_double;
+ icl::interval<int>::type _range_ContainerSize;
+
+ icl::interval<int>::type _range_interval_int;
+ icl::interval<double>::type _range_interval_double;
+ int _maxIntervalLength;
+
+ icl::interval<int>::type _range_codomain_ContainerSize;
+ int _repeat_count;
+ int _trials_count;
+ int _trials_count_release;
+ int _laws_per_cycle;
+
+ double _debug_slowdown;
+
+ int _unit;
+ int _scaling;
+ };
+
+
+ class GentorProfileSgl // SINGLETON PATTERN
+ {
+ // Singleton pattern part -----------------------------------------------------
+ public:
+ static GentorProfileSgl* it(); // function to call the unique instance
+
+ protected:
+ GentorProfileSgl(); // default constructor is not callable from outside
+ // preventing illegal instances
+
+ // specific interface ---------------------------------------------------------
+ public:
+ void set_range_int(int lwb, int upb) { m_profile.set_range_int(lwb, upb); }
+ void set_range_nat(cnat lwb, cnat upb) { m_profile.set_range_nat(lwb, upb); }
+ void set_range_double(double lwb, double upb) { m_profile.set_range_double(lwb, upb); }
+ void set_range_ContainerSize(int lwb, int upb) { m_profile.set_range_ContainerSize(lwb, upb); }
+ void set_range_interval_int(int lwb, int upb) { m_profile.set_range_interval_int(lwb, upb); }
+ void set_range_interval_double(double lwb, double upb){ m_profile.set_range_interval_double(lwb, upb); }
+ void set_maxIntervalLength(int val) { m_profile.set_maxIntervalLength(val); }
+ void set_range_codomain_ContainerSize(int lwb, int upb)
+ { m_profile.set_range_codomain_ContainerSize(lwb, upb); }
+ void set_repeat_count(int repeat) { m_profile.set_repeat_count(repeat); }
+ void set_trials_count(int trials) { m_profile.set_trials_count(trials); }
+ void set_laws_per_cycle(int count) { m_profile.set_laws_per_cycle(count); }
+
+ icl::interval<int>::type range_int() { return m_profile.range_int(); }
+ icl::interval<cnat>::type range_nat() { return m_profile.range_nat(); }
+ icl::interval<double>::type range_double() { return m_profile.range_double(); }
+ icl::interval<int>::type range_ContainerSize(){ return m_profile.range_ContainerSize(); }
+ icl::interval<int>::type range_interval_int() { return m_profile.range_interval_int(); }
+ icl::interval<double>::type range_interval_double() { return m_profile.range_interval_double();}
+ int maxIntervalLength() { return m_profile.maxIntervalLength(); }
+ icl::interval<int>::type range_codomain_ContainerSize(){ return m_profile.range_codomain_ContainerSize(); }
+ int repeat_count() { return m_profile.repeat_count(); }
+ int trials_count() { return m_profile.trials_count(); }
+ int laws_per_cycle() { return m_profile.laws_per_cycle(); }
+
+ void report_profile() { return m_profile.report_profile(); }
+
+ void set_std_profile(int unit, int factor=1) { return m_profile.set_std_profile(unit, factor); }
+ void set_polygon_profile(int max_polygon_set_size, int max_polygon_size, int min_coord, int max_coord)
+ { return m_profile.set_polygon_profile(max_polygon_set_size, max_polygon_size, min_coord, max_coord); }
+
+
+ private:
+ // Singleton pattern part -------------------------------------------------
+ static GentorProfileSgl* s_instance; // pointer to the unique instance
+
+ // specific members -------------------------------------------------------
+
+ // TODO add specifc members as needed
+ GentorProfile m_profile;
+ };
+
+ template<typename NumberT>
+ struct GentorProfileSgl_numeric_range
+ {
+ static typename icl::interval<NumberT>::type get();
+ };
+
+ template<>
+ struct GentorProfileSgl_numeric_range<int>
+ {
+ static icl::interval<int>::type get()
+ { return GentorProfileSgl::it()->range_int(); }
+ };
+
+ template<>
+ struct GentorProfileSgl_numeric_range<unsigned int>
+ {
+ static icl::interval<unsigned int>::type get()
+ {
+ icl::interval<cnat>::type inter_val = GentorProfileSgl::it()->range_nat();
+ return icl::interval<unsigned int>::right_open(inter_val.lower(), inter_val.upper());
+ }
+ };
+
+ template<>
+ struct GentorProfileSgl_numeric_range<cnat>
+ {
+ static icl::interval<cnat>::type get()
+ { return GentorProfileSgl::it()->range_nat(); }
+ };
+
+ template<>
+ struct GentorProfileSgl_numeric_range<double>
+ {
+ static icl::interval<double>::type get()
+ { return GentorProfileSgl::it()->range_double(); }
+ };
+
+}} // namespace icl boost

Added: sandbox/icl/boost/validate/gentor/randomgentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/gentor/randomgentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,977 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+
+#include <limits>
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/bits_gentor.hpp>
+#include <boost/icl_xt/setgentor.hpp>
+#include <boost/icl_xt/mapgentor.hpp>
+#include <boost/icl_xt/seqgentor.hpp>
+#include <boost/icl_xt/itvgentor.hpp>
+#include <boost/icl_xt/std/pair_gentor.hpp>
+#include <boost/icl_xt/map_segment_gentor.hpp>
+
+#ifdef LAW_BASED_TEST_BOOST_POLYGON
+#include <libs/validate/example/labat_polygon_/point_gentor.hpp>
+#include <libs/validate/example/labat_polygon_/polygon_gentor.hpp>
+#endif //LAW_BASED_TEST_BOOST_POLYGON
+
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl_xt/interval_bitset.hpp>
+#ifdef USE_ICL_TREE
+#include <boost/icl/tree/tree.hpp>
+#endif
+#include <boost/validate/gentor/gentorprofile.hpp>
+
+
+namespace boost{namespace icl
+{
+
+ // -------------------------------------------------------------------------
+ template <class ValueT> class RandomGentor;
+ template <> class RandomGentor<int> : public NumberGentorT<int> {};
+ template <> class RandomGentor<cnat> : public NumberGentorT<cnat> {};
+ template <> class RandomGentor<double> : public NumberGentorT<double> {};
+
+ // -------------------------------------------------------------------------
+ template <class NaturalT>
+ class RandomGentor<icl::bits<NaturalT> > :
+ public bits_gentor<icl::bits<NaturalT> > {};
+
+ // -------------------------------------------------------------------------
+ template <class DomainT, ICL_COMPARE Compare>
+ class RandomGentor<continuous_interval<DomainT,Compare> > :
+ public ItvGentorT<DomainT, continuous_interval<DomainT,Compare> > {};
+
+ template <class DomainT, ICL_COMPARE Compare>
+ class RandomGentor<discrete_interval<DomainT,Compare> > :
+ public ItvGentorT<DomainT, discrete_interval<DomainT,Compare> > {};
+
+ // -------------------------------------------------------------------------
+ template <class DomainT, class CodomainT>
+ class RandomGentor< std::pair<DomainT,CodomainT> > :
+ public std_pair_gentor<DomainT,CodomainT> {};
+
+
+ template <class DomainT>
+ class RandomGentor<icl::list<DomainT> > :
+ public SeqGentorT<icl::list<DomainT> > {};
+
+#ifdef LAW_BASED_TEST_BOOST_POLYGON
+ // -------------------------------------------------------------------------
+ template <class DomainT>
+ class RandomGentor<icl::point<DomainT> > :
+ public point_gentor<DomainT> {};
+
+ template <class PointT>
+ class RandomGentor<icl::list<icl::list<PointT> > > :
+ public polygon_set_gentor<icl::list<icl::list<PointT> > > {};
+#endif //LAW_BASED_TEST_BOOST_POLYGON
+
+ // ----- lists -------------------------------------------------------------
+ template <class DomainT, class CodomainT, ICL_COMPARE Compare>
+ class RandomGentor<std::pair<discrete_interval<DomainT,Compare>, CodomainT> > :
+ public map_segment_gentor<DomainT,CodomainT,discrete_interval<DomainT,Compare> > {};
+
+ template <class DomainT, class CodomainT, ICL_COMPARE Compare>
+ class RandomGentor<std::pair<continuous_interval<DomainT,Compare>, CodomainT> > :
+ public map_segment_gentor<DomainT,CodomainT,continuous_interval<DomainT,Compare> > {};
+
+ template <class DomainT, class CodomainT, ICL_COMPARE Compare>
+ class RandomGentor<icl::list<std::pair<discrete_interval<DomainT,Compare>, CodomainT> > > :
+ public SeqGentorT<icl::list<std::pair<discrete_interval<DomainT,Compare>, CodomainT> > > {};
+
+ template <class DomainT, class CodomainT, ICL_COMPARE Compare>
+ class RandomGentor<icl::list<std::pair<continuous_interval<DomainT,Compare>, CodomainT> > > :
+ public SeqGentorT<icl::list<std::pair<continuous_interval<DomainT,Compare>, CodomainT> > > {};
+
+ template <class DomainT, class CodomainT>
+ class RandomGentor<icl::list<std::pair<DomainT,CodomainT> > > :
+ public SeqGentorT<icl::list<std::pair<DomainT,CodomainT> > > {};
+
+ template <class DomainT, ICL_COMPARE Compare>
+ class RandomGentor<icl::list<discrete_interval<DomainT,Compare> > > :
+ public SeqGentorT<icl::list<discrete_interval<DomainT,Compare> > > {};
+
+ template <class DomainT, ICL_COMPARE Compare>
+ class RandomGentor<icl::list<continuous_interval<DomainT,Compare> > > :
+ public SeqGentorT<icl::list<continuous_interval<DomainT,Compare> > > {};
+
+ // ----- sets --------------------------------------------------------------
+ template <class DomainT>
+ class RandomGentor<icl::set<DomainT> > :
+ public SetGentorT<icl::set<DomainT> > {};
+
+ template <class DomainT>
+ class RandomGentor<std::set<DomainT> > :
+ public SetGentorT<std::set<DomainT> > {};
+
+ template <class DomainT>
+ class RandomGentor<icl::interval_set<DomainT> > :
+ public SetGentorT<icl::interval_set<DomainT> > {};
+
+ template <class DomainT>
+ class RandomGentor<icl::separate_interval_set<DomainT> > :
+ public SetGentorT<icl::separate_interval_set<DomainT> > {};
+
+ template <class DomainT>
+ class RandomGentor<icl::split_interval_set<DomainT> > :
+ public SetGentorT<icl::split_interval_set<DomainT> > {};
+
+ // ----- tree --------------------------------------------------------------
+#ifdef USE_ICL_TREE
+ template <class DomainT>
+ class RandomGentor<icl::tree<DomainT> > :
+ public SetGentorT<icl::tree<DomainT> > {};
+#endif
+
+ // ----- maps --------------------------------------------------------------
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<icl::map<DomainT,icl::set<int>,Neutronizer> > :
+ public MapGentorT<icl::map<DomainT,icl::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<icl::map<DomainT,std::set<int>,Neutronizer> > :
+ public MapGentorT<icl::map<DomainT,std::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section>
+ class RandomGentor<icl::map<DomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > :
+ public MapGentorT<icl::map<DomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > {};
+
+ template <class DomainT, class CodomainT, class Neutronizer>
+ class RandomGentor<icl::map<DomainT,CodomainT,Neutronizer> > :
+ public MapGentorT<icl::map<DomainT,CodomainT,Neutronizer> > {};
+
+
+ // ----- interval_map<D,C,N> -----------------------------------------------
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<interval_map<DomainT,icl::set<int>,Neutronizer> > :
+ public MapGentorT<interval_map<DomainT,icl::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<interval_map<DomainT,std::set<int>,Neutronizer> > :
+ public MapGentorT<interval_map<DomainT,std::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class CodomainT, class Neutronizer>
+ class RandomGentor<interval_map<DomainT,CodomainT,Neutronizer> > :
+ public MapGentorT<interval_map<DomainT,CodomainT,Neutronizer> > {};
+
+ // ----- split_interval_map<D,C,N> ----------------------------------------
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<split_interval_map<DomainT,icl::set<int>,Neutronizer> > :
+ public MapGentorT<split_interval_map<DomainT,icl::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class Neutronizer>
+ class RandomGentor<split_interval_map<DomainT,std::set<int>,Neutronizer> > :
+ public MapGentorT<split_interval_map<DomainT,std::set<int>,Neutronizer> > {};
+
+ template <class DomainT, class CodomainT, class Neutronizer>
+ class RandomGentor<split_interval_map<DomainT,CodomainT,Neutronizer> > :
+ public MapGentorT<split_interval_map<DomainT,CodomainT,Neutronizer> > {};
+
+ // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+ template <class NumericDomainT, class BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section>
+ class RandomGentor<split_interval_map<NumericDomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > :
+ public MapGentorT<split_interval_map<NumericDomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > {};
+
+ template <class NumericDomainT, class BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section>
+ class RandomGentor<interval_map<NumericDomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > :
+ public MapGentorT<interval_map<NumericDomainT,icl::bits<BitsT>,Neutronizer,Compare,Combine,Section> > {};
+
+ // ------------------------------------------------------------------------
+ template <class NumericDomainT, class BitsT>
+ class RandomGentor<interval_bitset<NumericDomainT,icl::bits<BitsT> > > :
+ public MapGentorT<interval_bitset<NumericDomainT,icl::bits<BitsT> > > {};
+ // ------------------------------------------------------------------------
+
+ //NOTE: All trials to reduce code replication for RandomGentor
+ // and Calibrater by introducing a fancy
+ // template template IntervalMap shipwrecked due to compilers
+ // disability to resolve the resulting instantiations. Compilers
+ // always see ambiguities where there seems to be a resolution.
+
+
+ // ------------------------------------------------------------------------
+ // class template SomeValue:
+ // TargetT is a value tuple that fits to the value generator gentor
+ // of type GentorT<TargetT>. The special kind of generator can be
+ // passed by the user. The only requirement is that the generator
+ // implements a function 'some' which is called to generate a tuple
+ // of type TargetT
+ template <class TargetT, template<class>class GentorT> struct SomeValue
+ {
+ static void apply(TargetT& value, GentorT<TargetT>& gentor);
+ };
+
+ template <class TargetT>
+ struct SomeValue<TargetT, RandomGentor>
+ {
+ static void apply(TargetT& value, RandomGentor<TargetT>& gentor)
+ {
+ gentor.some(value);
+ }
+ };
+ // ------------------------------------------------------------------------
+
+
+ // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+ template <class TargetT, template<class>class GentorT> struct Calibrater
+ {
+ static void apply(GentorT<TargetT>& gentor);
+ };
+
+ template <>
+ struct Calibrater<int, RandomGentor>
+ {
+ static void apply(RandomGentor<int>& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRange(GentorProfileSgl::it()->range_int());
+ }
+ };
+
+ template <>
+ struct Calibrater<cnat, RandomGentor>
+ {
+ static void apply(RandomGentor<cnat>& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRange(GentorProfileSgl::it()->range_nat());
+ }
+ };
+
+ template <>
+ struct Calibrater<double, RandomGentor>
+ {
+ static void apply(RandomGentor<double>& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRange(GentorProfileSgl::it()->range_double());
+ }
+ };
+
+ template <class BitsT>
+ struct Calibrater<icl::bits<BitsT>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::bits<BitsT> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.set_range(icl::interval<BitsT>::right_open(0, sizeof(BitsT)));
+ }
+ };
+
+
+ template <ICL_COMPARE Compare>
+ struct Calibrater<discrete_interval<int,Compare>, RandomGentor>
+ {
+ static void apply(RandomGentor<discrete_interval<int,Compare> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRange(GentorProfileSgl::it()->range_int());
+ }
+ };
+
+
+#ifdef LAW_BASED_TEST_BOOST_POLYGON
+ //--------------------------------------------------------------------------
+ // boost::polygon
+ //--------------------------------------------------------------------------
+ template <>
+ struct Calibrater<icl::point<int>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::point<int> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRange(GentorProfileSgl::it()->range_int());
+ }
+ };
+
+ template <>
+ struct Calibrater<icl::list<point<int> >, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::list<point<int> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+ point_gentor<int>* pointGentor = new point_gentor<int>;
+ pointGentor->setRange(GentorProfileSgl::it()->range_int());
+ gentor.setDomainGentor(pointGentor);
+ gentor.setUnique(true);
+ }
+ };
+
+ template <>
+ struct Calibrater<icl::list<list<point<int> > >, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::list<list<point<int> > > >& gentor)
+ {
+ point_gentor<int>* pointGentor = new point_gentor<int>;
+ pointGentor->setRange(GentorProfileSgl::it()->range_int());
+
+ polygon_gentor<list<point<int> > >* polyGentor = new polygon_gentor<list<point<int> > >;
+ polyGentor->setDomainGentor(pointGentor);
+ polyGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+ polyGentor->setUnique(true);
+
+ gentor.setDomainGentor(polyGentor);
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ }
+ };
+
+ //--------------------------------------------------------------------------
+ // nogylop::tsoob
+ //--------------------------------------------------------------------------
+#endif // LAW_BASED_TEST_BOOST_POLYGON
+
+
+ //--------------------------------------------------------------------------
+ // lists
+ //--------------------------------------------------------------------------
+ template <>
+ struct Calibrater<std::pair<int,int>, RandomGentor>
+ {
+ static void apply(RandomGentor< std::pair<int,int> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ NumberGentorT<int>* int_gentor_1 = new NumberGentorT<int>;
+ NumberGentorT<int>* int_gentor_2 = new NumberGentorT<int>;
+ int_gentor_1->setRange(GentorProfileSgl::it()->range_int());
+ int_gentor_2->setRange(GentorProfileSgl::it()->range_int());
+ gentor.set_first_gentor(int_gentor_1);
+ gentor.set_second_gentor(int_gentor_2);
+ }
+ };
+
+ template <ICL_COMPARE Compare>
+ struct Calibrater<std::pair<discrete_interval<int,Compare>, int>, RandomGentor>
+ {
+ static void apply(RandomGentor< std::pair<discrete_interval<int,Compare>, int> >&){}
+ };
+
+ template <ICL_COMPARE Compare>
+ struct Calibrater<std::pair<continuous_interval<double,Compare>, int>, RandomGentor>
+ {
+ static void apply(RandomGentor< std::pair<continuous_interval<double,Compare>, int> >&){}
+ };
+
+ template <ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<icl::list<std::pair<Interval, int> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list<std::pair<Interval, int> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ map_segment_gentor<double,int,Interval >* segment_gentor
+ = new map_segment_gentor<double,int,Interval >;
+ NumberGentorT<int>* int_gentor = new NumberGentorT<int>;
+ int_gentor->setRange(GentorProfileSgl::it()->range_int());
+ segment_gentor->setCodomainGentor(int_gentor);
+ segment_gentor->set_range(GentorProfileSgl::it()->range_interval_double());
+ segment_gentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ segment_gentor->set_corange(GentorProfileSgl::it()->range_int()); // sets range of codomain_values
+ gentor.setDomainGentor(segment_gentor);
+ }
+ };
+
+ template <class NumericT, ICL_COMPARE Compare>
+ struct Calibrater<icl::list< continuous_interval<NumericT,Compare> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list< continuous_interval<NumericT,Compare> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericT, continuous_interval<NumericT,Compare> >* itvGentor
+ = new ItvGentorT<NumericT, continuous_interval<NumericT,Compare> >;
+ itvGentor->setRange(GentorProfileSgl_numeric_range<NumericT>::get());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(itvGentor);
+ }
+ };
+
+ template <class NumericT, ICL_COMPARE Compare>
+ struct Calibrater<icl::list< discrete_interval<NumericT,Compare> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list< discrete_interval<NumericT,Compare> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericT, discrete_interval<NumericT,Compare> >* itvGentor
+ = new ItvGentorT<NumericT, discrete_interval<NumericT,Compare> >;
+ itvGentor->setRange(GentorProfileSgl_numeric_range<NumericT>::get());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(itvGentor);
+ }
+ };
+
+ template <class NumericT, ICL_COMPARE Compare>
+ struct Calibrater<icl::list< right_open_interval<NumericT,Compare> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list< right_open_interval<NumericT,Compare> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericT, right_open_interval<NumericT,Compare> >* itvGentor
+ = new ItvGentorT<NumericT, right_open_interval<NumericT,Compare> >;
+ itvGentor->setRange(GentorProfileSgl_numeric_range<NumericT>::get());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(itvGentor);
+ }
+ };
+
+ template <class NumericT>
+ struct Calibrater<icl::list<NumericT>, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list<NumericT> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ NumberGentorT<NumericT>* domainGentor = new NumberGentorT<NumericT>;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericT>::get());
+ gentor.setDomainGentor(domainGentor);
+ }
+ };
+
+ template <>
+ struct Calibrater<icl::list<std::pair<int, int> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list< std::pair<int, int> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ std_pair_gentor<int,int>* pair_gentor = new std_pair_gentor<int,int>;
+ NumberGentorT<int>* int_gentor_1 = new NumberGentorT<int>;
+ NumberGentorT<int>* int_gentor_2 = new NumberGentorT<int>;
+ int_gentor_1->setRange(GentorProfileSgl::it()->range_int());
+ int_gentor_2->setRange(GentorProfileSgl::it()->range_int());
+ pair_gentor->set_first_gentor(int_gentor_1);
+ pair_gentor->set_second_gentor(int_gentor_2);
+ gentor.setDomainGentor(pair_gentor);
+ }
+ };
+
+ template <ICL_COMPARE Compare>
+ struct Calibrater<icl::list<std::pair<discrete_interval<int,Compare>, int> >, RandomGentor>
+ {
+ static void apply(RandomGentor< icl::list<std::pair<discrete_interval<int,Compare>, int> > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ map_segment_gentor<int,int,discrete_interval<int,Compare> >* segment_gentor
+ = new map_segment_gentor<int,int,discrete_interval<int,Compare> >;
+ NumberGentorT<int>* int_gentor = new NumberGentorT<int>;
+ int_gentor->setRange(GentorProfileSgl::it()->range_int());
+ segment_gentor->setCodomainGentor(int_gentor);
+ segment_gentor->set_range(GentorProfileSgl::it()->range_interval_int());
+ segment_gentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ segment_gentor->set_corange(GentorProfileSgl::it()->range_int()); // sets range of codomain_values
+ gentor.setDomainGentor(segment_gentor);
+ }
+ };
+
+ //--------------------------------------------------------------------------
+ // sets
+ //--------------------------------------------------------------------------
+ template <>
+ struct Calibrater<icl::set<int>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::set<int> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ NumberGentorT<int>* intGentor = new NumberGentorT<int>;
+ intGentor->setRange(GentorProfileSgl::it()->range_int());
+ gentor.setDomainGentor(intGentor);
+ }
+ };
+
+ template <>
+ struct Calibrater<icl::set<double>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::set<double> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ NumberGentorT<double>* elemGentor = new NumberGentorT<double>;
+ elemGentor->setRange(GentorProfileSgl::it()->range_double());
+ gentor.setDomainGentor(elemGentor);
+ }
+ };
+
+ //--------------------------------------------------------------------------
+ template <>
+ struct Calibrater<std::set<int>, RandomGentor>
+ {
+ static void apply(RandomGentor<std::set<int> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ NumberGentorT<int>* intGentor = new NumberGentorT<int>;
+ intGentor->setRange(GentorProfileSgl::it()->range_int());
+ gentor.setDomainGentor(intGentor);
+ }
+ };
+
+ template <>
+ struct Calibrater<std::set<double>, RandomGentor>
+ {
+ static void apply(RandomGentor<std::set<double> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ NumberGentorT<double>* elemGentor = new NumberGentorT<double>;
+ elemGentor->setRange(GentorProfileSgl::it()->range_double());
+ gentor.setDomainGentor(elemGentor);
+ }
+ };
+
+ //----------------------------------------------------------------------------
+ // icl::{,separate,split}_interval_set<NumericDomainT>
+ //----------------------------------------------------------------------------
+ template <class NumericDomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_set<NumericDomainT,Compare,Interval>, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_set<NumericDomainT,Compare,Interval> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* domainGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+ domainGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(domainGentor);
+ }
+ };
+
+ template <class NumericDomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<separate_interval_set<NumericDomainT,Compare,Interval>, RandomGentor>
+ {
+ static void apply(RandomGentor<separate_interval_set<NumericDomainT,Compare,Interval> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* domainGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+ domainGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(domainGentor);
+ }
+ };
+
+ template <class NumericDomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<split_interval_set<NumericDomainT,Compare,Interval>, RandomGentor>
+ {
+ static void apply(RandomGentor<split_interval_set<NumericDomainT,Compare,Interval> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* domainGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+ domainGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(domainGentor);
+ }
+ };
+
+ //--------------------------------------------------------------------------
+ // icl::tree
+ //--------------------------------------------------------------------------
+#ifdef USE_ICL_TREE
+ template <>
+ struct Calibrater<icl::tree<int>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::tree<int> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+ ItvGentorT<int, discrete_interval<int,Compare> >* itvGentor
+ = new ItvGentorT<int, discrete_interval<int,Compare> >;
+ typename icl::interval<int>::type valRange = GentorProfileSgl::it()->range_interval_int();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+ gentor.setDomainGentor(itvGentor);
+ }
+ };
+#endif
+
+ //----------------------------------------------------------------------------
+ // icl::map<DomainT,CodomainT,Neutronizer>
+ //----------------------------------------------------------------------------
+ template <typename NumericDomainT, class Neutronizer>
+ struct Calibrater<icl::map<NumericDomainT,icl::set<int>,Neutronizer>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::map<NumericDomainT,icl::set<int>,Neutronizer> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+
+ SetGentorT<icl::set<int> >* codomainGentor = new SetGentorT<icl::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl_numeric_range<int>::get());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ gentor.setDomainGentor(domainGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <typename NumericDomainT, class Neutronizer>
+ struct Calibrater<icl::map<NumericDomainT,std::set<int>,Neutronizer>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::map<NumericDomainT,std::set<int>,Neutronizer> >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+
+ SetGentorT<std::set<int> >* codomainGentor = new SetGentorT<std::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl_numeric_range<int>::get());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ gentor.setDomainGentor(domainGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer>
+ struct Calibrater<icl::map<NumericDomainT,NumericCodomainT,Neutronizer>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::map<NumericDomainT,NumericCodomainT,Neutronizer> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
+ NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+ codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
+ gentor.setDomainGentor(domainGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <typename NumericDomainT, typename BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section>
+ struct Calibrater<icl::map<NumericDomainT,icl::bits<BitsT>,Neutronizer,
+ Compare,Combine,Section>, RandomGentor>
+ {
+ static void apply(RandomGentor<icl::map<NumericDomainT,icl::bits<BitsT>,Neutronizer,
+ Compare,Combine,Section> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
+ bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
+ domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
+ codomainGentor->set_range(icl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+ gentor.setDomainGentor(domainGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ //----------------------------------------------------------------------------
+ // icl::interval_map<DomainT,CodomainT,Neutronizer>
+ //----------------------------------------------------------------------------
+ template <class NumericDomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_map<NumericDomainT,icl::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_map<NumericDomainT,icl::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ SetGentorT<icl::set<int> >* codomainGentor = new SetGentorT<icl::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl::it()->range_int());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <class NumericDomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_map<NumericDomainT,std::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_map<NumericDomainT,std::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ SetGentorT<std::set<int> >* codomainGentor = new SetGentorT<std::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl::it()->range_int());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_map<NumericDomainT,NumericCodomainT,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_map<NumericDomainT,NumericCodomainT,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
+ codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ //----------------------------------------------------------------------------
+ // icl::split_interval_map<DomainT,CodomainT,Neutronizer>
+ //----------------------------------------------------------------------------
+ template <class NumericDomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<split_interval_map<NumericDomainT,icl::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<split_interval_map<NumericDomainT,icl::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ SetGentorT<icl::set<int> >* codomainGentor = new SetGentorT<icl::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl::it()->range_int());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <class NumericDomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<split_interval_map<NumericDomainT,std::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<split_interval_map<NumericDomainT,std::set<int>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ SetGentorT<std::set<int> >* codomainGentor = new SetGentorT<std::set<int> >;
+ NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
+ elementGentor->setRange(GentorProfileSgl::it()->range_int());
+
+ codomainGentor->setDomainGentor(elementGentor);
+ codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_codomain_ContainerSize());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+ template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<split_interval_map<NumericDomainT,NumericCodomainT,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<split_interval_map<NumericDomainT,NumericCodomainT,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ // Set the range within which the sizes of the generated object varies.
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
+ codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+
+ template <typename NumericDomainT, typename BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_map<NumericDomainT,icl::bits<BitsT>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_map<NumericDomainT,icl::bits<BitsT>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
+ codomainGentor->set_range(icl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+
+
+ template <typename NumericDomainT, typename BitsT, class Neutronizer,
+ ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<split_interval_map<NumericDomainT,icl::bits<BitsT>,
+ Neutronizer,Compare,Combine,Section,
+ Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<split_interval_map<NumericDomainT,icl::bits<BitsT>,
+ Neutronizer,Compare,Combine,Section,
+ Interval > >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
+ codomainGentor->set_range(icl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+ // ---------------------------------------------------------------------------
+
+ template <typename NumericDomainT, typename BitsT,
+ ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval>
+ struct Calibrater<interval_bitset<NumericDomainT,icl::bits<BitsT>,
+ Compare, Interval >, RandomGentor>
+ {
+ static void apply(RandomGentor<interval_bitset<NumericDomainT,icl::bits<BitsT>,
+ Compare, Interval> >& gentor)
+ {
+ gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
+
+ // If it is a container: (Create and) Pass the generator(s) for their contents
+ // NumberGentorT<int> intGentor;
+ ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >* itvGentor
+ = new ItvGentorT<NumericDomainT, ICL_INTERVAL_TYPE(Interval,NumericDomainT,Compare) >;
+ typename icl::interval<NumericDomainT>::type valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
+ itvGentor->setValueRange(valRange.lower(), valRange.upper());
+ itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
+
+ bits_gentor<BitsT>* codomainGentor = new bits_gentor<BitsT>;
+ codomainGentor->set_range(icl::interval<BitsT>::closed(0, (std::numeric_limits<BitsT>::max)()));
+
+ gentor.setDomainGentor(itvGentor);
+ gentor.setCodomainGentor(codomainGentor);
+ }
+ };
+ // ---------------------------------------------------------------------------
+
+
+}} // namespace icl boost

Added: sandbox/icl/boost/validate/gentor/rangegentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/gentor/rangegentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,94 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class IntevalGentor
+ A random generator for Sets.
+--------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/icl/type_traits/interval_type_default.hpp>
+//REV #include <boost/icl/interval.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <class Type>
+ class RangeGentor: public RandomGentorAT<typename icl::interval<Type>::type >
+ {
+ public:
+ typedef typename icl::interval<Type>::type interval_type;
+ public:
+ virtual void some(interval_type& x);
+ interval_type last()const;
+
+ void setLowerBoundRange(int lwb, int upb)
+ { setLowerBoundRange(icl::interval<int>::right_open(lwb,upb)); }
+
+ void setLowerBoundRange(const icl::interval<int>::type& range)
+ {
+ //JODO? BOOST_ASSERT(range.is_right_open()||range.is_closed());
+ _lwbGentor.setRange(range);
+ }
+
+ void setUpperBoundRange(int lwb, int upb)
+ { setUpperBoundRange(icl::interval<int>::right_open(lwb,upb)); }
+
+ void setUpperBoundRange(const icl::interval<int>::type& range)
+ {
+ //JODO? BOOST_ASSERT(range.is_right_open()||range.is_closed());
+ _upbGentor.setRange(range);
+ }
+
+ private:
+ NumberGentorT<Type> _lwbGentor;
+ NumberGentorT<Type> _upbGentor;
+ interval_type _last;
+ };
+
+ template <class Type>
+ void RangeGentor<Type>::some(interval_type& x)
+ {
+ Type lwb, upb;
+ _lwbGentor.some(lwb);
+ _upbGentor.some(upb);
+ _last = right_open_interval(lwb, upb);
+ x = _last;
+ }
+
+ template <class Type>
+ typename RangeGentor<Type>::interval_type RangeGentor<Type>::last()const
+ {
+ return _last;
+ }
+
+}} // namespace icl boost
+
+
+

Added: sandbox/icl/boost/validate/icl/functors.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/icl/functors.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,114 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+Auxiliary functors that are used to validate the equality of
+handcoded loops and calls of std::algorithms.
++-----------------------------------------------------------------------------*/
+
+#ifndef BOOST_VALIDATE_ICL_FUNCTORS_HPP_JOFA_091004
+#define BOOST_VALIDATE_ICL_FUNCTORS_HPP_JOFA_091004
+
+#include <boost/icl/iterator.hpp>
+
+namespace boost{namespace icl
+{
+
+template <typename SourceT, typename TargetT>
+struct base_insertion
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ icl::clear(collected);
+ ICL_const_FORALL(typename SourceT, item_, items)
+ collected.insert(*item_);
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<base_insertion>::apply() { return "_i"; }
+
+template <typename SourceT, typename TargetT>
+struct hint_insertion
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ typedef typename TargetT::value_type target_value_type;
+ icl::clear(collected);
+ typename TargetT::iterator prior_ = collected.end();
+ ICL_const_FORALL(typename SourceT, item_, items)
+ prior_ = collected.insert(prior_, *item_);
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<hint_insertion>::apply() { return "!i"; }
+
+template <typename SourceT, typename TargetT>
+struct copy_insertion
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ icl::clear(collected);
+ std::copy(items.begin(), items.end(), icl::inserter(collected, collected.end()));
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<copy_insertion>::apply() { return "ci"; }
+
+
+template <typename SourceT, typename TargetT>
+struct base_addition
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ icl::clear(collected);
+ ICL_const_FORALL(typename SourceT, item_, items)
+ //JODO icl::add(collected, *item_);
+ collected.add(*item_);
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<base_addition>::apply() { return "_+"; }
+
+template <typename SourceT, typename TargetT>
+struct hint_addition
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ icl::clear(collected);
+ typename TargetT::iterator prior_ = collected.end();
+ ICL_const_FORALL(typename SourceT, item_, items)
+ //JODO prior_ = add(collected, prior_, *item_);
+ prior_ = collected.add(prior_, *item_);
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<hint_addition>::apply() { return "!+"; }
+
+template <typename SourceT, typename TargetT>
+struct copy_addition
+{
+ void operator()(TargetT& collected, const SourceT& items)
+ {
+ icl::clear(collected);
+ std::copy(items.begin(), items.end(), icl::adder(collected, collected.end()));
+ }
+};
+
+template<>
+inline std::string binary_template_to_string<copy_addition>::apply() { return "c+"; }
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_FUNCTORS_HPP_JOFA_091004
\ No newline at end of file

Added: sandbox/icl/boost/validate/laws/algo_equivalence.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/algo_equivalence.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,213 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_090821
+#define BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_090821
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class IntersectsDefined
+ : public Law<IntersectsDefined<Type>, LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_total<T> || (intersects(a, b) == !(a & b).empty()) : Definition of intersects predicate
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "IntersectsDefined defined"; }
+ std::string formula()const { return "is_total<T> || intersects(a, b) == !(a & b).empty()"; }
+
+ std::string typeString()const
+ {
+ return "IntersectsDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // is_total<T> || intersects(a, b) == !(a & b).empty()
+ // --- left hand side ------------------------
+ bool a_intersects_b
+ = intersects(this->template getInputValue<operand_a>(),
+ this->template getInputValue<operand_b>());
+ // --- right hand side ------------------------
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ bool a_sec_b_non_empty = !a_sec_b.empty();
+
+ this->template setOutputValue<lhs_result>(a_intersects_b);
+ this->template setOutputValue<rhs_result>(a_sec_b_non_empty);
+
+ if(is_total<Type>::value)
+ // For a total map y, y.empty() does not mean that y is empty
+ // it means that y is a null vector. In this sense total maps
+ // always intersect with themselves and with key sets.
+ return a_intersects_b == true;
+ else
+ return a_intersects_b == a_sec_b_non_empty;
+ }
+
+ bool debug_holds()
+ {
+ // intersects(a, b) == !(a & b).empty() : Definition of intersects predicate
+ // --- left hand side ------------------------
+ Type value_a = this->template getInputValue<operand_a>();
+ Type value_b = this->template getInputValue<operand_b>();
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << (value_a & value_b) << std::endl;
+
+ bool a_intersects_b
+ = intersects(this->template getInputValue<operand_a>(),
+ this->template getInputValue<operand_b>());
+ // --- right hand side ------------------------
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ bool a_sec_b_non_empty = !a_sec_b.empty();
+
+ this->template setOutputValue<lhs_result>(a_intersects_b);
+ this->template setOutputValue<rhs_result>(a_sec_b_non_empty);
+
+ if(is_total<Type>::value)
+ return a_intersects_b == true;
+ else
+ return a_intersects_b == a_sec_b_non_empty;
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ template <typename Type, typename CoType>
+ class Interinclusion
+ : public Law<Interinclusion<Type,CoType>, LOKI_TYPELIST_2(Type,CoType), LOKI_TYPELIST_1(bool)>
+ {
+ /** a.contains(a & b)
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Interinclusion"; }
+ std::string formula()const { return "a.contains(a & b)"; }
+
+ std::string typeString()const
+ {
+ return "Interinclusion<"+ type_to_string<Type>::apply()+","
+ +type_to_string<CoType>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ return value_a.contains(value_a & value_b);
+ }
+
+ bool debug_holds()
+ {
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ Type a_sec_b = value_a & value_b;
+ bool result = value_a.contains(value_a & value_b);
+ // -------------------------------------------
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << a_sec_b << std::endl;
+ std::cout << "a.contains(a&b) = " << result << std::endl;
+ // -------------------------------------------
+ value_a.contains(a_sec_b);
+
+ return result;
+ }
+
+ size_t size()const
+ {
+ return value_size< Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<CoType>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+ template <typename Type, typename CoType>
+ class AddendInclusion
+ : public Law<AddendInclusion<Type,CoType>, LOKI_TYPELIST_2(Type,CoType), LOKI_TYPELIST_1(bool)>
+ {
+ /** (a + i).contains(i)
+ Input = (a := inVal1, i := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "AddendInclusion"; }
+ std::string formula()const { return "(a + i).contains(i)"; }
+
+ std::string typeString()const
+ {
+ return "AddendInclusion<"+ type_to_string<Type>::apply()+","
+ +type_to_string<CoType>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // (a + i).contains(i)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_i = this->template getInputValue<operand_b>();
+ return (value_a + value_i).contains(value_i);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ /*
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ Type a_sec_b = value_a & value_b;
+ bool result = value_a.contains(value_a & value_b);
+ // -------------------------------------------
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << a_sec_b << std::endl;
+ std::cout << "a.contains(a&b) = " << result << std::endl;
+ // -------------------------------------------
+ value_a.contains(a_sec_b);
+
+ return result;
+ */
+ }
+
+ size_t size()const
+ {
+ return value_size< Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<CoType>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_070411
+

Added: sandbox/icl/boost/validate/laws/atomic_equivalence.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/atomic_equivalence.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,288 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_LAWS_ATOMIC_EQUIVALENCE_HPP_JOFA_091124
+#define BOOST_VALIDATE_LAWS_ATOMIC_EQUIVALENCE_HPP_JOFA_091124
+
+#include <iterator>
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+// ----------------------------------------------------------------------------+
+// S: Segment container |
+// f: Function transforming an interval container into an element container |
+// E: Element container |
+// g: A function (specifically std::algorithm) applicable to S and E |
+// T: Target container |
+// |
+// S |
+// / \ |
+// f / \ g |
+// / = \ |
+// V V |
+// E ------> T |
+// g |
+// ----------------------------------------------------------------------------+
+template <typename SegmentsT,
+ typename TargetsT,
+ template<class,class,template<class>class>class Algorithm,
+ template<class>class TargetIterator = std::insert_iterator,
+ template<class,class>class Atomizer = icl::segmental::atomizer,
+ template<class>class Equality = icl::std_equal >
+class UnaryAtomicEquivalence :
+ public Law<UnaryAtomicEquivalence<SegmentsT, TargetsT,
+ Algorithm, TargetIterator,
+ Atomizer, Equality>,
+ LOKI_TYPELIST_1(SegmentsT),
+ LOKI_TYPELIST_2(TargetsT,TargetsT) >
+{
+ /** S: SegmentsT, T: TargetsT, I: InputIterator
+ Alg<S,T,I>: an algortihm on interval containers S
+ that results in a container T via iterator I.
+ For all S a: Alg<E,T,I>(atomize(a)) == Alg<S,T,I>(a)
+ Input = (a := inVal1)
+ Output = (lhs_result, rhs_result)
+ */
+public:
+ typedef typename SegmentsT::atomized_type ElementsT;
+ typedef Algorithm<SegmentsT,TargetsT,TargetIterator> Algo;
+
+ std::string name()const { return "UnaryAtomicEquivalence"; }
+ std::string formula()const { return "For all S a: Alg<E,T,I>(atomize(a)) == Alg<S,T,I>(a)"; }
+
+ std::string typeString()const
+ {
+ return
+ "EleEq<"
+ + type_to_string<SegmentsT>::apply()+","
+ + type_to_string<TargetsT>::apply() +","
+ + Algo::struct_abbreviation() +">";
+ }
+
+public:
+
+ bool holds()
+ {
+ // For all S a: Alg<E,T,I>(atomize(a)) == Alg<S,T,I>(a)
+ // --- left hand side --------------------------------------------------
+ TargetsT lhs;
+ SegmentsT segmental_a = this->template getInputValue<operand_a>();
+ ElementsT elemental_a;
+ Atomizer<ElementsT,SegmentsT>()(elemental_a, segmental_a);
+ Algo()(elemental_a, lhs);
+
+ // --- right hand side -------------------------------------------------
+ TargetsT rhs;
+ Algo()(segmental_a, rhs);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<TargetsT>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const
+ {
+ return value_size<SegmentsT>::apply(this->template getInputValue<operand_a>());
+ }
+};
+
+
+
+// ----------------------------------------------------------------------------+
+// S: Segment container |
+// f: Function transforming an interval container into an element container |
+// E: Element container |
+// g: A function (specifically std::algorithm) applicable to S and E |
+// T: Target container |
+// |
+// S |
+// / \ |
+// f / \ g |
+// / = \ |
+// V V |
+// E ------> T |
+// g |
+// ----------------------------------------------------------------------------+
+template <typename SegmentsT,
+ typename TargetsT,
+ template<class,class>class Algorithm,
+ template<class,class>class Atomizer = icl::segmental::atomizer,
+ template<class>class Equality = icl::std_equal >
+class UnaryAtomicEquivalence2 :
+ public Law<UnaryAtomicEquivalence2<SegmentsT, TargetsT,
+ Algorithm, Atomizer, Equality>,
+ LOKI_TYPELIST_2(SegmentsT, TargetsT),
+ LOKI_TYPELIST_2(TargetsT, TargetsT) >
+{
+ /** S: SegmentsT, T: TargetsT, I: InputIterator
+ Alg<S,T,I>: an algortihm on interval containers S
+ that results in a container T via iterator I.
+ For all S a: Alg<E,T,I>(c)(atomize(a)) == Alg<S,T,I>(c)(a)
+ Input = (a := inVal1)
+ Output = (lhs_result, rhs_result)
+ */
+public:
+ typedef typename SegmentsT::atomized_type ElementsT;
+ typedef typename ElementsT::value_type value_type;
+ typedef TargetsT element_type;
+
+ typedef Algorithm<SegmentsT,TargetsT> Algo;
+
+ std::string name()const { return "UnaryAtomicEquivalence2"; }
+ std::string formula()const { return "For all S a: Alg<E,T,I>(c)(atomize(a)) == Alg<S,T,I>(c)(a)"; }
+
+ std::string typeString()const
+ {
+ return
+ "EleEq2<"
+ + type_to_string<SegmentsT>::apply()+","
+ + type_to_string<TargetsT>::apply() +","
+ + Algo::struct_abbreviation() +">";
+ }
+
+public:
+
+ bool holds()
+ {
+ // For all S a: Alg<E,T,I>(c)(atomize(a)) == Alg<S,T,I>(c)(a)
+ // --- left hand side --------------------------------------------------
+ SegmentsT segmental_a = this->template getInputValue<operand_a>();
+ element_type comparand = this->template getInputValue<operand_b>();
+ ElementsT elemental_a;
+ Atomizer<ElementsT,SegmentsT>()(elemental_a, segmental_a);
+ Algo algorithm(comparand);
+ TargetsT lhs = algorithm(elemental_a);
+
+ // --- right hand side -------------------------------------------------
+ TargetsT rhs = algorithm(segmental_a);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<TargetsT>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const
+ {
+ return value_size<SegmentsT>::apply(this->template getInputValue<operand_a>());
+ }
+};
+
+
+
+// ----------------------------------------------------------------------------+
+// S: Segment container |
+// f: Function transforming an interval container into an element container |
+// E: Element container |
+// .o.: U x U -> T A binary function (specifically std::algorithm) |
+// applicable to S or E |
+// T: Target container |
+// |
+// S |
+// / \ |
+// f / \ o |
+// / = \ |
+// V V |
+// E ------> T |
+// o |
+// ----------------------------------------------------------------------------+
+template <typename SegmentsT,
+ typename TargetsT,
+ template<class,class,template<class>class>class Algorithm,
+ template<class>class TargetIterator = std::insert_iterator,
+ template<class,class>class Atomizer = icl::segmental::atomizer,
+ template<class>class Equality = icl::std_equal >
+class BinaryAtomicEquivalence :
+ public Law<BinaryAtomicEquivalence<SegmentsT, TargetsT,
+ Algorithm, TargetIterator,
+ Atomizer, Equality>,
+ LOKI_TYPELIST_2(SegmentsT,SegmentsT),
+ LOKI_TYPELIST_2(TargetsT,TargetsT) >
+{
+ /** S: SegmentsT, T: TargetsT, I: InputIterator
+ Alg<S,T,I>: an algortihm on interval containers S
+ that results in a container T via iterator I.
+ For all S a,b: Alg<S,T,I>(atomize(a), atomize(b)) == Alg<S,T,I>(a,b)
+ Input = (a := inVal1)
+ Output = (lhs_result, rhs_result)
+ */
+public:
+ typedef Algorithm<SegmentsT,TargetsT,TargetIterator> Algo;
+ typedef typename SegmentsT::atomized_type ElementsT;
+
+ std::string name()const { return "BinaryAtomicEquivalence"; }
+ std::string formula()const
+ { return "For all S a: Alg<E,T,I>(f(a),f(b)) == Alg<S,T,I>(a,b)"; }
+
+ std::string typeString()const
+ {
+ return
+ "EleEq<"
+ + type_to_string<SegmentsT>::apply()+","
+ + type_to_string<TargetsT>::apply() +","
+ + Algo::struct_abbreviation() +">";
+ }
+
+public:
+
+ bool holds()
+ {
+ // For all S a: Alg<E,T,I>(atomize(a)) == Alg<S,T,I>(a)
+ // --- left hand side --------------------------------------------------
+ TargetsT lhs;
+ SegmentsT segmental_a = this->template getInputValue<operand_a>();
+ SegmentsT segmental_b = this->template getInputValue<operand_b>();
+ ElementsT elemental_a, elemental_b;
+ Atomizer<ElementsT,SegmentsT>()(elemental_a, segmental_a);
+ Atomizer<ElementsT,SegmentsT>()(elemental_b, segmental_b);
+ Algo()(elemental_a, elemental_b, lhs);
+
+ // --- right hand side -------------------------------------------------
+ TargetsT rhs;
+ Algo()(segmental_a, segmental_b, rhs);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<TargetsT>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const
+ {
+ return value_size<SegmentsT>::apply(this->template getInputValue<operand_a>())
+ + value_size<SegmentsT>::apply(this->template getInputValue<operand_b>());
+ }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_LAWS_ATOMIC_EQUIVALENCE_HPP_JOFA_091124
+

Added: sandbox/icl/boost/validate/laws/element_order.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/element_order.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,219 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_ELEMENT_ORDER_HPP_JOFA_090202
+#define BOOST_ICL_ELEMENT_ORDER_HPP_JOFA_090202
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class ElementEqualDefined
+ : public Law<ElementEqualDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_element_equal(a, a.join())
+ Input = (a := inVal1)
+ Output = ()
+ */
+ public:
+ std::string name()const { return "ElementEqualDefined"; }
+ std::string formula()const { return "is_element_equal(a, a.join())"; }
+
+ std::string typeString()const
+ {
+ return "ElementEqualDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_equal(a, b);
+ bool rhs = (a_atomic == b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_equal(a, b);
+ bool rhs = (a_atomic == b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>());
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class ElementLessDefined
+ : public Law<ElementLessDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_element_less(a, b) == a.join() < b.join()
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs, rhs)
+ */
+ public:
+ std::string name()const { return "ElementLessDefined"; }
+ std::string formula()const { return "is_element_less(a,b) == a.atomic() < b.atomic()"; }
+
+ std::string typeString()const
+ {
+ return "ElementLessDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_less(a, b);
+ bool rhs = a_atomic < b_atomic;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_less(a, b);
+ bool rhs = a_atomic < b_atomic;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class ElementGreaterDefined
+ : public Law<ElementLessDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_element_greater(a, b) == a.join() > b.join()
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs, rhs)
+ */
+ public:
+ std::string name()const { return "ElementGreaterDefined"; }
+ std::string formula()const { return "is_element_greater(a,b) == a.atomic() > b.atomic()"; }
+
+ std::string typeString()const
+ {
+ return "ElementGreaterDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_greater(a, b);
+ bool rhs = a_atomic > b_atomic;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_element_greater(a, b);
+ bool rhs = a_atomic > b_atomic;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_ELEMENT_ORDER_HPP_JOFA_090202
+

Added: sandbox/icl/boost/validate/laws/function_equality.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/function_equality.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,106 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FUNCTION_EQUALITY_HPP_JOFA_091005
+#define BOOST_ICL_FUNCTION_EQUALITY_HPP_JOFA_091005
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+// -----------------------------------------------------------------------------
+// S
+// / \
+// f| = |g
+// \ /
+// v v
+// T
+// -----------------------------------------------------------------------------
+template <typename SourceT, typename TargetT,// domain, codomain types of f,g
+ template<class,class>class Function_f,
+ template<class,class>class Function_g,
+ template<class>class Equality = icl::std_equal>
+class FunctionEquality :
+ public Law<FunctionEquality<SourceT,TargetT,Function_f,Function_g,Equality>,
+ LOKI_TYPELIST_1(SourceT), LOKI_TYPELIST_2(TargetT,TargetT)>
+{
+ /** S: SourceT, T: TargetT
+ For all S a: f(a) == g(a) : Equality of functions f and g.
+ Input = (a := inVal1)
+ Output = (lhs_result, rhs_result)
+ */
+public:
+ std::string name()const { return "FunctionEquality"; }
+ std::string formula()const { return "S a: f(a) == g(a)"; }
+
+ std::string typeString()const
+ {
+ return
+ "Eq<"+type_to_string<SourceT>::apply()+","
+ +type_to_string<TargetT>::apply()+","
+ +binary_template_to_string<Function_f>::apply()+","
+ +binary_template_to_string<Function_g>::apply()+","
+ +unary_template_to_string<Equality>::apply() +">";
+ }
+
+public:
+
+ bool holds()
+ {
+ // For all S a: f(a) == g(a) : f == g.
+ // --- left hand side --------------------------------------------------
+ SourceT value_a = this->template getInputValue<operand_a>();
+ TargetT lhs;
+ Function_f<SourceT,TargetT>()(lhs, value_a); // lhs = f(a);
+
+ // --- right hand side -------------------------------------------------
+ TargetT rhs;
+ Function_g<SourceT,TargetT>()(rhs, value_a); // rhs = g(a);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<TargetT>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ // For all S a: f(a) == g(a) : f == g.
+ // --- left hand side --------------------------------------------------
+ SourceT value_a = this->template getInputValue<operand_a>();
+ std::cout << "a= " << value_a << std::endl;
+ TargetT lhs;
+ Function_f<SourceT,TargetT>()(lhs, value_a); // lhs = f(a);
+ std::cout << "l= " << lhs << std::endl;
+
+ // --- right hand side -------------------------------------------------
+ TargetT rhs;
+ Function_g<SourceT,TargetT>()(rhs, value_a); // rhs = g(a);
+ std::cout << "r= " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<TargetT>()(lhs, rhs);
+ }
+
+ size_t size()const
+ {
+ return value_size<SourceT>::apply(this->template getInputValue<operand_a>());
+ }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_FUNCTION_EQUALITY_HPP_JOFA_091005
+

Added: sandbox/icl/boost/validate/laws/induced_relation.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/induced_relation.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,111 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_INDUCED_RELATION_HPP_JOFA_090204
+#define BOOST_ICL_INDUCED_RELATION_HPP_JOFA_090204
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+ // An InducedRelation can be represented as a triangular commuting diagram
+ // where f is a unary function and R a binary predicate or relation
+ // ---------------------------------------------------------------------------
+ // (a,b)--f-->(a',b')
+ // \ /
+ // R \ == / R
+ // \ /
+ // V V
+ // {true,false}
+ // ---------------------------------------------------------------------------
+ template <typename SourceT, typename TargetT,
+ template<class,class>class FunctionT, // morphic function f
+ template<typename>class RelationT> // binary predicate like ==
+ class InducedRelation :
+ public Law<InducedRelation<SourceT,TargetT,FunctionT,RelationT>,
+ LOKI_TYPELIST_2(SourceT, SourceT), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** a rel b == f(a) rel f(b)
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "InducedRelation"; }
+ std::string formula()const { return "cont a, cont b: a rel b == f(a) rel f(b)"; }
+
+ std::string typeString()const
+ {
+ return
+ "InducedRel<"+type_to_string<SourceT>::apply()+","
+ +type_to_string<TargetT>::apply()+","
+ +binary_template_to_string<FunctionT>::apply()+","
+ +unary_template_to_string<RelationT>::apply()+">";
+ }
+
+ public:
+
+ size_t size()const
+ {
+ return
+ value_size<SourceT>::apply(this->template getInputValue<operand_a>())+
+ value_size<SourceT>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool holds()
+ {
+ // a rel b == f(a) rel f(b)
+ // --- left hand side ------------------------
+ // lhs := a rel b
+ SourceT a = this->template getInputValue<operand_a>();
+ SourceT b = this->template getInputValue<operand_b>();
+ bool lhs = RelationT<SourceT>()(a,b);
+ // --- right hand side -----------------------
+ TargetT f_a, f_b;
+ FunctionT<TargetT,SourceT>()(f_a, a);
+ FunctionT<TargetT,SourceT>()(f_b, b);
+ bool rhs = RelationT<TargetT>()(f_a, f_b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ // a rel b == f(a) rel f(b)
+ // --- left hand side ------------------------
+ // lhs := a rel b
+ SourceT a = this->template getInputValue<operand_a>();
+ SourceT b = this->template getInputValue<operand_b>();
+ std::cout << " a = " << a << std::endl;
+ std::cout << " b = " << b << std::endl;
+ bool lhs = RelationT<SourceT>()(a,b);
+ // --- right hand side -----------------------
+ TargetT f_a, f_b;
+ FunctionT<TargetT,SourceT>()(f_a, a);
+ FunctionT<TargetT,SourceT>()(f_b, b);
+ std::cout << "f(a) = " << f_a << std::endl;
+ std::cout << "f(b) = " << f_b << std::endl;
+ bool rhs = RelationT<TargetT>()(f_a, f_b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ }; //class InducedRelation
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_INDUCED_RELATION_HPP_JOFA_090204
+

Added: sandbox/icl/boost/validate/laws/inversion_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/inversion_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,313 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_INVERSION_LAWS_HPP_JOFA_071124
+#define BOOST_ICL_INVERSION_LAWS_HPP_JOFA_071124
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceNaturalInversion
+ : public Law<InplaceNaturalInversion<Type,Combiner,Equality>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ //a - a == 0
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
+
+ std::string name()const { return "InplaceNaturalInversion"; }
+ std::string formula()const { return "a -= a; a == 0"; }
+
+ std::string typeString()const
+ {
+ return "NaturalInversion<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ InverseCombinerT()(lhs, this->template getInputValue<operand_a>());
+
+ Type rhs = Combiner<Type>::identity_element();
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceInverseExistence
+ : public Law<InplaceInverseExistence<Type,Combiner,Equality>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ //(0 - a) + a == 0
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
+
+ std::string name()const { return "InplaceInverseExistence"; }
+ std::string formula()const { return "(0-a) + a == 0"; }
+
+ std::string typeString()const
+ {
+ return "InverseExistence<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = Combiner<Type>::identity_element();
+ Type value_a = this->template getInputValue<operand_a>();
+ // lhs = (0 - a)
+ InverseCombinerT()(lhs, value_a);
+ // lhs = (0 - a) + a
+ Combiner<Type>()(lhs, value_a);
+
+ Type rhs = Combiner<Type>::identity_element();
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Inverter = inplace_minus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceNaiveInversion
+ : public Law<InplaceNaiveInversion<Type,Combiner,Inverter,Equality>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ //(a + b) - b == a - b
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ std::string name()const { return "InplaceNaiveInversion"; }
+ std::string formula()const { return "(a + b) - b == a - b"; }
+
+ std::string typeString()const
+ {
+ return "NaiveInversion<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Inverter>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ Combiner<Type>()(lhs, this->template getInputValue<operand_b>());
+ Inverter<Type>()(lhs, this->template getInputValue<operand_b>());
+
+ Type rhs = this->template getInputValue<operand_a>();
+ Inverter<Type>()(rhs, this->template getInputValue<operand_b>());
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Inverter = inplace_minus,
+ template<class>class Equality = icl::std_equal>
+ class DisjointNaiveInversion
+ : public Law<DisjointNaiveInversion<Type,Combiner,Inverter,Equality>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ // dom(a).is_disjoint(dom(b)) => (a + b) - b == a - b
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ std::string name()const { return "DisjointNaiveInversion"; }
+ std::string formula()const { return "a.is_disjoint(b) => (a + b) - b == a - b"; }
+
+ std::string typeString()const
+ {
+ return "DisjointNaiveInversion<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Inverter>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // dom(a).is_disjoint(dom(b)) => (a + b) - b == a - b
+ Type value_a = this->template getInputValue<operand_a>();
+ Type value_b = this->template getInputValue<operand_b>();
+ typename Type::set_type dom_a; value_a.domain(dom_a);
+ typename Type::set_type dom_b; value_b.domain(dom_b);
+
+ if(is_disjoint(dom_a, dom_b))
+ {
+ Type lhs = value_a;
+ Combiner<Type>()(lhs, this->template getInputValue<operand_b>());
+ Inverter<Type>()(lhs, this->template getInputValue<operand_b>());
+
+ Type rhs = this->template getInputValue<operand_a>();
+ Inverter<Type>()(rhs, this->template getInputValue<operand_b>());
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+ else // a intersects b
+ {
+ this->template setOutputValue<lhs_result>(value_a);
+ this->template setOutputValue<rhs_result>(value_b);
+ return true;
+ }
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Inverter = inplace_minus,
+ template<class>class Equality = icl::std_equal>
+ class JointInverseExistence
+ : public Law<JointInverseExistence<Type,Combiner,Inverter,Equality>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ // a.contains(dom(b)) => (a + b) - b == (a - b) + a
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ std::string name()const { return "JointInverseExistence"; }
+ std::string formula()const { return "a.contains(dom(b)) => (a + b) - b == (a - b) + b"; }
+
+ std::string typeString()const
+ {
+ return "JointInverseExistence<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Inverter>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a.contains(dom(b)) => (a + b) - b == (a - b) + a
+ Type value_a = this->template getInputValue<operand_a>();
+ Type value_b = this->template getInputValue<operand_b>();
+ typename Type::set_type dom_b; value_b.domain(dom_b);
+
+ if(value_a.contains(dom_b))
+ {
+ Type lhs = value_a;
+ Combiner<Type>()(lhs, value_b);
+ Inverter<Type>()(lhs, value_b);
+
+ Type rhs = value_a;
+ Inverter<Type>()(rhs, value_b);
+ Combiner<Type>()(rhs, value_b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+ else // a intersects b
+ {
+ this->template setOutputValue<lhs_result>(value_a);
+ this->template setOutputValue<rhs_result>(value_b);
+ return true;
+ }
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ size_t size()const { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_INVERSION_LAWS_HPP_JOFA_071124
+
+

Added: sandbox/icl/boost/validate/laws/law.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/law.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,140 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_LAW_HPP_JOFA_070411
+#define BOOST_ICL_LAW_HPP_JOFA_070411
+
+#include <string>
+#include <set>
+#include <boost/validate/loki_xt/Tuple.h>
+
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4717) // ::size' : recursive on all control paths, function will cause runtime stack overflow
+#endif
+
+namespace boost{namespace icl
+{
+
+ /** \brief An abstract class template Law
+
+ A Law can hold for a given set of variables.
+ A Law together with the set of input variables is an instance of the law.
+ The evaluation of the law results in a set of output variables.
+ Output variables hold interim and final results of the evaluation of the law.
+ */
+ template
+ <
+ class SubType,
+ typename InputTypes, typename OutputTypes
+ >
+ class Law
+ {
+ public:
+ typedef SubType sub_type;
+ typedef InputTypes input_types;
+ typedef OutputTypes output_types;
+ typedef typename Loki::tuple<InputTypes> input_tuple;
+ typedef typename Loki::tuple<OutputTypes> output_tuple;
+
+ public:
+ /** Function \c holds yields true if the law holds for a given instantiation
+ of the input variables. */
+ bool holds(){ return that()->holds(); }
+
+ /** Function \c debug_holds is called at the end of a series of randomly
+ generated tests on the smallest law instantiation that violates the
+ law. Specific laws derived from class \c Law shall be coded to provide
+ informations useful for debugging. */
+ bool debug_holds(){ return that()->debug_holds(); }
+
+ /** Set input variables for a law. */
+ void setInstance(const input_tuple& inVars)
+ { _inputTuple = inVars; }
+
+ /** Get input and output variables. */
+ void getInstance(input_tuple& inVars, output_tuple& outVars)const
+ { inVars = _inputTuple; outVars = _outputTuple; }
+
+ /** Get input variables. */
+ void getInputInstance(input_tuple& inVars)const
+ { inVars = _inputTuple; }
+
+ /** Get output variables. */
+ void getOutputInstance(output_tuple& outVars)const
+ { outVars = _outputTuple; }
+
+ /** Get the size of a laws instantiation, that is a function of it's
+ input variables. The size function is used to filter small and simple
+ violations of laws in order to facilitate debugging. */
+ size_t size()const{ return that()->size(); }
+
+ /** A size equivalence on laws. */
+ bool operator == (const Law& rhs)const
+ { return size() == rhs.size(); }
+
+ /** A size order on laws. This ordering servers filter small and simple
+ law instances that violate the law. */
+ bool operator < (const Law& rhs)const
+ { return size() < rhs.size(); }
+
+ /// The name of the law
+ std::string name()const { return that()->name(); }
+ /// A formula for the law
+ std::string formula()const { return that()->formula(); }
+ /// A string that represents the Laws type instantiation.
+ std::string typeString()const { return that()->typeString(); }
+
+ /** Set a value for a laws input variable, indicated by it's \index in
+ the tuple of input variables */
+ template<unsigned int index>
+ typename Loki::TL::TypeAt<InputTypes, index>::Result
+ setInputValue(const typename Loki::TL::TypeAt<InputTypes, index>::Result& value)
+ { return Loki::tup::refer<index>(_inputTuple)=value; }
+
+ /** Get the value for a laws input variable, indicated by it's \index in
+ the tuple of input variables */
+ template<unsigned int index>
+ typename Loki::TL::TypeAt<InputTypes, index>::Result getInputValue()const
+ { return Loki::tup::get<index>(_inputTuple); }
+
+ /** Set a value for a laws output variable, indicated by it's \index in
+ the tuple of output variables */
+ template<unsigned int index>
+ typename Loki::TL::TypeAt<OutputTypes, index>::Result
+ setOutputValue(const typename Loki::TL::TypeAt<OutputTypes, index>::Result& value)
+ { return Loki::tup::refer<index>(_outputTuple)=value; }
+
+ /** Get the value for a laws output variable, indicated by it's \index in
+ the tuple of output variables */
+ template<unsigned int index>
+ typename Loki::TL::TypeAt<OutputTypes, index>::Result getOutputValue()const
+ { return Loki::tup::get<index>(_outputTuple); }
+
+ protected:
+ sub_type* that() { return static_cast <sub_type*>(this); }
+ const sub_type* that()const { return static_cast<const sub_type*>(this); }
+
+ private:
+ input_tuple _inputTuple;
+ output_tuple _outputTuple;
+ };
+
+ enum InputVarIndex { operand_a, operand_b, operand_c, operand_d, operand_e };
+ enum OutputVarIndex { lhs_result, rhs_result };
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif //BOOST_ICL_LAW_HPP_JOFA_070411
+

Added: sandbox/icl/boost/validate/laws/law_violations.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/law_violations.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,185 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_LAW_VIOLATIONS_HPP_JOFA_070411
+#define BOOST_ICL_LAW_VIOLATIONS_HPP_JOFA_070411
+
+#include <string>
+#include <boost/icl_xt/set.hpp>
+#include <boost/validate/loki_xt/Tuple.h>
+
+namespace boost{namespace icl
+{
+
+ class LawViolationsI
+ {
+ public:
+ virtual ~LawViolationsI(){}
+
+ virtual size_t size()const=0;
+ virtual size_t getViolationsCount()const=0;
+ virtual LawViolationsI& operator += (const LawViolationsI& rhs)=0;
+
+ virtual const LawViolationsI* getLawViolations()const=0;
+
+ virtual bool operator == (const LawViolationsI& rhs)const=0;
+ virtual bool operator < (const LawViolationsI& rhs)const=0;
+
+ virtual void reportFirst()const=0;
+
+ };
+
+ class PolyLawViolations
+ {
+ public:
+ PolyLawViolations(): p_violations(NULL){}
+ PolyLawViolations(LawViolationsI* vios): p_violations(vios) {}
+ ~PolyLawViolations() {}
+
+ void destroy() { delete p_violations; p_violations = NULL; }
+
+ size_t size()const { return p_violations ? p_violations->size() : 0; }
+ size_t getViolationsCount()const { return p_violations ? p_violations->getViolationsCount() : 0; }
+
+ PolyLawViolations& operator += (const PolyLawViolations& rhs)
+ {
+ if(p_violations == NULL)
+ p_violations = rhs.p_violations;
+ else if(rhs.p_violations != NULL)
+ (*p_violations) += *(rhs.p_violations);
+
+ return *this;
+ }
+
+ bool operator == (const PolyLawViolations& rhs)const
+ {
+ return (p_violations == NULL && rhs.p_violations == NULL)
+ || (
+ ( p_violations != NULL && rhs.p_violations != NULL)
+ &&( p_violations == rhs.p_violations
+ || *p_violations == (*rhs.p_violations))
+ );
+ }
+
+ bool operator < (const PolyLawViolations& rhs)const
+ {
+ return (p_violations != NULL && rhs.p_violations != NULL)
+ && (*p_violations < (*rhs.p_violations));
+ }
+
+ void reportFirst()const
+ {
+ if(p_violations == NULL)
+ std::cout << "Empty law violation." << std::endl;
+ else
+ p_violations->reportFirst();
+ }
+
+ private:
+ LawViolationsI* p_violations;
+ };
+
+
+ /** class LawViolations.
+ LawViolations is a set of instances of a law that are violated sorted by operator <.
+ Operator < will usually be implemented via the size of the laws instance.
+ We are always only interested in small instances of law violations for efficient
+ debugging. */
+ template <class LawT>
+ class LawViolations : public LawViolationsI
+ {
+ public:
+ typedef LawT LawType;
+ typedef typename icl::set<LawType> ViolationSet;
+ typedef typename ViolationSet::size_type size_type;
+
+ typedef typename ViolationSet::iterator iterator;
+ typedef typename ViolationSet::const_iterator const_iterator;
+
+ enum { MaxSize = 20 };
+
+ LawViolations():_maxSize(MaxSize), _violationsCount(0){}
+
+ const LawViolationsI* getLawViolations()const { return this; }
+
+ size_t getViolationsCount()const { return _violationsCount; }
+
+ LawViolationsI& operator += (const LawViolationsI& rhs)
+ {
+ ICL_const_FORALL(typename ViolationSet, vio_,
+ dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations)
+ insert(*vio_);
+
+ return *this;
+ }
+
+ bool operator == (const LawViolationsI& rhs)const
+ {
+ return _violations == dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations;
+ }
+
+ bool operator < (const LawViolationsI& rhs)const
+ {
+ return _violations < dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations;
+ }
+
+ void insert(const LawType& lawInstance)
+ {
+ _violations.insert(lawInstance);
+ _violationsCount++;
+ if(0 < _violations.size() && _maxSize < static_cast<int>(_violations.size()))
+ {
+ typename ViolationSet::iterator doomed_ = _violations.end();
+ doomed_--;
+ _violations.erase(doomed_);
+ }
+ }
+
+ iterator begin() { return _violations.begin(); }
+ const_iterator begin()const { return _violations.begin(); }
+ iterator end() { return _violations.end(); }
+ const_iterator end()const { return _violations.begin(); }
+
+ void clear() { icl::clear(_violations); }
+ bool empty()const { return icl::is_empty(_violations); }
+ size_type size()const { return _violations.size(); }
+
+ void reportFirst()const
+ {
+ typename ViolationSet::const_iterator fst = _violations.begin();
+ LawT violation = *(_violations.begin());
+
+ typename LawT::input_tuple inVars;
+ typename LawT::output_tuple outVars;
+ violation.getInstance(inVars, outVars);
+ std::cout << "Violation of: " << violation.typeString() << std::endl;
+ std::cout << inVars.as_string() << std::endl;
+ std::cout << outVars.as_string() << std::endl;
+ }
+
+
+ private:
+ ViolationSet _violations;
+ int _maxSize;
+ size_t _violationsCount;
+ };
+
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream, const PolyLawViolations& object)
+{
+ return stream << "operator<<: not implemented for icl::PolyLawViolations!";
+}
+
+
+}} // namespace icl boost
+
+#endif //BOOST_ICL_LAW_VIOLATIONS_HPP_JOFA_070411
+

Added: sandbox/icl/boost/validate/laws/map_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/map_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,171 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_MAP_LAWS_HPP_JOFA_071124
+#define BOOST_ICL_MAP_LAWS_HPP_JOFA_071124
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ template <typename MapT, template<class>class Equality = icl::std_equal>
+ class SectionAbsorbtion
+ : public Law<SectionAbsorbtion<MapT>,
+ LOKI_TYPELIST_2(MapT, typename MapT::set_type), LOKI_TYPELIST_2(MapT,MapT)>
+ {
+ /** a - (a & b) == a - b
+ computed using inplace operators -= and &=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "SectionAbsorbtion"; }
+ std::string formula()const { return "map a, set b: a - (a & b) == a - b 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "SectionAbsorbtion<"+type_to_string<MapT>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a - (a & b) == a - b
+ // --- left hand side ------------------------
+ // lhs := a - (a & b)
+ MapT a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+ MapT lhs = this->template getInputValue<operand_a>();
+ lhs -= a_sec_b;
+
+ // --- right hand side -----------------------
+ // rhs := a - b
+ MapT rhs = this->template getInputValue<operand_a>();
+ rhs -= this->template getInputValue<operand_b>();
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<MapT>()(lhs, rhs);
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return
+ value_size<MapT>::apply(this->template getInputValue<operand_a>())+
+ value_size<typename MapT::set_type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename MapT>
+ class ProtonicEquality
+ : public Law<ProtonicEquality<MapT>,
+ LOKI_TYPELIST_2(MapT,MapT), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** (a.absorb_identities() == b.absorb_identities()) == is_distinct_equal(a, b)
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "ProtonicEquality"; }
+ std::string formula()const { return "(a.absorb_identities() == b.absorb_identities()) == is_distinct_equal(a, b)"; }
+
+ std::string typeString()const
+ {
+ return "ProtonicEquality<"+type_to_string<MapT>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // (a.absorb_identities() == b.absorb_identities()) == is_distinct_equal(a, b)
+ // --- left hand side ------------------------
+ // lhs := (a.absorb_identities() == b.absorb_identities())
+ MapT a = this->template getInputValue<operand_a>();
+ MapT a_protonic = a;
+ a_protonic.absorb_identities();
+ MapT b = this->template getInputValue<operand_b>();
+ MapT b_protonic = b;
+ b_protonic.absorb_identities();
+
+ bool lhs = a_protonic == b_protonic;
+
+ // --- right hand side -----------------------
+ // rhs := is_distinct_equal(a, b)
+ bool rhs = is_distinct_equal(a, b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ // (a.absorb_identities() == b.absorb_identities()) == is_distinct_equal(a, b)
+ // --- left hand side ------------------------
+ // lhs := (a.absorb_identities() == b.absorb_identities())
+
+ std::cout << name() << "::debug_holds():" << std::endl;
+ std::cout << "Instance: " << typeString() << std::endl;
+ std::cout << "Formula: " << formula() << std::endl;
+
+ MapT a = this->template getInputValue<operand_a>();
+ MapT b = this->template getInputValue<operand_b>();
+
+ std::cout << "a: " << a.as_string() << std::endl;
+ std::cout << "b: " << b.as_string() << std::endl;
+
+ MapT a_protonic = a;
+ a_protonic.absorb_identities();
+ MapT b_protonic = b;
+ b_protonic.absorb_identities();
+
+ std::cout << "a.absorb_identities(): " << a_protonic.as_string() << std::endl;
+ std::cout << "b.absorb_identities(): " << b_protonic.as_string() << std::endl;
+
+ bool lhs = a_protonic == b_protonic;
+
+ std::cout << "lhs := (a.absorb_identities() == b.absorb_identities()): " << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ // rhs := is_distinct_equal(a, b)
+ bool rhs = is_distinct_equal(a, b);
+
+ std::cout << "rhs := is_distinct_equal(a, b): " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<MapT>::apply(this->template getInputValue<operand_a>())+
+ value_size<MapT>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_MAP_LAWS_HPP_JOFA_071124
+
+

Added: sandbox/icl/boost/validate/laws/minor_set_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/minor_set_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,213 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_090821
+#define BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_090821
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class IntersectsDefined
+ : public Law<IntersectsDefined<Type>, LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_total<T> || (intersects(a, b) == !(a & b).empty()) : Definition of intersects predicate
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "IntersectsDefined defined"; }
+ std::string formula()const { return "is_total<T> || intersects(a, b) == !(a & b).empty()"; }
+
+ std::string typeString()const
+ {
+ return "IntersectsDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // is_total<T> || intersects(a, b) == !(a & b).empty()
+ // --- left hand side ------------------------
+ bool a_intersects_b
+ = intersects(this->template getInputValue<operand_a>(),
+ this->template getInputValue<operand_b>());
+ // --- right hand side ------------------------
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ bool a_sec_b_non_empty = !a_sec_b.empty();
+
+ this->template setOutputValue<lhs_result>(a_intersects_b);
+ this->template setOutputValue<rhs_result>(a_sec_b_non_empty);
+
+ if(is_total<Type>::value)
+ // For a total map y, y.empty() does not mean that y is empty
+ // it means that y is a null vector. In this sense total maps
+ // always intersect with themselves and with key sets.
+ return a_intersects_b == true;
+ else
+ return a_intersects_b == a_sec_b_non_empty;
+ }
+
+ bool debug_holds()
+ {
+ // intersects(a, b) == !(a & b).empty() : Definition of intersects predicate
+ // --- left hand side ------------------------
+ Type value_a = this->template getInputValue<operand_a>();
+ Type value_b = this->template getInputValue<operand_b>();
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << (value_a & value_b) << std::endl;
+
+ bool a_intersects_b
+ = intersects(this->template getInputValue<operand_a>(),
+ this->template getInputValue<operand_b>());
+ // --- right hand side ------------------------
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ bool a_sec_b_non_empty = !a_sec_b.empty();
+
+ this->template setOutputValue<lhs_result>(a_intersects_b);
+ this->template setOutputValue<rhs_result>(a_sec_b_non_empty);
+
+ if(is_total<Type>::value)
+ return a_intersects_b == true;
+ else
+ return a_intersects_b == a_sec_b_non_empty;
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ template <typename Type, typename CoType>
+ class Interinclusion
+ : public Law<Interinclusion<Type,CoType>, LOKI_TYPELIST_2(Type,CoType), LOKI_TYPELIST_1(bool)>
+ {
+ /** a.contains(a & b)
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Interinclusion"; }
+ std::string formula()const { return "a.contains(a & b)"; }
+
+ std::string typeString()const
+ {
+ return "Interinclusion<"+ type_to_string<Type>::apply()+","
+ +type_to_string<CoType>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ return value_a.contains(value_a & value_b);
+ }
+
+ bool debug_holds()
+ {
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ Type a_sec_b = value_a & value_b;
+ bool result = value_a.contains(value_a & value_b);
+ // -------------------------------------------
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << a_sec_b << std::endl;
+ std::cout << "a.contains(a&b) = " << result << std::endl;
+ // -------------------------------------------
+ value_a.contains(a_sec_b);
+
+ return result;
+ }
+
+ size_t size()const
+ {
+ return value_size< Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<CoType>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+ template <typename Type, typename CoType>
+ class AddendInclusion
+ : public Law<AddendInclusion<Type,CoType>, LOKI_TYPELIST_2(Type,CoType), LOKI_TYPELIST_1(bool)>
+ {
+ /** (a + i).contains(i)
+ Input = (a := inVal1, i := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "AddendInclusion"; }
+ std::string formula()const { return "(a + i).contains(i)"; }
+
+ std::string typeString()const
+ {
+ return "AddendInclusion<"+ type_to_string<Type>::apply()+","
+ +type_to_string<CoType>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // (a + i).contains(i)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_i = this->template getInputValue<operand_b>();
+ return (value_a + value_i).contains(value_i);
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ /*
+ // a.contains(a & b)
+ Type value_a = this->template getInputValue<operand_a>();
+ CoType value_b = this->template getInputValue<operand_b>();
+ Type a_sec_b = value_a & value_b;
+ bool result = value_a.contains(value_a & value_b);
+ // -------------------------------------------
+ std::cout << "a = " << value_a << std::endl;
+ std::cout << "b = " << value_b << std::endl;
+ std::cout << "a&b = " << a_sec_b << std::endl;
+ std::cout << "a.contains(a&b) = " << result << std::endl;
+ // -------------------------------------------
+ value_a.contains(a_sec_b);
+
+ return result;
+ */
+ }
+
+ size_t size()const
+ {
+ return value_size< Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<CoType>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_MINOR_SET_LAWS_HPP_JOFA_070411
+

Added: sandbox/icl/boost/validate/laws/monoid.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/monoid.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,345 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_MONOID_HPP_JOFA_070411
+#define BOOST_ICL_MONOID_HPP_JOFA_070411
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ /* Monoid: (M,+,0) with .+.: M x M -> M has these axioms
+ (1) Associativity
+ (2) Neutral element
+ A commutative monoid or abelian monoid has also
+ (3) Commutativity
+ */
+
+ template <typename Type>
+ class AdditionNeutrality
+ : public Law<AdditionNeutrality<Type>, LOKI_TYPELIST_1(Type), LOKI_TYPELIST_1(Type)>
+ {
+ public:
+ std::string name()const { return "Addition Neutrality"; }
+ std::string formula()const { return "a + 0 == 0"; }
+
+ std::string typeString()const
+ {
+ return "Neutrality<"+type_to_string<Type>::apply()+",+,0>";
+ }
+
+ public:
+ bool holds()
+ {
+ Type inVal = this->template getInputValue<0>();
+ Type outVal = inVal + Type();
+ this->template setOutputValue<0>(outVal);
+ return inVal == outVal;
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const;
+
+ void setValue(const Type& inVal) { this->template setInputValue<0>(inVal); }
+ Type getResult()const { return this->template getOutputValue<0>(); }
+ };
+
+ template <> size_t AdditionNeutrality<int>::size()const
+ { return getInputValue<0>(); }
+
+ template <class Type> size_t AdditionNeutrality<Type>::size()const
+ { return this->template getInputValue<0>().size(); };
+
+ template <typename Type>
+ class AdditionCommutativity
+ : public Law<AdditionCommutativity<Type>, LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a + b == b + a
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Addition Commutativity"; }
+ std::string formula()const { return "a + b == b + a"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<Type>::apply()+",+>";
+ }
+
+ public:
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const Type& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const Type& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperands(const Type& inVal_a, const Type& inVal_b)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); }
+
+ Type getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ Type getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ bool holds()
+ {
+ this->template setOutputValue<lhs_result>(this->template getInputValue<operand_a>() + this->template getInputValue<operand_b>());
+ this->template setOutputValue<rhs_result>(this->template getInputValue<operand_b>() + this->template getInputValue<operand_a>());
+ return this->template getOutputValue<lhs_result>() == this->template getOutputValue<rhs_result>();
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+ template <typename TypeA, typename TypeB>
+ class MixedAdditionCommutativity
+ : public Law<MixedAdditionCommutativity<TypeA, TypeB>,
+ LOKI_TYPELIST_2(TypeA,TypeB), LOKI_TYPELIST_2(TypeB,TypeB)>
+ {
+ /** a + b == b + a
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Mixed Addition Commutativity"; }
+ std::string formula()const { return "a + b == b + a for A a; B b; +: A x B -> B"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<TypeA>::apply()+","
+ +type_to_string<TypeB>::apply()+",+>";
+ }
+
+ public:
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const TypeA& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const TypeB& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperands(const TypeA& inVal_a, const TypeB& inVal_b)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); }
+
+ TypeB getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ TypeB getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ bool holds()
+ {
+ this->template setOutputValue<lhs_result>(this->template getInputValue<operand_a>() + this->template getInputValue<operand_b>());
+ this->template setOutputValue<rhs_result>(this->template getInputValue<operand_b>() + this->template getInputValue<operand_a>());
+ return this->template getOutputValue<lhs_result>() == this->template getOutputValue<rhs_result>();
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return value_size<TypeA>::get(this->template getInputValue<operand_a>())+
+ value_size<TypeB>::get(this->template getInputValue<operand_b>());
+ }
+
+ };
+
+
+ // ---------------------------------------------------------------------------
+ // Inplace variant of laws for operator o=
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Accumulator = inplace_plus, template<class>class IdentityElement = identity_element>
+ class InplaceNeutrality
+ : public Law<InplaceNeutrality<Type,Accumulator,IdentityElement>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_1(Type)>
+ {
+ /** a o 0 == a computed as
+ l=a; l o= 0; => l==a
+ Input = (a := inVal1)
+ Output = (lhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Op Neutrality"; }
+ std::string formula()const { return "a o 0 == a 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Neutrality<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+","
+ +unary_template_to_string<IdentityElement>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, identity_element<Type>()());
+ this->template setOutputValue<lhs_result>(lhs);
+ return lhs == this->template getInputValue<operand_a>();
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ };
+
+
+ template <typename Type,
+ template<class>class Accumulator = inplace_plus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceAssociativity
+ : public Law<InplaceAssociativity<Type,Accumulator,Equality>,
+ LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** (a o b) o c == a o (b o c) 'inplace'
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Inplace Associativity"; }
+ std::string formula()const { return "(a o b) o c == a o (b o c) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Associativity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ size_t size()const
+ {
+ return
+ value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_c>());
+
+ Type rhs = this->template getInputValue<operand_a>();
+ Type b_plus_c = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
+ Accumulator<Type>()(rhs, b_plus_c);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ std::cout << "--- function debug_holds -----------------------------\n";
+ std::cout << " a = " << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << " b = " << this->template getInputValue<operand_b>() << std::endl;
+ std::cout << " c = " << this->template getInputValue<operand_c>() << std::endl;
+
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ std::cout << " a o b = " << lhs << std::endl;
+
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_c>());
+ std::cout << "(a o b) o c = " << lhs << std::endl;
+
+ Type rhs = this->template getInputValue<operand_a>();
+ Type b_plus_c = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
+ std::cout << " b o c = " << b_plus_c << std::endl;
+ Accumulator<Type>()(rhs, b_plus_c);
+ std::cout << "a o (b o c) = " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+ std::cout << "------------------------------------------------------\n";
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ };
+
+
+ template <typename Type, template<class>class Accumulator = inplace_plus>
+ class InplaceCommutativity
+ : public Law<InplaceCommutativity<Type,Accumulator>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a o b == b o a computed as
+ lhs=a; lhs+=b; rhs=b; rhs+=a => lhs==rhs
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Commutativity"; }
+ std::string formula()const { return "a o b == b o a 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+">";
+ }
+
+ public:
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ Type rhs = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(rhs, this->template getInputValue<operand_a>());
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ std::cout << "--- function debug_holds -----------------------------\n";
+ std::cout << " a = " << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << " b = " << this->template getInputValue<operand_b>() << std::endl;
+
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ std::cout << "a o b = " << lhs << std::endl;
+
+ Type rhs = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(rhs, this->template getInputValue<operand_a>());
+ std::cout << "b o a = " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+ std::cout << "------------------------------------------------------\n";
+
+ return lhs == rhs;
+ }
+
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_MONOID_HPP_JOFA_070411
+

Added: sandbox/icl/boost/validate/laws/order.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/order.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,228 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_ORDER_HPP_JOFA_071129
+#define BOOST_ICL_ORDER_HPP_JOFA_071129
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ /* Orders (Orderings): .<. : M x M -> bool */
+
+
+ template <typename Type, template<class>class Relation>
+ class Reflexivity
+ : public Law<Reflexivity<Type,Relation>,
+ LOKI_TYPELIST_1(Type), Loki::NullType>
+ {
+ public:
+ std::string name()const { return "Reflexivity"; }
+ std::string formula()const { return "a <= a"; }
+
+ std::string typeString()const
+ {
+ return "Reflexivity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Relation>::apply()+">";
+ }
+
+ public:
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ return Relation<Type>()(a,a);
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+ template<>
+ std::string unary_template_to_string<std::less_equal>::apply() { return "<="; }
+ template<>
+ std::string unary_template_to_string<std::less>::apply() { return "<"; }
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Relation>
+ class Irreflexivity
+ : public Law<Irreflexivity<Type,Relation>,
+ LOKI_TYPELIST_1(Type), Loki::NullType>
+ {
+ public:
+ std::string name()const { return "Irreflexivity"; }
+ std::string formula()const { return "!(a < a)"; }
+
+ std::string typeString()const
+ {
+ return "Irreflexivity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Relation>::apply()+">";
+ }
+
+ public:
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ return !Relation<Type>()(a,a);
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ { return value_size<Type>::apply(this->template getInputValue<operand_a>()); }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type,
+ template<class>class Relation,
+ template<class>class Equality = icl::std_equal>
+ class Antisymmetry
+ : public Law<Antisymmetry<Type,Relation,Equality>,
+ LOKI_TYPELIST_2(Type,Type), Loki::NullType>
+ {
+ /** a <= b && b <= a => a == b
+ Input = (a := inVal1, b := inVal2)
+ Output = ()
+ */
+ public:
+ std::string name()const { return "Antisymmetry"; }
+ std::string formula()const { return "(a <= b && b <= a) => a == b"; }
+
+ std::string typeString()const
+ {
+ return "Antisymmetry<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Relation>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+
+ return !(Relation<Type>()(a,b) && Relation<Type>()(b,a)) || Equality<Type>()(a,b);
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+
+ cout << "a = " << a << endl;
+ cout << "b = " << b << endl;
+
+ bool a_R_b = Relation<Type>()(a,b);
+ cout << "a<=b == " << a_R_b << endl;
+
+ bool b_R_a = Relation<Type>()(b,a);
+ cout << "b<=a == " << b_R_a << endl;
+
+ bool a_E_b = Equality<Type>()(a,b);
+ cout << "b==a == " << a_E_b << endl;
+
+ return !(Relation<Type>()(a,b) && Relation<Type>()(b,a)) || Equality<Type>()(a,b);
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Relation>
+ class Asymmetry
+ : public Law<Asymmetry<Type,Relation>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_1(Type)>
+ {
+ /** a < b => !(b < a)
+ Input = (a := inVal1, b := inVal2)
+ Output = ()
+ */
+ public:
+ std::string name()const { return "Asymmetry"; }
+ std::string formula()const { return " a < b => !(b < a)"; }
+
+ std::string typeString()const
+ {
+ return "Asymmetry<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Relation>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_a>();
+
+ return !(Relation<Type>()(a,b) && Relation<Type>()(b,a));
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Relation>
+ class Transitivity
+ : public Law<Transitivity<Type,Relation>,
+ LOKI_TYPELIST_3(Type,Type,Type), Loki::NullType>
+ {
+ /** a < b && b < c => a < c
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = ()
+ */
+ public:
+ std::string name()const { return "Transitivity"; }
+ std::string formula()const { return "a < b && b < c => a < c"; }
+
+ std::string typeString()const
+ {
+ return "Transitivity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Relation>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_a>();
+ Type c = this->template getInputValue<operand_c>();
+
+ return !(Relation<Type>()(a,b) && Relation<Type>()(b,c)) || Relation<Type>()(a,c);
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>())+
+ value_size<Type>::apply(this->template getInputValue<operand_c>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_ORDER_HPP_JOFA_071129
+

Added: sandbox/icl/boost/validate/laws/pushouts.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/pushouts.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,134 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_PUSHOUTS_HPP_JOFA_071124
+#define BOOST_ICL_PUSHOUTS_HPP_JOFA_071124
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ // (a,b) ---o---> c
+ // | |
+ // |f |f
+ // V V
+ // (a',b')---o---> c'
+ // ---------------------------------------------------------------------------
+ template <typename SourceT, typename TargetT,
+ template<class,class>class FunctionT, // morphic function f
+ template<typename>class OperatorT> // operator like +=
+ class BinaryPushout :
+ public Law<BinaryPushout<SourceT,TargetT,FunctionT,OperatorT>,
+ LOKI_TYPELIST_2(SourceT, SourceT), LOKI_TYPELIST_2(TargetT,TargetT)>
+ {
+ /** f(a o b) == f(a) o f(b)
+ computed using inplace operators o=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Pushout"; }
+ std::string formula()const { return "cont a, cont b: f(a o b) == f(a) o f(b) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return
+ "Pushout<"+type_to_string<SourceT>::apply()+","
+ +type_to_string<TargetT>::apply()+","
+ +binary_template_to_string<FunctionT>::apply()+","
+ +unary_template_to_string<OperatorT>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // f(a o b) == f(a) o f(b)
+ // --- left hand side ------------------------
+ // lhs := f(a o b)
+ SourceT a_o_b = this->template getInputValue<operand_a>();
+ // a_o_b *= this->template getInputValue<operand_b>();
+ OperatorT<SourceT>()(a_o_b, this->template getInputValue<operand_b>());
+
+ TargetT lhs;
+ FunctionT<TargetT,SourceT>()(lhs, a_o_b);
+
+ // --- right hand side -----------------------
+ // rhs := atomize(a) * atomize(b)
+ SourceT value_a = this->template getInputValue<operand_a>();
+ TargetT atomic_a;
+ FunctionT<TargetT,SourceT>()(atomic_a, value_a);
+ SourceT value_b = this->template getInputValue<operand_b>();
+ TargetT atomic_b;
+ FunctionT<TargetT,SourceT>()(atomic_b, value_b);
+ TargetT rhs = atomic_a;
+ OperatorT<TargetT>()(rhs, atomic_b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<SourceT>::apply(this->template getInputValue<operand_a>())+
+ value_size<SourceT>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool debug_holds()
+ {
+ std::cout << typeString() << std::endl;
+ std::cout << formula() << std::endl;
+ std::cout << "a: " << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << "b: " << this->template getInputValue<operand_b>() << std::endl;
+
+ // f(a o b) == f(a) o f(b)
+ // --- left hand side ------------------------
+ // lhs := f(a o b)
+ SourceT a_o_b = this->template getInputValue<operand_a>();
+ // a_o_b o= this->template getInputValue<operand_b>();
+ OperatorT<SourceT>()(a_o_b, this->template getInputValue<operand_b>());
+ std::cout << "a o b:" << a_o_b << std::endl;
+
+ TargetT lhs;
+ FunctionT<TargetT,SourceT>()(lhs, a_o_b);
+ std::cout << "f(a o b):" << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ // rhs := atomize(a) * atomize(b)
+ SourceT value_a = this->template getInputValue<operand_a>();
+ TargetT atomic_a;
+ FunctionT<TargetT,SourceT>()(atomic_a, value_a);
+ std::cout << "f(a):" << atomic_a << std::endl;
+ SourceT value_b = this->template getInputValue<operand_b>();
+ TargetT atomic_b;
+ FunctionT<TargetT,SourceT>()(atomic_b, value_b);
+ std::cout << "f(b):" << atomic_b << std::endl;
+ TargetT rhs = atomic_a;
+ OperatorT<TargetT>()(rhs, atomic_b);
+ std::cout << "f(a) o f(b):" << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ }; //class BinaryPushout
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_PUSHOUTS_HPP_JOFA_071124
+

Added: sandbox/icl/boost/validate/laws/set_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/set_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,332 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_SET_LAWS_HPP_JOFA_071124
+#define BOOST_ICL_SET_LAWS_HPP_JOFA_071124
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/predicates.hpp>
+#include <boost/validate/laws/law.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Operator1 = inplace_plus,
+ template<class>class Operator2 = inplace_et,
+ template<class>class Equality = icl::std_equal>
+ class InplaceDistributivity
+ : public Law<InplaceDistributivity<Type,Operator1,Operator2,Equality>,
+ LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a + (b * c) == (a + b) * (a + c)
+ a(1)(b(2)c) == (a(1)b)(2)(a(1)c)
+ computed using inplace operators +=, += and &=
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "InplaceDistributivity"; }
+ std::string formula()const { return "a + (b * c) == (a + b) * (a + c) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Distributivity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Operator1>::apply()+","
+ +unary_template_to_string<Operator2>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a + (b * c) == (a + b) * (a + c)
+ // --- left hand side ------------------------
+ Type b_star_c = this->template getInputValue<operand_b>();
+ Operator2<Type>()(b_star_c, this->template getInputValue<operand_c>());
+
+ // lhs := a + (b * c)
+ Type lhs = this->template getInputValue<operand_a>();
+ Operator1<Type>()(lhs, b_star_c);
+
+ // --- right hand side -----------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ Operator1<Type>()(a_plus_b, this->template getInputValue<operand_b>());
+
+ Type a_plus_c = this->template getInputValue<operand_a>();
+ Operator1<Type>()(a_plus_c, this->template getInputValue<operand_c>());
+
+ // rhs := (a + b) * (a + c)
+ Type rhs = a_plus_b;
+ Operator2<Type>()(rhs, a_plus_c);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ // a + (b * c) == (a + b) * (a + c)
+ std::cout << "a:" << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << "b:" << this->template getInputValue<operand_b>() << std::endl;
+ std::cout << "c:" << this->template getInputValue<operand_c>() << std::endl;
+ // --- left hand side ------------------------
+ Type b_star_c = this->template getInputValue<operand_b>();
+ Operator2<Type>()(b_star_c, this->template getInputValue<operand_c>());
+ std::cout << "b*c:" << b_star_c << std::endl;
+
+ // lhs := a + (b * c)
+ Type lhs = this->template getInputValue<operand_a>();
+ Operator1<Type>()(lhs, b_star_c);
+ std::cout << "l=a+(b*c):" << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ Operator1<Type>()(a_plus_b, this->template getInputValue<operand_b>());
+ std::cout << "a+b:" << a_plus_b << std::endl;
+
+ Type a_plus_c = this->template getInputValue<operand_a>();
+ Operator1<Type>()(a_plus_c, this->template getInputValue<operand_c>());
+ std::cout << "a+c:" << a_plus_c << std::endl;
+
+ // rhs := (a + b) * (a + c)
+ Type rhs = a_plus_b;
+ Operator2<Type>()(rhs, a_plus_c);
+ std::cout << "r=(a+b)*(a+c):" << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>())+
+ value_size<Type>::apply(this->template getInputValue<operand_c>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Operator1 = inplace_plus,
+ template<class>class Operator2 = inplace_et,
+ template<class>class Subtraction = inplace_minus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceDeMorgan
+ : public Law<InplaceDeMorgan<Type,Operator1,Operator2,Subtraction,Equality>,
+ LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a - (b o c) == (a - b) $ (a - c)
+ a - (b(1)c) == (a - b)(2)(a - c)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "InplacePlusDeMorgan"; }
+ std::string formula()const { return "a - (b o c) == (a - b) $ (a - c) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "DeMorgan<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Operator1>::apply()+","
+ +unary_template_to_string<Operator2>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a - (b o c) == (a - b) $ (a - c)
+ // --- left hand side ------------------------
+ Type b_plus_c = this->template getInputValue<operand_b>();
+ Operator1<Type>()(b_plus_c, this->template getInputValue<operand_c>());
+
+ // lhs := a - (b o c)
+ Type lhs = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(lhs, b_plus_c);
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_b, this->template getInputValue<operand_b>());
+
+ Type a_minus_c = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_c, this->template getInputValue<operand_c>());
+
+ // rhs := (a - b) $ (a - c)
+ Type rhs = a_minus_b;
+ Operator2<Type>()(rhs, a_minus_c);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ // a - (b o c) == (a - b) $ (a - c)
+ Type val_a = this->template getInputValue<operand_a>();
+ Type val_b = this->template getInputValue<operand_b>();
+ Type val_c = this->template getInputValue<operand_c>();
+
+ std::cout << "--- function debug_holds -----------------------------\n" ;
+ std::cout << " a = " << val_a << std::endl;
+ std::cout << " b = " << val_b << std::endl;
+ std::cout << " c = " << val_c << std::endl;
+ // --- left hand side ------------------------
+ Type b_plus_c = val_b;
+ Operator1<Type>()(b_plus_c, val_c);
+
+ std::cout << "lhs: \n";
+ std::cout << " (b o c) = " << b_plus_c << std::endl;
+ // lhs := a - (b o c)
+ Type lhs = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(lhs, b_plus_c);
+ std::cout << "a - (b o c) = " << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_b, this->template getInputValue<operand_b>());
+ std::cout << "rhs: \n";
+ std::cout << " a - b = " << a_minus_b << std::endl;
+
+ Type a_minus_c = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_c, this->template getInputValue<operand_c>());
+ std::cout << " a - c = " << a_minus_c << std::endl;
+
+ // rhs := (a - b) $ (a - c)
+ Type rhs = a_minus_b;
+ Operator2<Type>()(rhs, a_minus_c);
+ std::cout << "(a-b)$(a-c) = " << rhs << std::endl;
+ std::cout << "------------------------------------------------------\n" ;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>())+
+ value_size<Type>::apply(this->template getInputValue<operand_c>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type,
+ template<class>class Operator1 = inplace_plus,
+ template<class>class Operator2 = inplace_minus,
+ template<class>class Equality = icl::std_equal>
+ class InplaceRightDistributivity
+ : public Law<InplaceRightDistributivity<Type,Operator1,Operator2>,
+ LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** (a + b) - c == (a - c) + (b - c)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "InplaceRightDistributivity"; }
+ std::string formula()const { return "(a + b) - c == (a - c) + (b - c) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "RightDistributivity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Operator1>::apply()+","
+ +unary_template_to_string<Operator2>::apply()+","
+ +unary_template_to_string<Equality>::apply() +">";
+ }
+
+ public:
+
+ size_t size()const
+ {
+ return
+ value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>())+
+ value_size<Type>::apply(this->template getInputValue<operand_c>());
+ }
+
+ bool holds()
+ {
+ // (a + b) - c == (a - c) + (b - c)
+ // --- left hand side ------------------------
+ // lhs := (a + b) - c
+ Type lhs = this->template getInputValue<operand_a>();
+ Operator1<Type>()(lhs, this->template getInputValue<operand_b>());
+ Operator2<Type>()(lhs, this->template getInputValue<operand_c>());
+
+ // --- right hand side -----------------------
+ Type a_minus_c = this->template getInputValue<operand_a>();
+ Operator2<Type>()(a_minus_c, this->template getInputValue<operand_c>());
+
+ Type b_minus_c = this->template getInputValue<operand_b>();
+ Operator2<Type>()(b_minus_c, this->template getInputValue<operand_c>());
+
+ // rhs := (a - c) + (b - c)
+ Type rhs = a_minus_c;
+ Operator1<Type>()(rhs, b_minus_c);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ // (a + b) - c == (a - c) + (b - c)
+ std::cout << "a:" << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << "b:" << this->template getInputValue<operand_b>() << std::endl;
+ std::cout << "c:" << this->template getInputValue<operand_c>() << std::endl;
+ // --- left hand side ------------------------
+ // lhs := (a + b) - c
+ Type lhs = this->template getInputValue<operand_a>();
+ Operator1<Type>()(lhs, this->template getInputValue<operand_b>());
+ std::cout << "a+b:" << lhs << std::endl;
+ Operator2<Type>()(lhs, this->template getInputValue<operand_c>());
+ std::cout << "l=(a+b)-c:" << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_c = this->template getInputValue<operand_a>();
+ Operator2<Type>()(a_minus_c, this->template getInputValue<operand_c>());
+ std::cout << "a-c:" << a_minus_c << std::endl;
+
+ Type b_minus_c = this->template getInputValue<operand_b>();
+ Operator2<Type>()(b_minus_c, this->template getInputValue<operand_c>());
+ std::cout << "b-c:" << b_minus_c << std::endl;
+
+ // rhs := (a - c) + (b - c)
+ Type rhs = a_minus_c;
+ Operator1<Type>()(rhs, b_minus_c);
+ std::cout << "r=(a-c)+(b-c):" << b_minus_c << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_SET_LAWS_HPP_JOFA_071124
+
+

Added: sandbox/icl/boost/validate/laws/subset_order.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/subset_order.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,220 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_SUBSET_ORDERING_HPP_JOFA_090202
+#define BOOST_ICL_SUBSET_ORDERING_HPP_JOFA_090202
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/laws/law.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class InclusionEqualDefined
+ : public Law<InclusionEqualDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** is_element_equal(a, a.join())
+ Input = (a := inVal1)
+ Output = ()
+ */
+ public:
+ std::string name()const { return "InclusionEqualDefined"; }
+ std::string formula()const { return "is_element_equal(a, a.join())"; }
+
+ std::string typeString()const
+ {
+ return "InclusionEqualDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_inclusion_equal(a, b);
+ bool rhs = (a_atomic == b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = is_inclusion_equal(a, b);
+ bool rhs = (a_atomic == b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>());
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class SubsetDefined
+ : public Law<SubsetDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** within(a, b) == a.atomic().contained_in(b.atomic())
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs, rhs)
+ */
+ public:
+ std::string name()const { return "SubsetDefined"; }
+ std::string formula()const { return "within(a,b) == a.atomic().contained_in(b.atomic())"; }
+
+ std::string typeString()const
+ {
+ return "SubsetDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = within(a, b);
+ bool rhs = a_atomic.contained_in(b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ cout << "a: " << a << endl;
+ cout << "b: " << b << endl;
+
+ bool lhs = within(a, b);
+ bool rhs = a_atomic.contained_in(b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type>
+ class SupersetDefined
+ : public Law<SubsetDefined<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** contains(a, b) == a.join() > b.join()
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs, rhs)
+ */
+ public:
+ std::string name()const { return "SupersetDefined"; }
+ std::string formula()const { return "contains(a,b) == a.atomic() > b.atomic()"; }
+
+ std::string typeString()const
+ {
+ return "SupersetDefined<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = contains(a, b);
+ bool rhs = contains(a_atomic, b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ bool debug_holds()
+ {
+ Type a = this->template getInputValue<operand_a>();
+ Type b = this->template getInputValue<operand_b>();
+ typename Type::atomized_type a_atomic;
+ typename Type::atomized_type b_atomic;
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
+
+ bool lhs = contains(a, b);
+ bool rhs = contains(a_atomic, b_atomic);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_SUBSET_ORDERING_HPP_JOFA_090202
+

Added: sandbox/icl/boost/validate/laws/symmetric_difference.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/laws/symmetric_difference.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,205 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_SYMMETRIC_DIFFERENCE_HPP_JOFA_071124
+#define BOOST_ICL_SYMMETRIC_DIFFERENCE_HPP_JOFA_071124
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{namespace icl
+{
+
+ // ---------------------------------------------------------------------------
+ template <typename Type,
+ template<class>class Addition = icl::inplace_plus,
+ template<class>class Subtraction = icl::inplace_minus,
+ template<class>class Intersection = icl::inplace_et,
+ template<class>class Equality = icl::std_equal>
+ class InplaceSymmetricDifference
+ : public Law<InplaceSymmetricDifference<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** (a + b) - (a & b) == (a - b) + (b - a)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Symmetric Difference"; }
+ std::string formula()const { return "(a+b) - (a&b) == (a-b) + (b-a) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "SymmetricDifference<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // --- left hand side ------------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ Addition<Type>()(a_plus_b, this->template getInputValue<operand_b>());
+
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ Intersection<Type>()(a_sec_b, this->template getInputValue<operand_b>());
+
+ Type lhs = a_plus_b;
+ Subtraction<Type>()(lhs, a_sec_b);
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_b, this->template getInputValue<operand_b>());
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ Subtraction<Type>()(b_minus_a, this->template getInputValue<operand_a>());
+
+ Type rhs = a_minus_b;
+ Addition<Type>()(rhs, b_minus_a);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+
+ bool debug_holds()
+ {
+ // --- left hand side ------------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ Addition<Type>()(a_plus_b, this->template getInputValue<operand_b>());
+
+ std::cout << "a_plus_b=" << a_plus_b << std::endl;
+
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ Intersection<Type>()(a_sec_b, this->template getInputValue<operand_b>());
+
+ std::cout << "a_sec_b=" << a_sec_b << std::endl;
+
+ Type lhs = a_plus_b;
+ Subtraction<Type>()(lhs, a_sec_b);
+
+ std::cout << "lhs=" << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ Subtraction<Type>()(a_minus_b, this->template getInputValue<operand_b>());
+ std::cout << "a_minus_b=" << a_minus_b << std::endl;
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ Subtraction<Type>()(b_minus_a, this->template getInputValue<operand_a>());
+ std::cout << "b_minus_a=" << b_minus_a << std::endl;
+
+ Type rhs = a_minus_b;
+ Addition<Type>()(rhs, b_minus_a);
+ std::cout << "rhs=" << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Equality = icl::std_equal>
+ class InplaceFlip
+ : public Law<InplaceFlip<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a ^ b == (a - b) + (b - a)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Flip"; }
+ std::string formula()const { return "a ^ b == (a-b) + (b-a) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Flip<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // --- left hand side ------------------------
+ Type lhs = this->template getInputValue<operand_a>();
+ lhs ^= this->template getInputValue<operand_b>();
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+
+ bool debug_holds()
+ {
+ // --- left hand side ------------------------
+ Type lhs = this->template getInputValue<operand_a>();
+ lhs ^= this->template getInputValue<operand_b>();
+ std::cout << "lhs=" << lhs << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+ std::cout << "a_minus_b=" << a_minus_b << std::endl;
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+ std::cout << "b_minus_a=" << b_minus_a << std::endl;
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+ std::cout << "rhs=" << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_SYMMETRIC_DIFFERENCE_HPP_JOFA_071124
+
+

Added: sandbox/icl/boost/validate/loki/EmptyType.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/EmptyType.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_EMPTYTYPE_INC_
+#define LOKI_EMPTYTYPE_INC_
+
+// $Id$
+
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class EmptyType
+// Used as a class type that doesn't hold anything
+// Useful as a strawman class
+////////////////////////////////////////////////////////////////////////////////
+
+ class EmptyType {};
+
+
+ inline bool operator==(const EmptyType&, const EmptyType&)
+ {
+ return true;
+ }
+
+ inline bool operator<(const EmptyType&, const EmptyType&)
+ {
+ return false;
+ }
+
+ inline bool operator>(const EmptyType&, const EmptyType&)
+ {
+ return false;
+ }
+}
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki/NullType.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/NullType.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_NULLTYPE_INC_
+#define LOKI_NULLTYPE_INC_
+
+// $Id$
+
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class NullType
+// Used as a placeholder for "no type here"
+// Useful as an end marker in typelists
+////////////////////////////////////////////////////////////////////////////////
+
+ class NullType {};
+
+} // namespace Loki
+
+
+#endif // end file guardian

Added: sandbox/icl/boost/validate/loki/Sequence.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/Sequence.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2005 by Peter Kümmel
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author makes no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_SEQUENCE_INC_
+#define LOKI_SEQUENCE_INC_
+
+// $Id$
+
+
+#include "Typelist.h"
+
+namespace Loki
+{
+
+ template
+ <
+ class T01=NullType,class T02=NullType,class T03=NullType,class T04=NullType,class T05=NullType,
+ class T06=NullType,class T07=NullType,class T08=NullType,class T09=NullType,class T10=NullType,
+ class T11=NullType,class T12=NullType,class T13=NullType,class T14=NullType,class T15=NullType,
+ class T16=NullType,class T17=NullType,class T18=NullType,class T19=NullType,class T20=NullType
+ >
+ struct Seq
+ {
+ private:
+ typedef typename Seq< T02, T03, T04, T05, T06, T07, T08, T09, T10,
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>::Type
+ TailResult;
+ public:
+ typedef Typelist<T01, TailResult> Type;
+ };
+
+ template<>
+ struct Seq<>
+ {
+ typedef NullType Type;
+ };
+
+} // namespace Loki
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki/TypeManip.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/TypeManip.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,284 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_TYPEMANIP_INC_
+#define LOKI_TYPEMANIP_INC_
+
+// $Id$
+
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Int2Type
+// Converts each integral constant into a unique type
+// Invocation: Int2Type<v> where v is a compile-time constant integral
+// Defines 'value', an enum that evaluates to v
+////////////////////////////////////////////////////////////////////////////////
+
+ template <int v>
+ struct Int2Type
+ {
+ enum { value = v };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Type2Type
+// Converts each type into a unique, insipid type
+// Invocation Type2Type<T> where T is a type
+// Defines the type OriginalType which maps back to T
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T>
+ struct Type2Type
+ {
+ typedef T OriginalType;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Select
+// Selects one of two types based upon a boolean constant
+// Invocation: Select<flag, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+
+ template <bool flag, typename T, typename U>
+ struct Select
+ {
+ typedef T Result;
+ };
+ template <typename T, typename U>
+ struct Select<false, T, U>
+ {
+ typedef U Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsSameType
+// Return true iff two given types are the same
+// Invocation: SameType<T, U>::value
+// where:
+// T and U are types
+// Result evaluates to true iff U == T (types equal)
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T, typename U>
+ struct IsSameType
+ {
+ enum { value = false };
+ };
+
+ template <typename T>
+ struct IsSameType<T,T>
+ {
+ enum { value = true };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types Small and Big - guarantee that sizeof(Small) < sizeof(Big)
+////////////////////////////////////////////////////////////////////////////////
+
+ namespace Private
+ {
+ template <class T, class U>
+ struct ConversionHelper
+ {
+ typedef char Small;
+ struct Big { char dummy[2]; };
+ static Big Test(...);
+ static Small Test(U);
+ static T MakeT();
+ };
+ }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Conversion
+// Figures out the conversion relationships between two types
+// Invocations (T and U are types):
+// a) Conversion<T, U>::exists
+// returns (at compile time) true if there is an implicit conversion from T
+// to U (example: Derived to Base)
+// b) Conversion<T, U>::exists2Way
+// returns (at compile time) true if there are both conversions from T
+// to U and from U to T (example: int to char and back)
+// c) Conversion<T, U>::sameType
+// returns (at compile time) true if T and U represent the same type
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class T, class U>
+ struct Conversion
+ {
+ typedef Private::ConversionHelper<T, U> H;
+#ifndef __MWERKS__
+ enum { exists = sizeof(typename H::Small) == sizeof((H::Test(H::MakeT()))) };
+#else
+ enum { exists = false };
+#endif
+ enum { exists2Way = exists && Conversion<U, T>::exists };
+ enum { sameType = false };
+ };
+
+ template <class T>
+ struct Conversion<T, T>
+ {
+ enum { exists = 1, exists2Way = 1, sameType = 1 };
+ };
+
+ template <class T>
+ struct Conversion<void, T>
+ {
+ enum { exists = 0, exists2Way = 0, sameType = 0 };
+ };
+
+ template <class T>
+ struct Conversion<T, void>
+ {
+ enum { exists = 0, exists2Way = 0, sameType = 0 };
+ };
+
+ template <>
+ struct Conversion<void, void>
+ {
+ public:
+ enum { exists = 1, exists2Way = 1, sameType = 1 };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SuperSubclass
+// Invocation: SuperSubclass<B, D>::value where B and D are types.
+// Returns true if B is a public base of D, or if B and D are aliases of the
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+template <class T, class U>
+struct SuperSubclass
+{
+ enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
+ !::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( sizeof (T) == sizeof (U) ) };
+};
+
+template <>
+struct SuperSubclass<void, void>
+{
+ enum { value = false };
+};
+
+template <class U>
+struct SuperSubclass<void, U>
+{
+ enum { value = (::Loki::Conversion<const volatile U*, const volatile void*>::exists &&
+ !::Loki::Conversion<const volatile void*, const volatile void*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( 0 == sizeof (U) ) };
+};
+
+template <class T>
+struct SuperSubclass<T, void>
+{
+ enum { value = (::Loki::Conversion<const volatile void*, const volatile T*>::exists &&
+ !::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( sizeof (T) == 0 ) };
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SuperSubclassStrict
+// Invocation: SuperSubclassStrict<B, D>::value where B and D are types.
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+template<class T,class U>
+struct SuperSubclassStrict
+{
+ enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
+ !::Loki::Conversion<const volatile T*, const volatile void*>::sameType &&
+ !::Loki::Conversion<const volatile T*, const volatile U*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( sizeof (T) == sizeof (U) ) };
+};
+
+template<>
+struct SuperSubclassStrict<void, void>
+{
+ enum { value = false };
+};
+
+template<class U>
+struct SuperSubclassStrict<void, U>
+{
+ enum { value = (::Loki::Conversion<const volatile U*, const volatile void*>::exists &&
+ !::Loki::Conversion<const volatile void*, const volatile void*>::sameType &&
+ !::Loki::Conversion<const volatile void*, const volatile U*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( 0 == sizeof (U) ) };
+};
+
+template<class T>
+struct SuperSubclassStrict<T, void>
+{
+ enum { value = (::Loki::Conversion<const volatile void*, const volatile T*>::exists &&
+ !::Loki::Conversion<const volatile T*, const volatile void*>::sameType &&
+ !::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };
+
+ // Dummy enum to make sure that both classes are fully defined.
+ enum{ dontUseWithIncompleteTypes = ( sizeof (T) == 0 ) };
+};
+
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types.
+// Returns true if B is a public base of D, or if B and D are aliases of the
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+// Deprecated: Use SuperSubclass class template instead.
+////////////////////////////////////////////////////////////////////////////////
+
+#define LOKI_SUPERSUBCLASS(T, U) \
+ ::Loki::SuperSubclass<T,U>::value
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS_STRICT
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types.
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+// Deprecated: Use SuperSubclassStrict class template instead.
+////////////////////////////////////////////////////////////////////////////////
+
+#define LOKI_SUPERSUBCLASS_STRICT(T, U) \
+ ::Loki::SuperSubclassStrict<T,U>::value
+
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki/TypeTraits.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/TypeTraits.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,2228 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_TYPETRAITS_INC_
+#define LOKI_TYPETRAITS_INC_
+
+// $Id$
+
+
+#include "Typelist.h"
+#include "Sequence.h"
+
+#if (defined _MSC_VER) && (_MSC_VER < 1400)
+#include <string>
+#endif
+
+
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4180 ) //qualifier applied to function type has no meaning; ignored
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomUnsignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits
+// class template defined below.
+// Invocation: IsCustomUnsignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
+// integral type
+// Specialize this class template for nonstandard unsigned integral types
+// and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T>
+ struct IsCustomUnsignedInt
+ {
+ enum { value = 0 };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomSignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits
+// class template defined below.
+// Invocation: IsCustomSignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in signed
+// integral type
+// Specialize this class template for nonstandard unsigned integral types
+// and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T>
+ struct IsCustomSignedInt
+ {
+ enum { value = 0 };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomFloat
+// Offers a means to integrate nonstandard floating point types with the
+// TypeTraits class template defined below.
+// Invocation: IsCustomFloat<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in
+// floating point type
+// Specialize this class template for nonstandard unsigned integral types
+// and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T>
+ struct IsCustomFloat
+ {
+ enum { value = 0 };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types for class template TypeTraits defined below
+////////////////////////////////////////////////////////////////////////////////
+
+ namespace Private
+ {
+#ifndef LOKI_DISABLE_TYPELIST_MACROS
+ typedef LOKI_TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int)
+ StdUnsignedInts;
+ typedef LOKI_TYPELIST_4(signed char, short int,int, long int)
+ StdSignedInts;
+ typedef LOKI_TYPELIST_3(bool, char, wchar_t)
+ StdOtherInts;
+ typedef LOKI_TYPELIST_3(float, double, long double)
+ StdFloats;
+#else
+ typedef Loki::Seq<unsigned char, unsigned short int,unsigned int, unsigned long int>::Type
+ StdUnsignedInts;
+ typedef Loki::Seq<signed char, short int,int, long int>::Type
+ StdSignedInts;
+ typedef Loki::Seq<bool, char, wchar_t>::Type
+ StdOtherInts;
+ typedef Loki::Seq<float, double, long double>::Type
+ StdFloats;
+
+#endif
+ template <typename U> struct AddPointer
+ {
+ typedef U* Result;
+ };
+
+ template <typename U> struct AddPointer<U&>
+ {
+ typedef U* Result;
+ };
+
+ template <class U> struct AddReference
+ {
+ typedef U & Result;
+ };
+
+ template <class U> struct AddReference<U &>
+ {
+ typedef U & Result;
+ };
+
+ template <> struct AddReference<void>
+ {
+ typedef NullType Result;
+ };
+
+ template <class U> struct AddParameterType
+ {
+ typedef const U & Result;
+ };
+
+ template <class U> struct AddParameterType<U &>
+ {
+ typedef U & Result;
+ };
+
+ template <> struct AddParameterType<void>
+ {
+ typedef NullType Result;
+ };
+
+ template <typename T>
+ struct IsFunctionPointerRaw
+ {enum{result = 0};};
+
+ template <typename T>
+ struct IsFunctionPointerRaw<T(*)()>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01>
+ struct IsFunctionPointerRaw<T(*)(P01)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20)>
+ {enum {result = 1};};
+
+ template <typename T>
+ struct IsFunctionPointerRaw<T(*)(
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, ...)>
+ {enum {result = 1};};
+
+ template <typename T,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsFunctionPointerRaw<T(*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20,
+ ...)>
+ {enum {result = 1};};
+
+
+ template <typename T>
+ struct IsMemberFunctionPointerRaw
+ {enum{result = 0};};
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)()>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(P01)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20)>
+ {enum {result = 1};};
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, ...)>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20,
+ ...)>
+ {enum {result = 1};};
+
+ // Const versions
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)() const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(P01) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, ...) const>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20,
+ ...) const>
+ {enum {result = 1};};
+
+ // Volatile versions
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)() volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(P01) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, ...) volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20,
+ ...) volatile>
+ {enum {result = 1};};
+
+ // Const volatile versions
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)() const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(P01) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, ...) const volatile>
+ {enum {result = 1};};
+
+ template <typename T, typename S,
+ typename P01, typename P02, typename P03, typename P04, typename P05,
+ typename P06, typename P07, typename P08, typename P09, typename P10,
+ typename P11, typename P12, typename P13, typename P14, typename P15,
+ typename P16, typename P17, typename P18, typename P19, typename P20>
+ struct IsMemberFunctionPointerRaw<T (S::*)(
+ P01, P02, P03, P04, P05,
+ P06, P07, P08, P09, P10,
+ P11, P12, P13, P14, P15,
+ P16, P17, P18, P19, P20,
+ ...) const volatile>
+ {enum {result = 1};};
+
+ }// namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeTraits
+//
+// Figures out at compile time various properties of any given type
+// Invocations (T is a type, TypeTraits<T>::Propertie):
+//
+// - isPointer : returns true if T is a pointer type
+// - PointeeType : returns the type to which T points if T is a pointer
+// type, NullType otherwise
+// - isReference : returns true if T is a reference type
+// - ReferredType : returns the type to which T refers if T is a reference
+// type, NullType otherwise
+// - isMemberPointer : returns true if T is a pointer to member type
+// - isStdUnsignedInt: returns true if T is a standard unsigned integral type
+// - isStdSignedInt : returns true if T is a standard signed integral type
+// - isStdIntegral : returns true if T is a standard integral type
+// - isStdFloat : returns true if T is a standard floating-point type
+// - isStdArith : returns true if T is a standard arithmetic type
+// - isStdFundamental: returns true if T is a standard fundamental type
+// - isUnsignedInt : returns true if T is a unsigned integral type
+// - isSignedInt : returns true if T is a signed integral type
+// - isIntegral : returns true if T is a integral type
+// - isFloat : returns true if T is a floating-point type
+// - isArith : returns true if T is a arithmetic type
+// - isFundamental : returns true if T is a fundamental type
+// - ParameterType : returns the optimal type to be used as a parameter for
+// functions that take Ts
+// - isConst : returns true if T is a const-qualified type
+// - NonConstType : Type with removed 'const' qualifier from T, if any
+// - isVolatile : returns true if T is a volatile-qualified type
+// - NonVolatileType : Type with removed 'volatile' qualifier from T, if any
+// - UnqualifiedType : Type with removed 'const' and 'volatile' qualifiers from
+// T, if any
+// - ConstParameterType: returns the optimal type to be used as a parameter
+// for functions that take 'const T's
+//
+////////////////////////////////////////////////////////////////////////////////
+
+ template <typename T>
+ class TypeTraits
+ {
+ private:
+
+ template <class U> struct ReferenceTraits
+ {
+ enum { result = false };
+ typedef U ReferredType;
+ };
+
+ template <class U> struct ReferenceTraits<U&>
+ {
+ enum { result = true };
+ typedef U ReferredType;
+ };
+
+ template <class U> struct PointerTraits
+ {
+ enum { result = false };
+ typedef NullType PointeeType;
+ };
+
+ template <class U> struct PointerTraits<U*>
+ {
+ enum { result = true };
+ typedef U PointeeType;
+ };
+
+ template <class U> struct PointerTraits<U*&>
+ {
+ enum { result = true };
+ typedef U PointeeType;
+ };
+
+ template <class U> struct PToMTraits
+ {
+ enum { result = false };
+ };
+
+ template <class U, class V> struct PToMTraits<U V::*>
+ {
+ enum { result = true };
+ };
+
+ template <class U, class V> struct PToMTraits<U V::*&>
+ {
+ enum { result = true };
+ };
+
+ template <class U> struct FunctionPointerTraits
+ {
+ enum{ result = Private::IsFunctionPointerRaw<U>::result };
+ };
+
+ template <typename U> struct PToMFunctionTraits
+ {
+ enum{ result = Private::IsMemberFunctionPointerRaw<U>::result };
+ };
+
+ template <class U> struct UnConst
+ {
+ typedef U Result;
+ enum { isConst = 0 };
+ };
+
+ template <class U> struct UnConst<const U>
+ {
+ typedef U Result;
+ enum { isConst = 1 };
+ };
+
+ template <class U> struct UnConst<const U&>
+ {
+ typedef U& Result;
+ enum { isConst = 1 };
+ };
+
+ template <class U> struct UnVolatile
+ {
+ typedef U Result;
+ enum { isVolatile = 0 };
+ };
+
+ template <class U> struct UnVolatile<volatile U>
+ {
+ typedef U Result;
+ enum { isVolatile = 1 };
+ };
+
+ template <class U> struct UnVolatile<volatile U&>
+ {
+ typedef U& Result;
+ enum { isVolatile = 1 };
+ };
+
+ public:
+ typedef typename UnConst<T>::Result
+ NonConstType;
+ typedef typename UnVolatile<T>::Result
+ NonVolatileType;
+ typedef typename UnVolatile<typename UnConst<T>::Result>::Result
+ UnqualifiedType;
+ typedef typename PointerTraits<UnqualifiedType>::PointeeType
+ PointeeType;
+ typedef typename ReferenceTraits<T>::ReferredType
+ ReferredType;
+
+ enum { isConst = UnConst<T>::isConst };
+ enum { isVolatile = UnVolatile<T>::isVolatile };
+ enum { isReference = ReferenceTraits<UnqualifiedType>::result };
+ enum { isFunction = FunctionPointerTraits<typename Private::AddPointer<T>::Result >::result };
+ enum { isFunctionPointer= FunctionPointerTraits<
+ typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
+ enum { isMemberFunctionPointer= PToMFunctionTraits<
+ typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
+ enum { isMemberPointer = PToMTraits<
+ typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
+ isMemberFunctionPointer };
+ enum { isPointer = PointerTraits<
+ typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
+ isFunctionPointer };
+
+ enum { isStdUnsignedInt = TL::IndexOf<Private::StdUnsignedInts, UnqualifiedType>::value >= 0 ||
+ TL::IndexOf<Private::StdUnsignedInts,
+ typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
+ enum { isStdSignedInt = TL::IndexOf<Private::StdSignedInts, UnqualifiedType>::value >= 0 ||
+ TL::IndexOf<Private::StdSignedInts,
+ typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
+ enum { isStdIntegral = isStdUnsignedInt || isStdSignedInt ||
+ TL::IndexOf<Private::StdOtherInts, UnqualifiedType>::value >= 0 ||
+ TL::IndexOf<Private::StdOtherInts,
+ typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
+ enum { isStdFloat = TL::IndexOf<Private::StdFloats, UnqualifiedType>::value >= 0 ||
+ TL::IndexOf<Private::StdFloats,
+ typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
+ enum { isStdArith = isStdIntegral || isStdFloat };
+ enum { isStdFundamental = isStdArith || isStdFloat || Conversion<T, void>::sameType };
+
+ enum { isUnsignedInt = isStdUnsignedInt || IsCustomUnsignedInt<UnqualifiedType>::value };
+ enum { isSignedInt = isStdSignedInt || IsCustomSignedInt<UnqualifiedType>::value };
+ enum { isIntegral = isStdIntegral || isUnsignedInt || isSignedInt };
+ enum { isFloat = isStdFloat || IsCustomFloat<UnqualifiedType>::value };
+ enum { isArith = isIntegral || isFloat };
+ enum { isFundamental = isStdFundamental || isArith };
+
+ typedef typename Select<isStdArith || isPointer || isMemberPointer, T,
+ typename Private::AddParameterType<T>::Result>::Result
+ ParameterType;
+ };
+}
+
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif // _MSC_VER
+
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki/Typelist.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/Typelist.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,459 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_TYPELIST_INC_
+#define LOKI_TYPELIST_INC_
+
+// $Id$
+
+
+#include "NullType.h"
+#include "TypeManip.h"
+#include "TypelistMacros.h"
+
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Typelist
+// The building block of typelists of any length
+// Use it through the LOKI_TYPELIST_NN macros
+// Defines nested types:
+// Head (first element, a non-typelist type by convention)
+// Tail (second element, can be another typelist)
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class T, class U>
+ struct Typelist
+ {
+ typedef T Head;
+ typedef U Tail;
+ };
+
+// Typelist utility algorithms
+
+ namespace TL
+ {
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MakeTypelist
+// Takes a number of arguments equal to its numeric suffix
+// The arguments are type names.
+// MakeTypelist<T1, T2, ...>::Result
+// returns a typelist that is of T1, T2, ...
+////////////////////////////////////////////////////////////////////////////////
+
+ template
+ <
+ typename T1 = NullType, typename T2 = NullType, typename T3 = NullType,
+ typename T4 = NullType, typename T5 = NullType, typename T6 = NullType,
+ typename T7 = NullType, typename T8 = NullType, typename T9 = NullType,
+ typename T10 = NullType, typename T11 = NullType, typename T12 = NullType,
+ typename T13 = NullType, typename T14 = NullType, typename T15 = NullType,
+ typename T16 = NullType, typename T17 = NullType, typename T18 = NullType
+ >
+ struct MakeTypelist
+ {
+ private:
+ typedef typename MakeTypelist
+ <
+ T2 , T3 , T4 ,
+ T5 , T6 , T7 ,
+ T8 , T9 , T10,
+ T11, T12, T13,
+ T14, T15, T16,
+ T17, T18
+ >
+ ::Result TailResult;
+
+ public:
+ typedef Typelist<T1, TailResult> Result;
+ };
+
+ template<>
+ struct MakeTypelist<>
+ {
+ typedef NullType Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Length
+// Computes the length of a typelist
+// Invocation (TList is a typelist):
+// Length<TList>::value
+// returns a compile-time constant containing the length of TList, not counting
+// the end terminator (which by convention is NullType)
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList> struct Length;
+ template <> struct Length<NullType>
+ {
+ enum { value = 0 };
+ };
+
+ template <class T, class U>
+ struct Length< Typelist<T, U> >
+ {
+ enum { value = 1 + Length<U>::value };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAt
+// Finds the type at a given index in a typelist
+// Invocation (TList is a typelist and index is a compile-time integral
+// constant):
+// TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList
+// If you pass an out-of-bounds index, the result is a compile-time error
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, unsigned int index> struct TypeAt;
+
+ template <class Head, class Tail>
+ struct TypeAt<Typelist<Head, Tail>, 0>
+ {
+ typedef Head Result;
+ };
+
+ template <class Head, class Tail, unsigned int i>
+ struct TypeAt<Typelist<Head, Tail>, i>
+ {
+ typedef typename TypeAt<Tail, i - 1>::Result Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAtNonStrict
+// Finds the type at a given index in a typelist
+// Invocations (TList is a typelist and index is a compile-time integral
+// constant):
+// a) TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList, or NullType if index is
+// out-of-bounds
+// b) TypeAt<TList, index, D>::Result
+// returns the type in position 'index' in TList, or D if index is out-of-bounds
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, unsigned int index,
+ typename DefaultType = NullType>
+ struct TypeAtNonStrict
+ {
+ typedef DefaultType Result;
+ };
+
+ template <class Head, class Tail, typename DefaultType>
+ struct TypeAtNonStrict<Typelist<Head, Tail>, 0, DefaultType>
+ {
+ typedef Head Result;
+ };
+
+ template <class Head, class Tail, unsigned int i, typename DefaultType>
+ struct TypeAtNonStrict<Typelist<Head, Tail>, i, DefaultType>
+ {
+ typedef typename
+ TypeAtNonStrict<Tail, i - 1, DefaultType>::Result Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IndexOf
+// Finds the index of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// IndexOf<TList, T>::value
+// returns the position of T in TList, or NullType if T is not found in TList
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T> struct IndexOf;
+
+ template <class T>
+ struct IndexOf<NullType, T>
+ {
+ enum { value = -1 };
+ };
+
+ template <class T, class Tail>
+ struct IndexOf<Typelist<T, Tail>, T>
+ {
+ enum { value = 0 };
+ };
+
+ template <class Head, class Tail, class T>
+ struct IndexOf<Typelist<Head, Tail>, T>
+ {
+ private:
+ enum { temp = IndexOf<Tail, T>::value };
+ public:
+ enum { value = (temp == -1 ? -1 : 1 + temp) };
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Append
+// Appends a type or a typelist to another
+// Invocation (TList is a typelist and T is either a type or a typelist):
+// Append<TList, T>::Result
+// returns a typelist that is TList followed by T and NullType-terminated
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T> struct Append;
+
+ template <> struct Append<NullType, NullType>
+ {
+ typedef NullType Result;
+ };
+
+ template <class T> struct Append<NullType, T>
+ {
+ typedef Typelist<T,NullType> Result;
+ };
+
+ template <class Head, class Tail>
+ struct Append<NullType, Typelist<Head, Tail> >
+ {
+ typedef Typelist<Head, Tail> Result;
+ };
+
+ template <class Head, class Tail, class T>
+ struct Append<Typelist<Head, Tail>, T>
+ {
+ typedef Typelist<Head,
+ typename Append<Tail, T>::Result>
+ Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Erase
+// Erases the first occurence, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// Erase<TList, T>::Result
+// returns a typelist that is TList without the first occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T> struct Erase;
+
+ template <class T> // Specialization 1
+ struct Erase<NullType, T>
+ {
+ typedef NullType Result;
+ };
+
+ template <class T, class Tail> // Specialization 2
+ struct Erase<Typelist<T, Tail>, T>
+ {
+ typedef Tail Result;
+ };
+
+ template <class Head, class Tail, class T> // Specialization 3
+ struct Erase<Typelist<Head, Tail>, T>
+ {
+ typedef Typelist<Head,
+ typename Erase<Tail, T>::Result>
+ Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template EraseAll
+// Erases all first occurences, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// EraseAll<TList, T>::Result
+// returns a typelist that is TList without any occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T> struct EraseAll;
+ template <class T>
+ struct EraseAll<NullType, T>
+ {
+ typedef NullType Result;
+ };
+ template <class T, class Tail>
+ struct EraseAll<Typelist<T, Tail>, T>
+ {
+ // Go all the way down the list removing the type
+ typedef typename EraseAll<Tail, T>::Result Result;
+ };
+ template <class Head, class Tail, class T>
+ struct EraseAll<Typelist<Head, Tail>, T>
+ {
+ // Go all the way down the list removing the type
+ typedef Typelist<Head,
+ typename EraseAll<Tail, T>::Result>
+ Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDuplicates
+// Removes all duplicate types in a typelist
+// Invocation (TList is a typelist):
+// NoDuplicates<TList, T>::Result
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList> struct NoDuplicates;
+
+ template <> struct NoDuplicates<NullType>
+ {
+ typedef NullType Result;
+ };
+
+ template <class Head, class Tail>
+ struct NoDuplicates< Typelist<Head, Tail> >
+ {
+ private:
+ typedef typename NoDuplicates<Tail>::Result L1;
+ typedef typename Erase<L1, Head>::Result L2;
+ public:
+ typedef Typelist<Head, L2> Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Replace
+// Replaces the first occurence of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which the first occurence of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T, class U> struct Replace;
+
+ template <class T, class U>
+ struct Replace<NullType, T, U>
+ {
+ typedef NullType Result;
+ };
+
+ template <class T, class Tail, class U>
+ struct Replace<Typelist<T, Tail>, T, U>
+ {
+ typedef Typelist<U, Tail> Result;
+ };
+
+ template <class Head, class Tail, class T, class U>
+ struct Replace<Typelist<Head, Tail>, T, U>
+ {
+ typedef Typelist<Head,
+ typename Replace<Tail, T, U>::Result>
+ Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ReplaceAll
+// Replaces all occurences of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which all occurences of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T, class U> struct ReplaceAll;
+
+ template <class T, class U>
+ struct ReplaceAll<NullType, T, U>
+ {
+ typedef NullType Result;
+ };
+
+ template <class T, class Tail, class U>
+ struct ReplaceAll<Typelist<T, Tail>, T, U>
+ {
+ typedef Typelist<U, typename ReplaceAll<Tail, T, U>::Result> Result;
+ };
+
+ template <class Head, class Tail, class T, class U>
+ struct ReplaceAll<Typelist<Head, Tail>, T, U>
+ {
+ typedef Typelist<Head,
+ typename ReplaceAll<Tail, T, U>::Result>
+ Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Reverse
+// Reverses a typelist
+// Invocation (TList is a typelist):
+// Reverse<TList>::Result
+// returns a typelist that is TList reversed
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList> struct Reverse;
+
+ template <>
+ struct Reverse<NullType>
+ {
+ typedef NullType Result;
+ };
+
+ template <class Head, class Tail>
+ struct Reverse< Typelist<Head, Tail> >
+ {
+ typedef typename Append<
+ typename Reverse<Tail>::Result, Head>::Result Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MostDerived
+// Finds the type in a typelist that is the most derived from a given type
+// Invocation (TList is a typelist, T is a type):
+// MostDerived<TList, T>::Result
+// returns the type in TList that's the most derived from T
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList, class T> struct MostDerived;
+
+ template <class T>
+ struct MostDerived<NullType, T>
+ {
+ typedef T Result;
+ };
+
+ template <class Head, class Tail, class T>
+ struct MostDerived<Typelist<Head, Tail>, T>
+ {
+ private:
+ typedef typename MostDerived<Tail, T>::Result Candidate;
+ public:
+ typedef typename Select<
+ SuperSubclass<Candidate,Head>::value,
+ Head, Candidate>::Result Result;
+ };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFront
+// Arranges the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList
+////////////////////////////////////////////////////////////////////////////////
+
+ template <class TList> struct DerivedToFront;
+
+ template <>
+ struct DerivedToFront<NullType>
+ {
+ typedef NullType Result;
+ };
+
+ template <class Head, class Tail>
+ struct DerivedToFront< Typelist<Head, Tail> >
+ {
+ private:
+ typedef typename MostDerived<Tail, Head>::Result
+ TheMostDerived;
+ typedef typename Replace<Tail,
+ TheMostDerived, Head>::Result Temp;
+ typedef typename DerivedToFront<Temp>::Result L;
+ public:
+ typedef Typelist<TheMostDerived, L> Result;
+ };
+
+ } // namespace TL
+} // namespace Loki
+
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki/TypelistMacros.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki/TypelistMacros.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,353 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+// purpose is hereby granted without fee, provided that the above copyright
+// notice appear in all copies and that both that copyright notice and this
+// permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+#ifndef LOKI_TYPELISTMACROS_INC_
+#define LOKI_TYPELISTMACROS_INC_
+
+// $Id$
+
+
+//#define LOKI_DISABLE_TYPELIST_MACROS
+#ifndef LOKI_DISABLE_TYPELIST_MACROS
+
+////////////////////////////////////////////////////////////////////////////////
+// macros LOKI_TYPELIST_1, LOKI_TYPELIST_2, ... LOKI_TYPELIST_50
+// Each takes a number of arguments equal to its numeric suffix
+// The arguments are type names. LOKI_TYPELIST_NN generates a typelist containing
+// all types passed as arguments, in that order.
+// Example: LOKI_TYPELIST_2(char, int) generates a type containing char and int.
+////////////////////////////////////////////////////////////////////////////////
+
+#define LOKI_TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
+
+#define LOKI_TYPELIST_2(T1, T2) ::Loki::Typelist<T1, LOKI_TYPELIST_1(T2) >
+
+#define LOKI_TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, LOKI_TYPELIST_2(T2, T3) >
+
+#define LOKI_TYPELIST_4(T1, T2, T3, T4) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_3(T2, T3, T4) >
+
+#define LOKI_TYPELIST_5(T1, T2, T3, T4, T5) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_4(T2, T3, T4, T5) >
+
+#define LOKI_TYPELIST_6(T1, T2, T3, T4, T5, T6) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_5(T2, T3, T4, T5, T6) >
+
+#define LOKI_TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_6(T2, T3, T4, T5, T6, T7) >
+
+#define LOKI_TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
+
+#define LOKI_TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
+
+#define LOKI_TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
+
+#define LOKI_TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
+
+#define LOKI_TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12) >
+
+#define LOKI_TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13) >
+
+#define LOKI_TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14) >
+
+#define LOKI_TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15) >
+
+#define LOKI_TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16) >
+
+#define LOKI_TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17) >
+
+#define LOKI_TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18) >
+
+#define LOKI_TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19) >
+
+#define LOKI_TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
+
+#define LOKI_TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
+
+#define LOKI_TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
+
+#define LOKI_TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
+
+#define LOKI_TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
+
+#define LOKI_TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25) >
+
+#define LOKI_TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26) >
+
+#define LOKI_TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27) >
+
+#define LOKI_TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28) >
+
+#define LOKI_TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29) >
+
+#define LOKI_TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
+
+#define LOKI_TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
+
+#define LOKI_TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
+
+#define LOKI_TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
+
+#define LOKI_TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
+
+#define LOKI_TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35) >
+
+#define LOKI_TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36) >
+
+#define LOKI_TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37) >
+
+#define LOKI_TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38) >
+
+#define LOKI_TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39) >
+
+#define LOKI_TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
+
+#define LOKI_TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
+
+#define LOKI_TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
+
+#define LOKI_TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
+
+#define LOKI_TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
+
+#define LOKI_TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45) >
+
+#define LOKI_TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46) >
+
+#define LOKI_TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47) >
+
+#define LOKI_TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48) >
+
+#define LOKI_TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48, T49) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48, T49) >
+
+#define LOKI_TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
+ ::Loki::Typelist<T1, LOKI_TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+ T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) >
+
+#endif //LOKI_DISABLE_TYPELIST_MACROS
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki_xt/Tuple.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki_xt/Tuple.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,851 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+// This code is based on and inspired by designs of:
+// The Loki Library by Andrei Alexandrescu et al.
+// See:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// and:
+// www.sourceforge.net/projects/loki
+//
+// Parts of the Loki Library have been used for the Icl Library.
+// Those parts from the path <itl/loki> can also be included from the
+// original Loki Library sources.
+
+#ifndef __Loki_tuple_h_JOFA_070604__
+#define __Loki_tuple_h_JOFA_070604__
+
+#include <boost/validate/loki/Typelist.h>
+#include <boost/validate/loki/TypeTraits.h>
+#include <boost/validate/loki/EmptyType.h>
+#include <boost/validate/loki_xt/TypelistGentor.h>
+
+#include <boost/icl/type_traits/to_string.hpp>
+
+namespace Loki
+{
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( push )
+ // 'class1' : base-class 'class2' is already a base-class of 'class3'
+#pragma warning( disable : 4584 )
+#endif // _MSC_VER
+
+ // forward
+ template <class TargetT, class SrcT> struct Sizer;
+
+ namespace tup
+ {
+ template <typename FstT, typename SndT> struct TypePair
+ {
+ typedef FstT FirstT;
+ typedef SndT SecondT;
+ };
+
+ // --------------------------------------------------------------------------
+ // template class TupleElement
+ // --------------------------------------------------------------------------
+ template <typename Type, unsigned int index>
+ struct TupleElement
+ {
+ typedef Type ValueType;
+ enum { position = index };
+ Type _value;
+ operator Type&() { return _value; }
+ operator const Type&() const { return _value; }
+ void set(Type& value){ _value = value; }
+ };
+
+ // --------------------------------------------------------------------------
+ // template class TupleGentor
+ // --------------------------------------------------------------------------
+ template <class TList, unsigned int index>
+ struct TupleGentor;
+
+ template <class HeadT, class TailT, unsigned int index>
+ struct TupleGentor<Typelist<HeadT, TailT>, index>
+ : public TupleElement<HeadT, index>
+ , public TupleGentor<TailT, index+1>
+ {
+ typedef Typelist<HeadT, TailT> TList;
+ typedef TupleElement<HeadT, index> HeadClass;
+ typedef TupleGentor<TailT, index+1> TailClass;
+ };
+
+ template <unsigned int size>
+ struct TupleGentor<NullType, size>
+ {
+ typedef NullType TList;
+ };
+ // --------------------------------------------------------------------------
+
+ // ---------------------------------------------------------------------------
+ // template class RefGetter
+ // ---------------------------------------------------------------------------
+ template <class TupleT, unsigned int idx> struct RefGetter;
+
+ template <class TupleT>
+ struct RefGetter<TupleT, 0>
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename HeadClass::ValueType ValueType;
+
+ static ValueType& Do(TupleT& obj)
+ {
+ HeadClass& elem = obj;
+ return elem;
+ }
+ };
+
+ template <class TupleT, unsigned int idx>
+ struct RefGetter
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename TupleT::TailClass TailClass;
+ typedef typename TL::TypeAt<typename TupleT::TList, idx>::Result ValueType;
+
+ static ValueType& Do(TupleT& obj)
+ {
+ TailClass& rightBase = obj;
+ return RefGetter<TailClass, idx-1>::Do(rightBase);
+ }
+ };
+
+ template <int i, class TupleT>
+ typename RefGetter<TupleT, i>::ValueType& refer(TupleT& obj)
+ {
+ return RefGetter<TupleT, i>::Do(obj);
+ }
+ // ---------------------------------------------------------------------------
+
+ // ---------------------------------------------------------------------------
+ // template class ValueGetter
+ // ---------------------------------------------------------------------------
+ template <class TupleT, unsigned int idx> struct ValueGetter;
+
+ template <class TupleT>
+ struct ValueGetter<TupleT, 0>
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename HeadClass::ValueType ValueType;
+
+ static ValueType Do(const TupleT& obj)
+ {
+ const HeadClass& elem = obj;
+ return elem;
+ }
+ };
+
+ template <class TupleT, unsigned int idx>
+ struct ValueGetter
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename TupleT::TailClass TailClass;
+ typedef typename TL::TypeAt<typename TupleT::TList, idx>::Result ValueType;
+
+ static ValueType Do(const TupleT& obj)
+ {
+ const TailClass& rightBase = obj;
+ return ValueGetter<TailClass, idx-1>::Do(rightBase);
+ }
+ };
+
+ template <int idx, class TupleT>
+ typename ValueGetter<TupleT, idx>::ValueType get(const TupleT& obj)
+ {
+ return ValueGetter<TupleT, idx>::Do(obj);
+ }
+ // ---------------------------------------------------------------------------
+
+
+
+ // ---------------------------------------------------------------------------
+ // template class Mapper
+ // ---------------------------------------------------------------------------
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct Mapper;
+
+ template <template<typename,typename>class Function, typename TrgType, typename SrcType, unsigned int index>
+ struct Mapper<Function,
+ TupleGentor<Typelist<TrgType, NullType>, index>,
+ TupleGentor<Typelist<SrcType, NullType>, index> >
+ {
+ typedef TupleGentor<Typelist<TrgType, NullType>, index> TrgTupleT;
+ typedef TupleGentor<Typelist<SrcType, NullType>, index> SrcTupleT;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgType trgVal = Function<TrgType, SrcType>::apply(src);
+ trg.set(trgVal);
+ }
+ };
+
+
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct Mapper
+ {
+ typedef typename TrgTupleT::HeadClass TrgHeadClass;
+ typedef typename SrcTupleT::HeadClass SrcHeadClass;
+ typedef typename TrgTupleT::TailClass TrgTailClass;
+ typedef typename SrcTupleT::TailClass SrcTailClass;
+ typedef typename TrgHeadClass::ValueType TrgType;
+ typedef typename SrcHeadClass::ValueType SrcType;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgHeadClass& trgHead = trg;
+ const SrcHeadClass& srcHead = src;
+ TrgTailClass& trgTail = trg;
+ const SrcTailClass& srcTail = src;
+ TrgType trgVal = Function<TrgType, SrcType>::apply(srcHead);
+ trgHead.set(trgVal);
+
+ Mapper<Function, TrgTailClass, SrcTailClass>::Do(trgTail, srcTail);
+ }
+ };
+
+ template <template<typename,typename>class Fun, class TrgTupleT, class SrcTupelT>
+ TrgTupleT Transform(const SrcTupelT& src)
+ {
+ TrgTupleT target;
+ Mapper<Fun, TrgTupleT, SrcTupelT>::Do(target, src);
+ return target;
+ }
+
+ // ---------------------------------------------------------------------------
+ // template class RefMapper
+ // ---------------------------------------------------------------------------
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct RefMapper;
+
+ template <template<typename,typename>class Function, typename TrgType, typename SrcType, unsigned int index>
+ struct RefMapper<Function,
+ TupleGentor<Typelist<TrgType, NullType>, index>,
+ TupleGentor<Typelist<SrcType, NullType>, index> >
+ {
+ typedef TupleGentor<Typelist<TrgType, NullType>, index> TrgTupleT;
+ typedef TupleGentor<Typelist<SrcType, NullType>, index> SrcTupleT;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgType trgVal;
+ Function<TrgType, SrcType>::apply(trgVal, src);
+ trg.set(trgVal);
+ }
+ };
+
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct RefMapper
+ {
+ typedef typename TrgTupleT::HeadClass TrgHeadClass;
+ typedef typename SrcTupleT::HeadClass SrcHeadClass;
+ typedef typename TrgTupleT::TailClass TrgTailClass;
+ typedef typename SrcTupleT::TailClass SrcTailClass;
+ typedef typename TrgHeadClass::ValueType TrgType;
+ typedef typename SrcHeadClass::ValueType SrcType;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgHeadClass& trgHead = trg;
+ const SrcHeadClass& srcHead = src;
+ TrgTailClass& trgTail = trg;
+ const SrcTailClass& srcTail = src;
+ TrgType trgVal;
+ Function<TrgType, SrcType>::apply(trgVal, srcHead);
+ trgHead.set(trgVal);
+
+ RefMapper<Function, TrgTailClass, SrcTailClass>::Do(trgTail, srcTail);
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ // template class TemplateMapper
+ // ---------------------------------------------------------------------------
+ template <template<class>class UnaryTpl,
+ template<typename,template<class>class> class Function,
+ class TrgTupleT, class SrcTupleT>
+ struct TemplateMapper;
+
+
+ template <template<class>class UnaryTpl, template<typename,template<class>class> class Function,
+ unsigned int index>
+ struct TemplateMapper<UnaryTpl, Function,
+ TupleGentor<NullType, index>,
+ TupleGentor<NullType, index> >
+ {
+ typedef TupleGentor<NullType, index> TrgTupleT;
+ typedef TupleGentor<NullType, index> SrcTupleT;
+ static void Do(TrgTupleT&, SrcTupleT&){}
+ };
+
+
+ //JODO does not work for empty tuples!
+ template <template<class>class UnaryTpl, template<typename,template<class>class> class Function,
+ typename TrgType, unsigned int index>
+ struct TemplateMapper<UnaryTpl, Function,
+ TupleGentor<Typelist<TrgType, NullType>, index>,
+ TupleGentor<Typelist<UnaryTpl<TrgType>, NullType>, index> >
+ {
+ typedef TupleGentor<Typelist<TrgType, NullType>, index> TrgTupleT;
+ typedef TupleGentor<Typelist<UnaryTpl<TrgType>, NullType>, index> SrcTupleT;
+
+ static void Do(TrgTupleT& trg, SrcTupleT& src)
+ {
+ TrgType trgVal;
+ Function<TrgType, UnaryTpl>::apply(trgVal, src);
+ trg.set(trgVal);
+ }
+ };
+
+ template <template<class>class UnaryTpl,
+ template<typename,template<class>class>class Function,
+ class TrgTupleT, class SrcTupleT>
+ struct TemplateMapper
+ {
+ typedef typename TrgTupleT::HeadClass TrgHeadClass;
+ typedef typename SrcTupleT::HeadClass SrcHeadClass;
+ typedef typename TrgTupleT::TailClass TrgTailClass;
+ typedef typename SrcTupleT::TailClass SrcTailClass;
+ typedef typename TrgHeadClass::ValueType TrgType;
+ typedef typename SrcHeadClass::ValueType SrcType;
+
+ static void Do(TrgTupleT& trg, SrcTupleT& src)
+ {
+ TrgHeadClass& trgHead = trg;
+ SrcHeadClass& srcHead = src;
+ TrgTailClass& trgTail = trg;
+ SrcTailClass& srcTail = src;
+ TrgType trgVal;
+ Function<TrgType, UnaryTpl>::apply(trgVal, srcHead);
+ trgHead.set(trgVal);
+
+ TemplateMapper<UnaryTpl, Function, TrgTailClass, SrcTailClass>::Do(trgTail, srcTail);
+ }
+ };
+ // ---------------------------------------------------------------------------
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Reductor
+ // See reduce below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <class TupleT, unsigned int i> struct Reductor;
+
+ template <class TupleT>
+ struct Reductor<TupleT, 0>
+ {
+ typedef typename TupleT::TList::Head HeadType;
+
+ static HeadType Do(const TupleT& obj)
+ {
+ return get<0>(obj);
+ }
+ };
+
+ template <class TupleT, unsigned int i>
+ struct Reductor
+ {
+ typedef typename TupleT::TList::Head HeadType;
+ typedef typename TupleT::TailClass TailClass;
+
+ static HeadType Do(const TupleT& obj)
+ {
+ // Which is: first(obj) + reduce(tail(obj))
+ return get<0>(obj) + Reductor<TailClass, i-1>::Do(obj);
+ }
+ };
+
+ template <class TupleT>
+ typename Reductor<TupleT, 0>::HeadType reduce(const TupleT& obj)
+ {
+ return Reductor<typename TupleT::BaseClass,
+ TL::Length<typename TupleT::TList>::value-1>::Do(obj);
+ }
+
+ // --------------------------------------------------------------------------
+
+ template <typename TrgT, class TupleT>
+ TrgT perduce(const TupleT& obj);
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class TupleT>
+ TrgT perduce2(const TupleT&);
+
+
+
+ // ---------------------------------------------------------------------------
+ // template class Apply
+ // ---------------------------------------------------------------------------
+ template <template<class>class UnaryTpl,
+ template<typename,template<class>class> class Function,
+ class TrgTupleT, class SrcTupleT>
+ struct Apply;
+
+
+
+ template <template<class>class UnaryTpl, template<typename,template<class>class> class Function,
+ unsigned int index>
+ struct Apply<UnaryTpl, Function,
+ TupleGentor<NullType, index>,
+ TupleGentor<NullType, index> >
+ {
+ typedef TupleGentor<NullType, index> SrcTupleT;
+
+ static void Do(SrcTupleT&)
+ {
+ }
+ };
+
+
+ //JODO does not work for empty tuples!
+ template <template<class>class UnaryTpl, template<typename,template<class>class> class Function,
+ typename TrgType, unsigned int index>
+ struct Apply<UnaryTpl, Function,
+ TupleGentor<Typelist<TrgType, NullType>, index>,
+ TupleGentor<Typelist<UnaryTpl<TrgType>, NullType>, index> >
+ {
+ typedef TupleGentor<Typelist<TrgType, NullType>, index> TrgTupleT;
+ typedef TupleGentor<Typelist<UnaryTpl<TrgType>, NullType>, index> SrcTupleT;
+
+ static void Do(SrcTupleT& src)
+ {
+ Function<TrgType, UnaryTpl>::apply(src);
+ }
+ };
+
+
+ template <template<class>class UnaryTpl,
+ template<typename,template<class>class>class Function,
+ class TrgTupleT, class SrcTupleT>
+ struct Apply
+ {
+ typedef typename TrgTupleT::HeadClass TrgHeadClass;
+ typedef typename SrcTupleT::HeadClass SrcHeadClass;
+ typedef typename TrgTupleT::TailClass TrgTailClass;
+ typedef typename SrcTupleT::TailClass SrcTailClass;
+ typedef typename TrgHeadClass::ValueType TrgType;
+ typedef typename SrcHeadClass::ValueType SrcType;
+
+ static void Do(SrcTupleT& src)
+ {
+ SrcHeadClass& srcHead = src;
+ SrcTailClass& srcTail = src;
+
+ Function<TrgType, UnaryTpl>::apply(srcHead);
+
+ Apply<UnaryTpl, Function, TrgTailClass, SrcTailClass>::Do(srcTail);
+ }
+ };
+
+ template <class TupleT, unsigned int i> struct Stringer;
+
+ template <class TupleT>
+ std::string Stringify(const TupleT& obj);
+
+ } // namespace tup
+
+
+ // ---------------------------------------------------------------------------
+ // template class tuple
+ // ---------------------------------------------------------------------------
+ template <typename Types> class tuple
+ : public tup::TupleGentor<Types, 0>
+ {
+ public:
+ typedef tuple<Types> SelfType;
+ typedef typename tup::TupleGentor<Types, 0> BaseClass;
+ typedef NullType HeadType;
+
+ enum { Size = TL::Length<Types>::value };
+
+ int size()const { return Size; }
+
+ template <unsigned int index>
+ typename TL::TypeAt<Types, index>::Result get()const
+ { return Loki::tup::get<index>(*this); }
+
+ std::string as_string()const { return Stringify(*this); }
+
+ //JODO Does not work for empty tuples
+ HeadType reduce()const { return tup::reduce(*this); }
+
+ template <typename TrgT>
+ TrgT perduce()const { return tup::perduce<TrgT>(*this); }
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer, typename TrgT>
+ TrgT perduce2()const { return tup::perduce2<Combi, Embracer, TrgT>(*this); }
+
+ template <template<typename,typename>class Fun, class TrgTupleT>
+ TrgTupleT map()const
+ {
+ TrgTupleT target;
+ tup::Mapper<Fun, TrgTupleT, SelfType>::Do(target, *this);
+ return target;
+ }
+
+ template <template<typename,typename>class Fun, class TrgTupleT>
+ void map(TrgTupleT& target)const
+ {
+ tup::RefMapper<Fun, TrgTupleT, SelfType>::Do(target, *this);
+ }
+
+ // Using an example to clarify the template parameters:
+ // A value generator template A generator-function-type: value generating function value-tuple-type
+ // GentorT e.g. SomeValue to be generated
+ template <template<class>class UnaryTpl, template<class TrgTupleT,template<class>class>class Fun, class TrgTupleT>
+ void map_template(TrgTupleT& target)
+ {
+ tup::TemplateMapper<UnaryTpl, Fun, TrgTupleT, SelfType>::Do(target, *this);
+ }
+
+ // --------------------------------------------------------------------
+ /*
+ template
+ <
+ template<class>class ConsumerTpl, // GentorT<TypeT>
+ template<class>class ArgumentTpl, // GentorProfileT<TypeT>
+ template<template<class>class, // to consumer GentorT<TypeT>
+ template<class>class> // apply GentorProfileT<TypeT>
+ class Consume, // using function Calibrate
+ class ArgumentTupleT, // tuple type for profile tuple value
+ class BaseTupleT // Basis value tuple type
+ >
+ void map_consumer_template(const ArgumentTupleT& arguments)
+ {
+ tup::ConsumerTemplateMapper
+ <
+ ConsumerTpl,
+ ArgumentTpl,
+ Consume,
+ ArgumentTupleT,
+ BaseTupleT,
+ SelfType
+ >
+ ::Do
+ (
+ *this, // SelfType e.g. Tuple<GentorT <T>>
+ arguments // ArgumentTupleT e.g. Tuple<GentorProfileT<T>>
+ );
+ }
+ */
+ // --------------------------------------------------------------------
+
+ template <template<class>class UnaryTpl, template<class TrgTupleT,template<class>class>class Fun, class TrgTupleT>
+ void apply()
+ {
+ tup::Apply<UnaryTpl, Fun, TrgTupleT, SelfType>::Do(*this);
+ }
+
+ /*
+ template <typename TargetType
+ template<typename,typename>class Translator,
+ template<typename>class Combinator,
+ template<typename>class Embracer>
+ TargetType transform
+ */
+
+ // This leads to a compiler breakdown with ms vc8 !!!
+ // template <unsigned int index>
+ // void set(const TL::TypeAt<Types, index>::Result& value)const
+ // { return Loki::tup::refer<index>(const_cast<tuple<Types>&> (*this)) = value; }
+ };
+
+ namespace tup
+ {
+ template<typename T0, typename T1>
+ tuple<LOKI_TYPELIST_2(T0, T1)> le(const T0& val0, const T1& val1)
+ {
+ tuple<LOKI_TYPELIST_2(T0, T1)> tup;
+ refer<0>(tup)=val0;
+ refer<1>(tup)=val1;
+ return tup;
+ }
+
+ //---------------------------------------------------------------------------
+ // template class Perductor
+ //---------------------------------------------------------------------------
+ template <typename TrgT, typename SrcT> struct Perducer;
+
+ template <typename TrgT, class TupleT, unsigned int i> struct Perductor;
+
+ template <typename TrgT, class TupleT>
+ struct Perductor<TrgT, TupleT, 0>
+ {
+ typedef typename TupleT::TList::Head HeadType;
+
+ static TrgT Do(const TupleT& obj)
+ {
+ return Perducer<TrgT, HeadType>::Do(get<0>(obj));
+ }
+ };
+
+ template <typename TrgT, class TupleT, unsigned int i>
+ struct Perductor
+ {
+ typedef typename TupleT::TList::Head HeadType;
+ typedef typename TupleT::TailClass TailClass;
+
+ static TrgT Do(const TupleT& obj)
+ {
+ // Which is: first(obj) + reduce(tail(obj))
+ return Perducer<TrgT, HeadType>::Do(get<0>(obj)) + Perductor<TrgT, TailClass, i-1>::Do(obj);
+ }
+ };
+
+
+ template <typename TrgT, class Types>
+ struct Perducer<TrgT, tuple<Types> >
+ {
+ static TrgT Do(const tuple<Types>& obj)
+ {
+ return perduce<TrgT>(obj);
+ }
+ };
+
+ template <typename TrgT, typename SrcT>
+ struct Perducer
+ {
+ static TrgT Do(const SrcT& value) { return value; }
+ };
+
+ template <typename TrgT, class TupleT>
+ TrgT perduce(const TupleT& obj)
+ {
+ return Perductor<TrgT, typename TupleT::BaseClass,
+ TL::Length<typename TupleT::TList>::value-1>::Do(obj);
+ }
+
+ //---------------------------------------------------------------------------
+ // template class Perductor2
+ // allows to specify a Combinator Combi istead of just operator+ to
+ // binary combine values for reduction
+ //---------------------------------------------------------------------------
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, typename SrcT> struct Perducer2;
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class TupleT, unsigned int i>
+ struct Perductor2;
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class TupleT>
+ struct Perductor2<Combi, Embracer, TrgT, TupleT, 0>
+ {
+ typedef typename TupleT::TList::Head HeadType;
+
+ static TrgT Do(const TupleT& obj)
+ {
+ return Perducer2<Combi, Embracer, TrgT, HeadType>::Do(get<0>(obj));
+ }
+ };
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class TupleT, unsigned int i>
+ struct Perductor2
+ {
+ typedef typename TupleT::TList::Head HeadType;
+ typedef typename TupleT::TailClass TailClass;
+
+ static TrgT Do(const TupleT& obj)
+ {
+ // Which is: first(obj) + reduce(tail(obj))
+ return
+ Combi<TrgT>::Do(
+ Perducer2<Combi, Embracer, TrgT, HeadType>::Do(get<0>(obj)),
+ Perductor2<Combi, Embracer, TrgT, TailClass, i-1>::Do(obj)
+ );
+ }
+ };
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class Types>
+ struct Perducer2<Combi, Embracer, TrgT, tuple<Types> >
+ {
+ static TrgT Do(const tuple<Types>& obj)
+ {
+ //return perduce2<Combi, Embracer, TrgT>(obj);
+ return Embracer<TrgT>::Do(perduce2<Combi, Embracer, TrgT>(obj));
+ }
+ };
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, typename SrcT>
+ struct Perducer2
+ {
+ static TrgT Do(const SrcT& value) { return value; }
+ };
+
+ template <template<typename>class Combi,
+ template<typename>class Embracer,
+ typename TrgT, class TupleT>
+ TrgT perduce2(const TupleT& obj)
+ {
+ return Perductor2<Combi, Embracer, TrgT, typename TupleT::BaseClass,
+ TL::Length<typename TupleT::TList>::value-1>::Do(obj);
+ }
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Stringer
+ // See Stringify below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <unsigned int i>
+ struct Stringer<tuple<NullType>, i>
+ {
+ static std::string Do(const tuple<NullType>&)
+ {
+ return std::string();
+ }
+ };
+
+ template <class TupleT>
+ struct Stringer<TupleT, 0>
+ {
+ typedef typename TupleT::TList::Head HeadType;
+
+ static std::string Do(const TupleT& obj)
+ {
+ return boost::icl::to_string<HeadType>::apply(get<0>(obj));
+ }
+ };
+
+ template <class TupleT, unsigned int i>
+ struct Stringer
+ {
+ typedef typename TupleT::TList::Head HeadType;
+ typedef typename TupleT::TailClass TailClass;
+
+ static std::string Do(const TupleT& obj)
+ {
+ return boost::icl::to_string<HeadType>::apply(get<0>(obj))
+ + ", " + Stringer<TailClass, i-1>::Do(obj);
+ }
+ };
+
+ template <class TupleT>
+ std::string Stringify(const TupleT& obj)
+ {
+ return
+ "("+
+ Stringer<TupleT, TL::Length<typename TupleT::TList>::value-1>::Do(obj)
+ +")";
+ }
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Mapper
+ // See Map below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <typename TargetT, typename SourceT> struct UnaryFunction
+ {
+ typedef TargetT (*Type)(SourceT);
+ };
+
+ template <typename TargetT, typename SourceT> struct TwiceFun
+ {
+ static TargetT apply(const SourceT& src);
+ };
+ template <>
+ struct TwiceFun<int,int>
+ {
+ static int apply(const int& src)
+ {
+ return 2*src;
+ }
+ };
+ template <>
+ struct TwiceFun<int,double>
+ {
+ static int apply(const double& src)
+ {
+ return static_cast<int>(2.0*src);
+ }
+ };
+ template <>
+ struct TwiceFun<double,double>
+ {
+ static double apply(const double& src)
+ {
+ return (2.0*src);
+ }
+ };
+
+ // --- Referential version -------------------------------------
+ template <typename TargetT, typename SourceT> struct RefTwiceFun
+ {
+ static void apply(TargetT& trg, const SourceT& src);
+ };
+ template <>
+ struct RefTwiceFun<int,int>
+ {
+ static void apply(int& trg, const int& src)
+ {
+ trg = 2*src;
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ // template class ToString
+ // ---------------------------------------------------------------------------
+ template <typename TargetT, typename SourceT> struct ToString
+ { static TargetT apply(const SourceT& src); };
+
+ template <typename SourceT> struct ToString<std::string, SourceT>
+ {
+ static std::string apply(const SourceT& src)
+ {
+ return boost::icl::to_string<SourceT>::apply(src);
+ }
+ };
+ // ---------------------------------------------------------------------------
+
+
+
+ } //namespace tup
+
+
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( pop )
+#endif
+} // namespace Loki
+
+#endif // __Loki_tuple_h_JOFA_070604__
+

Added: sandbox/icl/boost/validate/loki_xt/TupleGentor.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki_xt/TupleGentor.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,355 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+// This code is based on and inspired by designs of:
+// The Loki Library by Andrei Alexandrescu et al.
+// See:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// and:
+// www.sourceforge.net/projects/loki
+//
+// Parts of the Loki Library have been used for the Icl Library.
+// Those parts from the path <itl/loki> can also be included from the
+// original Loki Library sources.
+
+#ifndef LOKI_TupleGentor_INC_
+#define LOKI_TupleGentor_INC_
+
+// $Id$
+
+
+#include "Typelist.h"
+#include "TypeTraits.h"
+#include "EmptyType.h"
+#include "TypelistGentor.h"
+
+#include "base/ctxreprbase.h"
+
+
+#define LOKI_FUNCTOR_IS_NOT_A_SMALLOBJECT
+#include <Functor.h>
+
+
+namespace Loki
+{
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( push )
+ // 'class1' : base-class 'class2' is already a base-class of 'class3'
+#pragma warning( disable : 4584 )
+#endif // _MSC_VER
+
+
+
+ template <typename FstT, typename SndT> struct TypePair
+ {
+ typedef FstT FirstT;
+ typedef SndT SecondT;
+ };
+
+ template <typename Type, unsigned int index>
+ struct TupleElement
+ {
+ typedef Type ValueType;
+ enum { position = index };
+ Type _value;
+ operator Type&() { return _value; }
+ operator const Type&() const { return _value; }
+ void set(Type& value){ _value = value; }
+ };
+
+ template <class TList, unsigned int index>
+ class TupleGentor;
+
+ template <class HeadT, class TailT, unsigned int index>
+ class TupleGentor<Typelist<HeadT, TailT>, index>
+ : public TupleElement<HeadT, index>
+ , public TupleGentor<TailT, index+1>
+ {
+ public:
+ enum { Index = index };
+ typedef Typelist<HeadT, TailT> TList;
+ typedef TupleElement<HeadT, index> HeadClass;
+ typedef TupleGentor<TailT, index+1> TailClass;
+ };
+
+ template <unsigned int size>
+ class TupleGentor<NullType, size>
+ {};
+
+ // ---------------------------------------------------------------------------
+ template <typename Types> class Tupl
+ : public TupleGentor<Types, 0>
+ {
+ public:
+ typedef TupleGentor<Types, 0> BaseClass;
+ std::string as_string()const;
+ };
+
+ // ---------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------
+ template <class TupleT, unsigned int idx> struct ValueGetter;
+
+ template <class TupleT>
+ struct ValueGetter<TupleT, 0>
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename HeadClass::ValueType ValueType;
+
+ static ValueType& Do(TupleT& obj)
+ {
+ HeadClass& elem = obj;
+ return elem;
+ }
+ };
+
+ template <class TupleT, unsigned int idx>
+ struct ValueGetter
+ {
+ typedef typename TupleT::HeadClass HeadClass;
+ typedef typename TupleT::TailClass TailClass;
+ typedef typename TL::TypeAt<typename TupleT::TList, idx>::Result ValueType;
+
+ static ValueType& Do(TupleT& obj)
+ {
+ TailClass& rightBase = obj;
+ return ValueGetter<TailClass, idx-1>::Do(rightBase);
+ }
+ };
+
+ template <int i, class H>
+ typename ValueGetter<H, i>::ValueType& get(H& obj)
+ {
+ return ValueGetter<H, i>::Do(obj);
+ }
+ // ---------------------------------------------------------------------------
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Reductor
+ // See Reduce below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <class H, unsigned int i> struct Reductor;
+
+ template <class H>
+ struct Reductor<H, 0>
+ {
+ typedef typename H::TList::Head HeadType;
+
+ static HeadType Do(H& obj)
+ {
+ return get<0>(obj);
+ }
+ };
+
+ template <class H, unsigned int i>
+ struct Reductor
+ {
+ typedef typename H::TList::Head HeadType;
+ typedef typename H::TailClass TailClass;
+
+ static HeadType Do(H& obj)
+ {
+ // Which is: first(obj) + reduce(tail(obj))
+ return get<0>(obj) + Reductor<TailClass, i-1>::Do(obj);
+ }
+ };
+
+ template <class H>
+ typename Reductor<H, 0>::HeadType Reduce(H& obj)
+ {
+ return Reductor<H, Length<H::TList>::value-1>::Do(obj);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Stringer
+ // See Reduce below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <class H, unsigned int i> struct Stringer;
+
+
+ template <class H>
+ struct Stringer<H, 0>
+ {
+ typedef typename H::TList::Head HeadType;
+
+ static std::string Do(H& obj)
+ {
+ return icl::value<HeadType>::to_string(get<0>(obj));
+ }
+ };
+
+ template <class H, unsigned int i>
+ struct Stringer
+ {
+ typedef typename H::TList::Head HeadType;
+ typedef typename H::TailClass TailClass;
+
+ static std::string Do(H& obj)
+ {
+ return icl::value<HeadType>::to_string(get<0>(obj))
+ + ", " + Stringer<TailClass, i-1>::Do(obj);
+ }
+ };
+
+ template <class H>
+ typename std::string Stringify(H& obj)
+ {
+ return "("+Stringer<H, Length<H::TList>::value-1>::Do(obj)+")";
+ }
+
+ template <typename Types>
+ std::string Tupl<Types>::as_string()const
+ {
+ //JODO In order to work with const selector functions I need to
+ // implement a const ValueGetter version
+ return Stringify(const_cast<Tupl<Types>&>(*this));
+ }
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // helper class template Mapper
+ // See Map below
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template <typename TargetT, typename SourceT> struct UnaryFunction
+ {
+ typedef typename TargetT (*Type)(SourceT);
+ };
+
+ template <typename TargetT, typename SourceT> struct TwiceFun
+ {
+ static TargetT apply(const SourceT& src);
+ };
+ template <>
+ struct TwiceFun<int,int>
+ {
+ static int apply(const int& src)
+ {
+ return 2*src;
+ }
+ };
+ template <>
+ struct TwiceFun<int,double>
+ {
+ static int apply(const double& src)
+ {
+ return static_cast<int>(2.0*src);
+ }
+ };
+ template <>
+ struct TwiceFun<double,double>
+ {
+ static double apply(const double& src)
+ {
+ return (2.0*src);
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ // template class ToString
+ // ---------------------------------------------------------------------------
+ template <typename TargetT, typename SourceT> struct ToString
+ { static TargetT apply(const SourceT& src); };
+
+ template <typename SourceT> struct ToString<std::string, SourceT>
+ {
+ static std::string apply(const SourceT& src)
+ {
+ return icl::value<SourceT>::to_string(src);
+ }
+ };
+
+
+ // ---------------------------------------------------------------------------
+ // template class Mapper
+ // ---------------------------------------------------------------------------
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct Mapper;
+
+ template <template<typename,typename>class Function, typename TrgType, typename SrcType, unsigned int index>
+ struct Mapper<Function,
+ TupleGentor<Typelist<TrgType, NullType>, index>,
+ TupleGentor<Typelist<SrcType, NullType>, index> >
+ {
+ typedef typename TupleGentor<Typelist<TrgType, NullType>, index> TrgTupleT;
+ typedef typename TupleGentor<Typelist<SrcType, NullType>, index> SrcTupleT;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgType trgVal = Function<TrgType, SrcType>::apply(src);
+ trg.set(trgVal);
+ }
+ };
+
+
+ template <template<typename,typename>class Function, class TrgTupleT, class SrcTupleT>
+ struct Mapper
+ {
+ typedef typename TrgTupleT::HeadClass TrgHeadClass;
+ typedef typename SrcTupleT::HeadClass SrcHeadClass;
+ typedef typename TrgTupleT::TailClass TrgTailClass;
+ typedef typename SrcTupleT::TailClass SrcTailClass;
+ typedef typename TrgHeadClass::ValueType TrgType;
+ typedef typename SrcHeadClass::ValueType SrcType;
+
+ static void Do(TrgTupleT& trg, const SrcTupleT& src)
+ {
+ TrgHeadClass& trgHead = trg;
+ const SrcHeadClass& srcHead = src;
+ TrgTailClass& trgTail = trg;
+ const SrcTailClass& srcTail = src;
+ TrgType trgVal = Function<TrgType, SrcType>::apply(srcHead);
+ trgHead.set(trgVal);
+
+ Mapper<Function, TrgTailClass, SrcTailClass>::Do(trgTail, srcTail);
+ }
+ };
+
+ template <template<typename,typename>class Fun, class TrgTupelT, class SrcTupelT>
+ TrgTupelT Transform(const SrcTupelT& src)
+ {
+ TrgTupelT target;
+ Mapper<Fun, TrgTupelT, SrcTupelT>::Do(target, src);
+ return target;
+ }
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // ---------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------
+
+
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( pop )
+#endif
+} // namespace Loki
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/loki_xt/TypelistGentor.h
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/loki_xt/TypelistGentor.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,140 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+// This code is based on and inspired by designs of:
+// The Loki Library by Andrei Alexandrescu et al.
+// See:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+// Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// and:
+// www.sourceforge.net/projects/loki
+//
+// Parts of the Loki Library have been used for the Icl Library.
+// Those parts from the path <itl/loki> can also be included from the
+// original Loki Library sources.
+
+#ifndef LOKI_TypelistGentor_INC_
+#define LOKI_TypelistGentor_INC_
+
+// $Id$
+
+
+#include <boost/validate/loki/Typelist.h>
+#include <boost/validate/loki/TypeTraits.h>
+#include <boost/validate/loki/EmptyType.h>
+
+
+namespace Loki
+{
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( push )
+ // 'class1' : base-class 'class2' is already a base-class of 'class3'
+#pragma warning( disable : 4584 )
+#endif // _MSC_VER
+
+ //JODO This should be integrated into Typelist.h
+ namespace TL
+ {
+ template <class TList1, class TList2> struct StrictEquality;
+
+ template<>
+ struct StrictEquality<NullType, NullType>
+ {
+ enum { Result = true };
+ };
+
+ template<typename Head1>
+ struct StrictEquality<Typelist<Head1, NullType>, NullType>
+ {
+ enum { Result = false };
+ };
+
+ template<typename Head2>
+ struct StrictEquality<NullType, Typelist<Head2, NullType> >
+ {
+ enum { Result = false };
+ };
+
+ template<typename Head, class Tail1, class Tail2>
+ struct StrictEquality<Typelist<Head, Tail1>, Typelist<Head, Tail2> >
+ {
+ enum { Result = StrictEquality<Tail1, Tail2>::Result };
+ };
+
+ template<typename Head1, class Tail1, typename Head2, class Tail2>
+ struct StrictEquality<Typelist<Head1, Tail1>, Typelist<Head2, Tail2> >
+ {
+ // Does only match if Head1 is unequal to Head2
+ enum { Result = false };
+ };
+
+ // --------------------------------------------------------------------
+ // Extension for Typelist:
+ // template class MapUnaryTemplate
+ // MapUnaryTemplate(F, Typelist<T1,...,Tn>) = Typelist<F<T1>,...,F<Tn> >
+ // --------------------------------------------------------------------
+ template<template<typename TypeT>class UnaryTemplate, typename Typelist>
+ struct MapUnaryTemplate;
+
+ template<template<typename TypeT>class UnaryTemplate>
+ struct MapUnaryTemplate<UnaryTemplate, NullType>
+ {
+ typedef NullType Result;
+ };
+
+ template<template<typename TypeT>class UnaryTemplate, class Head, class Tail>
+ struct MapUnaryTemplate<UnaryTemplate, Typelist<Head, Tail> >
+ {
+ typedef Typelist<UnaryTemplate<Head>, typename MapUnaryTemplate<UnaryTemplate, Tail>::Result> Result;
+ };
+
+ }
+
+ /* class template GenTypeList. It serves to generate homogenious
+ Typelists of a given size. */
+ template <class T, unsigned int size> struct GenTypeList;
+
+ template <class T>
+ struct GenTypeList<T, 0>
+ {
+ typedef NullType Result;
+ };
+
+ template <class T, unsigned int size>
+ struct GenTypeList
+ {
+ typedef Typelist<T, typename GenTypeList<T, size-1>::Result > Result;
+ };
+
+
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning( pop )
+#endif
+} // namespace Loki
+
+#endif // end file guardian
+

Added: sandbox/icl/boost/validate/std/algorithm/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/std/algorithm/copy.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,152 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_STD_ALGORITHM_COPY_HPP_JOFA_091124
+#define BOOST_VALIDATE_STD_ALGORITHM_COPY_HPP_JOFA_091124
+
+#include <algorithm>
+
+namespace boost{namespace icl
+{
+
+//------------------------------------------------------------------------------
+//- std::copy ------------------------------------------------------------------
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_copy
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& source, TargetT& target)const
+ {
+ std::copy(source.begin(), source.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& source, TargetT& target)const
+ {
+ std::copy(elements_begin(source), elements_end(source),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ static std::string struct_abbreviation(){ return "cpy_f"; }
+};
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_copy_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& source, TargetT& target)
+ {
+ std::copy(source.rbegin(), source.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& source, TargetT& target)
+ {
+ std::copy(elements_rbegin(source), elements_rend(source),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ static std::string struct_abbreviation(){ return "cpy_b"; }
+};
+
+//------------------------------------------------------------------------------
+//- std::reverse_copy ----------------------------------------------------------
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_reverse_copy
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& source, TargetT& target)
+ {
+ std::reverse_copy(source.begin(), source.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& source, TargetT& target)
+ {
+ std::reverse_copy(elements_begin(source), elements_end(source),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ static std::string struct_abbreviation(){ return "rcpy_f"; }
+};
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_reverse_copy_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& source, TargetT& target)
+ {
+ std::reverse_copy(source.rbegin(), source.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& source, TargetT& target)
+ {
+ std::reverse_copy(elements_rbegin(source), elements_rend(source),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ static std::string struct_abbreviation(){ return "rcpy_b"; }
+};
+
+
+//------------------------------------------------------------------------------
+//- std::copy_backward ---------------------------------------------------------
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_copy_backward
+{
+ typedef typename SourceT::atomized_type AtomicT;
+ typedef typename TargetT::value_type value_type;
+
+ void operator()(const AtomicT& source, TargetT& target)
+ {
+ fill_n(InsertIterator<TargetT>(target, target.end()), source.size(), identity_element<value_type>::value());
+ std::copy_backward(source.begin(), source.end(), target.end());
+ }
+
+ void operator()(const SourceT& source, TargetT& target)
+ {
+ fill_n(InsertIterator<TargetT>(target, target.end()), source.size(), identity_element<value_type>::value());
+ std::copy_backward(elements_begin(source), elements_end(source), target.end());
+ }
+
+ static std::string struct_abbreviation(){ return "cpyb_f"; }
+};
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_copy_backward_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+ typedef typename TargetT::value_type value_type;
+
+ void operator()(const AtomicT& source, TargetT& target)
+ {
+ fill_n(InsertIterator<TargetT>(target, target.end()), source.size(), identity_element<value_type>::value());
+ std::copy_backward(source.rbegin(), source.rend(), target.end());
+ }
+
+ void operator()(const SourceT& source, TargetT& target)
+ {
+ fill_n(InsertIterator<TargetT>(target, target.end()), source.size(), identity_element<value_type>::value());
+ std::copy_backward(elements_rbegin(source), elements_rend(source), target.end());
+ }
+
+ static std::string struct_abbreviation(){ return "cpyb_b"; }
+};
+
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_STD_ALGORITHM_COPY_HPP_JOFA_091124
+

Added: sandbox/icl/boost/validate/std/algorithm/find.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/std/algorithm/find.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,261 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_STD_ALGORITHM_FIND_HPP_JOFA_091205
+#define BOOST_VALIDATE_STD_ALGORITHM_FIND_HPP_JOFA_091205
+
+#include <algorithm>
+
+namespace boost{namespace icl
+{
+
+//------------------------------------------------------------------------------
+//- std::find ------------------------------------------------------------------
+template<class SegmentalT, class TargetT>
+class std_find
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_find& operator = (const std_find&);
+public:
+ std_find(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_iterator found
+ = std::find(source.begin(), source.end(), _comparand);
+ if(found == source.end())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_iterator found
+ = std::find(elements_begin(source), elements_end(source), _comparand);
+ if(found == elements_end(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "find_f"; }
+
+private:
+ value_type _comparand;
+};
+
+
+template<class SegmentalT, class TargetT>
+class std_find_back
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_find_back& operator = (const std_find_back&);
+public:
+ std_find_back(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_reverse_iterator found
+ = std::find(source.rbegin(), source.rend(), _comparand);
+ if(found == source.rend())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_reverse_iterator found
+ = std::find(elements_rbegin(source), elements_rend(source), _comparand);
+ if(found == elements_rend(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "find_b"; }
+
+private:
+ value_type _comparand;
+};
+
+
+//------------------------------------------------------------------------------
+//- std::lower_bound -----------------------------------------------------------
+template<class SegmentalT, class TargetT>
+class std_lower_bound
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_lower_bound& operator = (const std_lower_bound&);
+public:
+ std_lower_bound(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_iterator found
+ = std::lower_bound(source.begin(), source.end(), _comparand);
+ if(found == source.end())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_iterator found
+ = std::lower_bound(elements_begin(source), elements_end(source), _comparand);
+ if(found == elements_end(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "lwb_f"; }
+
+private:
+ value_type _comparand;
+};
+
+
+template<class SegmentalT, class TargetT>
+class std_lower_bound_back
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_lower_bound_back& operator = (const std_lower_bound_back&);
+public:
+ std_lower_bound_back(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_reverse_iterator found
+ = std::lower_bound(source.rbegin(), source.rend(), _comparand);
+ if(found == source.rend())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_reverse_iterator found
+ = std::lower_bound(elements_rbegin(source), elements_rend(source), _comparand);
+ if(found == elements_rend(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "lwb_b"; }
+
+private:
+ value_type _comparand;
+};
+
+
+//------------------------------------------------------------------------------
+//- std::upper_bound -----------------------------------------------------------
+template<class SegmentalT, class TargetT>
+class std_upper_bound
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_upper_bound& operator = (const std_upper_bound&);
+public:
+ std_upper_bound(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_iterator found
+ = std::upper_bound(source.begin(), source.end(), _comparand);
+ if(found == source.end())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_iterator found
+ = std::upper_bound(elements_begin(source), elements_end(source), _comparand);
+ if(found == elements_end(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "upb_f"; }
+
+private:
+ value_type _comparand;
+};
+
+
+template<class SegmentalT, class TargetT>
+class std_upper_bound_back
+{
+public:
+ typedef typename SegmentalT::atomized_type AtomicT;
+ typedef typename AtomicT::value_type value_type;
+private:
+ std_upper_bound_back& operator = (const std_upper_bound_back&);
+public:
+ std_upper_bound_back(const TargetT& comparand)
+ : _comparand(comparand){}
+
+ TargetT operator()(const AtomicT& source)const
+ {
+ typename AtomicT::const_reverse_iterator found
+ = std::upper_bound(source.rbegin(), source.rend(), _comparand);
+ if(found == source.rend())
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ TargetT operator()(const SegmentalT& source)const
+ {
+ typename SegmentalT::element_const_reverse_iterator found
+ = std::upper_bound(elements_rbegin(source), elements_rend(source), _comparand);
+ if(found == elements_rend(source))
+ return identity_element<TargetT>::value();
+ else
+ return *found;
+ }
+
+ static std::string struct_abbreviation(){ return "upb_b"; }
+
+private:
+ value_type _comparand;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_STD_ALGORITHM_FIND_HPP_JOFA_091205
+

Added: sandbox/icl/boost/validate/std/algorithm/relation.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/std/algorithm/relation.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,167 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_STD_ALGORITHM_RELATION_HPP_JOFA_091202
+#define BOOST_VALIDATE_STD_ALGORITHM_RELATION_HPP_JOFA_091202
+
+#include <algorithm>
+
+namespace boost{namespace icl
+{
+
+//- equal ----------------------------------------------------------------------
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
+#endif // I do guarantee here that I am using the parameters correctly :)
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_equals
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = false;
+ if(left.size() <= right.size())
+ target = std::equal(left.begin(), left.end(), right.begin());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = false;
+ if(left.size() <= right.size())
+ target = std::equal(elements_begin(left), elements_end(left), elements_begin(right));
+ }
+
+ static std::string struct_abbreviation(){ return "==f"; }
+};
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_equals_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = false;
+ if(left.size() <= right.size())
+ target = std::equal(left.rbegin(), left.rend(), right.rbegin());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = false;
+ if(left.size() <= right.size())
+ target = std::equal(elements_rbegin(left), elements_rend(left), elements_rbegin(right));
+ }
+
+ static std::string struct_abbreviation(){ return "==b"; }
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+//- lexicographical_compare ----------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_lexicographical_compare
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = std::lexicographical_compare(left.begin(), left.end(),
+ right.begin(), right.end());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = std::lexicographical_compare
+ (elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right));
+ }
+
+ static std::string struct_abbreviation(){ return "<L_f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_lexicographical_compare_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = std::lexicographical_compare(left.rbegin(), left.rend(),
+ right.rbegin(), right.rend());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = std::lexicographical_compare
+ (elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right));
+ }
+
+ static std::string struct_abbreviation(){ return "<L_b"; }
+};
+
+
+//- includes -------------------------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_includes
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = std::includes(left.begin(), left.end(),
+ right.begin(), right.end());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = std::includes(elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right));
+ }
+
+ static std::string struct_abbreviation(){ return "C=f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_includes_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ target = std::includes(left.rbegin(), left.rend(),
+ right.rbegin(), right.rend());
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ target = std::includes(elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right));
+ }
+
+ static std::string struct_abbreviation(){ return "C=b"; }
+};
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_STD_ALGORITHM_RELATION_HPP_JOFA_091202
+

Added: sandbox/icl/boost/validate/std/algorithm/set_algo.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/std/algorithm/set_algo.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,222 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_STD_ALGORITHM_SET_ALGO_HPP_JOFA_091125
+#define BOOST_VALIDATE_STD_ALGORITHM_SET_ALGO_HPP_JOFA_091125
+
+#include <algorithm>
+
+namespace boost{namespace icl
+{
+
+
+//- set_union -----------------------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_union
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_union(left.begin(), left.end(), right.begin(), right.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_union(
+ elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "+f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_union_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_union(left.rbegin(), left.rend(), right.rbegin(), right.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_union(
+ elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "+b"; }
+};
+
+
+//- set_difference ------------------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_difference
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_difference(left.begin(), left.end(), right.begin(), right.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_difference(
+ elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "-f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_difference_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_difference(left.rbegin(), left.rend(), right.rbegin(), right.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_difference(
+ elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "-b"; }
+};
+
+
+//- set_intersection -----------------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_intersection
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_intersection(left.begin(), left.end(), right.begin(), right.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_intersection(
+ elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "^f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_intersection_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_intersection(left.rbegin(), left.rend(), right.rbegin(), right.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_intersection(
+ elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "^b"; }
+};
+
+
+//- set_symmetric_difference ---------------------------------------------------
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_symmetric_difference
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_symmetric_difference(left.begin(), left.end(), right.begin(), right.end(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_symmetric_difference(
+ elements_begin(left), elements_end(left),
+ elements_begin(right), elements_end(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "&f"; }
+};
+
+
+template<class SourceT, class TargetT, template<class>class InsertIterator>
+struct std_set_symmetric_difference_back
+{
+ typedef typename SourceT::atomized_type AtomicT;
+
+ void operator()(const AtomicT& left, const AtomicT& right, TargetT& target)
+ {
+ std::set_symmetric_difference(left.rbegin(), left.rend(), right.rbegin(), right.rend(),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end())));
+ }
+
+ void operator()(const SourceT& left, const SourceT& right, TargetT& target)
+ {
+ std::set_symmetric_difference(
+ elements_rbegin(left), elements_rend(left),
+ elements_rbegin(right), elements_rend(right),
+ InsertIterator<TargetT>(target, typename TargetT::iterator(target.end()))
+ );
+ }
+
+ static std::string struct_abbreviation(){ return "&b"; }
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_STD_ALGORITHM_SET_ALGO_HPP_JOFA_091125
+

Added: sandbox/icl/boost/validate/type/bits.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/type/bits.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,86 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_LIBS_VALIDATE_TEST_BITS_HPP_JOFA_091009
+#define BOOST_ICL_LIBS_VALIDATE_TEST_BITS_HPP_JOFA_091009
+
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/type_traits/is_set.hpp>
+#include <boost/icl/detail/relation_state.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class NaturalT> class bits
+{
+public:
+ typedef NaturalT chunk_type;
+ typedef NaturalT element_type;
+ typedef std::size_t size_type;
+
+ bits():_bits(){}
+ explicit bits(NaturalT value):_bits(value){}
+
+ NaturalT number()const{ return _bits; }
+ bits& operator |= (const bits& value){_bits |= value._bits; return *this;}
+ bits& operator &= (const bits& value){_bits &= value._bits; return *this;}
+ bits& operator ^= (const bits& value){_bits ^= value._bits; return *this;}
+ bits operator ~ ()const { return bits(~_bits); }
+ bool operator < (const bits& value)const{return _bits < value._bits;}
+ bool operator == (const bits& value)const{return _bits == value._bits;}
+
+ bool contains(element_type element)const{return 0 !=(_bits & element);}
+ bool contains(const bits& value)const; //JODO
+ bool contained_in(const bits& value)const; //JODO
+
+ size_type cardinality()const{}
+
+private:
+ NaturalT _bits;
+};
+
+typedef bits<unsigned char> bits8;
+typedef bits<unsigned short> bits16;
+typedef bits<unsigned long> bits32;
+typedef bits<unsigned long long> bits64;
+
+template<class NaturalT>
+int inclusion_compare(icl::bits<NaturalT> left, icl::bits<NaturalT> right)
+{
+ if(0 ==(left.number() & right.number())) return inclusion::unrelated;
+ else if(left.number() < right.number() ) return inclusion::subset;
+ else if(left.number() > right.number() ) return inclusion::superset;
+ else return inclusion::equal;
+}
+
+
+template<class CharType, class CharTraits, class NaturalT>
+std::basic_ostream<CharType, CharTraits>& operator <<
+(std::basic_ostream<CharType, CharTraits>& stream, const icl::bits<NaturalT>& object)
+{
+ return stream << object.number();
+}
+
+template<class NaturalT>
+struct is_set<bits<NaturalT> >
+{
+ typedef is_set<bits<NaturalT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <>struct type_to_string<icl::bits<unsigned char > >{static std::string apply(){ return "bit8"; }};
+template <>struct type_to_string<icl::bits<unsigned short> >{static std::string apply(){ return "bit16"; }};
+template <>struct type_to_string<icl::bits<unsigned int > >{static std::string apply(){ return "bit32"; }};
+template <>struct type_to_string<icl::bits<unsigned long > >{static std::string apply(){ return "bitl32"; }};
+template <>struct type_to_string<icl::bits<unsigned long long> >{static std::string apply(){ return "bit64"; }};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_LIBS_VALIDATE_TEST_BITS_HPP_JOFA_091009

Added: sandbox/icl/boost/validate/type/nat.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/type/nat.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,73 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl/type_traits/type_to_string.hpp>
+#include <boost/icl/type_traits/value_size.hpp>
+
+#define ICL_LOCATION(message) location(__FILE__,__LINE__,message)
+
+namespace boost{namespace icl
+{
+
+class cnat
+{
+public:
+ cnat(): _value(0) {}
+ cnat(int val): _value(val<0 ? 0 : val){}
+ cnat(const cnat& val): _value(val._value){}
+
+ int value()const { return _value; }
+
+ cnat& operator++(){ ++_value; return *this; }
+ const cnat operator++(int){ cnat that = *this; ++_value; return that; }
+
+ cnat& operator--(){ if(_value > 0)--_value; return *this; }
+ const cnat operator--(int){ cnat that = *this; --_value; return that; }
+
+ cnat& operator += (const cnat& right){ _value += right._value; return *this; }
+
+ cnat& operator -= (const cnat& right)
+ {
+ _value = right._value > _value ? 0 : (_value - right._value);
+ return *this;
+ }
+
+ operator unsigned int()const{ return (_value); }
+
+ std::string as_string()const { return to_string<int>::apply(_value); }
+
+private:
+ int _value;
+};
+
+//inline cnat operator + (const cnat& left, const cnat& right){return cnat(left)+=right;}
+//inline cnat operator - (const cnat& left, const cnat& right){return cnat(left)-=right;}
+
+inline bool operator == (const boost::icl::cnat& left, const boost::icl::cnat& right){ return left.value() == right.value(); }
+inline bool operator < (const boost::icl::cnat& left, const boost::icl::cnat& right){ return left.value() < right.value(); }
+
+template<>inline std::string type_to_string<cnat>::apply() { return "cnat"; }
+
+template<> inline std::size_t value_size<cnat>::apply(const cnat& value)
+{ return value; }
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits> &operator<<
+(std::basic_ostream<CharType, CharTraits> &stream, icl::cnat const& right)
+{
+ return stream << right.value();
+}
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/utility.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/utility.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,54 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_UTILITY_HPP_JOFA_090203
+#define BOOST_VALIDATE_UTILITY_HPP_JOFA_090203
+
+#include <iostream>
+#include <boost/icl/type_traits/to_string.hpp>
+
+#define ICL_LOCATION(message) location(__FILE__,__LINE__,message)
+
+#define NEURONIZER_CASES(validater_Template, itl_Map, domain_Type, codomain_Type) \
+case IdentityHandlerType::partial_absorber: return new validater_Template<itl_Map<domain_Type,codomain_Type,partial_absorber> >; \
+case IdentityHandlerType::partial_enricher: return new validater_Template<itl_Map<domain_Type,codomain_Type,partial_enricher> >; \
+case IdentityHandlerType::total_absorber: return new validater_Template<itl_Map<domain_Type,codomain_Type,total_absorber> >; \
+case IdentityHandlerType::total_enricher: return new validater_Template<itl_Map<domain_Type,codomain_Type,total_enricher> >;
+
+
+namespace boost{namespace icl
+{
+ std::string location(const std::string& file, int line, const std::string& message)
+ {
+ std::string result = file;
+ result += "(" + to_string<int>::apply(line) + "): ";
+ result += message;
+ return result;
+ }
+
+ std::string msvc_stl_false_order_checking_for_reverse_iteration_message()
+ {
+ return std::string(
+"+----------------------------------------------------------------------------+\n"
+"| MSVC STL: Incorrect order checking for reverse iteration in _DEBUG mode: |\n"
+"+----------------------------------------------------------------------------+\n"
+"| It checks ranges for being sorted by < for algoriths that require ordering |\n"
+"| (which is correct) but misses the fact that reverse iteration from rbegin |\n"
+"| to rend would require to check REVERSE ORDERING .>. So it gives false |\n"
+"| alarm on correct instances of algorithms. |\n"
+"| For Msvc, law based tests on sorted associative containers in reverse |\n"
+"| order, are therefore executed in RELEASE MODE only. |\n"
+"+----------------------------------------------------------------------------+\n"
+ );
+ }
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_UTILITY_HPP_JOFA_090203
+

Added: sandbox/icl/boost/validate/validater/abelian_monoid_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/abelian_monoid_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,60 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+#define BOOST_ICL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+
+#include <boost/icl/functors.hpp>
+//#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+#include <boost/validate/validater/monoid_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class abelian_monoid_validater : public concept_validater
+{
+public:
+
+ enum Laws {monoid_laws, commutativity, Laws_size};
+
+ abelian_monoid_validater(){ setProfile(); }
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[monoid_laws] = 66;
+ _lawChoice[commutativity] = 34;
+ _lawChoice.init();
+ }
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case monoid_laws: return _monoid_validater.chooseValidater();
+ case commutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+ monoid_validater<Type> _monoid_validater;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+

Added: sandbox/icl/boost/validate/validater/bit_collector_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/bit_collector_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,113 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_VALIDATER_BIT_COLLECTOR_VALIDATER_HPP_JOFA_091009
+#define BOOST_VALIDATE_VALIDATER_BIT_COLLECTOR_VALIDATER_HPP_JOFA_091009
+
+#include <boost/icl/functors.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class collector_validater : public concept_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ inplacePlusDistributivity,
+ inplaceEtDistributivity,
+ inplacePlusDashRightDistrib,
+ inplaceEtDashRightDistrib,
+ inplacePlusDeMorgan,
+ inplaceEtDeMorgan,
+ Laws_size
+ };
+
+ collector_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDashRightDistrib]= share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDashRightDistrib] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ //JODO DEL complete: spezielle instanzen werden nicht benoetigt!
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_bit_add> >;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type, inplace_bit_add> >;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_bit_add> >;
+ case inplaceEtAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_bit_and> >;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_bit_and> >;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type, inplace_bit_add, inplace_bit_subtract, inplace_bit_and> >;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type> >;
+ case inplaceEtDistributivity:
+ if(icl::is_interval_splitter<Type>::value && absorbs_identities<Type>::value && !is_total<Type>::value)
+ return new LawValidater<InplaceDistributivity<Type, inplace_bit_and, inplace_bit_add, element_equal> >;
+ else return new LawValidater<InplaceDistributivity<Type, inplace_bit_and, inplace_bit_add, std_equal> >;
+ case inplacePlusDashRightDistrib:
+ if(icl::is_interval_splitter<Type>::value && absorbs_identities<Type>::value && !is_total<Type>::value)
+ return new LawValidater<InplaceRightDistributivity<Type, inplace_bit_add, inplace_bit_subtract, element_equal> >;
+ else return new LawValidater<InplaceRightDistributivity<Type, inplace_bit_add, inplace_bit_subtract, std_equal> >;
+ case inplaceEtDashRightDistrib: return new LawValidater<InplaceRightDistributivity<Type, inplace_bit_and, inplace_bit_subtract> >;
+ case inplacePlusDeMorgan: return new LawValidater<InplaceDeMorgan<Type, inplace_bit_add, inplace_bit_and, inplace_bit_subtract, icl::std_equal> >;
+ case inplaceEtDeMorgan:
+ if(icl::is_interval_splitter<Type>::value || icl::is_interval_separator<Type>::value)
+ return new LawValidater<InplaceDeMorgan<Type, inplace_bit_and, inplace_bit_add, inplace_bit_subtract, icl::element_equal> >;
+ else return new LawValidater<InplaceDeMorgan<Type, inplace_bit_and, inplace_bit_add, inplace_bit_subtract, icl::std_equal> >;
+
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_VALIDATER_BIT_COLLECTOR_VALIDATER_HPP_JOFA_091009

Added: sandbox/icl/boost/validate/validater/collector_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/collector_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,123 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_ICL_COLLECTOR_VALIDATER_HPP_JOFA_090315
+#define BOOST_ICL_VALIDATE_VALIDATER_ICL_COLLECTOR_VALIDATER_HPP_JOFA_090315
+
+
+#include <boost/icl/functors.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class collector_validater : public concept_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ inplacePlusDistributivity,
+ inplaceEtDistributivity,
+ inplacePlusDashRightDistrib,
+ inplaceEtDashRightDistrib,
+ inplacePlusDeMorgan,
+ inplaceEtDeMorgan,
+ Laws_size
+ };
+
+ collector_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDashRightDistrib]= share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDashRightDistrib] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_plus> >;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ case inplaceEtAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_et> >;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et> >;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type> >;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type> >;
+ case inplaceEtDistributivity:
+ if(icl::is_interval_splitter<Type>::value && absorbs_identities<Type>::value && !is_total<Type>::value)
+ return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal> >;
+ else return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal> >;
+ case inplacePlusDashRightDistrib:
+ if(icl::is_interval_splitter<Type>::value && absorbs_identities<Type>::value && !is_total<Type>::value)
+ return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, element_equal> >;
+ else return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal> >;
+ case inplaceEtDashRightDistrib: return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus> >;
+ case inplacePlusDeMorgan: return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, icl::std_equal> >;
+ case inplaceEtDeMorgan:
+ if(icl::is_interval_splitter<Type>::value || icl::is_interval_separator<Type>::value)
+ return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, icl::element_equal> >;
+ else return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, icl::std_equal> >;
+
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_ICL_COLLECTOR_VALIDATER_HPP_JOFA_090315
+

Added: sandbox/icl/boost/validate/validater/concept_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/concept_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,70 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203
+#define BOOST_ICL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203
+
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+
+namespace boost{namespace icl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+ class concept_validater
+ {
+ public:
+ virtual ~concept_validater(){}
+ // the choice probability, and also the availability of laws is individual to each type
+ // Somehow it has to be defined in conjunction to every type. So it is an aspect of
+ // type traits.
+ virtual LawValidaterI* chooseValidater()=0;
+ virtual bool hasValidProfile()const{ return true; }
+
+ void validate()
+ {
+ LawValidaterI* law_validater = chooseValidater();
+ if(law_validater)
+ {
+ law_validater->run();
+ law_validater->addFrequencies(_frequencies);
+ law_validater->addViolations(_violationsCount, _violations);
+ delete law_validater;
+ }
+ }
+
+ void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
+
+ void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
+ {
+ summary += _violationsCount;
+ collector += _violations;
+ }
+
+ static int share(int total, int& index, int& rest_shares);
+
+ private:
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
+ };
+
+ inline int concept_validater::share(int total, int& index, int& rest_shares)
+ {
+ int count = total - index;
+ int share = rest_shares / count;
+ rest_shares -= share;
+ ++index;
+ return share;
+ }
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203

Added: sandbox/icl/boost/validate/validater/function_equality_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/function_equality_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,67 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/validate/icl/functors.hpp>
+#include <boost/validate/laws/function_equality.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename SourceT, typename TargetT>
+ class function_equality_validater : public concept_validater
+ {
+ public:
+ enum Laws
+ {
+ insertion_loop_hint,
+ insertion_loop_copy,
+ addition_loop_hint,
+ addition_loop_copy,
+ Laws_size
+ };
+
+ function_equality_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int volume = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(volume);
+ _lawChoice[insertion_loop_hint] = 25;
+ _lawChoice[insertion_loop_copy] = 25;
+ _lawChoice[addition_loop_hint] = 25;
+ _lawChoice[addition_loop_copy] = 25;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case insertion_loop_hint: return new LawValidater<FunctionEquality<SourceT, TargetT, base_insertion, hint_insertion>, RandomGentor>();
+ case insertion_loop_copy: return new LawValidater<FunctionEquality<SourceT, TargetT, base_insertion, copy_insertion>, RandomGentor>();
+ case addition_loop_hint: return new LawValidater<FunctionEquality<SourceT, TargetT, base_addition, hint_addition>, RandomGentor>();
+ case addition_loop_copy: return new LawValidater<FunctionEquality<SourceT, TargetT, base_addition, copy_addition>, RandomGentor>();
+ default: return NULL;
+ }
+ }
+
+ private:
+ ChoiceT _lawChoice;
+ }; //class function_equality_validater
+
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/validater/icl_induced_relations.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/icl_induced_relations.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,67 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_ICL_INDUCED_RELATIONS_HPP_JOFA_090304
+#define BOOST_ICL_VALIDATE_VALIDATER_ICL_INDUCED_RELATIONS_HPP_JOFA_090304
+
+#include <boost/icl/functors.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/laws/induced_relation.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class icl_induced_relations_validater : public concept_validater
+ {
+ public:
+ enum Laws
+ {
+ atomize_subset,
+ atomize_superset,
+ atomize_element_equal,
+ Laws_size
+ };
+
+ icl_induced_relations_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int volume = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(volume);
+ _lawChoice[atomize_subset] = 33;
+ _lawChoice[atomize_superset] = 33;
+ _lawChoice[atomize_element_equal] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case atomize_subset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, segmental::atomizer, sub_super_set>, RandomGentor>();
+ case atomize_superset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, segmental::atomizer, super_sub_set>, RandomGentor>();
+ case atomize_element_equal: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, segmental::atomizer, element_equal>, RandomGentor>();
+ default: return NULL;
+ }
+ }
+
+ private:
+ ChoiceT _lawChoice;
+ }; //class icl_induced_relations_validater
+
+
+}} // namespace icl boost
+
+#endif BOOST_ICL_VALIDATE_VALIDATER_ICL_INDUCED_RELATIONS_HPP_JOFA_090304
+

Added: sandbox/icl/boost/validate/validater/icl_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/icl_order_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,72 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/validater/strict_weak_order_validater.hpp>
+#include <boost/validate/validater/partial_order_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class icl_order_validater : public concept_validater
+ {
+ public:
+ typedef strict_weak_order_validater<Type, std::less> LessValidaterT;
+ typedef partial_order_validater<Type, std::less_equal> LessEqualValidaterT;
+ typedef partial_order_validater<Type, icl::sub_super_set, icl::element_equal> ContainedInValidaterT;
+
+ enum Laws
+ {
+ strictWeakStdOrder,
+ partialStdOrder,
+ containedInOrder,
+ Laws_size
+ };
+
+ icl_order_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_weights = 100;
+ _lawChoice.setSize(sum_of_weights);
+ _lawChoice.setMaxWeights(sum_of_weights);
+ _lawChoice[strictWeakStdOrder] = 33;
+ _lawChoice[partialStdOrder] = 33;
+ _lawChoice[containedInOrder] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case strictWeakStdOrder: return _lessValidater.chooseValidater();
+ case partialStdOrder: return _lessEqualValidater.chooseValidater();
+ case containedInOrder: return _containedInValidater.chooseValidater();
+ default: return NULL;
+ }
+ }
+
+ private:
+ ChoiceT _lawChoice;
+ LessValidaterT _lessValidater;
+ LessEqualValidaterT _lessEqualValidater;
+ ContainedInValidaterT _containedInValidater;
+ };
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/validater/icl_set_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/icl_set_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,124 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_ICL_SET_VALIDATER_HPP_JOFA_090303
+#define BOOST_ICL_VALIDATE_VALIDATER_ICL_SET_VALIDATER_HPP_JOFA_090303
+
+#include <boost/icl/functors.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class icl_set_validater : public concept_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ inplacePlusDistributivity,
+ inplaceEtDistributivity,
+ inplacePlusDashRightDistrib,
+ inplaceEtDashRightDistrib,
+ inplacePlusDeMorgan,
+ inplaceEtDeMorgan,
+ Laws_size
+ };
+
+ icl_set_validater()
+ {
+ setProfile();
+ }
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDashRightDistrib]= share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDashRightDistrib] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_plus> >;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ case inplaceEtAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_et> >;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et> >;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type> >;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type> >;
+ case inplaceEtDistributivity:
+ if(icl::is_interval_splitter<Type>::value)
+ return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal> >;
+ else return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal> >;
+ case inplacePlusDashRightDistrib:
+ if(icl::is_interval_splitter<Type>::value)
+ return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, element_equal> >;
+ else return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal> >;
+ case inplaceEtDashRightDistrib: return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus> >;
+ case inplacePlusDeMorgan: return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, icl::std_equal> >;
+ case inplaceEtDeMorgan:
+ if(icl::is_interval_splitter<Type>::value || icl::is_interval_separator<Type>::value)
+ return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, inplace_minus, icl::element_equal> >;
+ else return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, inplace_minus, icl::std_equal> >;
+
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_ICL_SET_VALIDATER_HPP_JOFA_090303

Added: sandbox/icl/boost/validate/validater/interval_morphic_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/interval_morphic_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,103 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/laws/order.hpp>
+#include <boost/validate/laws/pushouts.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class interval_morphic_validater : public concept_validater
+ {
+ public:
+ enum Laws
+ {
+ atomize_plus,
+ atomize_minus,
+ atomize_et,
+ atomize_caret,
+ cluster_plus,
+ cluster_minus,
+ cluster_et,
+ cluster_caret,
+ atomize_insert,
+ atomize_erase,
+ cluster_insert,
+ cluster_erase,
+ join_plus,
+ absorb_plus,
+ Laws_size
+ };
+
+ interval_morphic_validater() {setProfile();}
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _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();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case atomize_plus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_plus>, RandomGentor>();
+ case atomize_minus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_minus>, RandomGentor>();
+ case atomize_et: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_et>, RandomGentor>();
+ case atomize_caret: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_caret>, RandomGentor>();
+ case cluster_plus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_plus>, RandomGentor>();
+ case cluster_minus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_minus>, RandomGentor>();
+ case cluster_et: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_et>, RandomGentor>();
+ case cluster_caret: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_caret>, RandomGentor>();
+ case atomize_insert: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_insert>,RandomGentor>();
+ case atomize_erase: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, segmental::atomizer, inplace_erase>, RandomGentor>();
+ case cluster_insert: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_insert>,RandomGentor>();
+ case cluster_erase: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, segmental::clusterer, inplace_erase>, RandomGentor>();
+ case join_plus: return new LawValidater<BinaryPushout<Type, typename Type::joint_type, segmental::joiner, inplace_plus>, RandomGentor>();
+ //JODO absorb_plus holds for interval_map. For split_interval_map element_equal has to be used as equality-relation.
+ //case absorb_plus: return new LawValidater<BinaryPushout<Type, typename Type::partial_absorber_type, segmental::identity_absorber, inplace_plus>, RandomGentor>();
+ //JODO doc: violated: inverse required: case absorb_minus: return new LawValidater<BinaryPushout<Type, typename Type::partial_absorber_type, Interval::AbsorbNeutrons, inplace_minus>, RandomGentor>();
+ default: return NULL;
+ }
+ }
+
+ private:
+ ChoiceT _lawChoice;
+ };
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/validater/law_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/law_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,241 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <boost/icl/ptime.hpp>
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/icl_xt/set.hpp>
+#include <boost/icl/map.hpp>
+#include <boost/validate/gentor/randomgentor.hpp>
+
+#include <boost/validate/validation_counts.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/law_violations.hpp>
+
+namespace boost{namespace icl
+{
+ typedef icl::map<std::string, validation_counts> ValidationCounterT;
+ typedef icl::map<std::string, int> ViolationCounterT;
+ typedef icl::map<std::string, PolyLawViolations> ViolationMapT;
+
+ /** \brief An interface for a test machine. */
+ class LawValidaterI
+ {
+ public:
+ /// Virtual dtor
+ virtual ~LawValidaterI(){}
+ /// Initialize the validater
+ virtual void init()=0;
+
+ /** \brief Run tests on the law.
+
+ Generate law instantiations, test the law on
+ them. Collect violations, if they occur. */
+ virtual void run()=0;
+
+ /// Add statistics of the validater's run to \c ValidationCounterT
+ virtual void addFrequencies(ValidationCounterT&)=0;
+ /// Add statistics and law violations to book keeper objects.
+ virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
+ };
+
+
+ /** \brief A class template for test machines.
+
+ Class template \c LawValidater defines a testmachine
+ for a given law \c LawT and a generator template, that
+ produces a matching generator of input variables for the law.
+ */
+ template <class LawT, template<typename>class GentorT = RandomGentor>
+ class LawValidater : public LawValidaterI
+ {
+ public:
+ typedef typename LawT::input_types input_types; // The input types of the law to test
+ typedef typename LawT::output_types output_types; // The output types of the law to test
+ typedef typename LawT::input_tuple input_tuple; // The tuple type for input variables of the law
+ typedef typename LawT::output_tuple output_tuple; // The tuple type for input variables of the law
+
+ typedef typename Loki::TL::MapUnaryTemplate<GentorT, input_types>::Result gentor_types;
+ typedef typename Loki::tuple<gentor_types> input_gentor;
+
+ public:
+#ifdef _DEBUG
+ static const int default_trials_count = 10;
+ static const int default_repeat_count = 20;
+#else
+ static const int default_trials_count = 20;
+ static const int default_repeat_count = 10;
+#endif
+ LawValidater()
+ {
+ _repeat_count = GentorProfileSgl::it()->repeat_count();
+ _trials_count = GentorProfileSgl::it()->trials_count();
+ }
+
+ void set_trials_count(int trials)
+ {
+ _trials_count = trials;
+ _silent_trials_count = std::max(1, _trials_count / 10);
+ }
+
+ void set_repeat_count(int repeats)
+ {
+ _repeat_count = std::max(1, repeats);
+ }
+
+ void set_silent_trials_count(int trials) { _trials_count = trials; }
+
+ void init();
+ void run();
+ void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
+
+ void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
+ {
+ summary += ViolationCounterT::value_type(lawType(), static_cast<int>(_lawViolations.size()));
+ if(!_lawViolations.empty())
+ collector += ViolationMapT::value_type(lawType(), PolyLawViolations(new LawViolationsT(_lawViolations)));
+ }
+
+ std::string lawType()const{ return _law.typeString(); }
+
+ void reportLawInfo()const;
+ void reportProgress()const;
+ void reportViolations()const;
+ void reportSuccess()const;
+
+ int violation_count()const { return _lawViolations.size(); }
+
+ private:
+ typedef LawViolations<LawT> LawViolationsT;
+
+ private:
+ input_gentor _gentor;
+ LawT _law;
+
+ int _trials_count;
+ int _silent_trials_count;
+ int _repeat_count;
+
+ LawViolationsT _lawViolations;
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
+ }; //class LawValitater
+
+
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::init()
+ {
+ icl::clear(_frequencies);
+ _lawViolations.clear();
+ icl::clear(_violations);
+ }
+
+ // Runs law_instance_count * repeat_count validations on the law LawT
+ // law_instance_count: Number of instances that are validated for LawT
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::run()
+ {
+ // apply Calibrater.apply to each element of the generator-tuple _gentor
+ // This is just an initialisation of the generators according to system
+ // defaults for convenience purposes.
+ _gentor.template apply<GentorT, Calibrater, input_tuple>();
+
+ // Input values that are to be generated on every iteration
+ input_tuple values;
+ posix_time::ptime start, stop;
+ double validation_time = 0.0; //microseconds
+
+ for(int idx=0; idx<_trials_count; idx++)
+ {
+ // Apply the function SomeValue to each component of the input tuple
+ _gentor.template map_template<GentorT, SomeValue>(values);
+ _law.setInstance(values);
+
+ bool law_is_violated = false;
+ start = posix_time::ptime(posix_time::microsec_clock::local_time());
+ // In order to measure small time intervals, evaluation must be repeated.
+
+ for(int repeat=0; repeat<_repeat_count; repeat++)
+ law_is_violated = !_law.holds();
+
+ stop = posix_time::ptime(posix_time::microsec_clock::local_time());
+ validation_time += static_cast<double>((stop - start).total_microseconds());
+
+ if(law_is_violated)
+ _lawViolations.insert(_law);
+
+ }
+
+ // Average time for one law evaluation in micro seconds
+ double avg_validation_time = validation_time/(_trials_count * _repeat_count);
+
+ if(!_lawViolations.empty())
+ {
+ reportViolations();
+ LawT violation = *(_lawViolations.begin());
+
+ input_tuple inVars;
+ output_tuple outVars;
+ violation.getInstance(inVars, outVars);
+ std::cout << "Violation of: " << _law.typeString() << std::endl;
+ std::cout << _law.formula() << std::endl;
+ std::cout << inVars.as_string() << std::endl;
+ std::cout << outVars.as_string() << std::endl;
+
+ violation.debug_holds();
+ }
+ else
+ {
+ //reportSuccess();
+ _frequencies +=
+ ValidationCounterT::value_type(lawType(),
+ validation_counts(avg_validation_time));
+ }
+
+ }
+
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::reportLawInfo()const
+ {
+ std::cout << "----------------------------------------------------------" << std::endl;
+ std::cout << "Validation of law: " << std::endl;
+ std::cout << _law.name() << std::endl;
+ std::cout << _law.formula() << std::endl;
+ }
+
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::reportProgress()const
+ {
+ typename LawT::input_tuple input_values;
+ _law.getInputInstance(input_values);
+ //JODO think about more general mechanics of progress reporting here
+ std::cout << "SomeValues " << input_values.as_string() << std::endl;
+ }
+
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::reportViolations()const
+ {
+ std::cout << static_cast<int>(_lawViolations.getViolationsCount()) << " violations" << std::endl;
+ }
+
+ template <class LawT, template<typename>class GentorT>
+ void LawValidater<LawT, GentorT>::reportSuccess()const
+ {
+ std::cout << "Law successfully validated for " << _trials_count << " cases" << std::endl;
+ }
+
+}} // namespace icl boost
+
+// ----------------------------------------------------------------------------
+

Added: sandbox/icl/boost/validate/validater/monoid_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/monoid_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,56 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+#define BOOST_ICL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+
+#include <boost/icl/functors.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class monoid_validater : public concept_validater
+{
+public:
+
+ enum Laws {associativity, neutrality, Laws_size};
+
+ monoid_validater(){ setProfile(); }
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[associativity] = 50;
+ _lawChoice[neutrality] = 50;
+ _lawChoice.init();
+ }
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case associativity: return new LawValidater<InplaceAssociativity<Type> >;
+ case neutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+

Added: sandbox/icl/boost/validate/validater/partial_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/partial_order_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,66 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/laws/order.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type, template<class>class Relation, template<class>class Equality = icl::std_equal>
+ class partial_order_validater : public concept_validater
+ {
+ public:
+ enum Laws
+ {
+ transitivity,
+ antisymmetry,
+ reflexivity,
+ Laws_size
+ };
+
+ partial_order_validater() {setProfile();}
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[transitivity] = 33;
+ _lawChoice[antisymmetry] = 33;
+ _lawChoice[reflexivity] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case transitivity: return new LawValidater<Transitivity<Type, Relation> >;
+ case antisymmetry: return new LawValidater<Antisymmetry<Type, Relation, Equality> >;
+ case reflexivity: return new LawValidater<Reflexivity <Type, Relation> >;
+ default: return NULL;
+ }
+ }
+
+
+ private:
+ ChoiceT _lawChoice;
+ };
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/validater/signed_quantifier_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/signed_quantifier_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,134 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_SIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+#define BOOST_ICL_VALIDATE_VALIDATER_SIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+
+#include <boost/icl/functors.hpp>
+#include <boost/icl/type_traits/is_interval_splitter.hpp>
+#include <boost/icl/type_traits/absorbs_identities.hpp>
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/map_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class signed_quantifier_validater : public concept_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ sectionAbsorbtion,
+ inplaceInverseExistence,
+ Laws_size
+ };
+
+ signed_quantifier_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ const int law_share = sum_of_shares / Laws_size;
+ int et_assoc_share = law_share;
+ int inv_ex_share = law_share;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ //NOTE: Associativity is not valid for partial_absorber signed quantifier maps
+ if(!is_total<Type>::value && absorbs_identities<Type>::value)
+ et_assoc_share = 0;
+ //NOTE: An Inverse exists only for a total signed quantifier
+ if(!is_total<Type>::value || !has_inverse<typename Type::codomain_type>::value)
+ inv_ex_share = 0;
+
+ int rest_shares = sum_of_shares, item_index = 0;
+
+ _lawChoice[inplaceEtAssociativity] = et_assoc_share; rest_shares -= et_assoc_share;
+ _lawChoice[inplaceInverseExistence] = inv_ex_share; rest_shares -= inv_ex_share;
+
+ item_index = 2;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[sectionAbsorbtion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity:
+ if(is_interval_splitter<Type>::value)
+ return new LawValidater<InplaceAssociativity<Type, inplace_plus, element_equal> >;
+ else return new LawValidater<InplaceAssociativity<Type, inplace_plus, std_equal> >;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ case inplaceEtAssociativity:
+ if(absorbs_identities<Type>::value && is_total<Type>::value)
+ return new LawValidater<InplaceAssociativity<Type, inplace_et, element_equal> >;
+ else return new LawValidater<InplaceAssociativity<Type, inplace_et> >;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et> >;
+ case inplaceNaturalInversion:
+ if(absorbs_identities<Type>::value)
+ return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal> >;
+ else return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, distinct_equal> >;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type> >;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type> >;
+ case sectionAbsorbtion:
+ if(absorbs_identities<Type>::value)
+ return new LawValidater<SectionAbsorbtion<Type,std_equal> >;
+ else return new LawValidater<SectionAbsorbtion<Type,distinct_equal> >;
+ case inplaceInverseExistence:
+ if(absorbs_identities<Type>::value)
+ return new LawValidater<InplaceInverseExistence<Type, inplace_plus, std_equal> >;
+ else return new LawValidater<InplaceInverseExistence<Type, inplace_plus, distinct_equal> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_SIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+

Added: sandbox/icl/boost/validate/validater/sorted_associative_back_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/sorted_associative_back_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,114 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_BACK_VALIDATER_HPP_JOFA_091202
+#define BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_BACK_VALIDATER_HPP_JOFA_091202
+
+#include <boost/validate/laws/atomic_equivalence.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#include <boost/validate/std/algorithm/copy.hpp>
+#include <boost/validate/std/algorithm/set_algo.hpp>
+#include <boost/validate/std/algorithm/relation.hpp>
+#include <boost/validate/std/algorithm/find.hpp>
+
+namespace boost{namespace icl
+{
+
+template <typename Type, typename TargetT = icl::list<typename Type::value_type> >
+class sorted_associative_back_validater : public concept_validater
+{
+public:
+ typedef typename Type::atomized_type atomic_type;
+ typedef typename atomic_type::value_type value_type;
+ typedef typename domain_type_of<Type>::type domain_type;
+ typedef typename Type::codomain_type codomain_type;
+
+ typedef typename mpl::if_< is_interval_map<Type>
+ , std::pair<domain_type, codomain_type>
+ , domain_type>::type element_type;
+
+public:
+
+ enum Laws
+ {
+ copy
+ , copy_backward
+ , reverse_copy
+ , equal
+ , lexicographical_compare
+ , includes
+ , set_union
+ , set_difference
+ , set_intersection
+ , set_symmetric_difference
+ , find
+ , lower_bound
+ , upper_bound
+ , Laws_size
+ };
+
+ sorted_associative_back_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[copy ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[copy_backward ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[reverse_copy ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[equal ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[lexicographical_compare ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[includes ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_union ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_difference ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_intersection ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_symmetric_difference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[find ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[lower_bound ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[upper_bound ] = share(Laws_size, item_index, rest_shares);
+
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case copy : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_copy_back > >;
+ case copy_backward : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_copy_backward_back > >;
+ case reverse_copy : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_reverse_copy_back > >;
+ case equal : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_equals_back > >;
+ case lexicographical_compare : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_lexicographical_compare_back > >;
+ case includes : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_includes_back > >;
+ case set_union : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_union_back > >;
+ case set_difference : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_difference_back > >;
+ case set_intersection : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_intersection_back > >;
+ case set_symmetric_difference: return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_symmetric_difference_back > >;
+ case find : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_find_back > >;
+ case lower_bound : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_lower_bound_back > >;
+ case upper_bound : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_upper_bound_back > >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_BACK_VALIDATER_HPP_JOFA_091202

Added: sandbox/icl/boost/validate/validater/sorted_associative_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/sorted_associative_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,116 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_VALIDATER_HPP_JOFA_091125
+#define BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_VALIDATER_HPP_JOFA_091125
+
+#include <boost/mpl/if.hpp>
+#include <boost/validate/laws/atomic_equivalence.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#include <boost/validate/std/algorithm/copy.hpp>
+#include <boost/validate/std/algorithm/set_algo.hpp>
+#include <boost/validate/std/algorithm/relation.hpp>
+#include <boost/validate/std/algorithm/find.hpp>
+
+
+namespace boost{namespace icl
+{
+
+template <typename Type, typename TargetT = icl::list<typename Type::value_type> >
+class sorted_associative_validater : public concept_validater
+{
+public:
+ typedef typename Type::atomized_type atomic_type;
+ typedef typename atomic_type::value_type value_type;
+ typedef typename domain_type_of<Type>::type domain_type;
+ typedef typename Type::codomain_type codomain_type;
+
+ typedef typename mpl::if_< is_interval_map<Type>
+ , std::pair<domain_type, codomain_type>
+ , domain_type>::type element_type;
+
+public:
+
+ enum Laws
+ {
+ copy
+ , copy_backward
+ , reverse_copy
+ , equal
+ , lexicographical_compare
+ , includes
+ , set_union
+ , set_difference
+ , set_intersection
+ , set_symmetric_difference
+ , find
+ , lower_bound
+ , upper_bound
+ , Laws_size
+ };
+
+ sorted_associative_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[copy ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[copy_backward ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[reverse_copy ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[equal ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[lexicographical_compare ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[includes ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_union ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_difference ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_intersection ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[set_symmetric_difference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[find ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[lower_bound ] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[upper_bound ] = share(Laws_size, item_index, rest_shares);
+
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case copy : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_copy > >;
+ case copy_backward : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_copy_backward > >;
+ case reverse_copy : return new LawValidater< UnaryAtomicEquivalence <Type, TargetT, std_reverse_copy > >;
+ case equal : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_equals > >;
+ case lexicographical_compare : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_lexicographical_compare > >;
+ case includes : return new LawValidater<BinaryAtomicEquivalence <Type, bool, std_includes > >;
+ case set_union : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_union > >;
+ case set_difference : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_difference > >;
+ case set_intersection : return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_intersection > >;
+ case set_symmetric_difference: return new LawValidater<BinaryAtomicEquivalence <Type, TargetT, std_set_symmetric_difference > >;
+ case find : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_find > >;
+ case lower_bound : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_lower_bound > >;
+ case upper_bound : return new LawValidater< UnaryAtomicEquivalence2<Type, element_type, std_upper_bound > >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#endif // BOOST_VALIDATE_VALIDATER_SORTED_ASSOCIATIVE_VALIDATER_HPP_JOFA_091125

Added: sandbox/icl/boost/validate/validater/strict_weak_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/strict_weak_order_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,67 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/icl/type_traits/is_continuous.hpp>
+#include <boost/icl/type_traits/has_inverse.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/laws/order.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+namespace boost{namespace icl
+{
+
+ template <typename Type, template<class>class Relation>
+ class strict_weak_order_validater : public concept_validater
+ {
+ public:
+ enum Laws
+ {
+ transitivity,
+ asymmetry,
+ irreflexivity,
+ Laws_size
+ };
+
+ strict_weak_order_validater() {setProfile();}
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[transitivity] = 33;
+ _lawChoice[asymmetry] = 33;
+ _lawChoice[irreflexivity] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case transitivity: return new LawValidater<Transitivity <Type, Relation >, RandomGentor >;
+ case asymmetry: return new LawValidater<Asymmetry<Type, Relation >, RandomGentor >;
+ case irreflexivity: return new LawValidater<Irreflexivity<Type, Relation >, RandomGentor >;
+ default: return NULL;
+ }
+ }
+
+ private:
+ ChoiceT _lawChoice;
+ }; //class concept_validater
+
+
+
+}} // namespace icl boost
+

Added: sandbox/icl/boost/validate/validater/unsigned_quantifier_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validater/unsigned_quantifier_validater.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,101 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATE_VALIDATER_UNSIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+#define BOOST_ICL_VALIDATE_VALIDATER_UNSIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+
+#include <boost/icl/functors.hpp>
+#include <boost/icl/type_traits/absorbs_identities.hpp>
+#include <boost/icl/type_traits/is_total.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/map_laws.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+namespace boost{namespace icl
+{
+
+template <typename Type>
+class unsigned_quantifier_validater : public concept_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ sectionAbsorbtion,
+ Laws_size
+ };
+
+ unsigned_quantifier_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[sectionAbsorbtion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_plus> >;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ case inplaceEtAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_et> >;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et> >;
+ case inplaceNaturalInversion:
+ if(absorbs_identities<Type>::value)
+ return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal> >;
+ else return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, distinct_equal> >;
+ case sectionAbsorbtion:
+ if(absorbs_identities<Type>::value)
+ return new LawValidater<SectionAbsorbtion<Type,std_equal> >;
+ else return new LawValidater<SectionAbsorbtion<Type,distinct_equal> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace icl boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_ICL_VALIDATE_VALIDATER_UNSIGNED_QUANTIFIER_VALIDATER_HPP_JOFA_090314
+

Added: sandbox/icl/boost/validate/validation_counts.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/validate/validation_counts.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_VALIDATION_COUNTS_HPP_JOFA_090713
+#define BOOST_ICL_VALIDATION_COUNTS_HPP_JOFA_090713
+
+
+namespace boost{namespace icl
+{
+
+class validation_counts
+{
+public:
+ validation_counts():_time(0.0), _count(0){}
+ validation_counts(double sum): _time(sum),_count(1){}
+
+ double time()const {return _time;}
+ long count()const {return _count;}
+ double average()const{ return _count==0 ? 0.0 : _time/_count; }
+
+ validation_counts& operator += (const validation_counts& right)
+ {
+ _time += right.time();
+ _count += right.count();
+ return *this;
+ }
+
+private:
+ double _time;
+ long _count;
+};
+
+bool operator == (const validation_counts& left, const validation_counts& right)
+{ return left.time()==right.time() && left.count()==right.count(); }
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream, const validation_counts& object)
+{
+ return stream << "(time=" << object.time() << "count=" << object.count() << ")";
+}
+
+
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_VALIDATION_COUNTS_HPP_JOFA_090713

Added: sandbox/icl/icl_4_0_0_plus.txt
==============================================================================
--- (empty file)
+++ sandbox/icl/icl_4_0_0_plus.txt 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+File itl_plus_3_2_1.zip or
+File itl_plus_3_2_1.tar.gz
+
++ itl_plus_3_2_1 is for users of different platforms that have a version of the
+ boost libraries and the build tool bjam installed.
++ You can copy itl_plus/boost/{itl,itl_xt,validate} to the boost directory
+ and itl_plus/libs/{itl,itl_xt,validate} to the libs directory of your boost
+ installation and then run all examples and tests using bjam.
+
+Changes
+Version 3.2.1. (Boost review version update 2)
++ All source files are now following the boost project conventions
+ <prj-root>/boost/itl/... Header files *.hpp of the library itl
+ <prj-root>/libs/itl/... Examples, Tests, Documentation for itl
++ Added class template interval_bitset for large compressed bitsets.
++ Added itl::insert_iterator itl::add_iterator to fill interval containers from
+ stl containers of intervals.
++ Added element iteration for all interval containers.
++ Set theoretic operations union (+ += | |=), difference (- -=), intersection
+ (& &=) and symmetric difference (^ ^=) are now available as namespace global
+ operators in an infix and an assigning variant for all interval containers and
+ many overloads combining elements, segments and useful combinations of
+ different interval containers.
++ Operators for intersection changed from (* *=) to (& &=).
++ Interval constructing functions changed from global function templates to
+ static functions.
\ No newline at end of file

Added: sandbox/icl/icl_4_0_0_plus_standalone.txt
==============================================================================
--- (empty file)
+++ sandbox/icl/icl_4_0_0_plus_standalone.txt 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,27 @@
+File itl_plus_3_2_1_standalone.7z or
+File itl_plus_3_2_1_standalone.zip
+
++ itl_plus_3_2_1_standalone is for users of msvc (visual studio) who do not have
+ a version of the boost libraries installed and do not want to get one or are
+ so busy that they think they do not have time to do so ;)
++ itl_plus_3_2_1_standalone contains all parts of boost that are needed to run
+ itl code, examples and tests under a ms windows os (vista, windows7) using
+ msvc-9 (visual studio 2008).
+
+Changes
+Version 3.2.1. (Boost review version update 2)
++ All source files are now following the boost project conventions
+ <prj-root>/boost/itl/... Header files *.hpp of the library itl
+ <prj-root>/libs/itl/... Examples, Tests, Documentation for itl
++ Added class template interval_bitset for large compressed bitsets.
++ Added itl::insert_iterator itl::add_iterator to fill interval containers from
+ stl containers of intervals.
++ Added element iteration for all interval containers.
++ Set theoretic operations union (+ += | |=), difference (- -=), intersection
+ (& &=) and symmetric difference (^ ^=) are now available as namespace global
+ operators in an infix and an assigning variant for all interval containers and
+ many overloads combining elements, segments and useful combinations of
+ different interval containers.
++ Operators for intersection changed from (* *=) to (& &=).
++ Interval constructing functions changed from global function templates to
+ static functions.
\ No newline at end of file

Added: sandbox/icl/install_libs.bat
==============================================================================
--- (empty file)
+++ sandbox/icl/install_libs.bat 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,29 @@
+rem Installs boost::date_time and boost::test so all examples and tests can be run
+rem for the Interval Template Library (ITL). You do not need to run this script,
+rem if you have a working installation of the boost libraries.
+
+@echo off
+if "%1"=="h" goto help
+if "%1"=="-h" goto help
+if "%1"=="help" goto help
+if "%1"=="-help" goto help
+if "%1"=="--help" goto help
+
+if "%1"=="" set TOOL_SET=msvc
+if not "%1"=="" set TOOL_SET=%1
+
+bjam toolset=%TOOL_SET% --with-date_time --build-type=complete stage
+bjam toolset=%TOOL_SET% --with-test --build-type=complete stage
+goto end
+
+:help
+echo Usage: install_libs [toolset or -h --help]
+echo Argument: -h --help : Show usage
+echo toolset : The compiler 'toolset' will be used with bjam.
+echo If the first argument is omitted 'msvc' is used as toolset.
+echo Installs boost::date_time and boost::test so all examples and tests can be run
+echo for the Interval Template Library (ITL). You do not need to run this script,
+echo if you have a working installation of the boost libraries.
+
+:end
+

Added: sandbox/icl/install_libs.sh
==============================================================================
--- (empty file)
+++ sandbox/icl/install_libs.sh 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Installs boost::date_time and boost::test so all examples and tests can be run
+# for the Interval Template Library (ITL). You do not need to run this script,
+# if you have a working installation of the boost libraries.
+
+for option
+do
+ case $option in
+ -help | --help | -h)
+ want_help=yes ;;
+ esac
+done
+
+if test "x$want_help" = xyes; then
+ echo "Usage: install_libs [toolset or -h --help]";
+ echo "Argument: -h --help : Show usage" ;
+ echo " toolset : The compiler 'toolset' will be used with bjam.";
+ echo " If the first argument is omitted 'gcc' is used as toolset.";
+ echo "Installs boost::date_time and boost::test so all examples and tests can be run";
+ echo "for the Interval Template Library (ITL). You do not need to run this script, ";
+ echo "if you have a working installation of the boost libraries.";
+else
+ TOOLSET=$1;
+ if test "x$TOOLSET" = x; then
+ TOOLSET="gcc";
+ fi
+ bjam toolset=$TOOLSET --with-date_time --build-type=complete stage
+ bjam toolset=$TOOLSET --with-test --build-type=complete stage
+fi
+
+

Added: sandbox/icl/libs/icl/build/cygwin/makefile
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/build/cygwin/makefile 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,282 @@
+#------------------------------------------------------------------------------
+# makefile for the inteval template library
+#------------------------------------------------------------------------------
+
+#--- Platformdependent variables ----------------------------------------------
+#--- cygwin
+EXE_TAG = .exe
+#--- unix
+#EXE_TAG =
+
+
+#------------------------------------------------------------------------------
+# Locations
+#------------------------------------------------------------------------------
+
+#--- location of this makefile ------------------------------------------------
+MAKE_PATH = .
+#--- location of the interval template library rootpath -----------------------
+ITL_ROOT_PATH = ../../../..
+#--- root directory of the interval template library --------------------------
+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 = $(ITL_ROOT_PATH)
+
+#--- binaries -----------------------------------------------------------------
+BIN_PATH = $(ITL_ROOT_PATH)/bin
+OBJ_PATH = $(BIN_PATH)/obj
+
+#--- include pathes -----------------------------------------------------------
+ITL_INCL = $(addprefix -I,$(ITL_SRC_PATH))
+BOOST_INCL = $(addprefix -I,$(BOOST_PATH))
+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/c++/4.3.0
+
+#INCLUDE = $(CONCEPTGCC_INCL) $(ITL_INCL) $(BOOST_INCL)
+INCLUDE = $(STD_INCL) $(ITL_INCL) $(BOOST_INCL)
+
+#--- libraries ----------------------------------------------------------------
+#LOAD_LIBS = -L$(CMP_PATH)/lib
+LOAD_LIBS = -L/usr/lib
+LOAD_LIBS = -L$(ITL_ROOT_PATH)/bin.v2/libs/date_time/build/gcc-3.4.4/release/link-static/threading-multi
+
+#--- loadflags ----------------------------------------------------------------
+LOAD_FLAGS = $(LOAD_LIBS) -lstdc++
+LOAD_FLAGS4BOOST = $(LOAD_FLAGS) -lboost_date_time
+
+#--- compileflags ---------------------------------------------------
+#COMPILE_FLAGS = -O2 -DUSE_CONCEPTS
+#COMPILE_FLAGS = -O2 -std=gnu++0x
+COMPILE_FLAGS = -O2
+
+#--- compiler -----------------------------------------------------------------
+#--- location of the compiler -------------------------------------------------
+#CMP_PATH = /opt/conceptgcc-boostcon
+#COMPILE = $(CMP_PATH)/bin/gcc
+COMPILE = gcc
+#COMPILE = /opt/conceptgcc-4.3.0-alpha-7/bin/gcc
+#COMPILE = i686-pc-cygwin-g++-4.exe
+
+
+all:
+ make examples
+ make boost_examples
+ make tests
+
+# The concept_gcc compiler does not yet digest my loki::typelist based tuple type
+# tag 'all_concept' covers the parts that can be compiled
+all_concept:
+ make examples
+ make itvset_shell
+ make splititvmap_shell
+# make auto_itv_test
+
+examples:
+ make party
+ make interval
+ make interval_container
+ make overlap_counter
+ make history
+ make amount_cube
+
+boost_examples:
+ make boost_party
+ make user_groups
+ make month_and_week_grid
+ make man_power
+
+all_examples:
+ examples
+ boost_examples
+
+tests:
+ make itvset_shell
+ make splititvmap_shell
+ make auto_itv_test
+
+#--- projects -----------------------------------------------------------------
+#--- group examples -----------------------------------------------------------
+
+#--- project party ---------------------------------------------------------
+EXAMPLE_DIR = example
+party_PATH = $(ITL_EXAMPLE_PATH)/party_
+party_MAIN = $(party_PATH)/party.cpp
+party_SOURCES = $(party_MAIN)
+party_TARGET = $(BIN_PATH)/party$(EXE_TAG)
+
+party:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(party_SOURCES) $(LOAD_FLAGS) -o $(party_TARGET)
+
+#--- project interval ---------------------------------------------------------
+interval_PATH = $(ITL_EXAMPLE_PATH)/interval_
+interval_MAIN = $(interval_PATH)/interval.cpp
+interval_SOURCES = $(interval_MAIN)
+interval_TARGET = $(BIN_PATH)/interval$(EXE_TAG)
+
+interval:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(interval_SOURCES) $(LOAD_FLAGS) -o $(interval_TARGET)
+
+#--- project interval_container --------------------------------------------------
+interval_container_PATH = $(ITL_EXAMPLE_PATH)/interval_container_
+interval_container_MAIN = $(interval_container_PATH)/interval_container.cpp
+interval_container_SOURCES = $(interval_container_MAIN)
+interval_container_TARGET = $(BIN_PATH)/interval_container$(EXE_TAG)
+
+interval_container:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(interval_container_SOURCES) $(LOAD_FLAGS) -o $(interval_container_TARGET)
+
+#--- project overlap_counter ---------------------------------------------------
+overlap_counter_PATH = $(ITL_EXAMPLE_PATH)/overlap_counter_
+overlap_counter_MAIN = $(overlap_counter_PATH)/overlap_counter.cpp
+overlap_counter_SOURCES = $(overlap_counter_MAIN)
+overlap_counter_TARGET = $(BIN_PATH)/overlap_counter$(EXE_TAG)
+
+overlap_counter:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(overlap_counter_SOURCES) $(LOAD_FLAGS) -o $(overlap_counter_TARGET)
+
+#--- project 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)
+
+history:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(history_SOURCES) $(LOAD_FLAGS) -o $(history_TARGET)
+
+#--- project 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)
+
+amount_cube:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(amount_cube_SOURCES) $(LOAD_FLAGS) -o $(amount_cube_TARGET)
+
+#--- project boost_party --------------------------------------------------
+boost_party_PATH = $(ITL_EXAMPLE_PATH)/boost_party_
+boost_party_MAIN = $(boost_party_PATH)/boost_party.cpp
+boost_party_SOURCES = $(boost_party_MAIN)
+boost_party_TARGET = $(BIN_PATH)/boost_party$(EXE_TAG)
+
+boost_party:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(boost_party_SOURCES) $(LOAD_FLAGS4BOOST) -o $(boost_party_TARGET)
+
+#--- project user_groups --------------------------------------------------
+user_groups_PATH = $(ITL_EXAMPLE_PATH)/user_groups_
+user_groups_MAIN = $(user_groups_PATH)/user_groups.cpp
+user_groups_SOURCES = $(user_groups_MAIN)
+user_groups_TARGET = $(BIN_PATH)/user_groups$(EXE_TAG)
+
+user_groups:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(user_groups_SOURCES) $(LOAD_FLAGS4BOOST) -o $(user_groups_TARGET)
+
+#--- project month_and_week_grid --------------------------------------------------
+month_and_week_grid_PATH = $(ITL_EXAMPLE_PATH)/month_and_week_grid_
+month_and_week_grid_MAIN = $(month_and_week_grid_PATH)/month_and_week_grid.cpp
+month_and_week_grid_SOURCES = $(month_and_week_grid_MAIN)
+month_and_week_grid_TARGET = $(BIN_PATH)/month_and_week_grid$(EXE_TAG)
+
+month_and_week_grid:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(month_and_week_grid_SOURCES) $(LOAD_FLAGS4BOOST) -o $(month_and_week_grid_TARGET)
+
+#--- project man_power --------------------------------------------------
+man_power_PATH = $(ITL_EXAMPLE_PATH)/man_power_
+man_power_MAIN = $(man_power_PATH)/man_power.cpp
+man_power_SOURCES = $(man_power_MAIN)
+man_power_TARGET = $(BIN_PATH)/man_power$(EXE_TAG)
+
+man_power:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(man_power_SOURCES) $(LOAD_FLAGS4BOOST) -o $(man_power_TARGET)
+
+
+#--- project 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)
+
+itvset_shell:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(itvset_shell_SOURCES) $(LOAD_FLAGS) -o $(itvset_shell_TARGET)
+
+#--- project 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)
+
+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_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)
+
+auto_itv_test:
+ $(COMPILE) $(COMPILE_FLAGS) $(INCLUDE) $(auto_itv_test_SOURCES) $(LOAD_FLAGS) -o $(auto_itv_test_TARGET)
+
+
+#--- group devels --------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+show_temps:
+ find $(ITL_LIBS_PATH) -name \*.pdb; \
+ find $(ITL_LIBS_PATH) -name \*.exe; \
+ find $(ITL_LIBS_PATH) -name \*.obj; \
+ find $(ITL_LIBS_PATH) -name \*.pdb; \
+ find $(ITL_LIBS_PATH) -name \*.idb; \
+ find $(ITL_LIBS_PATH) -name \*.ilk; \
+ find $(ITL_LIBS_PATH) -name \*.dep; \
+ find $(ITL_LIBS_PATH) -name \*.manifest*; \
+ find $(ITL_LIBS_PATH) -name BuildLog.htm; \
+ find $(ITL_LIBS_PATH)/doc/html -name *; \
+ find $(ITL_LIBS_PATH) -name \*.ncb; \
+ find $(ITL_LIBS_PATH) -name \*.suo; \
+ find $(ITL_LIBS_PATH) -name \*.user; \
+ find $(ITL_LIBS_PATH) -name stdafx.h; \
+
+win_clean:
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.exe; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.obj; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.pdb; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.idb; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.ilk; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.dep; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.manifest; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin \*.manifest.*; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/bin BuildLog.htm; \
+ ../script/rm_temps $(ITL_LIBS_PATH) \*.ncb; \
+ ../script/rm_temps $(ITL_LIBS_PATH) \*.suo; \
+ ../script/rm_temps $(ITL_LIBS_PATH) \*.user;
+
+bin_clean:
+ rm $(ITL_LIBS_PATH)/bin/* ;
+
+dox_clean:
+ ../script/rm_temps $(ITL_LIBS_PATH)/doc/html \*.html; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/doc/html \*.png; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/doc/html \*.css; \
+ ../script/rm_temps $(ITL_LIBS_PATH)/doc/html \*.gif; \
+
+clean:
+ make win_clean
+ make dox_clean
+
+svn_clean:
+ ../script/rm_svn $(ITL_ROOT_PATH)
+
+
+
\ No newline at end of file

Added: sandbox/icl/libs/icl/build/script/rm_svn.sh
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/build/script/rm_svn.sh 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "recursively removing .svn folders from $1"
+rm -rf `find $1 -type d -name .svn`

Added: sandbox/icl/libs/icl/build/script/rm_temps.sh
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/build/script/rm_temps.sh 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo "removing $2 from $1"
+rm -rf `find $1 -name $2` ;
\ No newline at end of file

Added: sandbox/icl/libs/icl/build/win32/vc9_all.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/build/win32/vc9_all.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,458 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval", "..\..\example\interval_\vc9_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval_container", "..\..\example\interval_container_\vc9_interval_container.vcproj", "{278324CE-9EC1-4D16-B637-E91A07F9DD81}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_party", "..\..\example\party_\vc9_party.vcproj", "{6BE62DDE-21B9-4333-BF11-AA054DD43759}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_overlap_counter", "..\..\example\overlap_counter_\vc9_overlap_counter.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boost_party", "..\..\example\boost_party_\vc9_boost_party.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6613F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_man_power", "..\..\example\man_power_\vc9_man_power.vcproj", "{8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_user_groups", "..\..\example\user_groups_\vc9_user_groups.vcproj", "{900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_auto_itv_test", "..\..\..\itl_xt\test\auto_itv_test_\vc9_auto_itv_test.vcproj", "{EF64A2C7-DE78-46C2-953F-C4685A5D2A97}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_itvset_shell", "..\..\example\itvset_shell_\vc9_itvset_shell.vcproj", "{FC32CF3E-293A-4576-A5C2-9373AECAF5BB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_splititvmap_shell", "..\..\example\splititvmap_shell_\vc9_splititvmap_shell.vcproj", "{639F6AD9-CD50-40BF-92B9-CC9DD069D65A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_history", "..\..\..\itl_xt\example\history_\vc9_history.vcproj", "{DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_amount_cube", "..\..\..\itl_xt\example\amount_cube_\vc9_amount_cube.vcproj", "{5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_interval", "..\..\test\test_itl_interval_\vc9_test_itl_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set", "..\..\test\test_interval_set_\vc9_test_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_separate_interval_set", "..\..\test\test_separate_interval_set_\vc9_test_separate_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_set", "..\..\test\test_split_interval_set_\vc9_test_split_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set_mixed", "..\..\test\test_interval_set_mixed_\vc9_test_interval_set_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map", "..\..\test\test_interval_map_\vc9_test_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_mixed", "..\..\test\test_interval_map_mixed_\vc9_test_interval_map_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_month_and_week_grid", "..\..\example\month_and_week_grid_\vc9_month_and_week_grid.vcproj", "{360BCFA9-9EB6-4D22-8469-CDC290478F78}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_meta_functors", "..\..\..\itl_xt\test\meta_functors_\vc9_meta_functors.vcproj", "{EF64A2C7-DE78-46C2-953F-C4685A5D2A98}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_single", "..\..\..\validate\example\labat_single_\vc9_labat_single.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_casual", "..\..\test\test_casual_\vc9_test_casual.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_unsigned_quantifier", "..\..\..\validate\example\labat_unsigned_quantifier_\vc9_labat_unsigned_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4720}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_signed_quantifier", "..\..\..\validate\example\labat_signed_quantifier_\vc9_labat_signed_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4721}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_collector", "..\..\..\validate\example\labat_collector_\vc9_labat_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_set", "..\..\..\validate\example\labat_itl_set_\vc9_labat_itl_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4723}"
+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_set_interval_set", "..\..\test\test_set_interval_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
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_map", "..\..\test\test_itl_map_\vc9_test_itl_map.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set_infix", "..\..\test\test_interval_set_infix_\vc9_test_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D1623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_separate_interval_set_infix", "..\..\test\test_separate_interval_set_infix_\vc9_test_separate_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D2623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_set_infix", "..\..\test\test_split_interval_set_infix_\vc9_test_split_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D3623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_partial_interval_quantifier", "..\..\test\test_partial_interval_quantifier_\vc9_test_partial_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_total_interval_quantifier", "..\..\test\test_total_interval_quantifier_\vc9_test_total_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_map", "..\..\test\test_split_interval_map_\vc9_test_split_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_tallest_guests", "..\..\example\partys_tallest_guests_\vc9_partys_tallest_guests.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6623F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_height_average", "..\..\example\partys_height_average_\vc9_partys_height_average.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6633F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_infix", "..\..\test\test_interval_map_infix_\vc9_test_interval_map_infix.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_map_infix", "..\..\test\test_split_interval_map_infix_\vc9_test_split_interval_map_infix.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_infix_mixed", "..\..\test\test_interval_map_infix_mixed_\vc9_test_interval_map_infix_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_mixed2", "..\..\test\test_interval_map_mixed2_\vc9_test_interval_map_mixed2.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map", "..\..\test\fastest_interval_map_\vc9_fastest_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_infix", "..\..\test\fastest_interval_map_infix_\vc9_fastest_interval_map_infix.vcproj", "{0FBD7F60-6470-41BB-8F8C-F47E9765C011}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_infix_mixed", "..\..\test\fastest_interval_map_infix_mixed_\vc9_fastest_interval_map_infix_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_mixed2", "..\..\test\fastest_interval_map_mixed2_\vc9_fastest_interval_map_mixed2.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_mixed", "..\..\test\fastest_interval_map_mixed_\vc9_fastest_interval_map_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set", "..\..\test\fastest_interval_set_\vc9_fastest_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set_infix", "..\..\test\fastest_interval_set_infix_\vc9_fastest_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D1623E906E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set_mixed", "..\..\test\fastest_interval_set_mixed_\vc9_fastest_interval_set_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_itl_interval", "..\..\test\fastest_itl_interval_\vc9_fastest_itl_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_itl_map", "..\..\test\fastest_itl_map_\vc9_fastest_itl_map.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_partial_interval_quantifier", "..\..\test\fastest_partial_interval_quantifier_\vc9_fastest_partial_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_separate_interval_set", "..\..\test\fastest_separate_interval_set_\vc9_fastest_separate_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_separate_interval_set_infix", "..\..\test\fastest_separate_interval_set_infix_\vc9_fastest_separate_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D2623E911E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_set_interval_set", "..\..\test\fastest_set_interval_set_\vc9_fastest_set_interval_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_set_itl_set", "..\..\test\fastest_set_itl_set_\vc9_fastest_set_itl_set.vcproj", "{33577D13-D562-4E3F-89F2-A8885151D13F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_map", "..\..\test\fastest_split_interval_map_\vc9_fastest_split_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_map_infix", "..\..\test\fastest_split_interval_map_infix_\vc9_fastest_split_interval_map_infix.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_set", "..\..\test\fastest_split_interval_set_\vc9_fastest_split_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_set_infix", "..\..\test\fastest_split_interval_set_infix_\vc9_fastest_split_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D3623E916E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_total_interval_quantifier", "..\..\test\fastest_total_interval_quantifier_\vc9_fastest_total_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_combinable", "..\..\test\test_combinable_\vc9_test_combinable.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_map_copy_conformity", "..\..\..\validate\example\labat_map_copy_conformity_\vc9_labat_map_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_bit_collector", "..\..\..\validate\example\labat_bit_collector_\vc9_labat_bit_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_set_copy_conformity", "..\..\..\validate\example\labat_set_copy_conformity_\vc9_labat_set_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F473F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_relations", "..\..\..\validate\example\labat_val_relations_\vc9_labat_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_set_order", "..\..\..\validate\example\labat_set_order_\vc9_labat_set_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4728}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_map_order", "..\..\..\validate\example\labat_map_order_\vc9_labat_map_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4727}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_copy", "..\..\example\std_copy_\vc9_std_copy.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_transform", "..\..\example\std_transform_\vc9_std_transform.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itv_bitset", "..\..\..\validate\example\labat_itv_bitset_\vc9_labat_itv_bitset.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_continuous_interval", "..\..\test\test_continuous_interval_\vc9_test_continuous_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2B9F8C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.Build.0 = Release|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Debug|Win32.ActiveCfg = Debug|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Debug|Win32.Build.0 = Debug|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Release|Win32.ActiveCfg = Release|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Release|Win32.Build.0 = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Debug|Win32.Build.0 = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Release|Win32.ActiveCfg = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Release|Win32.Build.0 = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Release|Win32.Build.0 = Release|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Debug|Win32.Build.0 = Debug|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Release|Win32.ActiveCfg = Release|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Release|Win32.Build.0 = Release|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Debug|Win32.Build.0 = Debug|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Release|Win32.ActiveCfg = Release|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Release|Win32.Build.0 = Release|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A97}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A97}.Debug|Win32.Build.0 = Debug|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A97}.Release|Win32.ActiveCfg = Release|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A97}.Release|Win32.Build.0 = Release|Win32
+ {FC32CF3E-293A-4576-A5C2-9373AECAF5BB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FC32CF3E-293A-4576-A5C2-9373AECAF5BB}.Debug|Win32.Build.0 = Debug|Win32
+ {FC32CF3E-293A-4576-A5C2-9373AECAF5BB}.Release|Win32.ActiveCfg = Release|Win32
+ {FC32CF3E-293A-4576-A5C2-9373AECAF5BB}.Release|Win32.Build.0 = Release|Win32
+ {639F6AD9-CD50-40BF-92B9-CC9DD069D65A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {639F6AD9-CD50-40BF-92B9-CC9DD069D65A}.Debug|Win32.Build.0 = Debug|Win32
+ {639F6AD9-CD50-40BF-92B9-CC9DD069D65A}.Release|Win32.ActiveCfg = Release|Win32
+ {639F6AD9-CD50-40BF-92B9-CC9DD069D65A}.Release|Win32.Build.0 = Release|Win32
+ {DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}.Debug|Win32.Build.0 = Debug|Win32
+ {DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}.Release|Win32.ActiveCfg = Release|Win32
+ {DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}.Release|Win32.Build.0 = Release|Win32
+ {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Debug|Win32.Build.0 = Debug|Win32
+ {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Release|Win32.ActiveCfg = Release|Win32
+ {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Debug|Win32.ActiveCfg = Debug|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Debug|Win32.Build.0 = Debug|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Release|Win32.ActiveCfg = Release|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Release|Win32.Build.0 = Release|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Debug|Win32.Build.0 = Debug|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Release|Win32.ActiveCfg = Release|Win32
+ {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.Build.0 = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {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-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
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Release|Win32.Build.0 = Release|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Debug|Win32.Build.0 = Debug|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Release|Win32.ActiveCfg = Release|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Release|Win32.Build.0 = Release|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Debug|Win32.Build.0 = Debug|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Release|Win32.ActiveCfg = Release|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E916E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E916E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E916E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E916E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Release|Win32.Build.0 = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Release|Win32.Build.0 = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2B9F8C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2B9F8C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2B9F8C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2B9F8C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/icl/doxy_doc/Doxyfile
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/doxy_doc/Doxyfile 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,264 @@
+# Doxyfile 1.5.5
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "Interval Container Library"
+PROJECT_NUMBER = "icl 4.0.0"
+OUTPUT_DIRECTORY = ./doxygen_output
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = D:/cygwin/home/jofa/dev/boost_sandbox/icl
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 4
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+BUILTIN_STL_SUPPORT = YES
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+TYPEDEF_HIDES_STRUCT = NO
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = NO
+SORT_BRIEF_DOCS = YES
+SORT_GROUP_NAMES = YES
+SORT_BY_SCOPE_NAME = YES
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = NO
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = . \
+ ../../../boost/icl/ \
+ ../../../boost/icl_xt/interval_bitset.hpp \
+ ../../../boost/icl_xt/product_history.hpp \
+ ../../../boost/icl_xt/tuple_computer.hpp \
+ ../../../boost/validate/laws/law.hpp \
+ ../../../boost/validate/validater/law_validater.hpp \
+ ../../../libs/icl/example/boost_party_ \
+ ../../../libs/icl/example/interval_ \
+ ../../../libs/icl/example/interval_ \
+ ../../../libs/icl/example/interval_container_ \
+ ../../../libs/icl/example/man_power_ \
+ ../../../libs/icl/example/month_and_week_grid_ \
+ ../../../libs/icl/example/overlap_counter_ \
+ ../../../libs/icl/example/party_ \
+ ../../../libs/icl/example/partys_height_average_ \
+ ../../../libs/icl/example/partys_tallest_guests_ \
+ ../../../libs/icl/example/std_copy_ \
+ ../../../libs/icl/example/std_transform_ \
+ ../../../libs/icl/example/user_groups_ \
+ ../../../libs/icl/example/large_bitset_ \
+ ../../../libs/icl_xt/example/history_ \
+ ../../../libs/icl_xt/example/amount_cube_ \
+ ../../../libs/validate/example/de_morgan_ \
+ ./doxygen_input/pages
+
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.hpp \
+ *.cpp
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH = . \
+ ../../icl/example \
+ ../../icl_xt/example \
+ ../../validate/example
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = YES
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = NO
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = NO
+INCLUDED_BY_GRAPH = NO
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = NO
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
+
+

Added: sandbox/icl/libs/icl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,163 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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 BOOST_ICL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+#define BOOST_ICL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+
+/**
+\mainpage Boost Interval Container Library
+
+\section header_sec Boost Interval Container Library
+
+Author: Joachim Faulhaber\n
+Copyright (c) 2007-2009: Joachim Faulhaber\n
+Copyright (c) 1999-2006: Cortex Software GmbH, Berlin\n
+
+Distributed under the Boost Software License, Version 1.0.\n
+(See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+\n \n
+
+\section overview_sec Overview
+
+The <b>Boost Interval Container Library (ITL+)</b> is a collection of
+generic c++ class templates for computations on intervals,
+interval containers, large bitsets and generalized crosstables or cubes.
+
+The complete library constists of three parts.
+
+<ul>
+<li><b>Core library (itl):</b> Interval containers.
+
+The <b>core library (ITL)</b> is currently submitted for review at the
+Boost c++ Libraries Collection
+as Boost.IntervalContainer Library.
+A <b>detailed boost book documentation</b> for Boost.IntervalContainers is
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/index.html">
+online available here</a>.
+We recommend to refer to this documentation for all informations related
+to interval containers. The boost book documentation also ships with
+this release and can be found at "<boost_root>/libs/icl/doc/html/index.html".
+
+<li><b>Extended library (itl_xt):</b>
+
+The extended part contains class templates interval_bitset, product_history, and tupel_computer
+(cubes). Those parts are not or not yet intended to be proposed for boost.
+
+<li><b>A Law Based Test Automaton (validate):</b>
+
+The Law Based Test Automaton (also refered to as \b \i LaBatea) is a tool for an
+automated teststing of code on the basis of laws or axioms.
+\b LaBatea has been used to validate the core library (itl)
+for a number of laws.
+
+</ul>
+
+
+<b>This doxygen generated documentation</b> is provided for the
+additional library parts \b itl_xt and \b validate
+that are not yet covered by a proper boost book documentation.
+\n \n
+
+\section news_sec News
+
+<ul>
+
+<li>Interval_bitset.
+
+The lastest addition to the library are interval_bitsets.
+Interval_bitsets use interval compression and bitset compression
+to achieve a very efficient and compact representation of large
+bitsets. The idea and implementation of interval_bitsets is
+explained in the
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/projects.html#boost_itl.projects.large_bitset">
+project section</a>
+of the boost book documentation.
+
+<li>icl::add_iterator, and icl::insert_iterator
+
+To copy or tranform data from std::containers of intervals or segments into
+interval containers you can use an icl::insert_iterator or an icl::add_iterator.
+See examples
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/examples/std_copy.html">
+std_copy</a> and
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/examples/std_transform.html">
+std_transform.</a>
+
+<li>Element iteration.
+
+The implementation of all interval containers including interval_bitsets
+now provides iteration on the level of elements. This makes interval
+containers a model of SortedAssociativeContainers.
+</ul>
+\n \n
+
+\section example_sec Examples
+
+We provide a collection of examples that demonstrate the purpose and basic
+characteristics of the class templates offered by the library. To get an instant
+impression you may browse these examples first.
+
+\subsection examples_itl_subsec Examples on Interval Containers (core library itl)
+
+<ul>
+<li>A <b>collection of examples</b> on interval containers is
+included in the
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/examples.html">
+boost book documentation</a>.
+</ul>
+\n \n
+
+
+\subsection examples_itl_xt_subsec Examples for the extended library (itl_xt)
+
+<ul>
+<li> <b>Interval Bitset</b>
+
+A minimal implementation of \ref interval_bitset together with
+sample applications is included in the boost book documentation in the
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/projects.html#boost_itl.projects.large_bitset">
+project section</a>. The full implementation of \ref interval_bitset is
+not yet part of the core library (itl). It's in the extended part (itl_xt)
+but it's integration into the core is intended.
+
+
+<li> \b History
+
+History is a more sophisticated application of an interval_map to decompose
+data in time. Sample history.cpp shows how we can monitor a set of attributes in a history.
+\n \n
+
+
+<li> <b>Amount Cube</b>
+
+Cubes or tuple computers allow to perform computations on values associated
+to tuples. A ITL tuple computer works similar to pivot tables (in spreadsheet programs)
+olap cubes (online analytic processing) or crosstables (in statistical programs).
+Sample amount_cube.cpp presents an application where values are \e 'amounts',
+which is the simplest instance.
+</ul>
+\n \n
+
+\subsection examples_validate_subsec Examples on law based Testing (validate)
+
+<ul>
+<li><b>De Morgan's law on interval sets</b>
+
+This example de_morgan.cpp shows how to test a single law on given type. It shows
+how <b>LaBatea</b> reports successful validation and what happens, if
+law validations are found. The law can be modified to a valid form in
+this example by choosing a different equality relation for one of the law's
+templates parameters.
+
+</ul>
+
+*/
+#endif // BOOST_ICL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+
+

Added: sandbox/icl/libs/icl/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,159 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+# Examples that do not use boost_date_time
+exe interval
+ :
+ interval_/interval.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe interval_container
+ :
+ interval_container_/interval_container.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe overlap_counter
+ :
+ overlap_counter_/overlap_counter.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe party
+ :
+ party_/party.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe std_copy
+ :
+ std_copy_/std_copy.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe std_transform
+ :
+ std_transform_/std_transform.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe custom_interval
+ :
+ custom_interval_/custom_interval.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe dynamic_interval
+ :
+ dynamic_interval_/dynamic_interval.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe static_interval
+ :
+ static_interval_/static_interval.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# Examples using boost_date_time
+exe boost_party
+ :
+ boost_party_/boost_party.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe partys_height_average
+ :
+ partys_height_average_/partys_height_average.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe partys_tallest_guests
+ :
+ partys_tallest_guests_/partys_tallest_guests.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe man_power
+ :
+ man_power_/man_power.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe month_and_week_grid
+ :
+ month_and_week_grid_/month_and_week_grid.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe user_groups
+ :
+ user_groups_/user_groups.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# Projects
+exe large_bitset
+ :
+ large_bitset_/large_bitset.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+
+
+exe itvset_shell
+ :
+ itvset_shell_/itvset_shell.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+exe splititvmap_shell
+ :
+ splititvmap_shell_/splititvmap_shell.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+

Added: sandbox/icl/libs/icl/example/boost_party_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/boost_party_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,12 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+exe boost_party
+ :
+ boost_party.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/icl/example/boost_party_/boost_party.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/boost_party_/boost_party.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,143 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/** Example boost_party.cpp \file boost_party.cpp
+ \brief Generates an attendance history of a party by inserting into an interval_map.
+ Demonstrating <i>aggregate on overlap</i>.
+
+ boost_party.cpp demonstrates the possibilities of an interval map
+ (interval_map or split_interval_map). Boost::posix_time::ptime is used as time
+ parameter. An interval_map maps intervals to a given content. In this case the
+ content is a set of party guests represented by their name strings.
+
+ As time goes by, groups of people join the party and leave later in the evening.
+ So we add a time interval and a name set to the interval_map for the attendance
+ of each group of people, that come together and leave together.
+
+ On every overlap of intervals, the corresponding name sets are accumulated. At
+ the points of overlap the intervals are split. The accumulation of content on
+ overlap of intervals is done via an operator += that has to be implemented
+ for the content parameter of the interval_map.
+
+ Finally the interval_map contains the history of attendance and all points in
+ time, where the group of party guests changed.
+
+ boost_party.cpp demonstrates a principle that we call
+ <b><em>aggregate on overlap (aggrovering;)</em></b>:
+ On insertion a value associated to the interval is aggregated (added) to those
+ values in the interval_map that overlap with the inserted value.
+
+ There are two behavioral aspects to <b>aggrovering</b>: a <em>decompositional
+ behavior</em> and a <em>accumulative behavior</em>.
+
+ The <em>decompositional behavior</em> splits up intervals on the time dimension of the
+ interval_map so that the intervals change whenever associated values
+ change.
+
+ The <em>accumulative behavior</em> accumulates associated values on every overlap of
+ an insertion for the associated values.
+
+ \include boost_party_/boost_party.cpp
+*/
+//[example_boost_party
+#include <iostream>
+// The next line includes <boost/date_time/posix_time/posix_time.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/ptime.hpp>
+
+// Prior to other includes for interval containers we define ...
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// ... so all interval containers will use right_open_intervals that
+// have static interval borders.
+
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost::posix_time;
+using namespace boost::icl;
+
+// Type set<string> collects the names of party guests. Since std::set is
+// a model of the itl's set concept, the concept provides an operator +=
+// that performs a set union on overlap of intervals.
+typedef std::set<string> GuestSetT;
+
+void boost_party()
+{
+ GuestSetT mary_harry;
+ mary_harry.insert("Mary");
+ mary_harry.insert("Harry");
+
+ GuestSetT diana_susan;
+ diana_susan.insert("Diana");
+ diana_susan.insert("Susan");
+
+ GuestSetT peter;
+ peter.insert("Peter");
+
+ // A party is an interval map that maps time intervals to sets of guests
+ interval_map<ptime, GuestSetT> party;
+
+ party.add( // add and element
+ make_pair(
+ interval<ptime>::right_open(
+ time_from_string("2008-05-20 19:30"),
+ time_from_string("2008-05-20 23:00")),
+ mary_harry));
+
+ party += // element addition can also be done via operator +=
+ make_pair(
+ interval<ptime>::right_open(
+ time_from_string("2008-05-20 20:10"),
+ time_from_string("2008-05-21 00:00")),
+ diana_susan);
+
+ party +=
+ make_pair(
+ interval<ptime>::right_open(
+ time_from_string("2008-05-20 22:15"),
+ time_from_string("2008-05-21 00:30")),
+ peter);
+
+
+ interval_map<ptime, GuestSetT>::iterator it = party.begin();
+ cout << "----- History of party guests -------------------------\n";
+ while(it != party.end())
+ {
+ interval<ptime>::type when = it->first;
+ // Who is at the party within the time interval 'when' ?
+ GuestSetT who = (*it++).second;
+ cout << when << ": " << who << endl;
+ }
+
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample boost_party.cpp <<\n";
+ cout << "-------------------------------------------------------\n";
+ boost_party();
+ return 0;
+}
+
+// Program output:
+/*-----------------------------------------------------------------------------
+>>Interval Container Library: Sample boost_party.cpp <<
+-------------------------------------------------------
+----- History of party guests -------------------------
+[2008-May-20 19:30:00, 2008-May-20 20:10:00): Harry Mary
+[2008-May-20 20:10:00, 2008-May-20 22:15:00): Diana Harry Mary Susan
+[2008-May-20 22:15:00, 2008-May-20 23:00:00): Diana Harry Mary Peter Susan
+[2008-May-20 23:00:00, 2008-May-21 00:00:00): Diana Peter Susan
+[2008-May-21 00:00:00, 2008-May-21 00:30:00): Peter
+-----------------------------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/boost_party_/vc9_boost_party.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/boost_party_/vc9_boost_party.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_boost_party"
+ ProjectGUID="{0D1DB87E-E72A-4FE9-A067-1907CC6613F8}"
+ RootNamespace="Boost_party"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\boost_party.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/custom_interval_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/custom_interval_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,11 @@
+# (C) Copyright 2010: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+exe custom_interval
+ :
+ custom_interval.cpp
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/icl/example/custom_interval_/custom_interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/custom_interval_/custom_interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,103 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/** Example custom_interval.cpp \file custom_interval.cpp
+ \brief Shows how to use interval containers with own interval classes.
+
+ There may be instances, where we want to use interval container with our
+ own user defined interval classes. Boost interval containers can be adapted
+ to your interval class by partial template specialisation. Only a few lines
+ of code are needed to achieve this.
+
+ \include custom_interval_/custom_interval.cpp
+*/
+//[example_custom_interval
+#include <iostream>
+#include <boost/icl/interval_set.hpp>
+
+using namespace std;
+using namespace boost::icl;
+
+// Here is a typical class that may model intervals in your application.
+class MyInterval
+{
+public:
+ MyInterval(): _first(), _past(){}
+ MyInterval(int lo, int up): _first(lo), _past(up){}
+ int first()const{ return _first; }
+ int past ()const{ return _past; }
+private:
+ int _first, _past;
+};
+
+namespace boost{ namespace icl
+{
+// Class template interval_traits serves as adapter to register and customize your interval class
+template<>
+struct interval_traits< MyInterval > //1. Partially specialize interval_traits for
+{ // your class MyInterval
+ //2. Define associated types
+ typedef MyInterval interval_type; //2.1 MyInterval will be the interval_type
+ typedef int domain_type; //2.2 The elements of the domain are ints
+ typedef std::less<int> domain_compare; //2.3 This is the way our element shall be ordered.
+ //3. Next we define the essential functions
+ // of the specialisation
+ //3.1 Construction of intervals
+ static interval_type construct(const domain_type& lo, const domain_type& up)
+ { return interval_type(lo, up); }
+ //3.2 Selection of values
+ static domain_type lower(const interval_type& inter_val){ return inter_val.first(); };
+ static domain_type upper(const interval_type& inter_val){ return inter_val.past(); };
+};
+
+template<>
+struct interval_bound_type<MyInterval> //4. Finally we define the interval borders.
+{ // Choose between static_open (lo..up)
+ typedef interval_bound_type type; // static_left_open (lo..up]
+ BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open);//[lo..up)
+}; // and static_closed [lo..up]
+
+}} // namespace boost icl
+
+void custom_interval()
+{
+ // Now we can use class MyInterval with interval containers:
+ typedef interval_set<int, std::less, MyInterval> MyIntervalSet;
+ MyIntervalSet mySet;
+ mySet += MyInterval(1,9);
+ cout << mySet << endl;
+ mySet.subtract(3) -= 6;
+ cout << mySet << " subtracted 3 and 6\n";
+ mySet ^= MyInterval(2,8);
+ cout << mySet << " flipped between 2 and 7\n";
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample custom_interval.cpp <<\n";
+ cout << "-----------------------------------------------------------\n";
+ cout << "This program uses a user defined interval class:\n";
+ custom_interval();
+ return 0;
+}
+
+// Program output:
+/*-----------------------------------------------------------------------------
+>>Interval Container Library: Sample custom_interval.cpp <<
+-----------------------------------------------------------
+This program uses a user defined interval class:
+{[1, 9)}
+{[1, 3) [4, 6) [7, 9)} subtracted 3 and 6
+{[1,2) [3,4) [6,7) [8,9)} flipped between 2 and 7
+-----------------------------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_custom_interval"
+ ProjectGUID="{0D1DB87E-E72A-4FE9-A067-1907CC6614F8}"
+ RootNamespace="Custom_interval"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\custom_interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/dynamic_interval_/dynamic_interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/dynamic_interval_/dynamic_interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,140 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example dynamic_interval.cpp \file dynamic_interval.cpp
+ \brief Intervals with dynamic interval bounds that can be changed at runtime.
+
+ Intervals types with dynamic interval bounds can represent closed and
+ open interval borders. Interval borders are not static or fixed for
+ the type but may change due to computations in interval containers.
+ Dynamically bounded intervals are the library default for interval
+ parameters in interval containers.
+
+ \include dynamic_interval_/dynamic_interval.cpp
+*/
+//[example_dynamic_interval
+#include <iostream>
+#include <string>
+#include <math.h>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+// Dynamically bounded intervals 'discrete_interval' and 'continuous_interval'
+// are indirectly included via interval containers as library defaults.
+#include "../toytime.hpp"
+#include <boost/icl/rational.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample interval.cpp <<\n";
+ cout << "----------------------------------------------------\n";
+
+ // Dynamically bounded intervals are the library default for
+ // interval parameters in interval containers.
+ BOOST_STATIC_ASSERT((
+ is_same< interval_set<int>::interval_type
+ , discrete_interval<int> >::value
+ ));
+
+
+ BOOST_STATIC_ASSERT((
+ is_same< interval_set<float>::interval_type
+ , continuous_interval<float> >::value
+ ));
+
+ // As we can see the library default chooses the appropriate
+ // class template instance discrete_interval<T> or continuous_interval<T>
+ // dependent on the domain_type T. The library default for intervals
+ // is also available via the template 'interval':
+ BOOST_STATIC_ASSERT((
+ is_same< interval<int>::type
+ , discrete_interval<int> >::value
+ ));
+
+ BOOST_STATIC_ASSERT((
+ is_same< interval<float>::type
+ , continuous_interval<float> >::value
+ ));
+
+ // template interval also provides static functions for the four border types
+
+ interval<int>::type int_interval = interval<int>::closed(3, 7);
+ interval<double>::type sqrt_interval = interval<double>::right_open(1/sqrt(2.0), sqrt(2.0));
+ interval<string>::type city_interval = interval<string>::left_open("Barcelona", "Boston");
+ interval<Time>::type time_interval = interval<Time>::open(Time(monday,8,30), Time(monday,17,20));
+
+ cout << "----- Dynamically bounded intervals ----------------------------------------\n";
+ cout << " discrete_interval<int> : " << int_interval << endl;
+ cout << "continuous_interval<double>: " << sqrt_interval << " does "
+ << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT")
+ << " contain sqrt(2)" << endl;
+ cout << "continuous_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval,"Barcelona")?"":"NOT")
+ << " contain 'Barcelona'" << endl;
+ cout << "continuous_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval, "Berlin")?"":"NOT")
+ << " contain 'Berlin'" << endl;
+ cout << " discrete_interval<Time> : " << time_interval << "\n\n";
+
+ // Using dynamically bounded intervals allows to apply operations
+ // with intervals and also with elements on all interval containers
+ // including interval containers of continuous domain types:
+
+ interval<rational<int> >::type unit_interval
+ = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1));
+ interval_set<rational<int> > unit_set(unit_interval);
+ interval_set<rational<int> > ratio_set(unit_set);
+ ratio_set -= rational<int>(1,3); // Subtract 1/3 from the set
+
+ cout << "----- Manipulation of single values in continuous sets ---------------------\n";
+ cout << "1/3 subtracted from [0..1) : " << ratio_set << endl;
+ cout << "The set does " << string(contains(ratio_set, rational<int>(1,3))?"":"NOT")
+ << " contain '1/3'" << endl;
+ ratio_set ^= unit_set;
+ cout << "Flipping the holey set : " << ratio_set << endl;
+ cout << "yields the subtracted : 1/3\n\n";
+
+ // Of course we can use interval types that are different from the
+ // library default by explicit instantiation:
+ split_interval_set<int, std::less, closed_interval<Time> > intuitive_times;
+ // Interval set 'intuitive_times' uses statically bounded closed intervals
+ intuitive_times += closed_interval<Time>(Time(monday, 9,00), Time(monday, 10,59));
+ intuitive_times += closed_interval<Time>(Time(monday, 10,00), Time(monday, 11,59));
+ cout << "----- Here we are NOT using the library default for intervals --------------\n";
+ cout << intuitive_times << endl;
+
+ return 0;
+}
+
+// Program output:
+//>>Interval Container Library: Sample interval.cpp <<
+//----------------------------------------------------
+//----- Dynamically bounded intervals ----------------------------------------
+// discrete_interval<int> : [3,7]
+//continuous_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2)
+//continuous_interval<string>: (Barcelona,Boston] does NOT contain 'Barcelona'
+//continuous_interval<string>: (Barcelona,Boston] does contain 'Berlin'
+// discrete_interval<Time> : (mon:08:30,mon:17:20)
+//
+//----- Manipulation of single values in continuous sets ---------------------
+//1/3 subtracted from [0..1) : {[0/1,1/3)(1/3,1/1)}
+//The set does NOT contain '1/3'
+//Flipping the holey set : {[1/3,1/3]}
+//yields the subtracted : 1/3
+//
+//----- Here we are NOT using the library default for intervals --------------
+//{[mon:09:00,mon:09:59][mon:10:00,mon:10:59][mon:11:00,mon:11:59]}
+//]
+

Added: sandbox/icl/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_dynamic_interval"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}"
+ RootNamespace="Dynamic_interval"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\dynamic_interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\dynamic_interval.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/interval_/interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/interval_/interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,111 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example interval.cpp \file interval.cpp
+ \brief Intervals for integral and continuous instance types.
+ Closed and open interval borders.
+
+ Much of the library code deals with intervals which are implemented
+ by interval class templates. This program gives a very short samlpe of
+ different interval instances.
+
+ \include interval_/interval.cpp
+*/
+//[example_interval
+#include <iostream>
+#include <string>
+#include <math.h>
+
+// Dynamically bounded intervals
+#include <boost/icl/discrete_interval.hpp>
+#include <boost/icl/continuous_interval.hpp>
+
+// Statically bounded intervals
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/left_open_interval.hpp>
+#include <boost/icl/closed_interval.hpp>
+#include <boost/icl/open_interval.hpp>
+
+#include "../toytime.hpp"
+#include <boost/icl/rational.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample interval.cpp <<\n";
+ cout << "----------------------------------------------------\n";
+
+ // Class template discrete_interval can be used for discrete data types
+ // like integers, date and time and other types that have a least steppable
+ // unit.
+ discrete_interval<int> int_interval
+ = construct<discrete_interval<int> >(3, 7, interval_bounds::closed());
+
+ // Class template continuous_interval can be used for continuous data types
+ // like double, boost::rational or strings.
+ continuous_interval<double> sqrt_interval
+ = construct<continuous_interval<double> >(1/sqrt(2.0), sqrt(2.0));
+ //interval_bounds::right_open() is default
+ continuous_interval<string> city_interval
+ = construct<continuous_interval<string> >("Barcelona", "Boston", interval_bounds::left_open());
+
+ discrete_interval<Time> time_interval
+ = construct<discrete_interval<Time> >(Time(monday,8,30), Time(monday,17,20),
+ interval_bounds::open());
+
+ cout << "Dynamically bounded intervals:\n";
+ cout << " discrete_interval<int>: " << int_interval << endl;
+ cout << "continuous_interval<double>: " << sqrt_interval << " does "
+ << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT")
+ << " contain sqrt(2)" << endl;
+ cout << "continuous_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval,"Barcelona")?"":"NOT")
+ << " contain 'Barcelona'" << endl;
+ cout << "continuous_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval, "Berlin")?"":"NOT")
+ << " contain 'Berlin'" << endl;
+ cout << " discrete_interval<Time>: " << time_interval << "\n\n";
+
+ // There are statically bounded interval types with fixed interval borders
+ right_open_interval<string> fix_interval1; // You will probably use one kind of static intervals
+ // right_open_intervals are recommended.
+ closed_interval<unsigned int> fix_interval2; // ... static closed, left_open and open intervals
+ left_open_interval<float> fix_interval3; // are implemented for sake of completeness but
+ open_interval<short> fix_interval4; // are of minor practical importance.
+
+ right_open_interval<rational<int> > range1(rational<int>(0,1), rational<int>(2,3));
+ right_open_interval<rational<int> > range2(rational<int>(1,3), rational<int>(1,1));
+
+ // This middle third of the unit interval [0,1)
+ cout << "Statically bounded interval:\n";
+ cout << "right_open_interval<rational<int>>: " << (range1 & range2) << endl;
+
+ return 0;
+}
+
+// Program output:
+
+//>>Interval Container Library: Sample interval.cpp <<
+//----------------------------------------------------
+//Dynamically bounded intervals
+// discrete_interval<int>: [3,7]
+//continuous_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2)
+//continuous_interval<string>: (Barcelona,Boston] does NOT contain 'Barcelona'
+//continuous_interval<string>: (Barcelona,Boston] does contain 'Berlin'
+// discrete_interval<Time>: (mon:08:30,mon:17:20)
+//
+//Statically bounded interval
+//right_open_interval<rational<int>>: [1/3,2/3)
+
+//]
+

Added: sandbox/icl/libs/icl/example/interval_/vc9_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/interval_/vc9_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_interval"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}"
+ RootNamespace="Interval"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/interval_container_/interval_container.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/interval_container_/interval_container.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,114 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example interval_container.cpp \file interval_container.cpp
+
+ \brief Demonstrates basic characteristics of interval container objects.
+
+ \include interval_container_/interval_container.cpp
+*/
+//[example_interval_container
+#include <iostream>
+
+// Prior to other includes for interval containers we define ...
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// ... so all interval containers will use right_open_intervals that
+// have static interval borders.
+
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include "../toytime.hpp"
+
+using namespace std;
+using namespace boost::icl;
+
+void interval_container_basics()
+{
+ interval<Time>::type night_and_day(Time(monday, 20,00), Time(tuesday, 20,00));
+ interval<Time>::type day_and_night(Time(tuesday, 7,00), Time(wednesday, 7,00));
+ interval<Time>::type next_morning(Time(wednesday, 7,00), Time(wednesday,10,00));
+ interval<Time>::type next_evening(Time(wednesday,18,00), Time(wednesday,21,00));
+
+ // An interval set of type interval_set joins intervals that that overlap or touch each other.
+ interval_set<Time> joinedTimes;
+ joinedTimes.insert(night_and_day);
+ joinedTimes.insert(day_and_night); //overlapping in 'day' [07:00, 20.00)
+ joinedTimes.insert(next_morning); //touching
+ joinedTimes.insert(next_evening); //disjoint
+
+ cout << "Joined times :" << joinedTimes << endl;
+
+ // A separate interval set of type separate_interval_set joins intervals that that
+ // overlap but it preserves interval borders that just touch each other. You may
+ // represent time grids like the months of a year as a split_interval_set.
+ separate_interval_set<Time> separateTimes;
+ separateTimes.insert(night_and_day);
+ separateTimes.insert(day_and_night); //overlapping in 'day' [07:00, 20.00)
+ separateTimes.insert(next_morning); //touching
+ separateTimes.insert(next_evening); //disjoint
+
+ cout << "Separate times:" << separateTimes << endl;
+
+ // A split interval set of type split_interval_set preserves all interval
+ // borders. On insertion of overlapping intervals the intervals in the
+ // set are split up at the interval borders of the inserted interval.
+ split_interval_set<Time> splitTimes;
+ splitTimes += night_and_day;
+ splitTimes += day_and_night; //overlapping in 'day' [07:00, 20:00)
+ splitTimes += next_morning; //touching
+ splitTimes += next_evening; //disjoint
+
+ cout << "Split times :\n" << splitTimes << endl;
+
+ // A split interval map splits up inserted intervals on overlap and aggregates the
+ // associated quantities via the operator +=
+ split_interval_map<Time, int> overlapCounter;
+ overlapCounter += make_pair(night_and_day,1);
+ overlapCounter += make_pair(day_and_night,1); //overlapping in 'day' [07:00, 20.00)
+ overlapCounter += make_pair(next_morning, 1); //touching
+ overlapCounter += make_pair(next_evening, 1); //disjoint
+
+ cout << "Split times overlap counted:\n" << overlapCounter << endl;
+
+ // An interval map joins touching intervals, if associated values are equal
+ interval_map<Time, int> joiningOverlapCounter;
+ joiningOverlapCounter = overlapCounter;
+ cout << "Times overlap counted:\n" << joiningOverlapCounter << endl;
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample interval_container.cpp <<\n";
+ cout << "--------------------------------------------------------------\n";
+ interval_container_basics();
+ return 0;
+}
+
+
+// Program output:
+/* ----------------------------------------------------------------------------
+>>Interval Container Library: Sample interval_container.cpp <<
+--------------------------------------------------------------
+Joined times :[mon:20:00,wed:10:00)[wed:18:00,wed:21:00)
+Separate times:[mon:20:00,wed:07:00)[wed:07:00,wed:10:00)[wed:18:00,wed:21:00)
+Split times :
+[mon:20:00,tue:07:00)[tue:07:00,tue:20:00)[tue:20:00,wed:07:00)
+[wed:07:00,wed:10:00)[wed:18:00,wed:21:00)
+Split times overlap counted:
+{([mon:20:00,tue:07:00)->1)([tue:07:00,tue:20:00)->2)([tue:20:00,wed:07:00)->1)
+([wed:07:00,wed:10:00)->1)([wed:18:00,wed:21:00)->1)}
+Times overlap counted:
+{([mon:20:00,tue:07:00)->1)([tue:07:00,tue:20:00)->2)([tue:20:00,wed:10:00)->1)
+([wed:18:00,wed:21:00)->1)}
+-----------------------------------------------------------------------------*/
+//]

Added: sandbox/icl/libs/icl/example/interval_container_/vc9_interval_container.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/interval_container_/vc9_interval_container.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_interval_container"
+ ProjectGUID="{278324CE-9EC1-4D16-B637-E91A07F9DD81}"
+ RootNamespace="interval_container"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\interval_container.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/itvset_shell_/itvset_shell.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/itvset_shell_/itvset_shell.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,132 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+itvset_shell.cpp provides a simple test shells for interval sets.
+The shell also gives you a good idea how interval container are working.
++-----------------------------------------------------------------------------*/
+#include <iostream>
+
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void instructions()
+{
+ cout << "+++++ Test shell for interval set +++++\n";
+ cout << "Type: q e or 0 to quit\n";
+ cout << "Type: + for insertions\n";
+ cout << "Type: - for subtraction\n";
+ cout << "Type: j to join contiguous intervals\n";
+ cout << "Type: s to compute total size\n";
+}
+
+void wrongInput()
+{
+ cout << "Wrong Input ------------------\n";
+ instructions();
+}
+
+
+template <class SetTV>
+void setTestShell()
+{
+ SetTV m1;
+
+ try {
+ char cmd = 'b';
+ typename SetTV::domain_type lwb = typename SetTV::domain_type();
+ typename SetTV::domain_type upb = typename SetTV::domain_type();
+
+ instructions();
+
+ for(;;)
+ {
+ cout << "> ";
+ cin >> cmd ;
+
+ switch(cmd)
+ {
+ case 'q':
+ case 'e':
+ case '0': cout << "good bye\n"; return;
+ case '+':
+ {
+ cout << "input: lwb upb >> ";
+ cin >> lwb >> upb;
+ typename SetTV::interval_type itv
+ = typename SetTV::interval_type(lwb,upb);
+ // SetTV::IntervalTD itv = rightOpenInterval(lwb,upb);
+ m1.insert(itv);
+
+ cout << "+" << itv << " =" << endl;
+ cout << "{" << m1 << "}" << endl;
+
+ }
+ break;
+ case '-':
+ {
+ cout << "input: lwb upb >> ";
+ cin >> lwb >> upb;
+ typename SetTV::interval_type itv
+ = typename SetTV::interval_type(lwb,upb);
+ // m1.subtract(itv);
+ SetTV tmp;
+ tmp.insert(itv);
+ m1 -= tmp;
+
+ cout << "-" << itv << " =" << endl;
+ cout << "{" << m1 << "}" << endl;
+
+ }
+ break;
+ case 'j':
+ {
+ icl::join(m1);
+ cout << "{" << m1 << "}" << endl;
+ }
+ break;
+ case 's':
+ {
+ cout << "size = " << m1.size() << endl;
+ }
+ break;
+
+ default: wrongInput();
+ }
+ }
+
+ }
+ catch (exception& e)
+ {
+ cout << "itvset_shell: exception caught: " << endl
+ << e.what() << endl;
+ }
+ catch (...)
+ {
+ cout << "itvset_shell: unknown exception caught" << endl;
+ }
+}
+
+
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Test itvset_shell.cpp <<\n";
+ cout << "------------------------------------------------------\n";
+ setTestShell< interval_set<int> >();
+
+ return 0;
+}
+

Added: sandbox/icl/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_itvset_shell"
+ ProjectGUID="{FC32CF3E-293A-4576-A5C2-9373AECAF5BB}"
+ RootNamespace="vc9_itvset_shell"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\itvset_shell.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl/example/large_bitset_/bits.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/large_bitset_/bits.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,77 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET_BITS_HPP_JOFA_091019
+#define BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET_BITS_HPP_JOFA_091019
+//[mini_bits_includes
+ // These includes are needed ...
+#include <string> // for conversion to output and to
+#include <boost/icl/type_traits/has_set_semantics.hpp>//declare that bits has the
+ // behavior of a set.
+//]
+
+namespace mini
+{
+//[mini_bits_class_bits
+template<class NaturalT> class bits
+{
+public:
+ typedef NaturalT word_type;
+ static const int digits = std::numeric_limits<NaturalT>::digits;
+ static const word_type w1 = static_cast<NaturalT>(1) ;
+
+ bits():_bits(){}
+ explicit bits(word_type value):_bits(value){}
+
+ word_type word()const{ return _bits; }
+ bits& operator |= (const bits& value){_bits |= value._bits; return *this;}
+ bits& operator &= (const bits& value){_bits &= value._bits; return *this;}
+ bits& operator ^= (const bits& value){_bits ^= value._bits; return *this;}
+ bits operator ~ ()const { return bits(~_bits); }
+ bool operator < (const bits& value)const{return _bits < value._bits;}
+ bool operator == (const bits& value)const{return _bits == value._bits;}
+
+ bool contains(word_type element)const{ return ((w1 << element) & _bits) != 0; }
+ std::string as_string(const char off_on[2] = " 1")const;
+
+private:
+ word_type _bits;
+};
+//]
+
+template<class NaturalT>
+std::string bits<NaturalT>::as_string(const char off_on[2])const
+{
+ std::string sequence;
+ for(int bit=0; bit < digits; bit++)
+ sequence += contains(bit) ? off_on[1] : off_on[0];
+ return sequence;
+}
+
+} // mini
+
+//[mini_bits_is_set
+namespace boost { namespace icl
+{
+ template<class NaturalT>
+ struct is_set<mini::bits<NaturalT> >
+ {
+ typedef is_set<mini::bits<NaturalT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<class NaturalT>
+ struct has_set_semantics<mini::bits<NaturalT> >
+ {
+ typedef has_set_semantics<mini::bits<NaturalT> > type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+}}
+//]
+
+#endif

Added: sandbox/icl/libs/icl/example/large_bitset_/large_bitset.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/large_bitset_/large_bitset.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,168 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+/** Example large_bitset.cpp \file large_bitset.cpp
+ \brief Shows a bitset class that combines interval and bitset compression
+ in order to represent very large bitsets efficiently.
+
+ Example large_bitset.cpp demonstrates the usage of a large_bitset class
+ template that is implemented as an interval_map of bitsets. The idea is
+ to combine interval compression and bitset compression. Large uninterrupted
+ runs of bits are represented by intervals (interval compression). Local
+ nests of varying bitsequences are represented by associated bitests
+ (bitset compression).
+
+ Find a commented sample implementation in the boost book documentation
+ <a href="http://www.joachim-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/projects.html#boost_itl.projects.large_bitset">
+ here</a>.
+
+ \include large_bitset_/large_bitset.cpp
+*/
+#if defined(_MSC_VER)
+#pragma warning(disable:4244) // Msvc warns on some operations that are needed
+#pragma warning(disable:4245) // in this example - we're working on bit level.
+#endif // So we intentionally disable them.
+
+//[large_bitset_cpp_includes
+#include <limits>
+#include "large_bitset.hpp"
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+using namespace mini;
+//]
+
+
+//[large_bitset_test_large_set_all
+void test_large()
+{
+ const nat64 much = 0xffffffffffffffffull;
+ large_bitset<> venti; // ... the largest, I can think of ;)
+ venti += discrete_interval<nat64>(0, much);
+
+ cout << "----- Test function test_large() -----------------------------------------------\n";
+ cout << "We have just turned on the awesome amount of 18,446,744,073,709,551,616 bits ;-)\n";
+ venti.show_segments();
+ //]
+
+ //[large_bitset_test_large_erase_last
+ cout << "---- Let's swich off the very last bit -----------------------------------------\n";
+ venti -= much;
+ venti.show_segments();
+
+ cout << "---- Venti is plenty ... let's do something small: A tall ----------------------\n\n";
+}
+//]
+
+//[large_bitset_test_small
+void test_small()
+{
+ large_bitset<nat32, bits8> tall; // small is tall ...
+ // ... because even this 'small' large_bitset
+ // can represent up to 2^32 == 4,294,967,296 bits.
+
+ cout << "----- Test function test_small() -----------\n";
+ cout << "-- Switch on all bits in range [0,64] ------\n";
+ tall += discrete_interval<nat>(0, 64);
+ tall.show_segments();
+ cout << "--------------------------------------------\n";
+
+ cout << "-- Turn off bits: 25,27,28 -----------------\n";
+
+ (((tall -= 25) -= 27) -= 28) ;
+ tall.show_segments();
+ cout << "--------------------------------------------\n";
+
+ cout << "-- Flip bits in range [24,30) --------------\n";
+ tall ^= discrete_interval<nat>::right_open(24,30);
+ tall.show_segments();
+ cout << "--------------------------------------------\n";
+
+ cout << "-- Remove the first 10 bits ----------------\n";
+ tall -= discrete_interval<nat>::right_open(0,10);
+ tall.show_segments();
+
+ cout << "-- Remove even bits in range [0,72) --------\n";
+ int bit;
+ for(bit=0; bit<72; bit++) if(!(bit%2)) tall -= bit;
+ tall.show_segments();
+
+ cout << "-- Set odd bits in range [0,72) --------\n";
+ for(bit=0; bit<72; bit++) if(bit%2) tall += bit;
+ tall.show_segments();
+
+ cout << "--------------------------------------------\n\n";
+
+}
+//]
+
+//[large_bitset_test_picturesque
+void test_picturesque()
+{
+ typedef large_bitset<nat, bits8> Bit8Set;
+
+ Bit8Set square, stare;
+ square += discrete_interval<nat>(0,8);
+ for(int i=1; i<5; i++)
+ {
+ square += 8*i;
+ square += 8*i+7;
+ }
+
+ square += discrete_interval<nat>(41,47);
+
+ cout << "----- Test function test_picturesque() -----\n";
+ cout << "-------- empty face: "
+ << square.interval_count() << " intervals -----\n";
+ square.show_matrix(" *");
+
+ stare += 18; stare += 21;
+ stare += discrete_interval<nat>(34,38);
+
+ cout << "-------- compressed smile: "
+ << stare.interval_count() << " intervals -----\n";
+ stare.show_matrix(" *");
+
+ cout << "-------- staring bitset: "
+ << (square + stare).interval_count() << " intervals -----\n";
+ (square + stare).show_matrix(" *");
+
+ cout << "--------------------------------------------\n";
+}
+//]
+
+template<class NatT, class BitsT>
+void test_set()
+{
+ const NatT much = (numeric_limits<NatT>::max)();
+
+ large_bitset<NatT, BitsT> venti; //the largest, I can think of
+ venti += discrete_interval<NatT>(0, much);
+
+ cout << "--------------------------------------------------------------------------------\n";
+ venti.show_segments();
+
+ venti -= much;
+ cout << "--------------------------------------------------------------------------------\n";
+ venti.show_segments();
+}
+
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample large_bitset.cpp <<\n";
+ cout << "--------------------------------------------------------\n";
+ test_large();
+ test_small();
+ test_picturesque();
+ //test_set<nat64,bits64>();
+ return 0;
+}
+

Added: sandbox/icl/libs/icl/example/large_bitset_/large_bitset.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/large_bitset_/large_bitset.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET__LARGE_BITSET_HPP_JOFA_091019
+#define BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET__LARGE_BITSET_HPP_JOFA_091019
+
+//[large_bitset_includes
+#include <iostream> // to organize output
+#include <limits> // limits and associated constants
+#include <boost/operators.hpp> // to define operators with minimal effort
+#include "meta_log.hpp" // a meta logarithm
+#include "bits.hpp" // a minimal bitset implementation
+#include <boost/icl/interval_map.hpp> // base of large bitsets
+
+namespace mini // minimal implementations for example projects
+{
+//]
+
+//[large_bitset_natural_typedefs
+typedef unsigned char nat8; // nati i: number bits
+typedef unsigned short nat16;
+typedef unsigned long nat32;
+typedef unsigned long long nat64;
+typedef unsigned long nat;
+
+typedef bits<nat8> bits8;
+typedef bits<nat16> bits16;
+typedef bits<nat32> bits32;
+typedef bits<nat64> bits64;
+//]
+
+//[large_bitset_class_template_header
+template
+<
+ typename DomainT = nat64,
+ typename BitSetT = bits64,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare),
+ ICL_ALLOC Alloc = std::allocator
+>
+class large_bitset
+ : boost::equality_comparable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::less_than_comparable< large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+
+ , boost::addable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::orable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::subtractable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::andable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+ , boost::xorable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>
+
+ , boost::addable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::orable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::subtractable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::andable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+ , boost::xorable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT
+
+ , boost::addable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::orable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::subtractable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::andable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ , boost::xorable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare)
+ > > > > > > > > > > > > > > > > >
+ //^ & - | + ^ & - | + ^ & - | + < ==
+ //segment element container
+//]
+{
+public:
+ //[large_bitset_associated_types
+ typedef boost::icl::interval_map
+ <DomainT, BitSetT, boost::icl::partial_absorber,
+ std::less, boost::icl::inplace_bit_add, boost::icl::inplace_bit_and> interval_bitmap_type;
+
+ typedef DomainT domain_type;
+ typedef DomainT element_type;
+ typedef BitSetT bitset_type;
+ typedef typename BitSetT::word_type word_type;
+ typedef typename interval_bitmap_type::interval_type interval_type;
+ typedef typename interval_bitmap_type::value_type value_type;
+ //]
+//[large_bitset_operators
+public:
+ bool operator ==(const large_bitset& rhs)const { return _map == rhs._map; }
+ bool operator < (const large_bitset& rhs)const { return _map < rhs._map; }
+
+ large_bitset& operator +=(const large_bitset& rhs) {_map += rhs._map; return *this;}
+ large_bitset& operator |=(const large_bitset& rhs) {_map |= rhs._map; return *this;}
+ large_bitset& operator -=(const large_bitset& rhs) {_map -= rhs._map; return *this;}
+ large_bitset& operator &=(const large_bitset& rhs) {_map &= rhs._map; return *this;}
+ large_bitset& operator ^=(const large_bitset& rhs) {_map ^= rhs._map; return *this;}
+
+ large_bitset& operator +=(const element_type& rhs) {return add(interval_type(rhs)); }
+ large_bitset& operator |=(const element_type& rhs) {return add(interval_type(rhs)); }
+ large_bitset& operator -=(const element_type& rhs) {return subtract(interval_type(rhs)); }
+ large_bitset& operator &=(const element_type& rhs) {return intersect(interval_type(rhs));}
+ large_bitset& operator ^=(const element_type& rhs) {return flip(interval_type(rhs)); }
+
+ large_bitset& operator +=(const interval_type& rhs){return add(rhs); }
+ large_bitset& operator |=(const interval_type& rhs){return add(rhs); }
+ large_bitset& operator -=(const interval_type& rhs){return subtract(rhs); }
+ large_bitset& operator &=(const interval_type& rhs){return intersect(rhs);}
+ large_bitset& operator ^=(const interval_type& rhs){return flip(rhs); }
+ //]
+ //[large_bitset_fundamental_functions
+ large_bitset& add (const interval_type& rhs){return segment_apply(&large_bitset::add_, rhs);}
+ large_bitset& subtract (const interval_type& rhs){return segment_apply(&large_bitset::subtract_, rhs);}
+ large_bitset& intersect(const interval_type& rhs){return segment_apply(&large_bitset::intersect_,rhs);}
+ large_bitset& flip (const interval_type& rhs){return segment_apply(&large_bitset::flip_, rhs);}
+ //]
+
+ //[large_bitset_demo_functions
+ size_t interval_count()const { return boost::icl::interval_count(_map); }
+
+ void show_segments()const
+ {
+ for(typename interval_bitmap_type::const_iterator it_ = _map.begin();
+ it_ != _map.end(); ++it_)
+ {
+ interval_type itv = it_->first;
+ bitset_type bits = it_->second;
+ std::cout << itv << "->" << bits.as_string("01") << std::endl;
+ }
+ }
+
+ void show_matrix(const char off_on[2] = " 1")const
+ {
+ using namespace boost;
+ typename interval_bitmap_type::const_iterator iter = _map.begin();
+ while(iter != _map.end())
+ {
+ element_type fst = icl::first(iter->first), lst = icl::last(iter->first);
+ for(element_type chunk = fst; chunk <= lst; chunk++)
+ std::cout << iter->second.as_string(off_on) << std::endl;
+ ++iter;
+ }
+ }
+ //]
+
+//[large_bitset_impl_constants
+private: // Example value
+ static const word_type // 8-bit case
+ digits = std::numeric_limits // --------------------------------------------------------------
+ <word_type>::digits , // 8 Size of the associated bitsets
+ divisor = digits , // 8 Divisor to find intervals for values
+ last = digits-1 , // 7 Last bit (0 based)
+ shift = log2_<divisor>::value , // 3 To express the division as bit shift
+ w1 = static_cast<word_type>(1) , // Helps to avoid static_casts for long long
+ mask = divisor - w1 , // 7=11100000 Helps to express the modulo operation as bit_and
+ all = ~static_cast<word_type>(0), // 255=11111111 Helps to express a complete associated bitset
+ top = w1 << (digits-w1) ; // 128=00000001 Value of the most significant bit of associated bitsets
+ // !> Note: Most signigicant bit on the right.
+ //]
+ //[large_bitset_segment_combiner
+ typedef void (large_bitset::*segment_combiner)(element_type, element_type, bitset_type);
+ //]
+
+ //[large_bitset_bitset_filler
+ static word_type from_lower_to(word_type bit){return bit==last ? all : (w1<<(bit+w1))-w1;}
+ static word_type to_upper_from(word_type bit){return bit==last ? top : ~((w1<<bit)-w1); }
+ //]
+
+ //[large_bitset_segment_apply
+ large_bitset& segment_apply(segment_combiner combine, const interval_type& operand)
+ {
+ using namespace boost; // same as
+ element_type base = icl::first(operand) >> shift, // icl::first(operand) / divisor
+ ceil = icl::last (operand) >> shift; // icl::last (operand) / divisor
+ word_type base_rest = icl::first(operand) & mask , // icl::first(operand) % divisor
+ ceil_rest = icl::last (operand) & mask ; // icl::last (operand) % divisor
+
+ if(base == ceil) // [first, last] are within one bitset (chunk)
+ (this->*combine)(base, base+1, bitset_type( to_upper_from(base_rest)
+ & from_lower_to(ceil_rest)));
+ else // [first, last] spread over more than one bitset (chunk)
+ {
+ element_type mid_low = base_rest == 0 ? base : base+1, // first element of mid part
+ mid_up = ceil_rest == all ? ceil+1 : ceil ; // last element of mid part
+
+ if(base_rest > 0) // Bitset of base interval has to be filled from base_rest to last
+ (this->*combine)(base, base+1, bitset_type(to_upper_from(base_rest)));
+ if(ceil_rest < all) // Bitset of ceil interval has to be filled from first to ceil_rest
+ (this->*combine)(ceil, ceil+1, bitset_type(from_lower_to(ceil_rest)));
+ if(mid_low < mid_up) // For the middle part all bits have to set.
+ (this->*combine)(mid_low, mid_up, bitset_type(all));
+ }
+ return *this;
+ }
+ //]
+
+ //[large_bitmap_combiners
+ void add_(DomainT lo, DomainT up, BitSetT bits){_map += value_type(interval_type::right_open(lo,up), bits);}
+ void subtract_(DomainT lo, DomainT up, BitSetT bits){_map -= value_type(interval_type::right_open(lo,up), bits);}
+ void intersect_(DomainT lo, DomainT up, BitSetT bits){_map &= value_type(interval_type::right_open(lo,up), bits);}
+ void flip_(DomainT lo, DomainT up, BitSetT bits){_map ^= value_type(interval_type::right_open(lo,up), bits);}
+ //]
+
+//[large_bitmap_impl_map
+private:
+ interval_bitmap_type _map;
+//]
+};
+
+} // mini
+#endif
+
+

Added: sandbox/icl/libs/icl/example/large_bitset_/meta_log.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/large_bitset_/meta_log.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+Author: Joachim Faulhaber
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+
+namespace mini // minimal implementations for example projects
+{
+// A meta implementation of an the logarithm function on integrals
+template <size_t Argument, size_t Base=2>
+struct log_{ enum { value = 1 + log_<Argument/Base, Base>::value }; };
+
+template <size_t Base>struct log_<1, Base>{ enum { value = 0 }; };
+template <size_t Base>struct log_<0, Base>{ enum { value = 0 }; };
+
+template <size_t Argument>
+struct log2_{ enum { value = log_<Argument, 2>::value }; };
+
+template <size_t Argument>
+struct power2_{ enum { value = 1 << Argument }; };
+
+} // namespace mini
+

Added: sandbox/icl/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_large_bitset"
+ ProjectGUID="{6BE62DDE-21B9-4333-BF11-AA054DD53759}"
+ RootNamespace="Large_bitset"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\large_bitset.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\bits.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\large_bitset.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/man_power_/man_power.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/man_power_/man_power.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,192 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example man_power.cpp \file man_power.cpp
+ \brief Using set style operators to compute with interval sets and maps.
+
+ Interval sets and maps can be filled and manipulated using
+ set style operation like union (+=), difference (-=) and intersection
+ (&=).
+
+ In this example 'man_power' a number of those operations are
+ demonstrated in the process of calculation the available working
+ times (man-power) of a company's employees accounting for weekends,
+ holidays, sickness times and vacations.
+
+ \include man_power_/man_power.cpp
+*/
+//[example_man_power
+#include <iostream>
+
+// The next line includes <boost/gregorian/date.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/gregorian.hpp>
+
+#include <boost/icl/discrete_interval.hpp>
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost::gregorian;
+using namespace boost::icl;
+
+
+// Function weekends returns the interval_set of weekends that are contained in
+// the date interval 'scope'
+interval_set<date> weekends(const discrete_interval<date>& scope)
+{
+ interval_set<date> weekends;
+
+ date cur_weekend_sat
+ = first(scope)
+ + days(days_until_weekday(first(scope), greg_weekday(Saturday)))
+ - weeks(1);
+ week_iterator week_iter(cur_weekend_sat);
+
+ for(; week_iter <= last(scope); ++week_iter)
+ weekends += discrete_interval<date>::right_open(*week_iter, *week_iter + days(2));
+
+ weekends &= scope; // cut off the surplus
+
+ return weekends;
+}
+
+// The available working time for the employees of a company is calculated
+// for a period of 3 months accounting for weekends and holidays.
+// The available daily working time for the employees is calculated
+// using interval_sets and interval_maps demonstrating a number of
+// addition, subtraction and intersection operations.
+void man_power()
+{
+ date someday = from_string("2008-08-01");
+ date thenday = someday + months(3);
+
+ discrete_interval<date> scope = discrete_interval<date>::right_open(someday, thenday);
+
+ // ------------------------------------------------------------------------
+ // (1) In a first step, the regular working times are computed for the
+ // company within the given scope. From all available days, the weekends
+ // and holidays have to be subtracted:
+ interval_set<date> worktime(scope);
+ // Subtract the weekends
+ worktime -= weekends(scope);
+ // Subtract holidays
+ worktime -= from_string("2008-10-03"); //German reunification ;)
+
+ // company holidays (fictitious ;)
+ worktime -= discrete_interval<date>::closed(from_string("2008-08-18"),
+ from_string("2008-08-22"));
+
+ //-------------------------------------------------------------------------
+ // (2) Now we calculate the individual work times for some employees
+ //-------------------------------------------------------------------------
+ // In the company works Claudia.
+ // This is the map of her regular working times:
+ interval_map<date,int> claudias_working_hours;
+
+ // Claudia is working 8 hours a day. So the next statement says
+ // that every day in the whole scope is mapped to 8 hours worktime.
+ claudias_working_hours += make_pair(scope, 8);
+
+ // But Claudia only works 8 hours on regular working days so we do
+ // an intersection of the interval_map with the interval_set worktime:
+ claudias_working_hours &= worktime;
+
+ // Yet, in addition Claudia has her own absence times like
+ discrete_interval<date> claudias_seminar (from_string("2008-09-16"),
+ from_string("2008-09-24"),
+ interval_bounds::closed());
+ discrete_interval<date> claudias_vacation(from_string("2008-08-01"),
+ from_string("2008-08-14"),
+ interval_bounds::closed());
+
+ interval_set<date> claudias_absence_times(claudias_seminar);
+ claudias_absence_times += claudias_vacation;
+
+ // All the absence times have to subtracted from the map of her working times
+ claudias_working_hours -= claudias_absence_times;
+
+ //-------------------------------------------------------------------------
+ // Claudia's boss is Bodo. He only works part time.
+ // This is the map of his regular working times:
+ interval_map<date,int> bodos_working_hours;
+
+ // Bodo is working 4 hours a day.
+ bodos_working_hours += make_pair(scope, 4);
+
+ // Bodo works only on regular working days
+ bodos_working_hours &= worktime;
+
+ // Bodos additional absence times
+ discrete_interval<date> bodos_flu(from_string("2008-09-19"), from_string("2008-09-29"),
+ interval_bounds::closed());
+ discrete_interval<date> bodos_vacation(from_string("2008-08-15"), from_string("2008-09-03"),
+ interval_bounds::closed());
+
+ interval_set<date> bodos_absence_times(bodos_flu);
+ bodos_absence_times += bodos_vacation;
+
+ // All the absence times have to be subtracted from the map of his working times
+ bodos_working_hours -= bodos_absence_times;
+
+ //-------------------------------------------------------------------------
+ // (3) Finally we want to calculate the available manpower of the company
+ // for the selected time scope: This is done by adding up the employees
+ // working time maps:
+ interval_map<date,int> manpower;
+ manpower += claudias_working_hours;
+ manpower += bodos_working_hours;
+
+
+ cout << first(scope) << " - " << last(scope)
+ << " available man-power:" << endl;
+ cout << "---------------------------------------------------------------\n";
+
+ for(interval_map<date,int>::iterator it = manpower.begin();
+ it != manpower.end(); it++)
+ {
+ cout << first(it->first) << " - " << last(it->first)
+ << " -> " << it->second << endl;
+ }
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample man_power.cpp <<\n";
+ cout << "---------------------------------------------------------------\n";
+ man_power();
+ return 0;
+}
+
+// Program output:
+/*
+>>Interval Container Library: Sample man_power.cpp <<
+---------------------------------------------------------------
+2008-Aug-01 - 2008-Oct-31 available man-power:
+---------------------------------------------------------------
+2008-Aug-01 - 2008-Aug-01 -> 4
+2008-Aug-04 - 2008-Aug-08 -> 4
+2008-Aug-11 - 2008-Aug-14 -> 4
+2008-Aug-15 - 2008-Aug-15 -> 8
+2008-Aug-25 - 2008-Aug-29 -> 8
+2008-Sep-01 - 2008-Sep-03 -> 8
+2008-Sep-04 - 2008-Sep-05 -> 12
+2008-Sep-08 - 2008-Sep-12 -> 12
+2008-Sep-15 - 2008-Sep-15 -> 12
+2008-Sep-16 - 2008-Sep-18 -> 4
+2008-Sep-25 - 2008-Sep-26 -> 8
+2008-Sep-29 - 2008-Sep-29 -> 8
+2008-Sep-30 - 2008-Oct-02 -> 12
+2008-Oct-06 - 2008-Oct-10 -> 12
+2008-Oct-13 - 2008-Oct-17 -> 12
+2008-Oct-20 - 2008-Oct-24 -> 12
+2008-Oct-27 - 2008-Oct-31 -> 12
+*/
+//]
+

Added: sandbox/icl/libs/icl/example/man_power_/vc9_man_power.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/man_power_/vc9_man_power.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_man_power"
+ ProjectGUID="{8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}"
+ RootNamespace="Party"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\man_power.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,142 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example month_and_week_grid.cpp \file month_and_week_grid.cpp
+ \brief Creating and combining time grids.
+
+ A split_interval_set preserves all interval borders on insertion
+ and intersection operations. So given a split_interval_set ...
+ \code
+ x = {[1, 3)}
+ x.add( [2, 4)) then
+ x == {[1,2)[2,3)[3,4)}
+ \endcode
+ ... using this property we can intersect splitting interval containers
+ in order to iterate over intervals accounting for all changes of
+ interval borders.
+
+ In this example we provide an intersection of two split_interval_sets
+ representing a month and week time grid.
+
+ \include month_and_week_grid_/month_and_week_grid.cpp
+*/
+//[example_month_and_week_grid
+#include <iostream>
+
+// The next line includes <boost/gregorian/date.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/gregorian.hpp>
+
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost::gregorian;
+using namespace boost::icl;
+
+typedef split_interval_set<boost::gregorian::date> date_grid;
+
+// This function splits a gregorian::date interval 'scope' into a month grid:
+// For every month contained in 'scope' that month is contained as interval
+// in the resulting split_interval_set.
+date_grid month_grid(const discrete_interval<date>& scope)
+{
+ split_interval_set<date> month_grid;
+
+ date frame_months_1st = first(scope).end_of_month() + days(1) - months(1);
+ month_iterator month_iter(frame_months_1st);
+
+ for(; month_iter <= last(scope); ++month_iter)
+ month_grid += discrete_interval<date>::right_open(*month_iter, *month_iter + months(1));
+
+ month_grid &= scope; // cut off the surplus
+
+ return month_grid;
+}
+
+// This function splits a gregorian::date interval 'scope' into a week grid:
+// For every week contained in 'scope' that month is contained as interval
+// in the resulting split_interval_set.
+date_grid week_grid(const discrete_interval<date>& scope)
+{
+ split_interval_set<date> week_grid;
+
+ date frame_weeks_1st = first(scope) + days(days_until_weekday(first(scope), greg_weekday(Monday))) - weeks(1);
+ week_iterator week_iter(frame_weeks_1st);
+
+ for(; week_iter <= last(scope); ++week_iter)
+ week_grid.insert(discrete_interval<date>::right_open(*week_iter, *week_iter + weeks(1)));
+
+ week_grid &= scope; // cut off the surplus
+
+ return week_grid;
+}
+
+// For a period of two months, starting from today, the function
+// computes a partitioning for months and weeks using intersection
+// operator &= on split_interval_sets.
+void month_and_time_grid()
+{
+ date someday = day_clock::local_day();
+ date thenday = someday + months(2);
+
+ discrete_interval<date> itv = discrete_interval<date>::right_open(someday, thenday);
+
+ // Compute a month grid
+ date_grid month_and_week_grid = month_grid(itv);
+ // Intersection of the month and week grids:
+ month_and_week_grid &= week_grid(itv);
+
+ cout << "interval : " << first(itv) << " - " << last(itv)
+ << " month and week partitions:" << endl;
+ cout << "---------------------------------------------------------------\n";
+
+ for(date_grid::iterator it = month_and_week_grid.begin();
+ it != month_and_week_grid.end(); it++)
+ {
+ if(first(*it).day() == 1)
+ cout << "new month: ";
+ else if(first(*it).day_of_week()==greg_weekday(Monday))
+ cout << "new week : " ;
+ else if(it == month_and_week_grid.begin())
+ cout << "first day: " ;
+ cout << first(*it) << " - " << last(*it) << endl;
+ }
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample month_and_time_grid.cpp <<\n";
+ cout << "---------------------------------------------------------------\n";
+ month_and_time_grid();
+ return 0;
+}
+
+// Program output:
+/*
+>>Interval Container Library: Sample month_and_time_grid.cpp <<
+---------------------------------------------------------------
+interval : 2008-Jun-22 - 2008-Aug-21 month and week partitions:
+---------------------------------------------------------------
+first day: 2008-Jun-22 - 2008-Jun-22
+new week : 2008-Jun-23 - 2008-Jun-29
+new week : 2008-Jun-30 - 2008-Jun-30
+new month: 2008-Jul-01 - 2008-Jul-06
+new week : 2008-Jul-07 - 2008-Jul-13
+new week : 2008-Jul-14 - 2008-Jul-20
+new week : 2008-Jul-21 - 2008-Jul-27
+new week : 2008-Jul-28 - 2008-Jul-31
+new month: 2008-Aug-01 - 2008-Aug-03
+new week : 2008-Aug-04 - 2008-Aug-10
+new week : 2008-Aug-11 - 2008-Aug-17
+new week : 2008-Aug-18 - 2008-Aug-21
+*/
+//]
+

Added: sandbox/icl/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_month_and_week_grid"
+ ProjectGUID="{360BCFA9-9EB6-4D22-8469-CDC290478F78}"
+ RootNamespace="Party"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\month_and_week_grid.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl/example/overlap_counter_/overlap_counter.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/overlap_counter_/overlap_counter.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,108 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example overlap_counter.cpp \file overlap_counter.cpp
+
+ \brief The most simple application of an interval map:
+ Counting the overlaps of added intervals.
+
+ The most basic application of an interval_map is a counter counting
+ the number of overlaps of intervals inserted into it.
+
+ On could call an interval_map an aggregate on overlap machine. A very basic
+ aggregation is summation of an integer. A interval_map<int,int> maps
+ intervals of int to ints.
+
+ If we insert a value pair (discrete_interval<int>(2,6), 1) into the interval_map, it
+ increases the content of all value pairs in the map by 1, if their interval
+ part overlaps with discrete_interval<int>(2,6).
+
+ \include overlap_counter_/overlap_counter.cpp
+*/
+//[example_overlap_counter
+#include <iostream>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost::icl;
+
+
+/* The most simple example of an interval_map is an overlap counter.
+ If intervals are added that are associated with the value 1,
+ all overlaps of added intervals are counted as a result in the
+ associated values.
+*/
+typedef interval_map<int, int> OverlapCounterT;
+
+void print_overlaps(const OverlapCounterT& counter)
+{
+ for(OverlapCounterT::const_iterator it = counter.begin(); it != counter.end(); it++)
+ {
+ discrete_interval<int> itv = (*it).first;
+ int overlaps_count = (*it).second;
+ if(overlaps_count == 1)
+ cout << "in interval " << itv << " intervals do not overlap" << endl;
+ else
+ cout << "in interval " << itv << ": "<< overlaps_count << " intervals overlap" << endl;
+ }
+}
+
+void overlap_counter()
+{
+ OverlapCounterT overlap_counter;
+ discrete_interval<int> inter_val;
+
+ inter_val = discrete_interval<int>::right_open(4,8);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
+ print_overlaps(overlap_counter);
+ cout << "-----------------------------------------------------------" << endl;
+
+ inter_val = discrete_interval<int>::right_open(6,9);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
+ print_overlaps(overlap_counter);
+ cout << "-----------------------------------------------------------" << endl;
+
+ inter_val = discrete_interval<int>::right_open(1,9);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
+ print_overlaps(overlap_counter);
+ cout << "-----------------------------------------------------------" << endl;
+
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample overlap_counter.cpp <<\n";
+ cout << "-----------------------------------------------------------\n";
+ overlap_counter();
+ return 0;
+}
+
+// Program output:
+
+// >>Interval Container Library: Sample overlap_counter.cpp <<
+// -----------------------------------------------------------
+// -- adding [4,8) -----------------------------------------
+// in interval [4,8) intervals do not overlap
+// -----------------------------------------------------------
+// -- adding [6,9) -----------------------------------------
+// in interval [4,6) intervals do not overlap
+// in interval [6,8): 2 intervals overlap
+// in interval [8,9) intervals do not overlap
+// -----------------------------------------------------------
+// -- adding [1,9) -----------------------------------------
+// in interval [1,4) intervals do not overlap
+// in interval [4,6): 2 intervals overlap
+// in interval [6,8): 3 intervals overlap
+// in interval [8,9): 2 intervals overlap
+// -----------------------------------------------------------
+//]

Added: sandbox/icl/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_overlap_counter"
+ ProjectGUID="{8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}"
+ RootNamespace="overlap_counter"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\overlap_counter.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/party_/party.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/party_/party.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,115 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <boost/icl/interval_map.hpp>
+#include "../toytime.hpp"
+
+using namespace std;
+using namespace boost::icl;
+
+/**
+
+ Party.cpp demonstrates the possibilities of an interval map (interval_map or
+ split_interval_map). An interval_map maps intervals to a given content. In
+ this case the content is a set of party guests represented by their name
+ strings.
+
+ As time goes by, groups of people join the party and leave later in the
+ evening. So we add a time interval and a name set to the interval_map for
+ the attendance of each group of people, that come together and leave
+ together.
+
+ On every overlap of intervals, the corresponding name sets are accumulated.
+ At the points of overlap the intervals are split. The accumulation of content
+ on overlap of intervals is always done via an operator += that has to be
+ implemented for the content parameter of the interval_map.
+
+ Finally the interval_map contains the history of attendance and all points
+ in time, where the group of party guests changed.
+
+ Party.cpp demonstrates a principle that we call aggregate on overlap
+ (aggovering;) On insertion a value associated to the interval is aggregated
+ (added) to those values in the interval_map that overlap with the inserted
+ value.
+
+ There are two behavioral aspects to aggovering: a decompositional behavior
+ and a accumulative behavior.
+
+ The decompositional behavior splits up intervals on the time dimension of
+ the interval_map so that the intervals change whenever associated values
+ change.
+
+ The accumulative behavior accumulates associated values on every overlap of
+ an insertion for the associated values.
+
+*/
+
+// Type set<string> collects the names of party guests. Since std::set is
+// a model of the itl's set concept, the concept provides an operator +=
+// that performs a set union on overlap of intervals.
+typedef std::set<string> GuestSetT;
+
+// Time is the domain type the split_interval_map. It's key values are therefore
+// time intervals. The content is the set of names: GuestSetT.
+
+
+void party()
+{
+ GuestSetT mary_harry;
+ mary_harry.insert("Mary");
+ mary_harry.insert("Harry");
+
+ GuestSetT diana_susan;
+ diana_susan.insert("Diana");
+ diana_susan.insert("Susan");
+
+ GuestSetT peter;
+ peter.insert("Peter");
+
+ interval_map<Time, GuestSetT> party;
+
+ //party += make_pair( discrete_interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
+ //party += make_pair( discrete_interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
+ //party += make_pair( discrete_interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
+
+ party += make_pair( interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
+ party += make_pair( interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
+ party += make_pair( interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
+
+ interval_map<Time, GuestSetT>::iterator it = party.begin();
+ while(it != party.end())
+ {
+ discrete_interval<Time> when = it->first;
+ // Who is at the party within the time interval 'when' ?
+ GuestSetT who = (*it++).second;
+ cout << when << ": " << who << endl;
+ }
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample party.cpp <<\n";
+ cout << "-------------------------------------------------------\n";
+ party();
+ return 0;
+}
+
+// Program output:
+
+// >>Interval Container Library: Sample party.cpp <<
+// -------------------------------------------------
+// [sun:19:30,sun:20:10): Harry Mary
+// [sun:20:10,sun:22:15): Diana Harry Mary Susan
+// [sun:22:15,sun:23:00): Diana Harry Mary Peter Susan
+// [sun:23:00,mon:00:00): Diana Peter Susan
+// [mon:00:00,mon:00:30): Peter
+
+

Added: sandbox/icl/libs/icl/example/party_/vc9_party.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/party_/vc9_party.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_party"
+ ProjectGUID="{6BE62DDE-21B9-4333-BF11-AA054DD43759}"
+ RootNamespace="Party"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\party.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/partys_height_average_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_height_average_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,12 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+exe partys_height_average
+ :
+ partys_height_average.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/icl/example/partys_height_average_/partys_height_average.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_height_average_/partys_height_average.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,135 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/** Example partys_height_average.cpp \file partys_height_average.cpp
+ \brief Using <i>aggregate on overlap</i> a history of height averages of
+ party guests is computed.
+
+ In partys_height_average.cpp we compute yet another aggregation:
+ The average height of guests as it changes over time. This is done by
+ defining a class counted_sum that sums up heights and counts the number
+ of guests via an operator +=.
+
+ Based on the operator += we can aggregate counted sums on addition
+ of interval value pairs into an interval_map.
+
+ \include partys_height_average_/partys_height_average.cpp
+*/
+//[example_partys_height_average
+#include <iostream>
+// The next line includes <boost/date_time/posix_time/posix_time.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/ptime.hpp>
+
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost::posix_time;
+using namespace boost::icl;
+
+
+class counted_sum
+{
+public:
+ counted_sum():_sum(0),_count(0){}
+ counted_sum(int sum):_sum(sum),_count(1){}
+
+ int sum()const {return _sum;}
+ int count()const{return _count;}
+ double average()const{ return _count==0 ? 0.0 : _sum/static_cast<double>(_count); }
+
+ counted_sum& operator += (const counted_sum& right)
+ { _sum += right.sum(); _count += right.count(); return *this; }
+
+private:
+ int _sum;
+ int _count;
+};
+
+bool operator == (const counted_sum& left, const counted_sum& right)
+{ return left.sum()==right.sum() && left.count()==right.count(); }
+
+
+void partys_height_average()
+{
+ interval_map<ptime, counted_sum> height_sums;
+
+ height_sums +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 19:30"),
+ time_from_string("2008-05-20 23:00")),
+ counted_sum(165)); // Mary is 1,65 m tall.
+
+ height_sums +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 19:30"),
+ time_from_string("2008-05-20 23:00")),
+ counted_sum(180)); // Harry is 1,80 m tall.
+
+ height_sums +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 20:10"),
+ time_from_string("2008-05-21 00:00")),
+ counted_sum(170)); // Diana is 1,70 m tall.
+
+ height_sums +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 20:10"),
+ time_from_string("2008-05-21 00:00")),
+ counted_sum(165)); // Susan is 1,65 m tall.
+
+ height_sums +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 22:15"),
+ time_from_string("2008-05-21 00:30")),
+ counted_sum(200)); // Peters height is 2,00 m
+
+ interval_map<ptime, counted_sum>::iterator height_sum_ = height_sums.begin();
+ cout << "-------------- History of average guest height -------------------\n";
+ while(height_sum_ != height_sums.end())
+ {
+ discrete_interval<ptime> when = height_sum_->first;
+
+ double height_average = (*height_sum_++).second.average();
+ cout << setprecision(3)
+ << "[" << first(when) << " - " << upper(when) << ")"
+ << ": " << height_average <<" cm = " << height_average/30.48 << " ft" << endl;
+ }
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample partys_height_average.cpp <<\n";
+ cout << "------------------------------------------------------------------\n";
+ partys_height_average();
+ return 0;
+}
+
+// Program output:
+/*-----------------------------------------------------------------------------
+>>Interval Container Library: Sample partys_height_average.cpp <<
+------------------------------------------------------------------
+-------------- History of average guest height -------------------
+[2008-May-20 19:30:00 - 2008-May-20 20:10:00): 173 cm = 5.66 ft
+[2008-May-20 20:10:00 - 2008-May-20 22:15:00): 170 cm = 5.58 ft
+[2008-May-20 22:15:00 - 2008-May-20 23:00:00): 176 cm = 5.77 ft
+[2008-May-20 23:00:00 - 2008-May-21 00:00:00): 178 cm = 5.85 ft
+[2008-May-21 00:00:00 - 2008-May-21 00:30:00): 200 cm = 6.56 ft
+-----------------------------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_partys_height_average"
+ ProjectGUID="{0D1DB87E-E72A-4FE9-A067-1907CC6633F8}"
+ RootNamespace="Partys_height_average"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\partys_height_average.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/partys_tallest_guests_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_tallest_guests_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,12 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+exe partys_tallest_guests
+ :
+ partys_tallest_guests.cpp
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,162 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/** Example partys_tallest_guests.cpp \file partys_tallest_guests.cpp
+ \brief Using <i>aggregate on overlap</i> the heights of the party's tallest
+ guests are computed.
+
+ In partys_tallest_guests.cpp we use a different instantiation of
+ interval map templates to compute maxima of guest heights.
+
+ Instead of aggregating groups of people attending the party in time
+ we aggregate the maximum of guest height for the time intervals.
+
+ Using a joining interval_map results in a smaller map: All interval
+ value pairs are joined if the maximum does not change in time. Using
+ a split_interval_map results in a larger map: All splits of intervals
+ that occur due to entering and leaving of guests are preserved in
+ the split_interval_map.
+
+ \include partys_tallest_guests_/partys_tallest_guests.cpp
+*/
+//[example_partys_tallest_guests
+#include <iostream>
+// The next line includes <boost/date_time/posix_time/posix_time.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/ptime.hpp>
+
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost::posix_time;
+using namespace boost::icl;
+
+
+// A party's height shall be defined as the maximum height of all guests ;-)
+// The last parameter 'inplace_max' is a functor template that calls a max
+// aggregation on overlap.
+typedef interval_map<ptime, int, partial_absorber, less, inplace_max>
+ PartyHeightHistoryT;
+
+// Using a split_interval_map we preserve interval splittings that occurred via insertion.
+typedef split_interval_map<ptime, int, partial_absorber, less, inplace_max>
+ PartyHeightSplitHistoryT;
+
+void partys_height()
+{
+ PartyHeightHistoryT tallest_guest;
+
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 19:30"),
+ time_from_string("2008-05-20 23:00")),
+ 180); // Mary & Harry: Harry is 1,80 m tall.
+
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 20:10"),
+ time_from_string("2008-05-21 00:00")),
+ 170); // Diana & Susan: Diana is 1,70 m tall.
+
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 22:15"),
+ time_from_string("2008-05-21 00:30")),
+ 200); // Peters height is 2,00 m
+
+ PartyHeightHistoryT::iterator height_ = tallest_guest.begin();
+ cout << "-------------- History of maximum guest height -------------------\n";
+ while(height_ != tallest_guest.end())
+ {
+ discrete_interval<ptime> when = height_->first;
+ // Of what height are the tallest guests within the time interval 'when' ?
+ int height = (*height_++).second;
+ cout << "[" << first(when) << " - " << upper(when) << ")"
+ << ": " << height <<" cm = " << height/30.48 << " ft" << endl;
+ }
+
+}
+
+// Next we are using a split_interval_map instead of a joining interval_map
+void partys_split_height()
+{
+ PartyHeightSplitHistoryT tallest_guest;
+
+ // adding an element can be done wrt. simple aggregate functions
+ // like e.g. min, max etc. in their 'inplace' or op= incarnation
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 19:30"),
+ time_from_string("2008-05-20 23:00")),
+ 180); // Mary & Harry: Harry is 1,80 m tall.
+
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 20:10"),
+ time_from_string("2008-05-21 00:00")),
+ 170); // Diana & Susan: Diana is 1,70 m tall.
+
+ tallest_guest +=
+ make_pair(
+ discrete_interval<ptime>::right_open(
+ time_from_string("2008-05-20 22:15"),
+ time_from_string("2008-05-21 00:30")),
+ 200); // Peters height is 2,00 m
+
+ PartyHeightSplitHistoryT::iterator height_ = tallest_guest.begin();
+ cout << "\n";
+ cout << "-------- Split History of maximum guest height -------------------\n";
+ cout << "--- Same map as above but split for every interval insertion. ---\n";
+ while(height_ != tallest_guest.end())
+ {
+ discrete_interval<ptime> when = height_->first;
+ // Of what height are the tallest guests within the time interval 'when' ?
+ int height = (*height_++).second;
+ cout << "[" << first(when) << " - " << upper(when) << ")"
+ << ": " << height <<" cm = " << height/30.48 << " ft" << endl;
+ }
+
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample partys_tallest_guests.cpp <<\n";
+ cout << "------------------------------------------------------------------\n";
+ partys_height();
+ partys_split_height();
+ return 0;
+}
+
+// Program output:
+/*-----------------------------------------------------------------------------
+>>Interval Container Library: Sample partys_tallest_guests.cpp <<
+------------------------------------------------------------------
+-------------- History of maximum guest height -------------------
+[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
+
+-------- Split History of maximum guest height -------------------
+--- Same map as above but split for every interval insertion. ---
+[2008-May-20 19:30:00 - 2008-May-20 20:10:00): 180 cm = 5.90551 ft
+[2008-May-20 20:10:00 - 2008-May-20 22:15:00): 180 cm = 5.90551 ft
+[2008-May-20 22:15:00 - 2008-May-20 23:00:00): 200 cm = 6.56168 ft
+[2008-May-20 23:00:00 - 2008-May-21 00:00:00): 200 cm = 6.56168 ft
+[2008-May-21 00:00:00 - 2008-May-21 00:30:00): 200 cm = 6.56168 ft
+-----------------------------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_partys_tallest_guests"
+ ProjectGUID="{0D1DB87E-E72A-4FE9-A067-1907CC6623F8}"
+ RootNamespace="Partys_tallest_guests"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\partys_tallest_guests.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,131 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+splititvmap_shell.cpp provides a simple test shell for splitting interval maps.
+The shell also gives you a good idea how interval container are working.
++-----------------------------------------------------------------------------*/
+#include <iostream>
+
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void instructions()
+{
+ cout << "+++++ Test shell for split interval map +++++\n";
+ cout << "Type: q e or 0 to quit\n";
+ cout << "Type: + for insertions\n";
+ cout << "Type: - for subtraction of ([a,b],value)\n";
+ cout << "Type: _ for subtraction of [a,b]\n";
+ cout << "Type: j to join contiguous intervals\n";
+ cout << "Type: s to compute total size\n";
+}
+
+void wrongInput()
+{
+ cout << "Wrong Input ------------------\n";
+ instructions();
+}
+
+
+template <class MapTV>
+void mapTestShell()
+{
+ MapTV m1;
+
+ try {
+ char cmd = 'b';
+ typename MapTV::domain_type
+ lwb = typename MapTV::domain_type(),
+ upb = typename MapTV::domain_type();
+
+ typename MapTV::codomain_type
+ val = typename MapTV::codomain_type();
+
+ instructions();
+
+ for(;;)
+ {
+ cout << "> ";
+ cin >> cmd ;
+
+ switch(cmd)
+ {
+ case 'q':
+ case 'e':
+ case '0': cout << "good bye\n"; return;
+ case '+':
+ {
+ cout << "input: lwb upb val >> ";
+ cin >> lwb >> upb >> val;
+ typename MapTV::interval_type
+ itv = typename MapTV::interval_type(lwb,upb);
+ m1 += make_pair(itv,val);
+
+ cout << "+" << itv << " " << val << " =" << endl;
+ cout << "{" << m1 << "}" << endl;
+
+ }
+ break;
+ case '-':
+ {
+ cout << "input: lwb upb val >> ";
+ cin >> lwb >> upb >> val;
+ typename MapTV::interval_type
+ itv = typename MapTV::interval_type(lwb,upb);
+ m1 -= make_pair(itv,val);
+
+ cout << "-" << itv << " " << val << " =" << endl;
+ cout << "{" << m1 << "}" << endl;
+
+ }
+ break;
+ case 'j':
+ {
+ icl::join(m1);
+ cout << "{" << m1 << "}" << endl;
+ }
+ break;
+ case 's':
+ {
+ cout << "size = " << m1.size() << endl;
+ }
+ break;
+
+ default: wrongInput();
+ }
+ } // end while
+ }
+ catch (exception& e)
+ {
+ cout << "splititvmap_shell: exception caught: " << endl
+ << e.what() << endl;
+ }
+ catch (...)
+ {
+ cout << "splititvmap_shell: unknown exception caught" << endl;
+ }
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Test splititvmap_shell.cpp <<\n";
+ cout << "-----------------------------------------------------------\n";
+ mapTestShell< interval_map<int, int> >();
+
+ return 0;
+}
+

Added: sandbox/icl/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_splititvmap_shell"
+ ProjectGUID="{639F6AD9-CD50-40BF-92B9-CC9DD069D65A}"
+ RootNamespace="splititvmap_shell"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\splititvmap_shell.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl/example/static_interval_/static_interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/static_interval_/static_interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,123 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2010: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example static_interval.cpp \file static_interval.cpp
+ \brief Intervals with static interval bounds.
+
+ Intervals types with static or fixed interval bounds. Statically
+ bounded intervals use up to 33% less memory than dynamically
+ bounded ones. Of the four possible statically bounded intervals types
+ right_open_intervals are the most important ones. We can switch the
+ library default to statically bounded intervals by defining
+ BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS.
+
+ \include static_interval_/static_interval.cpp
+*/
+//[example_static_interval
+#include <iostream>
+#include <string>
+#include <math.h>
+#include <boost/type_traits/is_same.hpp>
+
+// We can change the library default for the interval types by defining
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// prior to other inluces from the icl.
+// The interval type that is automatically used with interval
+// containers then is the statically bounded right_open_interval.
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+// The statically bounded interval type 'right_open_interval'
+// is indirectly included via interval containers.
+
+
+#include "../toytime.hpp"
+#include <boost/icl/rational.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+int main()
+{
+ cout << ">> Interval Container Library: Sample static_interval.cpp <<\n";
+ cout << "------------------------------------------------------------\n";
+
+ // Statically bounded intervals are the user defined library default for
+ // interval parameters in interval containers now.
+ BOOST_STATIC_ASSERT((
+ is_same< interval_set<int>::interval_type
+ , right_open_interval<int> >::value
+ ));
+
+ BOOST_STATIC_ASSERT((
+ is_same< interval_set<float>::interval_type
+ , right_open_interval<float> >::value
+ ));
+
+ // As we can see the library default both for discrete and continuous
+ // domain_types T is 'right_open_interval<T>'.
+ // The user defined library default for intervals is also available via
+ // the template 'interval':
+ BOOST_STATIC_ASSERT((
+ is_same< interval<int>::type
+ , right_open_interval<int> >::value
+ ));
+
+ // Again we are declaring and initializing the four test intervals that have been used
+ // in the example 'interval' and 'dynamic_interval'
+ interval<int>::type int_interval = interval<int>::right_open(3, 8); // shifted the upper bound
+ interval<double>::type sqrt_interval = interval<double>::right_open(1/sqrt(2.0), sqrt(2.0));
+
+ // Interval ("Barcelona", "Boston"] can not be represented because there is no 'steppable next' on
+ // lower bound "Barcelona". Ok. this is a different interval:
+ interval<string>::type city_interval = interval<string>::right_open("Barcelona", "Boston");
+
+ // Toy Time is discrete again so we can transfrom open(Time(monday,8,30), Time(monday,17,20))
+ // to right_open(Time(monday,8,31), Time(monday,17,20))
+ interval<Time>::type time_interval = interval<Time>::right_open(Time(monday,8,31), Time(monday,17,20));
+
+ cout << "----- Statically bounded intervals ----------------------------------------\n";
+ cout << "right_open_interval<int> : " << int_interval << endl;
+ cout << "right_open_interval<double>: " << sqrt_interval << " does "
+ << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT")
+ << " contain sqrt(2)" << endl;
+ cout << "right_open_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval,"Barcelona")?"":"NOT")
+ << " contain 'Barcelona'" << endl;
+ cout << "right_open_interval<string>: " << city_interval << " does "
+ << string(contains(city_interval, "Boston")?"":"NOT")
+ << " contain 'Boston'" << endl;
+ cout << "right_open_interval<Time> : " << time_interval << "\n\n";
+
+ // Using statically bounded intervals does not allows to apply operations
+ // with elements on all interval containers, if their domain_type is continuous.
+ // The code that follows is identical to example 'dynamic_interval'. Only 'internally'
+ // the library default for the interval template now is 'right_open_interval'
+ interval<rational<int> >::type unit_interval
+ = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1));
+ interval_set<rational<int> > unit_set(unit_interval);
+ interval_set<rational<int> > ratio_set(unit_set);
+ // ratio_set -= rational<int>(1,3); // This line will not compile, because we can not
+ // represent a singleton interval as right_open_interval.
+ return 0;
+}
+
+// Program output:
+//>> Interval Container Library: Sample static_interval.cpp <<
+//------------------------------------------------------------
+//----- Statically bounded intervals ----------------------------------------
+//right_open_interval<int> : [3,8)
+//right_open_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2)
+//right_open_interval<string>: [Barcelona,Boston) does contain 'Barcelona'
+//right_open_interval<string>: [Barcelona,Boston) does NOT contain 'Boston'
+//right_open_interval<Time> : [mon:08:31,mon:17:20)
+//]
+

Added: sandbox/icl/libs/icl/example/static_interval_/vc9_static_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/static_interval_/vc9_static_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_static_interval"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}"
+ RootNamespace="Static_interval"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\static_interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\static_interval.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/std_copy_/std_copy.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/std_copy_/std_copy.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,107 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example std_copy.cpp \file std_copy.cpp
+ \brief Fill interval containers using std::copy.
+
+ Example std_copy shows how algorithm std::copy can be used to
+ fill interval containers from other std::containers and how copying
+ to interval containers differs from other uses of std::copy.
+
+ \include std_copy_/std_copy.cpp
+*/
+//[example_std_copy
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/iterator.hpp> // needed for icl::inserter and
+ // icl::adder.
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+// 'make_segments' returns a vector of interval value pairs, which
+// are not sorted. The values are taken from the minimal example
+// in section 'interval combining styles'.
+vector<pair<discrete_interval<int>, int> > make_segments()
+{
+ vector<pair<discrete_interval<int>, int> > segment_vec;
+ segment_vec.push_back(make_pair(discrete_interval<int>::right_open(2,4), 1));
+ segment_vec.push_back(make_pair(discrete_interval<int>::right_open(4,5), 1));
+ segment_vec.push_back(make_pair(discrete_interval<int>::right_open(1,3), 1));
+ return segment_vec;
+}
+
+// 'show_segments' displays the source segements.
+void show_segments(const vector<pair<discrete_interval<int>, int> >& segments)
+{
+ vector<pair<discrete_interval<int>, int> >::const_iterator iter = segments.begin();
+ while(iter != segments.end())
+ {
+ cout << "(" << iter->first << "," << iter->second << ")";
+ ++iter;
+ }
+}
+
+void std_copy()
+{
+ // So we have some segments stored in an std container.
+ vector<pair<discrete_interval<int>, int> > segments = make_segments();
+ // Display the input
+ cout << "input sequence: "; show_segments(segments); cout << "\n\n";
+
+ // We are going to 'std::copy' those segments into an interval_map:
+ interval_map<int,int> segmap;
+
+ // Use an 'icl::inserter' from <boost/icl/iterator.hpp> to call
+ // insertion on the interval container.
+ std::copy(segments.begin(), segments.end(),
+ icl::inserter(segmap, segmap.end()));
+ cout << "icl::inserting: " << segmap << endl;
+ segmap.clear();
+
+ // When we are feeding data into interval_maps, most of the time we are
+ // intending to compute an aggregation result. So we are not interested
+ // the std::insert semantincs but the aggregating icl::addition semantics.
+ // To achieve this there is an icl::add_iterator and an icl::adder function
+ // provided in <boost/icl/iterator.hpp>.
+ std::copy(segments.begin(), segments.end(),
+ icl::adder(segmap, segmap.end())); //Aggregating associated values
+ cout << "icl::adding : " << segmap << endl;
+
+ // In this last case, the semantics of 'std::copy' transforms to the
+ // generalized addition operation, that is implemented by operator
+ // += or + on itl maps and sets.
+}
+
+int main()
+{
+ cout << ">> Interval Container Library: Example std_copy.cpp <<\n";
+ cout << "-----------------------------------------------------------\n";
+ cout << "Using std::copy to fill an interval_map:\n\n";
+
+ std_copy();
+ return 0;
+}
+
+// Program output:
+/*---------------------------------------------------------
+>> Interval Container Library: Example std_copy.cpp <<
+-----------------------------------------------------------
+Using std::copy to fill an interval_map:
+
+input sequence: ([2,4),1)([4,5),1)([1,3),1)
+
+icl::inserting: {([1,5)->1)}
+icl::adding : {([1,2)->1)([2,3)->2)([3,5)->1)}
+---------------------------------------------------------*/
+//]

Added: sandbox/icl/libs/icl/example/std_copy_/vc9_std_copy.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/std_copy_/vc9_std_copy.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_std_copy"
+ ProjectGUID="{8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}"
+ RootNamespace="std_copy"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\std_copy.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/std_transform_/std_transform.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/std_transform_/std_transform.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,151 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example std_transform.cpp \file std_transform.cpp
+ \brief Fill interval containers from user defined objects using std::transform.
+
+ Example std_transform shows how algorithm std::transform can be used to
+ fill interval containers from std::containers of objects of a user
+ defined class.
+
+ \include std_transform_/std_transform.cpp
+*/
+//[example_std_transform
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/iterator.hpp> // needed for icl::inserter and
+ // icl::adder.
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+// Suppose we are working with a class called MyObject, containing some
+// information about interval bounds e.g. _from, _to and some data members
+// that carry associated information like e.g. _value.
+class MyObject
+{
+public:
+ MyObject(){}
+ MyObject(int from, int to, int value): _from(from), _to(to), _value(value){}
+ int from()const {return _from;}
+ int to()const {return _to;}
+ int value()const{return _value;}
+private:
+ int _from;
+ int _to;
+ int _value;
+};
+
+// ... in order to use the std::transform algorithm to fill
+// interval maps with MyObject data we need a function
+// 'to_segment' that maps an object of type MyObject into
+// the value type to the interval map we want to tranform to ...
+pair<discrete_interval<int>, int> to_segment(const MyObject& myObj)
+{
+ return std::pair< discrete_interval<int>, int >
+ (discrete_interval<int>::closed(myObj.from(), myObj.to()), myObj.value());
+}
+
+// ... there may be another function that returns the interval
+// of an object only
+discrete_interval<int> to_interval(const MyObject& myObj)
+{
+ return discrete_interval<int>::closed(myObj.from(), myObj.to());
+}
+
+
+// ... make_object computes a sequence of objects to test.
+vector<MyObject> make_objects()
+{
+ vector<MyObject> object_vec;
+ object_vec.push_back(MyObject(2,3,1));
+ object_vec.push_back(MyObject(4,4,1));
+ object_vec.push_back(MyObject(1,2,1));
+ return object_vec;
+}
+
+// ... show_objects displays the sequence of input objects.
+void show_objects(const vector<MyObject>& objects)
+{
+ vector<MyObject>::const_iterator iter = objects.begin();
+ while(iter != objects.end())
+ {
+ cout << "([" << iter->from() << "," << iter->to() << "],"
+ << iter->value() << ")";
+ ++iter;
+ }
+}
+
+
+void std_transform()
+{
+ // This time we want to transform objects into a splitting interval map:
+ split_interval_map<int,int> segmap;
+ vector<MyObject> myObjects = make_objects();
+
+ // Display the input
+ cout << "input sequence: "; show_objects(myObjects); cout << "\n\n";
+
+ // Use an icl::inserter to fill the interval map via inserts
+ std::transform(myObjects.begin(), myObjects.end(),
+ icl::inserter(segmap, segmap.end()),
+ to_segment);
+ cout << "icl::inserting: " << segmap << endl;
+ segmap.clear();
+
+ // In order to compute aggregation results on associated values, we
+ // usually want to use an icl::adder instead of an std or icl::inserter
+ std::transform(myObjects.begin(), myObjects.end(),
+ icl::adder(segmap, segmap.end()),
+ to_segment);
+ cout << "icl::adding : " << segmap << "\n\n";
+
+ separate_interval_set<int> segset;
+ std::transform(myObjects.begin(), myObjects.end(),
+ icl::adder (segset, segset.end()),
+ // could be a icl::inserter(segset, segset.end()), here: same effect
+ to_interval);
+
+ cout << "Using std::transform to fill a separate_interval_set:\n\n";
+ cout << "icl::adding : " << segset << "\n\n";
+}
+
+
+int main()
+{
+ cout << ">> Interval Container Library: Example std_transform.cpp <<\n";
+ cout << "------------------------------------------------------------\n";
+ cout << "Using std::transform to fill a split_interval_map:\n\n";
+
+ std_transform();
+ return 0;
+}
+
+// Program output:
+/*----------------------------------------------------------
+>> Interval Container Library: Example std_transform.cpp <<
+------------------------------------------------------------
+Using std::transform to fill a split_interval_map:
+
+input sequence: ([2,3],1)([4,4],1)([1,2],1)
+
+icl::inserting: {([1,2)->1)([2,3]->1)([4,4]->1)}
+icl::adding : {([1,2)->1)([2,2]->2)((2,3]->1)([4,4]->1)}
+
+Using std::transform to fill a separate_interval_set:
+
+icl::adding : {[1,3][4,4]}
+----------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/std_transform_/vc9_std_transform.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/std_transform_/vc9_std_transform.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_std_transform"
+ ProjectGUID="{8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}"
+ RootNamespace="std_transform"
+ 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="4"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\std_transform.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/example/toytime.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/toytime.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,74 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4996) // This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
+#endif
+
+namespace boost{namespace icl
+{
+
+/** Time is a toy-class to demonstrate a class that conforms the requirements of
+ a template parameter for class template icl::interval.
+
+ In real world applications you may want to use the integer representation of a
+ time variable. That way intervals and their containers are working most efficiently.
+*/
+
+enum {sunday=0, monday, tuesday, wednesday, thursday, friday, saturday};
+static const char* daynames[] = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"};
+
+class Time
+{
+public:
+ Time(): m_time(0) {}
+ Time(int hours, int minutes): m_time(60*hours+minutes) {}
+ Time(int day, int hours, int minutes): m_time((24*60)*day+60*hours+minutes) {}
+ int getDay()const { return m_time/(24*60); }
+ int getHours()const { return (m_time%(24*60))/60; }
+ int getMinutes()const { return (m_time%(24*60))%60; }
+ int asInt()const { return m_time; }
+ std::string getDayString()const { return daynames[getDay()]; }
+
+ std::string as_string()const
+ {
+ const int MAX_TIMESTING_LEN = 256;
+ char repr[MAX_TIMESTING_LEN];
+ sprintf(repr, "%3s:%02d:%02d", getDayString().c_str(), getHours(), getMinutes());
+ return std::string(repr);
+ }
+
+ Time& operator ++ () { m_time++; return *this; }
+ Time& operator -- () { m_time--; return *this; }
+
+private:
+ int m_time;
+};
+
+
+bool operator < (const Time& x1, const Time& x2) { return x1.asInt() < x2.asInt(); }
+bool operator == (const Time& x1, const Time& x2) { return x1.asInt() == x2.asInt(); }
+bool operator <= (const Time& x1, const Time& x2) { return x1.asInt() <= x2.asInt(); }
+
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits> &operator<<
+ (std::basic_ostream<CharType, CharTraits> &stream, Time const& value)
+{
+ return stream << value.as_string();
+}
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+}} // namespace icl boost
+

Added: sandbox/icl/libs/icl/example/user_groups_/user_groups.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/user_groups_/user_groups.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,199 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+/** Example user_groups.cpp \file user_groups.cpp
+ \brief Shows the availability of set operations on interval maps.
+
+ In the example there is a user group 'med_users' of a hosptial staff
+ that has the authorisation to handle medical data of patients.
+ User group 'admin_users' has access to administrative data like
+ health insurance and invoice data.
+
+ The membership for each user in one of the user groups has a time
+ interval of validity. The group membership begins and ends.
+
+ Using a union operation '+' we can have an overview over both
+ user groups and the membership dates of employees.
+
+ Computing an intersection '&' shows the super users. The persons
+ that are members of both med_users and admin_users and the times
+ of the joint memberships.
+
+ \include user_groups_/user_groups.cpp
+*/
+//[example_user_groups
+#include <iostream>
+
+// The next line includes <boost/gregorian/date.hpp>
+// and a few lines of adapter code.
+#include <boost/icl/gregorian.hpp>
+
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost::gregorian;
+using namespace boost::icl;
+
+// Type icl::set<string> collects the names a user group's members. Therefore
+// it needs to implement operator += that performs a set union on overlap of
+// intervals.
+typedef std::set<string> MemberSetT;
+
+// boost::gregorian::date is the domain type the interval map.
+// It's key values are therefore time intervals: discrete_interval<date>. The content
+// is the set of names: MemberSetT.
+typedef interval_map<date, MemberSetT> MembershipT;
+
+// Collect user groups for medical and administrative staff and perform
+// union and intersection operations on the collected membership schedules.
+void user_groups()
+{
+ MemberSetT mary_harry;
+ mary_harry.insert("Mary");
+ mary_harry.insert("Harry");
+
+ MemberSetT diana_susan;
+ diana_susan.insert("Diana");
+ diana_susan.insert("Susan");
+
+ MemberSetT chief_physician;
+ chief_physician.insert("Dr.Jekyll");
+
+ MemberSetT director_of_admin;
+ director_of_admin.insert("Mr.Hyde");
+
+ //----- Collecting members of user group: med_users -------------------
+ MembershipT med_users;
+
+ med_users.add( // add and element
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-01-01"), from_string("2008-12-31")), mary_harry));
+
+ med_users += // element addition can also be done via operator +=
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-01-15"), from_string("2008-12-31")),
+ chief_physician);
+
+ med_users +=
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-02-01"), from_string("2008-10-15")),
+ director_of_admin);
+
+ //----- Collecting members of user group: admin_users ------------------
+ MembershipT admin_users;
+
+ admin_users += // element addition can also be done via operator +=
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-03-20"), from_string("2008-09-30")), diana_susan);
+
+ admin_users +=
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-01-15"), from_string("2008-12-31")),
+ chief_physician);
+
+ admin_users +=
+ make_pair(
+ discrete_interval<date>::closed(
+ from_string("2008-02-01"), from_string("2008-10-15")),
+ director_of_admin);
+
+ MembershipT all_users = med_users + admin_users;
+
+ MembershipT super_users = med_users & admin_users;
+
+ MembershipT::iterator med_ = med_users.begin();
+ cout << "----- Membership of medical staff -----------------------------------\n";
+ while(med_ != med_users.end())
+ {
+ discrete_interval<date> when = (*med_).first;
+ // Who is member of group med_users within the time interval 'when' ?
+ MemberSetT who = (*med_++).second;
+ cout << "[" << first(when) << " - " << last(when) << "]"
+ << ": " << who << endl;
+ }
+
+ MembershipT::iterator admin_ = admin_users.begin();
+ cout << "----- Membership of admin staff -------------------------------------\n";
+ while(admin_ != admin_users.end())
+ {
+ discrete_interval<date> when = (*admin_).first;
+ // Who is member of group admin_users within the time interval 'when' ?
+ MemberSetT who = (*admin_++).second;
+ cout << "[" << first(when) << " - " << last(when) << "]"
+ << ": " << who << endl;
+ }
+
+ MembershipT::iterator all_ = all_users.begin();
+ cout << "----- Membership of all users (med + admin) -------------------------\n";
+ while(all_ != all_users.end())
+ {
+ discrete_interval<date> when = (*all_).first;
+ // Who is member of group med_users OR admin_users ?
+ MemberSetT who = (*all_++).second;
+ cout << "[" << first(when) << " - " << last(when) << "]"
+ << ": " << who << endl;
+ }
+
+ MembershipT::iterator super_ = super_users.begin();
+ cout << "----- Membership of super users: intersection(med,admin) ------------\n";
+ while(super_ != super_users.end())
+ {
+ discrete_interval<date> when = (*super_).first;
+ // Who is member of group med_users AND admin_users ?
+ MemberSetT who = (*super_++).second;
+ cout << "[" << first(when) << " - " << last(when) << "]"
+ << ": " << who << endl;
+ }
+
+}
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample user_groups.cpp <<\n";
+ cout << "-------------------------------------------------------\n";
+ user_groups();
+ return 0;
+}
+
+// Program output:
+/*-----------------------------------------------------------------------------
+>>Interval Container Library: Sample user_groups.cpp <<
+-------------------------------------------------------
+----- Membership of medical staff -----------------------------------
+[2008-Jan-01 - 2008-Jan-14]: Harry Mary
+[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll Harry Mary
+[2008-Feb-01 - 2008-Oct-15]: Dr.Jekyll Harry Mary Mr.Hyde
+[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll Harry Mary
+----- Membership of admin staff -------------------------------------
+[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll
+[2008-Feb-01 - 2008-Mar-19]: Dr.Jekyll Mr.Hyde
+[2008-Mar-20 - 2008-Sep-30]: Diana Dr.Jekyll Mr.Hyde Susan
+[2008-Oct-01 - 2008-Oct-15]: Dr.Jekyll Mr.Hyde
+[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll
+----- Membership of all users (med + admin) -------------------------
+[2008-Jan-01 - 2008-Jan-14]: Harry Mary
+[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll Harry Mary
+[2008-Feb-01 - 2008-Mar-19]: Dr.Jekyll Harry Mary Mr.Hyde
+[2008-Mar-20 - 2008-Sep-30]: Diana Dr.Jekyll Harry Mary Mr.Hyde Susan
+[2008-Oct-01 - 2008-Oct-15]: Dr.Jekyll Harry Mary Mr.Hyde
+[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll Harry Mary
+----- Membership of super users: intersection(med,admin) ------------
+[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll
+[2008-Feb-01 - 2008-Oct-15]: Dr.Jekyll Mr.Hyde
+[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll
+-----------------------------------------------------------------------------*/
+//]
+

Added: sandbox/icl/libs/icl/example/user_groups_/vc9_user_groups.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/user_groups_/vc9_user_groups.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_user_groups"
+ ProjectGUID="{900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}"
+ RootNamespace="User_groups"
+ 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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="true"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseUnicodeResponseFiles="true"
+ />
+ <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="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ UseUnicodeResponseFiles="false"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ IgnoreAllDefaultLibraries="false"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\user_groups.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\interval_map.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl/example/vc9_icl_examples.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/example/vc9_icl_examples.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,110 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_copy", "std_copy_\vc9_std_copy.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_transform", "std_transform_\vc9_std_transform.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_large_bitset", "large_bitset_\vc9_large_bitset.vcproj", "{6BE62DDE-21B9-4333-BF11-AA054DD53759}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval", "interval_\vc9_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boost_party", "boost_party_\vc9_boost_party.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6613F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval_container", "interval_container_\vc9_interval_container.vcproj", "{278324CE-9EC1-4D16-B637-E91A07F9DD81}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_man_power", "man_power_\vc9_man_power.vcproj", "{8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_month_and_week_grid", "month_and_week_grid_\vc9_month_and_week_grid.vcproj", "{360BCFA9-9EB6-4D22-8469-CDC290478F78}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_overlap_counter", "overlap_counter_\vc9_overlap_counter.vcproj", "{8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_party", "party_\vc9_party.vcproj", "{6BE62DDE-21B9-4333-BF11-AA054DD43759}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_height_average", "partys_height_average_\vc9_partys_height_average.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6633F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_tallest_guests", "partys_tallest_guests_\vc9_partys_tallest_guests.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6623F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_user_groups", "user_groups_\vc9_user_groups.vcproj", "{900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_custom_interval", "custom_interval_\vc9_custom_interval.vcproj", "{0D1DB87E-E72A-4FE9-A067-1907CC6614F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_dynamic_interval", "dynamic_interval_\vc9_dynamic_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_static_interval", "static_interval_\vc9_static_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B84}.Release|Win32.Build.0 = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B85}.Release|Win32.Build.0 = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD53759}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD53759}.Debug|Win32.Build.0 = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD53759}.Release|Win32.ActiveCfg = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD53759}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6613F8}.Release|Win32.Build.0 = Release|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Debug|Win32.ActiveCfg = Debug|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Debug|Win32.Build.0 = Debug|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Release|Win32.ActiveCfg = Release|Win32
+ {278324CE-9EC1-4D16-B637-E91A07F9DD81}.Release|Win32.Build.0 = Release|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Debug|Win32.Build.0 = Debug|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Release|Win32.ActiveCfg = Release|Win32
+ {8B9B91C9-E79C-4F24-BD5C-04ED0F38E8C2}.Release|Win32.Build.0 = Release|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Debug|Win32.ActiveCfg = Debug|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Debug|Win32.Build.0 = Debug|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Release|Win32.ActiveCfg = Release|Win32
+ {360BCFA9-9EB6-4D22-8469-CDC290478F78}.Release|Win32.Build.0 = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Debug|Win32.Build.0 = Debug|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Release|Win32.ActiveCfg = Release|Win32
+ {8DC9BDE4-E5A4-4294-A12F-D75FD6990B83}.Release|Win32.Build.0 = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Debug|Win32.Build.0 = Debug|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Release|Win32.ActiveCfg = Release|Win32
+ {6BE62DDE-21B9-4333-BF11-AA054DD43759}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6633F8}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6623F8}.Release|Win32.Build.0 = Release|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Debug|Win32.Build.0 = Debug|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Release|Win32.ActiveCfg = Release|Win32
+ {900B8478-E01B-4ECD-A4D6-DC88DD5BF4A1}.Release|Win32.Build.0 = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6614F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6614F8}.Debug|Win32.Build.0 = Debug|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6614F8}.Release|Win32.ActiveCfg = Release|Win32
+ {0D1DB87E-E72A-4FE9-A067-1907CC6614F8}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/icl/prj_home/boost_powered_by.png
==============================================================================
Binary file. No diff available.

Added: sandbox/icl/libs/icl/prj_home/logo_cortex.png
==============================================================================
Binary file. No diff available.

Added: sandbox/icl/libs/icl/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,61 @@
+# (C) Copyright 2008-2009: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+# bring in rules for testing
+import testing ;
+import feature ;
+
+project
+ : requirements
+ <library>/boost/test//boost_unit_test_framework
+ <library>/boost/date_time//boost_date_time
+ <link>static
+ <include>../../..
+ ;
+
+test-suite "itl"
+ :
+ # interval
+ [ run fastest_icl_interval_/fastest_icl_interval.cpp ]
+
+ # sets
+ [ run fastest_interval_set_/fastest_interval_set.cpp ]
+ [ run fastest_interval_set_infix_/fastest_interval_set_infix.cpp ]
+
+ [ run fastest_separate_interval_set_/fastest_separate_interval_set.cpp ]
+ [ run fastest_separate_interval_set_infix_/fastest_separate_interval_set_infix.cpp ]
+
+ [ run fastest_split_interval_set_/fastest_split_interval_set.cpp ]
+ [ run fastest_split_interval_set_infix_/fastest_split_interval_set_infix.cpp ]
+
+ [ run fastest_interval_set_mixed_/fastest_interval_set_mixed.cpp ]
+
+ # maps
+ [ run fastest_interval_map_/fastest_interval_map.cpp ]
+ [ run fastest_interval_map_infix_/fastest_interval_map_infix.cpp ]
+ [ run fastest_split_interval_map_/fastest_split_interval_map.cpp ]
+ [ run fastest_split_interval_map_infix_/fastest_split_interval_map_infix.cpp ]
+ [ run fastest_interval_map_mixed_/fastest_interval_map_mixed.cpp ]
+ [ run fastest_interval_map_mixed2_/fastest_interval_map_mixed2.cpp ]
+ [ run fastest_interval_map_infix_mixed_/fastest_interval_map_infix_mixed.cpp ]
+ [ run fastest_icl_map_/fastest_icl_map.cpp ]
+
+ # handcoded tests using laws (not LaBatea) -------------------------------
+ # Concept Set
+ [ run fastest_set_interval_set_/fastest_set_interval_set.cpp ]
+ [ run fastest_set_icl_set_/fastest_set_icl_set.cpp ]
+
+ # Concept Map
+ [ run fastest_partial_interval_quantifier_/fastest_partial_interval_quantifier.cpp ]
+ [ run fastest_total_interval_quantifier_/fastest_total_interval_quantifier.cpp ]
+ [ run fastest_partial_icl_quantifier_/fastest_partial_icl_quantifier.cpp ]
+ [ run fastest_total_icl_quantifier_/fastest_total_icl_quantifier.cpp ]
+
+ # Misc -------------------------------------------------------------------
+ [ run test_misc_/test_misc.cpp ]
+ [ run test_doc_code_/test_doc_code.cpp ]
+ [ run test_type_traits_/test_type_traits.cpp ]
+ [ run test_combinable_/test_combinable.cpp ]
+ [ run test_changing_interval_defaults_/test_changing_interval_defaults.cpp ]
+ ;

Added: sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,162 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_interval_laws.hpp"
+
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/left_open_interval.hpp>
+#include <boost/icl/closed_interval.hpp>
+#include <boost/icl/open_interval.hpp>
+
+#include <boost/icl/discrete_interval.hpp>
+#include <boost/icl/continuous_interval.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_icl_interval_shared.hpp"
+#include "../test_icl_interval.hpp"
+#include "../test_icl_dynamic_interval.hpp"
+#include "../test_icl_discrete_interval.hpp"
+#include "../test_icl_continuous_interval.hpp"
+#include "../test_icl_static_interval.hpp"
+
+//==============================================================================
+//= Traits
+//==============================================================================
+BOOST_AUTO_TEST_CASE
+(fastest_itl_discrete_interval_traits)
+{ discrete_interval_traits<discrete_type_1, discrete_interval<discrete_type_1> >(); }
+
+//==============================================================================
+
+//- sta.asy.{dis|con} ----------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_right_open_interval_ctor_4_ordered_types)
+{ interval_ctor_4_ordered_types<right_open_interval<ordered_type_1> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_right_open_interval_4_ordered_types)
+{ singelizable_interval_4_ordered_types<right_open_interval<discrete_type_1> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_right_open_interval_4_bicremental_types)
+{ singelizable_interval_4_bicremental_types<right_open_interval<discrete_type_2> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_left_open_interval_ctor_4_ordered_types)
+{ interval_ctor_4_ordered_types<left_open_interval<ordered_type_2> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_left_open_interval_4_ordered_types_singelizable)
+{ singelizable_interval_4_ordered_types<left_open_interval<signed_discrete_type_1> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_left_open_interval_4_bicremental_types)
+{ singelizable_interval_4_bicremental_types<left_open_interval<discrete_type_4> >(); }
+
+
+//- dyn.dis --------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_discrete_interval_ctor_4_discrete_types_base)
+{ interval_ctor_4_ordered_types<discrete_interval<discrete_type_1> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_discrete_interval_ctor_4_discrete_types_dynamic)
+{ dynamic_interval_ctor_4_ordered_types<discrete_interval<discrete_type_2> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_discrete_interval_4_ordered_types)
+{ singelizable_interval_4_ordered_types<discrete_interval<discrete_type_3> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_discrete_interval_4_bicremental_types)
+{ singelizable_interval_4_bicremental_types<discrete_interval<discrete_type_3> >(); }
+
+//- dyn.con --------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_continuous_interval_ctor_4_continuous_types_base)
+{ interval_ctor_4_ordered_types<continuous_interval<continuous_type_1> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_continuous_interval_ctor_4_continuous_types_dynamic)
+{ dynamic_interval_ctor_4_ordered_types<continuous_interval<continuous_type_2> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_continuous_interval_4_continuous_types_singelizable)
+{ singelizable_interval_4_ordered_types<continuous_interval<continuous_type_3> >(); }
+
+//------------------------------------------------------------------------------
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_distant_intervals_4_discrete_types)
+{ distant_intervals_4_discrete_types<discrete_type_1, std::less>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_distant_intervals_4_numeric_continuous_types)
+{ distant_intervals_4_numeric_continuous_types<numeric_continuous_type_1, std::less>(); }
+
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_dynamic_interval_bounds_4_bicremental_types)
+{ dynamic_interval_bounds_4_bicremental_types<bicremental_type_2>(); }
+
+//==============================================================================
+//==============================================================================
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_equal_4_integral_types)
+{ interval_equal_4_integral_types<integral_type_2>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_less_4_integral_types)
+{ interval_less_4_integral_types<integral_type_3>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_touches_4_bicremental_types)
+{ interval_touches_4_bicremental_types<bicremental_type_1>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_touches_4_integral_types)
+{ interval_touches_4_integral_types<integral_type_4>(); }
+
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_ctor_specific)
+{ interval_ctor_specific(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_equal_4_bicremental_continuous_types)
+{ interval_equal_4_bicremental_continuous_types<bicremental_continuous_type_1>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_infix_intersect_4_bicremental_types)
+{ interval_infix_intersect_4_bicremental_types<bicremental_type_4>(); }
+
+#else
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_infix_intersect_4_bicremental_types)
+{ interval_infix_intersect_4_bicremental_types<discrete_type_2>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_subtract_4_bicremental_types)
+{ interval_subtract_4_bicremental_types<bicremental_type_5>(); }
+
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS

Added: sandbox/icl/libs/icl/test/fastest_icl_interval_/vc9_fastest_icl_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_icl_interval_/vc9_fastest_icl_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_icl_interval"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}"
+ RootNamespace="Fastest_icl_interval"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_icl_interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::itl_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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 <set>
+#include <boost/icl/associative_element_container.hpp>
+#include <boost/icl/map.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_map.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "fastest_icl_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_icl_map_/fastest_icl_map_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,19 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_map_contains_4_bicremental_types)
+{ itl_map_contains_4_bicremental_types<discrete_type_1, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_map_find_4_bicremental_types)
+{ itl_map_find_4_bicremental_types<discrete_type_1, int, partial_absorber, INTERVAL_MAP>();}
+
+#endif // BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701

Added: sandbox/icl/libs/icl/test/fastest_icl_map_/vc9_fastest_icl_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_icl_map_/vc9_fastest_icl_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_icl_map"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}"
+ RootNamespace="Fastest_icl_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_icl_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_map_/fastest_interval_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_/fastest_interval_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_map_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fastest_interval_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_/vc9_fastest_interval_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_/vc9_fastest_interval_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_map"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}"
+ RootNamespace="Fastest_interval_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_map_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,84 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_INTERVAL_MAP_CASES_HPP_JOFA_090702
+#define BOOST_ICL_FASTEST_INTERVAL_MAP_CASES_HPP_JOFA_090702
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_fundamentals_4_ordered_types)
+{ interval_map_fundamentals_4_ordered_types<INTERVAL_MAP, ordered_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_ctor_4_bicremental_types)
+{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_add_sub_4_bicremental_types)
+{ interval_map_add_sub_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_distinct_4_bicremental_types)
+{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_distinct_4_bicremental_continuous_types)
+{ interval_map_distinct_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_isolate_4_bicremental_continuous_types)
+{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_contains_4_bicremental_types)
+{ interval_map_contains_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_contains_key_objects_4_bicremental_types)
+{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_operators_4_bicremental_types)
+{ interval_map_operators_4_bicremental_types<INTERVAL_MAP, bicremental_type_5, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_intersect_4_bicremental_types)
+{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_erase_4_bicremental_types)
+{ interval_map_base_erase_4_bicremental_types<INTERVAL_MAP, bicremental_type_7, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_is_disjoint_4_bicremental_types)
+{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_flip_4_bicremental_types)
+{ interval_map_flip_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_find_4_bicremental_types)
+{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_set_4_bicremental_types)
+{ interval_map_set_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_inclusion_compare_4_bicremental_types)
+{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_std_copy_via_inserter_4_bicremental_types)
+{ interval_map_std_copy_via_inserter_4_bicremental_types<bicremental_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_element_iter_4_discrete_types)
+{ interval_map_element_iter_4_discrete_types<discrete_type_2, int, partial_absorber, INTERVAL_MAP>();}
+
+
+#endif // BOOST_ICL_FASTEST_INTERVAL_MAP_CASES_HPP_JOFA_090702
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_infix_/fastest_interval_map_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_infix_/fastest_interval_map_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_map_shared are tests that should give identical results for all
+// interval_maps: interval_map and split_interval_map.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_interval_map_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_infix_/vc9_fastest_interval_map_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_infix_/vc9_fastest_interval_map_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_map_infix"
+ ProjectGUID="{0FBD7F60-6470-41BB-8F8C-F47E9765C011}"
+ RootNamespace="Fastest_interval_map_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_map_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_map_infix_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_infix_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,32 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+#define BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+
+BOOST_AUTO_TEST_CASE
+(test_icl_interval_map_infix_plus_overload_4_bicremental_types)
+{ interval_map_infix_plus_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(test_icl_interval_map_infix_pipe_overload_4_bicremental_types)
+{ interval_map_infix_pipe_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(test_icl_interval_map_infix_minus_overload_4_bicremental_types)
+{ interval_map_infix_minus_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(test_icl_interval_map_infix_et_overload_4_bicremental_types)
+{ interval_map_infix_et_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(test_icl_interval_map_infix_caret_overload_4_bicremental_types)
+{ interval_map_infix_caret_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
+#endif // BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/fastest_interval_map_infix_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/fastest_interval_map_infix_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,44 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_infix_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_map_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_infix_plus_overload_4_bicremental_types)
+{ interval_map_mixed_infix_plus_overload_4_bicremental_types<bicremental_type_1, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_infix_pipe_overload_4_bicremental_types)
+{ interval_map_mixed_infix_pipe_overload_4_bicremental_types<bicremental_type_2, double>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_infix_minus_overload_4_bicremental_types)
+{ interval_map_mixed_infix_minus_overload_4_bicremental_types<bicremental_type_3, boost::rational<int> >(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_infix_et_overload_4_bicremental_types)
+{ interval_map_mixed_infix_et_overload_4_bicremental_types<bicremental_type_4, int>(); }

Added: sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/vc9_fastest_interval_map_infix_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_infix_mixed_/vc9_fastest_interval_map_infix_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_map_infix_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}"
+ RootNamespace="Fastest_interval_map_infix_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_map_infix_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_map_mixed2_/fastest_interval_map_mixed2.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/fastest_interval_map_mixed2.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,83 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_map_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_add_4_bicremental_types)
+{ interval_map_mixed_add_4_bicremental_types<bicremental_type_1, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_add2_4_bicremental_types)
+{ interval_map_mixed_add2_4_bicremental_types<bicremental_type_2, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_subtract_4_bicremental_types)
+{ interval_map_mixed_subtract_4_bicremental_types<bicremental_type_3, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_erase_4_bicremental_types)
+{ interval_map_mixed_erase_4_bicremental_types<bicremental_type_4, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_erase2_4_bicremental_types)
+{ interval_map_mixed_erase2_4_bicremental_types<bicremental_type_5, int>(); }
+
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_insert_erase_4_bicremental_types)
+{ interval_map_mixed_insert_erase_4_bicremental_types<bicremental_type_6, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_insert_erase2_4_bicremental_types)
+{ interval_map_mixed_insert_erase2_4_bicremental_types<bicremental_type_7, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_basic_intersect_4_bicremental_types)
+{ interval_map_mixed_basic_intersect_4_bicremental_types<bicremental_type_8, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_basic_intersect2_4_bicremental_types)
+{ interval_map_mixed_basic_intersect2_4_bicremental_types<bicremental_type_1, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_intersect_4_bicremental_types)
+{ interval_map_mixed_intersect_4_bicremental_types<bicremental_type_2, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_intersect2_4_bicremental_types)
+{ interval_map_mixed_intersect2_4_bicremental_types<bicremental_type_3, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_disjoint_4_bicremental_types)
+{ interval_map_mixed_disjoint_4_bicremental_types<bicremental_type_4, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_erase_if_4_integral_types)
+{ interval_map_mixed_erase_if_4_integral_types<int, int>(); }
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/vc9_fastest_interval_map_mixed2.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_mixed2_/vc9_fastest_interval_map_mixed2.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_map_mixed2"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}"
+ RootNamespace="Fastest_interval_map_mixed2"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_map_mixed2.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_map_mixed_/fastest_interval_map_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/fastest_interval_map_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,62 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_map_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_ctor_4_ordered_types)
+{ interval_map_mixed_ctor_4_ordered_types<std::string, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_equal_4_ordered_types)
+{ interval_map_mixed_equal_4_ordered_types<double, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_assign_4_ordered_types)
+{ interval_map_mixed_assign_4_ordered_types<unsigned int, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_ctor_4_bicremental_types)
+{ interval_map_mixed_ctor_4_bicremental_types<bicremental_type_1, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_assign_4_bicremental_types)
+{ interval_map_mixed_assign_4_bicremental_types<bicremental_type_2, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_mixed_equal_4_bicremental_types)
+{ interval_map_mixed_equal_4_bicremental_types<bicremental_type_3, int>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_interval_map_mixed_inclusion_compare_4_bicremental_types)
+{ partial_interval_map_mixed_inclusion_compare_4_bicremental_types<bicremental_type_4, int, partial_absorber>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_interval_map_mixed_contains_4_bicremental_types)
+{ partial_interval_map_mixed_contains_4_bicremental_types<int, int, partial_absorber>(); }
+

Added: sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/vc9_fastest_interval_map_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_mixed_/vc9_fastest_interval_map_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_map_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}"
+ RootNamespace="Fastest_interval_map_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_map_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\fastest_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_set_/fastest_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_/fastest_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET interval_set
+#include "../fastest_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_set_/vc9_fastest_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_/vc9_fastest_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}"
+ RootNamespace="Fastest_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,66 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_INTERVAL_SET_CASES_HPP_JOFA_090702
+#define BOOST_ICL_FASTEST_INTERVAL_SET_CASES_HPP_JOFA_090702
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_fundamentals_4_ordered_types)
+{ interval_set_fundamentals_4_ordered_types<INTERVAL_SET, ordered_type_1>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_ctor_4_bicremental_types)
+{ interval_set_ctor_4_bicremental_types<INTERVAL_SET, bicremental_type_1>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_add_sub_4_bicremental_types)
+{ interval_set_add_sub_4_bicremental_types<INTERVAL_SET, bicremental_type_2>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_distinct_4_bicremental_types)
+{ interval_set_distinct_4_bicremental_types<INTERVAL_SET, bicremental_type_3>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_distinct_4_bicremental_continuous_types)
+{ interval_set_distinct_4_bicremental_continuous_types<INTERVAL_SET, continuous_type_1>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_isolate_4_bicremental_continuous_types)
+{ interval_set_isolate_4_bicremental_continuous_types<INTERVAL_SET, continuous_type_2>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_element_compare_4_bicremental_types)
+{ interval_set_element_compare_4_bicremental_types<INTERVAL_SET, bicremental_type_4>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_contains_4_bicremental_types)
+{ interval_set_contains_4_bicremental_types<INTERVAL_SET, bicremental_type_5>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_operators_4_bicremental_types)
+{ interval_set_operators_4_bicremental_types<INTERVAL_SET, bicremental_type_6>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_base_intersect_4_bicremental_types)
+{ interval_set_base_intersect_4_bicremental_types<INTERVAL_SET, bicremental_type_7>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_flip_4_bicremental_types)
+{ interval_set_flip_4_bicremental_types<INTERVAL_SET, bicremental_type_8>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_find_4_bicremental_types)
+{ interval_set_find_4_bicremental_types<INTERVAL_SET, bicremental_type_1>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_element_iter_4_discrete_types)
+{ interval_set_element_iter_4_discrete_types<INTERVAL_SET, discrete_type_2>();}
+
+#endif // BOOST_ICL_FASTEST_INTERVAL_SET_CASES_HPP_JOFA_090702
+
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_set_infix_/fastest_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_infix_/fastest_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET interval_set
+#include "../fastest_interval_set_infix_cases.hpp"
+
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_set_infix_/vc9_fastest_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_infix_/vc9_fastest_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D1623E906E}"
+ RootNamespace="Fastest_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_interval_set_infix_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_infix_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090702
+#define BOOST_ICL_FASTEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090702
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_infix_plus_overload_4_bicremental_types)
+{ interval_set_infix_plus_overload_4_bicremental_types<INTERVAL_SET, bicremental_type_1>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_infix_pipe_overload_4_bicremental_types)
+{ interval_set_infix_pipe_overload_4_bicremental_types<INTERVAL_SET, bicremental_type_2>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_infix_minus_overload_4_bicremental_types)
+{ interval_set_infix_minus_overload_4_bicremental_types<INTERVAL_SET, bicremental_type_3>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_infix_et_overload_4_bicremental_types)
+{ interval_set_infix_et_overload_4_bicremental_types<INTERVAL_SET, bicremental_type_4>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_infix_caret_overload_4_bicremental_types)
+{ interval_set_infix_caret_overload_4_bicremental_types<INTERVAL_SET, bicremental_type_5>();}
+
+#endif // BOOST_ICL_FASTEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090702
+
+
+

Added: sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/fastest_interval_set_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/fastest_interval_set_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,95 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_set_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_ctor_4_ordered_types)
+{ interval_set_mixed_ctor_4_ordered_types<int>(); }
+
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_equal_4_ordered_types)
+{ interval_set_mixed_equal_4_ordered_types<std::string>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_assign_4_ordered_types)
+{ interval_set_mixed_assign_4_ordered_types<float>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_ctor_4_bicremental_types)
+{ interval_set_mixed_ctor_4_bicremental_types<bicremental_type_1>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_assign_4_bicremental_types)
+{ interval_set_mixed_assign_4_bicremental_types<bicremental_type_2>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_equal_4_bicremental_types)
+{ interval_set_mixed_equal_4_bicremental_types<bicremental_type_3>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_contains_4_bicremental_types)
+{ interval_set_mixed_contains_4_bicremental_types<bicremental_type_4>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_add_4_bicremental_types)
+{ interval_set_mixed_add_4_bicremental_types<bicremental_type_5>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_subtract_4_bicremental_types)
+{ interval_set_mixed_subtract_4_bicremental_types<bicremental_type_6>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_erase_4_bicremental_types)
+{ interval_set_mixed_erase_4_bicremental_types<bicremental_type_7>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_basic_intersect_4_bicremental_types)
+{ interval_set_mixed_basic_intersect_4_bicremental_types<bicremental_type_8>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_disjoint_4_bicremental_types)
+{ interval_set_mixed_disjoint_4_bicremental_types<bicremental_type_1>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_infix_plus_overload_4_bicremental_types)
+{ interval_set_mixed_infix_plus_overload_4_bicremental_types<bicremental_type_2>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_infix_pipe_overload_4_bicremental_types)
+{ interval_set_mixed_infix_pipe_overload_4_bicremental_types<bicremental_type_3>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_infix_minus_overload_4_bicremental_types)
+{ interval_set_mixed_infix_minus_overload_4_bicremental_types<bicremental_type_4>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_infix_et_overload_4_bicremental_types)
+{ interval_set_mixed_infix_et_overload_4_bicremental_types<bicremental_type_5>(); }
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_mixed_infix_caret_overload_4_bicremental_types)
+{ interval_set_mixed_infix_caret_overload_4_bicremental_types<bicremental_type_6>(); }

Added: sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/vc9_fastest_interval_set_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_interval_set_mixed_/vc9_fastest_interval_set_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_interval_set_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}"
+ RootNamespace="Fastest_interval_set_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_interval_set_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_partial_icl_quantifier_/fastest_partial_icl_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/fastest_partial_icl_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::partial_icl_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fastest_partial_icl_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/vc9_fastest_partial_icl_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_/vc9_fastest_partial_icl_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_partial_icl_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}"
+ RootNamespace="Fastest_partial_icl_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_partial_icl_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_partial_icl_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_icl_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,77 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+#define BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+
+//------------------------------------------------------------------------------
+// partial_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_1, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_2, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_3, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+// x - x = 0 | partial absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types<bicremental_type_5, int, partial_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// partial_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_6, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_7, int, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_8, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_1, int, partial_enricher, INTERVAL_MAP>();}
+
+// x - x =p= 0 | partial enricher
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types)
+{ icl_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types<bicremental_type_2, int, partial_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
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_icl_quantifier_check_containedness_4_bicremental_types)
+{ icl_quantifier_check_containedness_4_bicremental_types<bicremental_type_1, mono, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_icl_quantifier_check_containedness_4_bicremental_types)
+{ icl_quantifier_check_containedness_4_bicremental_types<bicremental_type_1, mono, partial_enricher, INTERVAL_MAP>();}
+
+
+#endif // BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+

Added: sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/fastest_partial_interval_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/fastest_partial_interval_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::partial_interval_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fastest_partial_interval_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/vc9_fastest_partial_interval_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_/vc9_fastest_partial_interval_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_partial_interval_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}"
+ RootNamespace="Fastest_partial_interval_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_partial_interval_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_partial_interval_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_partial_interval_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,84 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+#define BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+
+//------------------------------------------------------------------------------
+// partial_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_itv_quantifier_check_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_1, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_itv_quantifier_check_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_2, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_3, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_itv_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+// x - x = 0 | partial absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types<bicremental_type_5, int, partial_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// partial_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_6, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_7, int, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_8, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_1, int, partial_enricher, INTERVAL_MAP>();}
+
+// x - x =p= 0 | partial enricher
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types)
+{ itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types<bicremental_type_2, int, partial_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
+
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_inner_complementarity_4_bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<bicremental_type_4, int, partial_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_enricher_itv_quantifier_check_length_complementarity_4_bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<bicremental_type_5, double, partial_enricher, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_absorber_itv_quantifier_check_inner_complementarity_4_bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<bicremental_type_6, int, partial_absorber, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_partial_absorber_itv_quantifier_check_length_complementarity_4_bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<bicremental_type_7, double, partial_absorber, interval_map>();}
+
+#endif // BOOST_ICL_FASTEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+

Added: sandbox/icl/libs/icl/test/fastest_separate_interval_set_/fastest_separate_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_separate_interval_set_/fastest_separate_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::separate_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET separate_interval_set
+#include "../fastest_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_separate_interval_set_/vc9_fastest_separate_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_separate_interval_set_/vc9_fastest_separate_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_separate_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}"
+ RootNamespace="Fastest_separate_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_separate_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_separate_interval_set_infix_/fastest_separate_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/fastest_separate_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::separate_interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET separate_interval_set
+#include "../fastest_interval_set_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/vc9_fastest_separate_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_separate_interval_set_infix_/vc9_fastest_separate_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_separate_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D2623E911E}"
+ RootNamespace="Fastest_separate_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_separate_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::set_itl_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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 <set>
+#include <boost/icl/associative_element_container.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_set.hpp"
+
+#include "fastest_set_icl_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_SET_ICL_SET_CASES_HPP_JOFA_090703
+#define BOOST_ICL_FASTEST_SET_ICL_SET_CASES_HPP_JOFA_090703
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_set_check_monoid_plus_4_bicremental_types)
+{ itl_set_check_monoid_plus_4_bicremental_types<discrete_type_1, interval_set>();}
+ //MEMO: interval_set
+// is used here pragmatically to be able to recycle test code for initializing
+// sets. These interval_set are then converted to icl::set by atomize.
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_set_check_abelian_monoid_plus_4_bicremental_types)
+{ itl_set_check_abelian_monoid_plus_4_bicremental_types<discrete_type_2, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_set_check_abelian_monoid_et_4_bicremental_types)
+{ itl_set_check_abelian_monoid_et_4_bicremental_types<discrete_type_3, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_itl_set_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<discrete_type_4, interval_set>();}
+
+#endif // BOOST_ICL_FASTEST_SET_ICL_SET_CASES_HPP_JOFA_090703
+
+

Added: sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_icl_set_/fastest_set_icl_set_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -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, discrete_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, discrete_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, discrete_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, discrete_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, interval_set>();}
+

Added: sandbox/icl/libs/icl/test/fastest_set_icl_set_/vc9_fastest_set_icl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_icl_set_/vc9_fastest_set_icl_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_set_icl_set"
+ ProjectGUID="{33577D13-D562-4E3F-89F2-A8885151D13F}"
+ RootNamespace="Fastest_set_icl_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_set_icl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::set_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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"
+
+#include "fastest_set_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_interval_set_/fastest_set_interval_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,117 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090703
+#define BOOST_ICL_FASTEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090703
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_monoid_plus_4_bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<bicremental_type_1, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_abelian_monoid_plus_4_bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_2, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_abelian_monoid_et_4_bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<bicremental_type_3, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<bicremental_type_4, interval_set>();}
+
+
+//------------------------------------------------------------------------------
+// separate_interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_monoid_plus_4_bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<bicremental_type_5, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_abelian_monoid_plus_4_bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_6, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_abelian_monoid_et_4_bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<bicremental_type_7, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<bicremental_type_8, separate_interval_set>();}
+
+
+//------------------------------------------------------------------------------
+// split_interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_monoid_plus_4_bicremental_types)
+{ interval_set_check_monoid_plus_4_bicremental_types<bicremental_type_1, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_abelian_monoid_plus_4_bicremental_types)
+{ interval_set_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_2, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_abelian_monoid_et_4_bicremental_types)
+{ interval_set_check_abelian_monoid_et_4_bicremental_types<bicremental_type_3, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_partial_invertive_monoid_plus_4_bicremental_types)
+{ interval_set_check_partial_invertive_monoid_plus_4_bicremental_types<bicremental_type_4, split_interval_set>();}
+
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_containedness_4_bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<bicremental_type_4, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_containedness_4_bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<bicremental_type_5, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_containedness_4_bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<bicremental_type_6, separate_interval_set>();}
+
+//------------------------------------------------------------------------------
+// Inner Complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_inner_complementarity_4_bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<bicremental_type_7, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_inner_complementarity_4_bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<bicremental_type_8, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_inner_complementarity_4_bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<bicremental_type_1, split_interval_set>();}
+
+//------------------------------------------------------------------------------
+// Inner Complement and Distance
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_set_check_length_complementarity_4_bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<bicremental_type_2, interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_separate_interval_set_check_length_complementarity_4_bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<bicremental_type_3, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_split_interval_set_check_length_complementarity_4_bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<bicremental_type_4, split_interval_set>();}
+
+#endif // BOOST_ICL_FASTEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090703
+

Added: sandbox/icl/libs/icl/test/fastest_set_interval_set_/vc9_fastest_set_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_set_interval_set_/vc9_fastest_set_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_set_interval_set"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}"
+ RootNamespace="Fastest_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_set_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_map_shared.hpp"
+
+#define INTERVAL_MAP split_interval_map
+#include "../fastest_interval_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_map_/fastest_split_interval_map_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,72 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_map_fundamentals_4_ordered_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_map_ctor_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_map_add_sub_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_map_distinct_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_distinct_4_bicremental_continuous_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_isolate_4_bicremental_continuous_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_contains_4_bicremental_types, T, bicremental_types)
+{ interval_map_contains_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_operators_4_bicremental_types, T, bicremental_types)
+{ interval_map_operators_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_intersect_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_erase_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_erase_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_is_disjoint_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_is_disjoint_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_plus_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_pipe_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_et_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_caret_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_caret_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_find_4_bicremental_types, T, bicremental_types)
+{ interval_map_find_4_bicremental_types<split_interval_map, T, int>();}
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_map_/vc9_fastest_split_interval_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_map_/vc9_fastest_split_interval_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_split_interval_map"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}"
+ RootNamespace="Fastest_split_interval_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_split_interval_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_split_interval_map_infix_/fastest_split_interval_map_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/fastest_split_interval_map_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_map_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_map_shared are tests that should give identical results for all
+// interval_maps: interval_map and split_interval_map.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP split_interval_map
+#include "../fastest_interval_map_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/vc9_fastest_split_interval_map_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_map_infix_/vc9_fastest_split_interval_map_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_split_interval_map_infix"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A914D}"
+ RootNamespace="Fastest_split_interval_map_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_split_interval_map_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET split_interval_set
+#include "../fastest_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_set_/fastest_split_interval_set_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,56 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_set_fundamentals_4_ordered_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_set_ctor_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_set_add_sub_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_set_distinct_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_distinct_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_isolate_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_element_compare_4_bicremental_types, T, bicremental_types)
+{ interval_set_element_compare_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_contains_4_bicremental_types, T, bicremental_types)
+{ interval_set_contains_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_operators_4_bicremental_types, T, bicremental_types)
+{ interval_set_operators_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_set_base_intersect_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_plus_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_find_4_bicremental_types, T, bicremental_types)
+{ interval_set_find_4_bicremental_types<INTERVAL_SET, T>();}
+
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_set_/vc9_fastest_split_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_set_/vc9_fastest_split_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_split_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}"
+ RootNamespace="Fastest_split_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_split_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_split_interval_set_infix_/fastest_split_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/fastest_split_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET split_interval_set
+#include "../fastest_interval_set_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/vc9_fastest_split_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_split_interval_set_infix_/vc9_fastest_split_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_split_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D3623E916E}"
+ RootNamespace="Fastest_split_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_split_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_split_interval_set_infix_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_total_icl_quantifier_/fastest_total_icl_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/fastest_total_icl_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::total_icl_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fastest_total_icl_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/vc9_fastest_total_icl_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_/vc9_fastest_total_icl_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_total_icl_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}"
+ RootNamespace="Fastest_total_icl_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_total_icl_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_total_icl_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_icl_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,84 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+#define BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_1, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_2, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_3, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_4, float, total_absorber, INTERVAL_MAP>();}
+
+// (0-x) + x = 0 | total absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_abelian_group_plus_4_bicremental_domain_and_discrete_codomain)
+{ icl_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_1)
+{ icl_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, double, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_icl_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_2)
+{ icl_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, boost::rational<int>, total_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// total_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_6, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_7, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_8, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ icl_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_1, double, total_enricher, INTERVAL_MAP>();}
+
+// (0-x) + x =p= 0 | total absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_discrete_codomain)
+{ icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_2, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_continuous_codomain_1)
+{ icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_3, float, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_continuous_codomain_2)
+{ icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_4, boost::rational<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
+
+
+
+
+#endif // BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+

Added: sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/fastest_total_interval_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/fastest_total_interval_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::total_interval_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fastest_total_interval_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/vc9_fastest_total_interval_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_/vc9_fastest_total_interval_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fastest_total_interval_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}"
+ RootNamespace="Fastest_total_interval_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fastest_total_interval_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/fastest_total_interval_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/fastest_total_interval_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,100 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+#define BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_1, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_2, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_3, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_4, float, total_absorber, INTERVAL_MAP>();}
+
+// (0-x) + x = 0 | total absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_discrete_codomain)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_1)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, double, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_2)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<bicremental_type_5, boost::rational<int>, total_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// total_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<bicremental_type_6, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<bicremental_type_7, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<bicremental_type_8, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_abelian_monoid_et_4_bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<bicremental_type_1, double, total_enricher, INTERVAL_MAP>();}
+
+// (0-x) + x =p= 0 | total absorber
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_discrete_codomain)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_2, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_continuous_codomain_1)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_3, float, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_continuous_codomain_2)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<bicremental_type_4, boost::rational<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
+
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_inner_complementarity_4_bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<bicremental_type_4, int, total_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_enricher_itv_quantifier_check_length_complementarity_4_bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<bicremental_type_5, double, total_enricher, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_absorber_itv_quantifier_check_inner_complementarity_4_bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<bicremental_type_6, int, total_absorber, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_total_absorber_itv_quantifier_check_length_complementarity_4_bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<bicremental_type_7, double, total_absorber, interval_map>();}
+
+#endif // BOOST_ICL_FASTEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090703
+

Added: sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::casual unit test
+#include <string>
+#include <vector>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE(casual)
+{
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, total_absorber> IntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
+
+ BOOST_CHECK_EQUAL(true, true);
+}
+

Added: sandbox/icl/libs/icl/test/test_casual_/vc9_test_casual.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_casual_/vc9_test_casual.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_casual"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}"
+ RootNamespace="Test_casual"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_casual.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_changing_interval_defaults_/test_changing_interval_defaults.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_changing_interval_defaults_/test_changing_interval_defaults.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,115 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::test_doc_code unit test
+
+#include <limits>
+#include <complex>
+
+
+#include <string>
+#include <vector>
+#include <boost/mpl/list.hpp>
+#include <boost/icl/iterator.hpp>
+#include "../unit_test_unwarned.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/type_traits/is_same.hpp>
+
+
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+#define BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT right_open_interval
+#define BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS 2 //0=() 1=(] 2=[) 3=[]
+
+#include <boost/icl/rational.hpp>
+
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE(test_intervals_4_changed_lib_defaults)
+{
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, total_absorber> IntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
+
+ typedef icl::map<int,int> MapII;
+
+ //const bool xx = is_same< typename icl::map<int,int>::codomain_type,
+ // typename codomain_type_of<icl::map<int,int> >::type >::value;
+
+
+#if defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && !defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+ BOOST_CHECK( (is_same<icl::interval<int >::type, right_open_interval<int > >::value) );
+ BOOST_CHECK( (is_same<icl::interval<double>::type, right_open_interval<double> >::value) );
+
+ BOOST_CHECK_EQUAL( icl::interval<int>::open(0,2), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::left_open(0,1), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::right_open(1,2), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::closed(1,1), icl::construct<right_open_interval<int> >(1,2) );
+
+ BOOST_CHECK_EQUAL( icl::interval<float>::right_open(1.0,2.0), icl::construct<right_open_interval<float> >(1.0,2.0) );
+ //The next yields compiletime error: STATIC_ASSERTION_FAILURE
+ //BOOST_CHECK_EQUAL( icl::interval<float>::left_open(1.0,2.0), icl::construct<right_open_interval<float> >(1.0,2.0) );
+#endif
+
+#if defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+# if defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 0)
+ cout << "discrete_interval == open_interval\n";
+ BOOST_CHECK( (is_same<icl::interval<int>::type, open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::open(0,2), icl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::left_open(0,1), icl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::right_open(1,2), icl::construct<open_interval<int> >(0,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::closed(1,1), icl::construct<open_interval<int> >(0,2) );
+
+# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 1)
+ cout << "discrete_interval == left_open_interval\n";
+ BOOST_CHECK( (is_same<icl::interval<int>::type, left_open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::open(0,2), icl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::left_open(0,1), icl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::right_open(1,2), icl::construct<left_open_interval<int> >(0,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::closed(1,1), icl::construct<left_open_interval<int> >(0,1) );
+
+# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 2)
+ cout << "discrete_interval == right_open_interval\n";
+ BOOST_CHECK( (is_same<icl::interval<int>::type, right_open_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::open(0,2), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::left_open(0,1), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::right_open(1,2), icl::construct<right_open_interval<int> >(1,2) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::closed(1,1), icl::construct<right_open_interval<int> >(1,2) );
+
+# elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 3)
+ cout << "discrete_interval == closed_interval\n";
+ BOOST_CHECK( (is_same<icl::interval<int>::type, closed_interval<int> >::value) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::open(0,2), icl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::left_open(0,1), icl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::right_open(1,2), icl::construct<closed_interval<int> >(1,1) );
+ BOOST_CHECK_EQUAL( icl::interval<int>::closed(1,1), icl::construct<closed_interval<int> >(1,1) );
+
+# else
+ cout << "#else part, INTERVAL_BORDERS not in {0,1,2,3}\n";
+#endif //defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+
+#else
+ BOOST_CHECK( (is_same<icl::interval<int >::type, discrete_interval<int > >::value) );
+ BOOST_CHECK( (is_same<icl::interval<double>::type, continuous_interval<double> >::value) );
+#endif
+
+}
+

Added: sandbox/icl/libs/icl/test/test_changing_interval_defaults_/vc9_test_changing_interval_defalts.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_changing_interval_defaults_/vc9_test_changing_interval_defalts.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_changing_interval_defaults"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}"
+ RootNamespace="Test_changing_interval_defaults"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_changing_interval_defaults.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_combinable_/test_combinable.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_combinable_/test_combinable.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,516 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::casual unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/validate/type/nat.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+template<template<class, class>class IsCombinable,
+ class LeftT, class RightT>
+void check_combinable(bool expected, const char* type_combi, const char* combi_text)
+{
+ std::string type_combination = type_combi;
+ std::string is_combi_text = combi_text;
+ bool is_combinable = IsCombinable<LeftT,RightT>::value;
+ std::string combination_result = is_combinable
+ ? (is_combinable == expected ? type_combination : "expected: NOT "+is_combi_text+"<"+type_combination+">")
+ : (is_combinable == expected ? type_combination : "expected: IS "+is_combi_text+"<"+type_combination+">");
+
+ //BOOST_CHECK_EQUAL(expected, is_combinable);
+ BOOST_CHECK_EQUAL(type_combination, combination_result);
+}
+
+template<template<class, class>class IsCombinable>
+void check_combine_pattern(const char* text,
+ bool jS_e, bool jS_i, bool jS_b, bool jS_p, bool jS_jS, bool jS_zS, bool jS_sS, bool jS_jM, bool jS_sM,
+ bool zS_e, bool zS_i, bool zS_b, bool zS_p, bool zS_jS, bool zS_zS, bool zS_sS, bool zS_jM, bool zS_sM,
+ bool sS_e, bool sS_i, bool sS_b, bool sS_p, bool sS_jS, bool sS_zS, bool sS_sS, bool sS_jM, bool sS_sM,
+ bool jM_e, bool jM_i, bool jM_b, bool jM_p, bool jM_jS, bool jM_zS, bool jM_sS, bool jM_jM, bool jM_sM,
+ bool sM_e, bool sM_i, bool sM_b, bool sM_p, bool sM_jS, bool sM_zS, bool sM_sS, bool sM_jM, bool sM_sM,
+ bool check_base_class = true
+ )
+{
+ typedef interval_set<int> jS;
+ typedef separate_interval_set<int> zS;
+ typedef split_interval_set<int> sS;
+ typedef interval_map<int,double> jM;
+ typedef split_interval_map<int,double> sM;
+
+ typedef interval_base_set<jS,int> jT;
+ typedef interval_base_set<zS,int> zT;
+ typedef interval_base_set<sS,int> sT;
+ typedef interval_base_map<jM,int,double> jN;
+ typedef interval_base_map<sM,int,double> sN;
+
+ typedef interval_set<int>::element_type S_e;
+ typedef interval_set<int>::segment_type S_i;
+
+ typedef interval_map<int,double>::element_type M_b;
+ typedef interval_map<int,double>::segment_type M_p;
+
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, jS, S_e>(jS_e , "jS_e ", text);
+ check_combinable<IsCombinable, jS, S_i>(jS_i , "jS_i ", text);
+ check_combinable<IsCombinable, jS, M_b>(jS_b , "jS_b ", text);
+ check_combinable<IsCombinable, jS, M_p>(jS_p , "jS_p ", text);
+ check_combinable<IsCombinable, jS, jS >(jS_jS, "jS_jS", text);
+ check_combinable<IsCombinable, jS, zS >(jS_zS, "jS_zS", text);
+ check_combinable<IsCombinable, jS, sS >(jS_sS, "jS_sS", text);
+ check_combinable<IsCombinable, jS, jM >(jS_jM, "jS_jM", text);
+ check_combinable<IsCombinable, jS, sM >(jS_sM, "jS_sM", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, zS, S_e>(zS_e , "zS_e ", text);
+ check_combinable<IsCombinable, zS, S_i>(zS_i , "zS_i ", text);
+ check_combinable<IsCombinable, zS, M_b>(zS_b , "zS_b ", text);
+ check_combinable<IsCombinable, zS, M_p>(zS_p , "zS_p ", text);
+ check_combinable<IsCombinable, zS, jS >(zS_jS, "zS_jS", text);
+ check_combinable<IsCombinable, zS, zS >(zS_zS, "zS_zS", text);
+ check_combinable<IsCombinable, zS, sS >(zS_sS, "zS_sS", text);
+ check_combinable<IsCombinable, zS, jM >(zS_jM, "zS_jM", text);
+ check_combinable<IsCombinable, zS, sM >(zS_sM, "zS_sM", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, sS, S_e>(sS_e , "sS_e ", text);
+ check_combinable<IsCombinable, sS, S_i>(sS_i , "sS_i ", text);
+ check_combinable<IsCombinable, sS, M_b>(sS_b , "sS_b ", text);
+ check_combinable<IsCombinable, sS, M_p>(sS_p , "sS_p ", text);
+ check_combinable<IsCombinable, sS, jS >(sS_jS, "sS_jS", text);
+ check_combinable<IsCombinable, sS, zS >(sS_zS, "sS_zS", text);
+ check_combinable<IsCombinable, sS, sS >(sS_sS, "sS_sS", text);
+ check_combinable<IsCombinable, sS, jM >(sS_jM, "sS_jM", text);
+ check_combinable<IsCombinable, sS, sM >(sS_sM, "sS_sM", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, jM, S_e>(jM_e , "jM_e ", text);
+ check_combinable<IsCombinable, jM, S_i>(jM_i , "jM_i ", text);
+ check_combinable<IsCombinable, jM, M_b>(jM_b , "jM_b ", text);
+ check_combinable<IsCombinable, jM, M_p>(jM_p , "jM_p ", text);
+ check_combinable<IsCombinable, jM, jS >(jM_jS, "jM_jS", text);
+ check_combinable<IsCombinable, jM, zS >(jM_zS, "jM_zS", text);
+ check_combinable<IsCombinable, jM, sS >(jM_sS, "jM_sS", text);
+ check_combinable<IsCombinable, jM, jM >(jM_jM, "jM_jM", text);
+ check_combinable<IsCombinable, jM, sM >(jM_sM, "jM_sM", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, sM, S_e>(sM_e , "sM_e ", text);
+ check_combinable<IsCombinable, sM, S_i>(sM_i , "sM_i ", text);
+ check_combinable<IsCombinable, sM, M_b>(sM_b , "sM_b ", text);
+ check_combinable<IsCombinable, sM, M_p>(sM_p , "sM_p ", text);
+ check_combinable<IsCombinable, sM, jS >(sM_jS, "sM_jS", text);
+ check_combinable<IsCombinable, sM, zS >(sM_zS, "sM_zS", text);
+ check_combinable<IsCombinable, sM, sS >(sM_sS, "sM_sS", text);
+ check_combinable<IsCombinable, sM, jM >(sM_jM, "sM_jM", text);
+ check_combinable<IsCombinable, sM, sM >(sM_sM, "sM_sM", text);
+ //--------------------------------------------------------------------------
+
+ if(check_base_class)
+ {
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, jT, S_e>(jS_e , "jT_e ", text);
+ check_combinable<IsCombinable, jT, S_i>(jS_i , "jT_i ", text);
+ check_combinable<IsCombinable, jT, M_b>(jS_b , "jT_b ", text);
+ check_combinable<IsCombinable, jT, M_p>(jS_p , "jT_p ", text);
+ check_combinable<IsCombinable, jT, jS >(jS_jS, "jT_jS", text);
+ check_combinable<IsCombinable, jT, zS >(jS_zS, "jT_zS", text);
+ check_combinable<IsCombinable, jT, sS >(jS_sS, "jT_sS", text);
+ check_combinable<IsCombinable, jT, jM >(jS_jM, "jT_jM", text);
+ check_combinable<IsCombinable, jT, sM >(jS_sM, "jT_sM", text);
+ check_combinable<IsCombinable, jT, jT >(jS_jS, "jT_jT", text);
+ check_combinable<IsCombinable, jT, zT >(jS_zS, "jT_zT", text);
+ check_combinable<IsCombinable, jT, sT >(jS_sS, "jT_sT", text);
+ check_combinable<IsCombinable, jT, jN >(jS_jM, "jT_jN", text);
+ check_combinable<IsCombinable, jT, sN >(jS_sM, "jT_sN", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, zT, S_e>(zS_e , "zT_e ", text);
+ check_combinable<IsCombinable, zT, S_i>(zS_i , "zT_i ", text);
+ check_combinable<IsCombinable, zT, M_b>(zS_b , "zT_b ", text);
+ check_combinable<IsCombinable, zT, M_p>(zS_p , "zT_p ", text);
+ check_combinable<IsCombinable, zT, jS >(zS_jS, "zT_jS", text);
+ check_combinable<IsCombinable, zT, zS >(zS_zS, "zT_zS", text);
+ check_combinable<IsCombinable, zT, sS >(zS_sS, "zT_sS", text);
+ check_combinable<IsCombinable, zT, jM >(zS_jM, "zT_jM", text);
+ check_combinable<IsCombinable, zT, sM >(zS_sM, "zT_sM", text);
+ check_combinable<IsCombinable, zT, jT >(zS_jS, "zT_jT", text);
+ check_combinable<IsCombinable, zT, zT >(zS_zS, "zT_zT", text);
+ check_combinable<IsCombinable, zT, sT >(zS_sS, "zT_sT", text);
+ check_combinable<IsCombinable, zT, jN >(zS_jM, "zT_jN", text);
+ check_combinable<IsCombinable, zT, sN >(zS_sM, "zT_sN", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, sT, S_e>(sS_e , "sT_e ", text);
+ check_combinable<IsCombinable, sT, S_i>(sS_i , "sT_i ", text);
+ check_combinable<IsCombinable, sT, M_b>(sS_b , "sT_b ", text);
+ check_combinable<IsCombinable, sT, M_p>(sS_p , "sT_p ", text);
+ check_combinable<IsCombinable, sT, jS >(sS_jS, "sT_jS", text);
+ check_combinable<IsCombinable, sT, zS >(sS_zS, "sT_zS", text);
+ check_combinable<IsCombinable, sT, sS >(sS_sS, "sT_sS", text);
+ check_combinable<IsCombinable, sT, jM >(sS_jM, "sT_jM", text);
+ check_combinable<IsCombinable, sT, sM >(sS_sM, "sT_sM", text);
+ check_combinable<IsCombinable, sT, jT >(sS_jS, "sT_jT", text);
+ check_combinable<IsCombinable, sT, zT >(sS_zS, "sT_zT", text);
+ check_combinable<IsCombinable, sT, sT >(sS_sS, "sT_sT", text);
+ check_combinable<IsCombinable, sT, jN >(sS_jM, "sT_jN", text);
+ check_combinable<IsCombinable, sT, sN >(sS_sM, "sT_sN", text);
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, jN, S_e>(jM_e , "jN_e ", text);
+ check_combinable<IsCombinable, jN, S_i>(jM_i , "jN_i ", text);
+ check_combinable<IsCombinable, jN, M_b>(jM_b , "jN_b ", text);
+ check_combinable<IsCombinable, jN, M_p>(jM_p , "jN_p ", text);
+ check_combinable<IsCombinable, jN, jS >(jM_jS, "jN_jS", text);
+ check_combinable<IsCombinable, jN, zS >(jM_zS, "jN_zS", text);
+ check_combinable<IsCombinable, jN, sS >(jM_sS, "jN_sS", text);
+ check_combinable<IsCombinable, jN, jM >(jM_jM, "jN_jM", text);//
+ check_combinable<IsCombinable, jN, sM >(jM_sM, "jN_sM", text);//
+ check_combinable<IsCombinable, jN, jT >(jM_jS, "jN_jT", text);
+ check_combinable<IsCombinable, jN, zT >(jM_zS, "jN_zT", text);
+ check_combinable<IsCombinable, jN, sT >(jM_sS, "jN_sT", text);
+ check_combinable<IsCombinable, jN, jN >(jM_jM, "jN_jN", text);//
+ check_combinable<IsCombinable, jN, sN >(jM_sM, "jN_sN", text);//
+ //--------------------------------------------------------------------------
+ check_combinable<IsCombinable, sN, S_e>(sM_e , "sN_e ", text);
+ check_combinable<IsCombinable, sN, S_i>(sM_i , "sN_i ", text);
+ check_combinable<IsCombinable, sN, M_b>(sM_b , "sN_b ", text);
+ check_combinable<IsCombinable, sN, M_p>(sM_p , "sN_p ", text);
+ check_combinable<IsCombinable, sN, jS >(sM_jS, "sN_jS", text);
+ check_combinable<IsCombinable, sN, zS >(sM_zS, "sN_zS", text);
+ check_combinable<IsCombinable, sN, sS >(sM_sS, "sN_sS", text);
+ check_combinable<IsCombinable, sN, jM >(sM_jM, "sN_jM", text);
+ check_combinable<IsCombinable, sN, sM >(sM_sM, "sN_sM", text);
+ check_combinable<IsCombinable, sN, jT >(sM_jS, "sN_jT", text);
+ check_combinable<IsCombinable, sN, zT >(sM_zS, "sN_zT", text);
+ check_combinable<IsCombinable, sN, sT >(sM_sS, "sN_sT", text);
+ check_combinable<IsCombinable, sN, jN >(sM_jM, "sN_jN", text);
+ check_combinable<IsCombinable, sN, sN >(sM_sM, "sN_sN", text);
+ }
+}
+
+
+BOOST_AUTO_TEST_CASE(test_itl_is_derivative)
+{
+ //--------------------------------------------------------------------------
+ // 1.1
+ check_combine_pattern<is_intra_derivative>(
+ "is_intra_derivative",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 0, 0, // jM
+ 0, 0, 1, 1, 0, 0, 0, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 1.2
+ check_combine_pattern<is_cross_derivative>(
+ "is_cross_derivative",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 1.3
+ check_combine_pattern<is_inter_derivative>(
+ "is_inter_derivative",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // sS
+ 1, 1, 1, 1, 0, 0, 0, 0, 0, // jM
+ 1, 1, 1, 1, 0, 0, 0, 0, 0 // sM
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_combinable)
+{
+ //--------------------------------------------------------------------------
+ // 2.1
+ check_combine_pattern<is_intra_combinable>(
+ "is_intra_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // jS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // zS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // sS
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, // jM
+ 0, 0, 0, 0, 0, 0, 0, 1, 1 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 2.2
+ check_combine_pattern<is_cross_combinable>(
+ "is_cross_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, // jS
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, // zS
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, // sS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // jM
+ 0, 0, 0, 0, 1, 1, 1, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 2.3
+ check_combine_pattern<is_inter_combinable>(
+ "is_inter_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, // jS
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, // zS
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, // sS
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, // jM
+ 0, 0, 0, 0, 1, 1, 1, 1, 1 // sM
+ );
+
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_container_right_combinable)
+{
+ //--------------------------------------------------------------------------
+ // 3.1
+ // LeftT is an interval_set:
+ // is_interval_set_right_combinable<LeftT, RightT> determines what can
+ // be combined as RightT argument type.
+ check_combine_pattern<is_interval_set_right_combinable>(
+ "is_interval_set_right_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // sS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 3.2
+ check_combine_pattern<is_interval_map_right_intra_combinable>(
+ "is_interval_map_right_intra_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 1, 1, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 1 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 3.3
+ check_combine_pattern<is_interval_map_right_cross_combinable>(
+ "is_interval_map_right_cross_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 3.4
+ check_combine_pattern<is_interval_map_right_inter_combinable>(
+ "is_interval_map_right_inter_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, // jM
+ 1, 1, 1, 1, 1, 1, 1, 1, 1 // sM
+ );
+
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_right_combinable)
+{
+ //--------------------------------------------------------------------------
+ // 4.1
+ check_combine_pattern<is_right_intra_combinable>(
+ "is_right_intra_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 1, 1, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 1 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 4.2
+ check_combine_pattern<is_right_inter_combinable>(
+ "is_right_inter_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // sS
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, // jM
+ 1, 1, 1, 1, 1, 1, 1, 1, 1 // sM
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_combines_right_to)
+{
+ //--------------------------------------------------------------------------
+ // 5.1
+ check_combine_pattern<combines_right_to_interval_set>(
+ "combines_right_to_interval_set",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // jS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // zS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // sS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // jM
+ 0, 0, 0, 0, 1, 1, 1, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 5.2
+ check_combine_pattern<combines_right_to_interval_map>(
+ "combines_right_to_interval_map",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, // jM
+ 0, 0, 0, 0, 0, 0, 0, 1, 1 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 5.3
+ check_combine_pattern<combines_right_to_interval_container>(
+ "combines_right_to_interval_container",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // jS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // zS
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, // sS
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, // jM
+ 0, 0, 0, 0, 1, 1, 1, 1, 1 // sM
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_companion)
+{
+ //--------------------------------------------------------------------------
+ // 6.1
+ check_combine_pattern<is_interval_set_companion>(
+ "is_interval_set_companion",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // sS
+ 1, 1, 0, 0, 1, 1, 1, 0, 0, // jM
+ 1, 1, 0, 0, 1, 1, 1, 0, 0 // sM
+ );
+
+ //--------------------------------------------------------------------------
+ // 6.2
+ check_combine_pattern<is_interval_map_companion>(
+ "is_interval_map_companion",
+ // e i b p jS zS sS jM sM
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 1, 1, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 1 // sM
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_coarser_combinable)
+{
+ //--------------------------------------------------------------------------
+ // 7.1
+ check_combine_pattern<is_coarser_interval_set_companion>(
+ "is_coarser_interval_set_companion",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 1, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 0, 0, 0, // sS
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jM
+ 1, 1, 0, 0, 1, 1, 0, 0, 0, // sM
+ false
+ );
+
+ //--------------------------------------------------------------------------
+ // 7.2
+ check_combine_pattern<is_coarser_interval_map_companion>(
+ "is_coarser_interval_map_companion",
+ // e i b p jS zS sS jM sM
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 0, 0, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 0, // sM
+ false
+ );
+
+ //--------------------------------------------------------------------------
+ // 8.1
+ check_combine_pattern<is_binary_interval_set_combinable>(
+ "is_binary_interval_set_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 1, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 0, 0, 0, // sS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sM
+ false
+ );
+
+ //--------------------------------------------------------------------------
+ // 8.2
+ check_combine_pattern<is_binary_interval_map_combinable>(
+ "is_binary_interval_map_combinable",
+ // e i b p jS zS sS jM sM
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // jS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // zS
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 0, 0, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 0, // sM
+ false
+ );
+}
+
+BOOST_AUTO_TEST_CASE(test_itl_is_binary_combinable)
+{
+ //--------------------------------------------------------------------------
+ // 9.1
+ check_combine_pattern<is_binary_intra_combinable>(
+ "is_binary_intra_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 1, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 0, 0, 0, // sS
+ 0, 0, 1, 1, 0, 0, 0, 0, 0, // jM
+ 0, 0, 1, 1, 0, 0, 0, 1, 0, // sM
+ false
+ );
+
+ //--------------------------------------------------------------------------
+ // 9.2
+ check_combine_pattern<is_binary_inter_combinable>(
+ "is_binary_inter_combinable",
+ // e i b p jS zS sS jM sM
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, // jS
+ 1, 1, 0, 0, 1, 0, 0, 0, 0, // zS
+ 1, 1, 0, 0, 1, 1, 0, 0, 0, // sS
+ 1, 1, 1, 1, 1, 1, 1, 0, 0, // jM
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, // sM
+ false
+ );
+}

Added: sandbox/icl/libs/icl/test/test_combinable_/vc9_test_combinable.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_combinable_/vc9_test_combinable.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_combinable"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}"
+ RootNamespace="Test_combinable"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_combinable.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_doc_code_/test_doc_code.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_doc_code_/test_doc_code.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,72 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::test_doc_code unit test
+
+#include <limits>
+#include <complex>
+
+
+#include <string>
+#include <vector>
+#include <boost/mpl/list.hpp>
+#include <boost/icl/iterator.hpp>
+#include "../unit_test_unwarned.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/type_traits/is_same.hpp>
+
+#include <boost/icl/rational.hpp>
+
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/icl/interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(intro_sample_telecast)
+{
+ // Switch on my favorite telecasts using an interval_set
+ interval<int>::type news(2000, 2015);
+ interval<int>::type talk_show(2245, 2330);
+ interval_set<int> myTvProgram;
+ myTvProgram.add(news).add(talk_show);
+
+ // Iterating over elements (seconds) would be silly ...
+ for(interval_set<int>::iterator telecast = myTvProgram.begin();
+ telecast != myTvProgram.end(); ++telecast)
+ //...so this iterates over intervals
+ //TV.switch_on(*telecast);
+ cout << *telecast;
+
+ cout << endl;
+}
+
+BOOST_AUTO_TEST_CASE(interface_sample_identifiers)
+{
+ typedef interval_set<std::string, less, continuous_interval<std::string> > IdentifiersT;
+ IdentifiersT identifiers, excluded;
+
+ // special identifiers shall be excluded
+ identifiers += continuous_interval<std::string>::right_open("a", "c");
+ identifiers -= std::string("boost");
+ cout << "identifiers: " << identifiers << endl;
+
+ excluded = IdentifiersT(icl::hull(identifiers)) - identifiers;
+ cout << "excluded : " << excluded << endl;
+
+ if(icl::contains(identifiers, std::string("boost")))
+ cout << "error, identifiers.contains('boost')\n";
+}
+

Added: sandbox/icl/libs/icl/test/test_doc_code_/vc9_test_doc_code.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_doc_code_/vc9_test_doc_code.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_doc_code"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}"
+ RootNamespace="Test_doc_code"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_doc_code.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_functions.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,70 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+Auxiliary functions to reduce redundancies in test case code.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_FUNCTIONS_H_JOFA_091003
+#define BOOST_ICL_TEST_FUNCTIONS_H_JOFA_091003
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl/discrete_interval.hpp>
+
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/functors.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class SequenceT
+>
+void itl_map_copy(const SequenceT& segments,
+ IntervalMap<T,U,Trt>& destination)
+{
+ ICL_const_FORALL(typename SequenceT, segment_, segments)
+ destination.insert(*segment_);
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class SequenceT
+>
+void test_interval_map_copy_via_inserter(const SequenceT& segments, IntervalMap<T,U,Trt>& std_copied_map)
+{
+ // The second parameter (std_copied_map) could be omitted and only held as a
+ // local variable. I is there to help gcc-3.4.4 resolving the function template type.
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT looped_copied_map;
+ std_copied_map.clear();
+ itl_map_copy(segments, looped_copied_map);
+ std::copy(segments.begin(), segments.end(), std::inserter(std_copied_map, std_copied_map.end()));
+ BOOST_CHECK_EQUAL( looped_copied_map, std_copied_map );
+}
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_TEST_FUNCTIONS_H_JOFA_091003
+

Added: sandbox/icl/libs/icl/test/test_icl_continuous_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_continuous_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,82 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_INTERVAL_CONTINUOUS_HPP_JOFA_100930
+#define BOOST_ICL_TEST_ICL_INTERVAL_CONTINUOUS_HPP_JOFA_100930
+
+template <class T, class IntervalT>
+void interval_ctor_4_ordered_types()
+{
+ BOOST_CHECK_EQUAL(icl::is_empty(IntervalT()), true);
+ BOOST_CHECK_EQUAL(icl::cardinality(IntervalT()), icl::identity_element<typename icl::size_type_of<T>::type>::value());
+ BOOST_CHECK_EQUAL(icl::size(IntervalT()), icl::identity_element<typename icl::size_type_of<T>::type>::value());
+
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT() );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(IntervalT().lower(), IntervalT().upper()) );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(icl::lower(IntervalT()), icl::upper(IntervalT())) );
+}
+
+
+template <class T, ICL_COMPARE Compare>
+void distant_intervals_4_numeric_continuous_types()
+{
+ typedef right_open_interval<T,Compare> L__D; // L__D for [..)
+ typedef left_open_interval<T,Compare> C__I; // C__I for (..]
+ typedef typename icl::interval<T,Compare>::type IntervalT;
+
+ BOOST_CHECK( is_interval<L__D>::value );
+ BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value );
+ BOOST_CHECK( is_continuous<typename interval_traits<L__D>::domain_type>::value );
+ BOOST_CHECK( (is_same<typename interval_traits<L__D>::domain_type, T>::value) );
+
+ typedef typename difference_type_of<T>::type DiffT;
+
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,0,4), MK_I(L__D,8,9));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,7,8), MK_I(L__D,2,3));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,2,4), MK_I(L__D,4,6));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,3,7), MK_I(L__D,5,8));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,7,9), MK_I(L__D,0,4));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,0,0), MK_I(L__D,0,0));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,1,0), MK_I(L__D,2,0));
+
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,1,5), MK_I(C__I,4,9));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,4,6), MK_I(C__I,1,3));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,4,6));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,0,6));
+
+ //--------------------------------------------------------------------------
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+ test_inner_complement<T,Compare,IntervalT>(I_D(0,4), I_D(8,9));
+ test_inner_complement<T,Compare,IntervalT>(I_D(7,8), I_D(2,3));
+ test_inner_complement<T,Compare,IntervalT>(I_D(2,4), I_D(4,6));
+ test_inner_complement<T,Compare,IntervalT>(I_D(3,7), I_D(5,8));
+ test_inner_complement<T,Compare,IntervalT>(I_D(7,9), I_D(0,4));
+ test_inner_complement<T,Compare,IntervalT>(I_D(0,0), I_D(0,0));
+ test_inner_complement<T,Compare,IntervalT>(I_D(1,0), I_D(2,0));
+
+ test_inner_complement<T,Compare,IntervalT>(C_I(1,5), C_I(4,9));
+ test_inner_complement<T,Compare,IntervalT>(C_I(4,6), C_I(1,3));
+ test_inner_complement<T,Compare,IntervalT>(C_I(0,2), C_I(4,6));
+ test_inner_complement<T,Compare,IntervalT>(C_I(0,2), C_I(0,6));
+
+ test_inner_complement<T,Compare,IntervalT>(I_I(7,9), I_I(0,5));
+ test_inner_complement<T,Compare,IntervalT>(I_I(0,9), I_I(2,5));
+
+ test_inner_complement<T,Compare,IntervalT>(C_D(6,9), C_D(1,4));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,3), C_D(1,4));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,3), C_D(6,8));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,7), C_D(1,6));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,1), C_D(1,1));
+ test_inner_complement<T,Compare,IntervalT>(C_D(3,0), C_D(4,0));
+ test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(4,6));
+ test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(0,6));
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+}
+
+
+
+#endif // BOOST_ICL_TEST_ICL_INTERVAL_CONTINUOUS_HPP_JOFA_100930

Added: sandbox/icl/libs/icl/test/test_icl_discrete_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_discrete_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,100 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 BOOST_ICL_TEST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_TEST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100930
+
+
+template <class T, class IntervalT>
+void discrete_interval_traits()
+{
+ BOOST_CHECK( is_interval<IntervalT>::value );
+ BOOST_CHECK( is_discrete_interval<IntervalT>::value );
+ BOOST_CHECK( is_discrete<typename IntervalT::domain_type>::value );
+ BOOST_CHECK(!is_continuous<typename IntervalT::domain_type>::value);
+ BOOST_CHECK( has_dynamic_bounds<IntervalT>::value );
+ BOOST_CHECK(!has_static_bounds<IntervalT>::value );
+}
+
+template <class T, class IntervalT>
+void discrete_interval_ctor__dis_4_dyn_v_sta() // discrete && (dynamic or static)
+{
+ BOOST_CHECK_EQUAL( IntervalT(MK_v(3)), IntervalT(MK_v(3)) );
+ BOOST_CHECK_EQUAL( icl::contains(IntervalT(MK_v(1)), MK_v(1)), true );
+}
+
+template <class T, ICL_COMPARE Compare>
+void distant_intervals_4_discrete_types()
+{
+ typedef right_open_interval<T,Compare> L__D; // L__D for [..)
+ typedef left_open_interval<T,Compare> C__I; // C__I for (..]
+ typedef closed_interval<T,Compare> L__I; // L__I for [..]
+ typedef open_interval<T,Compare> C__D; // C__D for (..)
+ typedef typename icl::interval<T,Compare>::type IntervalT;
+
+ BOOST_CHECK( is_interval<L__D>::value );
+ BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value );
+ BOOST_CHECK( is_discrete<typename interval_traits<L__D>::domain_type>::value );
+ BOOST_CHECK( (is_same<typename interval_traits<L__D>::domain_type, T>::value) );
+
+ typedef typename difference_type_of<T>::type DiffT;
+
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,0,4), MK_I(L__D,8,9));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,7,8), MK_I(L__D,2,3));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,2,4), MK_I(L__D,4,6));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,3,7), MK_I(L__D,5,8));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,7,9), MK_I(L__D,0,4));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,0,0), MK_I(L__D,0,0));
+ test_inner_complement<T,Compare,L__D>(MK_I(L__D,1,0), MK_I(L__D,2,0));
+
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,1,5), MK_I(C__I,4,9));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,4,6), MK_I(C__I,1,3));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,4,6));
+ test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,0,6));
+
+ test_inner_complement<T,Compare,L__I>(MK_I(L__I,7,9), MK_I(L__I,0,5));
+ test_inner_complement<T,Compare,L__I>(MK_I(L__I,0,9), MK_I(L__I,2,5));
+
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,6,9), MK_I(C__D,1,4));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,1,3), MK_I(C__D,1,4));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,1,3), MK_I(C__D,6,8));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,1,7), MK_I(C__D,1,6));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,1,1), MK_I(C__D,1,1));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,3,0), MK_I(C__D,4,0));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,0,2), MK_I(C__D,4,6));
+ test_inner_complement<T,Compare,C__D>(MK_I(C__D,0,2), MK_I(C__D,0,6));
+
+ //--------------------------------------------------------------------------
+ test_inner_complement<T,Compare,IntervalT>(I_D(0,4), I_D(8,9));
+ test_inner_complement<T,Compare,IntervalT>(I_D(7,8), I_D(2,3));
+ test_inner_complement<T,Compare,IntervalT>(I_D(2,4), I_D(4,6));
+ test_inner_complement<T,Compare,IntervalT>(I_D(3,7), I_D(5,8));
+ test_inner_complement<T,Compare,IntervalT>(I_D(7,9), I_D(0,4));
+ test_inner_complement<T,Compare,IntervalT>(I_D(0,0), I_D(0,0));
+ test_inner_complement<T,Compare,IntervalT>(I_D(1,0), I_D(2,0));
+
+ test_inner_complement<T,Compare,IntervalT>(C_I(1,5), C_I(4,9));
+ test_inner_complement<T,Compare,IntervalT>(C_I(4,6), C_I(1,3));
+ test_inner_complement<T,Compare,IntervalT>(C_I(0,2), C_I(4,6));
+ test_inner_complement<T,Compare,IntervalT>(C_I(0,2), C_I(0,6));
+
+ test_inner_complement<T,Compare,IntervalT>(I_I(7,9), I_I(0,5));
+ test_inner_complement<T,Compare,IntervalT>(I_I(0,9), I_I(2,5));
+
+ test_inner_complement<T,Compare,IntervalT>(C_D(6,9), C_D(1,4));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,3), C_D(1,4));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,3), C_D(6,8));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,7), C_D(1,6));
+ test_inner_complement<T,Compare,IntervalT>(C_D(1,1), C_D(1,1));
+ test_inner_complement<T,Compare,IntervalT>(C_D(3,0), C_D(4,0));
+ test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(4,6));
+ test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(0,6));
+
+}
+
+
+#endif // BOOST_ICL_TEST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100930

Added: sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,65 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_DYNAMIC_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_TEST_ICL_DYNAMIC_INTERVAL_HPP_JOFA_100930
+
+template <class IntervalT>
+void dynamic_interval_ctor_4_ordered_types()
+{
+ typedef typename domain_type_of<interval_traits<IntervalT> >::type T;
+
+ BOOST_CHECK_EQUAL(IntervalT().lower(), icl::identity_element<T>::value());
+ BOOST_CHECK_EQUAL(IntervalT().upper(), icl::identity_element<T>::value());
+ BOOST_CHECK_EQUAL(icl::lower(IntervalT()), icl::identity_element<T>::value());
+ BOOST_CHECK_EQUAL(icl::upper(IntervalT()), icl::identity_element<T>::value());
+
+ IntervalT itv = IntervalT(icl::identity_element<T>::value(), icl::identity_element<T>::value());
+ BOOST_CHECK_EQUAL(IntervalT(), IntervalT(icl::identity_element<T>::value(), icl::identity_element<T>::value()));
+ BOOST_CHECK_EQUAL(IntervalT(), IntervalT(icl::identity_element<T>::value(), icl::identity_element<T>::value(), interval_bounds::right_open()));
+}
+
+template <class T>
+void dynamic_interval_bounds_4_bicremental_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+
+ BOOST_CHECK_EQUAL( T(), pred(succ(T())));
+ BOOST_CHECK_EQUAL( icl::identity_element<T>::value(), pred(succ(icl::identity_element<T>::value())) );
+ BOOST_CHECK_EQUAL( icl::unit_element<T>::value(), succ(icl::identity_element<T>::value()) );
+ BOOST_CHECK_EQUAL( length(IntervalT()), icl::identity_element<typename difference_type_of<T>::type>::value() );
+
+ //LAW: I x: borders(x)==closed => contains(x, lower(x)) && contains(x, upper(x))
+ check_border_containedness(I_I(0,0));
+ check_border_containedness(I_I(2,5));
+
+ check_border_containedness(I_D(0,1));
+ check_border_containedness(I_D(2,5));
+
+ check_border_containedness(C_I(0,1));
+ check_border_containedness(C_I(2,5));
+
+ check_border_containedness(C_I(0,2));
+ check_border_containedness(C_I(2,5));
+
+}
+
+template <class T>
+void discrete_dynamic_interval_bounds_4_bicremental_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+
+ BOOST_CHECK( icl::bounds(I_I(2,4)) == interval_bounds::closed() );
+ BOOST_CHECK( icl::bounds(I_D(2,5)) == interval_bounds::right_open() );
+ BOOST_CHECK( icl::bounds(C_I(1,4)) == interval_bounds::left_open() );
+ BOOST_CHECK( icl::bounds(C_D(1,5)) == interval_bounds::open() );
+
+}
+
+
+
+#endif // BOOST_ICL_TEST_ICL_DYNAMIC_INTERVAL_HPP_JOFA_100930

Added: sandbox/icl/libs/icl/test/test_icl_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,89 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_TEST_ICL_INTERVAL_HPP_JOFA_100930
+
+// NOTE: ordered_types is the largest class of types that is admissable as
+// domain parameters for intervals and interval containers.
+// bicremental_types is a smaller class of types used for testing instead of
+// ordered types, because they can be generated in a simple
+// way using the functions of test_value_maker.hpp.
+
+template <class IntervalT>
+void interval_ctor_4_ordered_types()
+{
+ typedef typename domain_type_of<interval_traits<IntervalT> >::type T;
+ typedef typename icl::size_type_of<T>::type SizeT;
+ T t_0 = icl::identity_element<T>::value();
+ T t_1 = icl::unit_element<T>::value();
+ SizeT s_0 = icl::identity_element<SizeT>::value();
+ SizeT s_1 = icl::unit_element<SizeT>::value();
+
+ // Default ctor and emptieness
+ BOOST_CHECK_EQUAL( icl::is_empty(IntervalT()), true );
+ BOOST_CHECK_EQUAL( icl::cardinality(IntervalT()), s_0 );
+ BOOST_CHECK_EQUAL( icl::size(IntervalT()), s_0 );
+
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT() );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(IntervalT().lower(), IntervalT().upper()) );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(icl::lower(IntervalT()), icl::upper(IntervalT())) );
+
+ BOOST_CHECK_EQUAL(icl::cardinality(IntervalT(t_0, t_1)) >= s_1, true);
+ BOOST_CHECK_EQUAL(( icl::contains(IntervalT(t_0, t_1), t_0)
+ || icl::contains(IntervalT(t_0, t_1), t_1)), true);
+
+ BOOST_CHECK_EQUAL(IntervalT(t_0, t_1).lower(), t_0);
+ BOOST_CHECK_EQUAL(IntervalT(t_0, t_1).upper(), t_1);
+ BOOST_CHECK_EQUAL(lower(icl::construct<IntervalT>(t_0, t_1)), t_0);
+ BOOST_CHECK_EQUAL(upper(icl::construct<IntervalT>(t_0, t_1)), t_1);
+}
+
+
+template <class IntervalT>
+void singelizable_interval_4_ordered_types()
+{
+ // Singleton ctor and singleness
+ // LAW: !is_asymmetric_continuous(IntervalT) => size(singleton(x))==1
+ // LAW: This law applies to all discrete and to dynamic continuous intervals
+ // LAW: No singletons can be constructed for static continuous right_open and left_open intervals
+ typedef typename domain_type_of<interval_traits<IntervalT> >::type T;
+ typedef typename icl::size_type_of<T>::type SizeT;
+ T t_0 = icl::identity_element<T>::value();
+ T t_1 = icl::unit_element<T>::value();
+ SizeT s_1 = icl::unit_element<SizeT>::value();
+
+ BOOST_CHECK( is_singelizable<IntervalT>::value );
+
+ BOOST_CHECK_EQUAL( icl::cardinality(icl::singleton<IntervalT>(t_0)), s_1 );
+ BOOST_CHECK_EQUAL( icl::size(icl::singleton<IntervalT>(t_0)), s_1 );
+ BOOST_CHECK_EQUAL( icl::cardinality(icl::singleton<IntervalT>(t_1)), s_1 );
+ BOOST_CHECK_EQUAL( icl::size(icl::singleton<IntervalT>(t_1)), s_1 );
+
+ BOOST_CHECK_EQUAL( icl::contains(icl::singleton<IntervalT>(t_0), t_0), true );
+ BOOST_CHECK_EQUAL( icl::contains(icl::singleton<IntervalT>(t_1), t_1), true );
+}
+
+template <class IntervalT>
+void singelizable_interval_4_bicremental_types()
+{
+ typedef typename domain_type_of<interval_traits<IntervalT> >::type T;
+ typedef typename icl::size_type_of<T>::type SizeT;
+ //T t_0 = icl::identity_element<T>::value();
+ SizeT s_1 = icl::unit_element<SizeT>::value();
+
+ BOOST_CHECK( is_singelizable<IntervalT>::value );
+
+ BOOST_CHECK_EQUAL( icl::cardinality(IntervalT(MK_v(3))), s_1 );
+ BOOST_CHECK_EQUAL( icl::size(IntervalT(MK_v(4))), s_1 );
+ BOOST_CHECK_EQUAL( icl::singleton<IntervalT>(MK_v(2)), icl::singleton<IntervalT>(MK_v(2)) );
+ BOOST_CHECK_EQUAL( icl::contains(IntervalT(MK_v(1)), MK_v(1)), true );
+}
+
+
+
+#endif // BOOST_ICL_TEST_ICL_INTERVAL_HPP_JOFA_100930

Added: sandbox/icl/libs/icl/test/test_icl_interval_/test_icl_interval.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_interval_/test_icl_interval.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,191 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_interval_laws.hpp"
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_icl_interval_shared.hpp"
+#include "../test_icl_interval.hpp"
+#include "../test_icl_dynamic_interval.hpp"
+#include "../test_icl_discrete_interval.hpp"
+#include "../test_icl_continuous_interval.hpp"
+#include "../test_icl_static_interval.hpp"
+
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl/left_open_interval.hpp>
+#include <boost/icl/closed_interval.hpp>
+#include <boost/icl/open_interval.hpp>
+
+#include <boost/icl/discrete_interval.hpp>
+#include <boost/icl/continuous_interval.hpp>
+
+//- sta.asy.{dis|con} ----------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_right_open_interval_ctor_4_ordered_types, T, ordered_types)
+{ interval_ctor_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_right_open_interval_4_ordered_types, T, discrete_types)
+{ singelizable_interval_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_right_open_interval_4_bicremental_types, T, discrete_types)
+{ singelizable_interval_4_bicremental_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_left_open_interval_ctor_4_ordered_types, T, ordered_types)
+{ interval_ctor_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_left_open_interval_4_ordered_types_singelizable, T, signed_discrete_types)
+{ singelizable_interval_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_left_open_interval_4_bicremental_types, T, discrete_types)
+{ singelizable_interval_4_bicremental_types<left_open_interval<T> >(); }
+
+//------------------------------------------------------------------------------
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_distant_intervals_4_discrete_types, T, discrete_types)
+{ distant_intervals_4_discrete_types<T, std::less>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_distant_intervals_4_numeric_continuous_types, T, numeric_continuous_types)
+{ distant_intervals_4_numeric_continuous_types<T, std::less>(); }
+
+
+//- sta.asy.{dis|con} ----------------------------------------------------------
+//- n tests for right_open_inverval --------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_ctor_4_ordered_types, T, ordered_types)
+{ interval_ctor_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_4_ordered_types, T, discrete_types)
+{ singelizable_interval_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_4_bicremental_types, T, discrete_types)
+{ singelizable_interval_4_bicremental_types<right_open_interval<T> >(); }
+
+//- n tests for left_open_inverval ---------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_ctor_4_ordered_types, T, ordered_types)
+{ interval_ctor_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_4_ordered_types_singelizable, T, signed_discrete_types)
+{ singelizable_interval_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_4_bicremental_types, T, discrete_types)
+{ singelizable_interval_4_bicremental_types<left_open_interval<T> >(); }
+
+//- dyn.dis --------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_discrete_interval_ctor_4_discrete_types_base, T, discrete_types)
+{ interval_ctor_4_ordered_types<discrete_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_discrete_interval_ctor_4_discrete_types_dynamic, T, discrete_types)
+{ dynamic_interval_ctor_4_ordered_types<discrete_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_discrete_interval_4_ordered_types, T, discrete_types)
+{ singelizable_interval_4_ordered_types<discrete_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_discrete_interval_4_bicremental_types, T, discrete_types)
+{ singelizable_interval_4_bicremental_types<discrete_interval<T> >(); }
+
+//- dyn.con --------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_continuous_interval_ctor_4_continuous_types_base, T, continuous_types)
+{ interval_ctor_4_ordered_types<continuous_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_continuous_interval_ctor_4_continuous_types_dynamic, T, continuous_types)
+{ dynamic_interval_ctor_4_ordered_types<continuous_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_continuous_interval_4_continuous_types_singelizable, T, continuous_types)
+{ singelizable_interval_4_ordered_types<continuous_interval<T> >(); }
+
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_distant_intervals_4_discrete_types, T, discrete_types)
+{ distant_intervals_4_discrete_types<T, std::less>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_distant_intervals_4_numeric_continuous_types, T, numeric_continuous_types)
+{ distant_intervals_4_numeric_continuous_types<T, std::less>(); }
+
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_dynamic_interval_bounds_4_bicremental_types, T, bicremental_types)
+{ dynamic_interval_bounds_4_bicremental_types<T>(); }
+
+//==============================================================================
+//==============================================================================
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_equal_4_integral_types, T, integral_types)
+{ interval_equal_4_integral_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_less_4_integral_types, T, integral_types)
+{ interval_less_4_integral_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_touches_4_bicremental_types, T, bicremental_types)
+{ interval_touches_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_touches_4_integral_types, T, integral_types)
+{ interval_touches_4_integral_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_subtract_4_bicremental_types, T, bicremental_types)
+{ interval_subtract_4_bicremental_types<T>(); }
+
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_ctor_specific)
+{ interval_ctor_specific(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_equal_4_bicremental_continuous_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_infix_intersect_4_bicremental_types<T>(); }
+
+#else
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_infix_intersect_4_bicremental_types, T, discrete_types)
+{ interval_infix_intersect_4_bicremental_types<T>(); }
+
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+
+

Added: sandbox/icl/libs/icl/test/test_icl_interval_/vc9_test_icl_interval.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_interval_/vc9_test_icl_interval.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_icl_interval"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}"
+ RootNamespace="Test_itl_interval"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_icl_interval.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_icl_interval_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_interval_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,302 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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 LIBS_ICL_TEST_TEST_ICL_interval_shared_hpp_JOFA_100306__
+#define LIBS_ICL_TEST_TEST_ICL_interval_shared_hpp_JOFA_100306__
+
+#include <boost/icl/interval_set.hpp>
+
+template <class DomainT, ICL_COMPARE Compare,
+ ICL_INTERVAL(ICL_COMPARE) Interval>
+void test_inner_complement(const ICL_INTERVAL_TYPE(Interval,DomainT,Compare)& itv1,
+ const ICL_INTERVAL_TYPE(Interval,DomainT,Compare)& itv2)
+{
+ typedef interval_set<DomainT,Compare,Interval> ItvSetT;
+ typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) IntervalT;
+
+ BOOST_CHECK_EQUAL(icl::length(inner_complement(itv1,itv2)), icl::distance(itv1,itv2));
+ BOOST_CHECK_EQUAL(icl::length(inner_complement(itv1,itv2)), icl::distance(itv2,itv1));
+ BOOST_CHECK_EQUAL(icl::length(inner_complement(itv2,itv1)), icl::distance(itv1,itv2));
+ BOOST_CHECK_EQUAL(icl::length(inner_complement(itv2,itv1)), icl::distance(itv2,itv1));
+
+ IntervalT in_comp = inner_complement(itv1,itv2);
+ ItvSetT itvset, inner_comp;
+ itvset.add(itv1).add(itv2);
+ ItvSetT hullset = ItvSetT(hull(itvset));
+ inner_comp = hullset - itvset;
+ IntervalT inner_comp_itv;
+ if(inner_comp.begin() != inner_comp.end())
+ inner_comp_itv = *inner_comp.begin();
+
+ BOOST_CHECK_EQUAL(inner_complement(itv1,itv2), inner_comp_itv);
+ BOOST_CHECK_EQUAL(inner_complement(itv2,itv1), inner_comp_itv);
+ BOOST_CHECK_EQUAL(icl::length(inner_comp), icl::distance(itv1,itv2));
+ BOOST_CHECK_EQUAL(icl::length(inner_comp), icl::distance(itv2,itv1));
+
+ BOOST_CHECK(icl::disjoint(itv1, in_comp));
+ BOOST_CHECK(icl::disjoint(itv2, in_comp));
+
+ IntervalT itv1_comp = hull(itv1, in_comp);
+ IntervalT itv2_comp = hull(itv2, in_comp);
+
+ if(!icl::is_empty(in_comp))
+ {
+ BOOST_CHECK(icl::intersects(itv1_comp, in_comp));
+ BOOST_CHECK(icl::intersects(itv2_comp, in_comp));
+
+ BOOST_CHECK_EQUAL(itv1_comp & itv2_comp, in_comp);
+ BOOST_CHECK_EQUAL( icl::is_empty(itv1_comp & itv2_comp), icl::disjoint(itv1_comp, itv2_comp));
+ BOOST_CHECK_EQUAL(!icl::is_empty(itv1_comp & itv2_comp), icl::intersects(itv1_comp, itv2_comp));
+ }
+}
+
+template <class IntervalT>
+void test_inner_complement_(const IntervalT& itv1, const IntervalT& itv2)
+{
+ typedef typename interval_traits<IntervalT>::domain_type DomainT;
+ // For the test of plain interval types we assume that std::less is
+ // the compare functor
+ test_inner_complement<DomainT, std::less, IntervalT>(itv1, itv2);
+}
+
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+void interval_ctor_specific()
+{
+ BOOST_CHECK_EQUAL(icl::length(icl::interval<double>::type()), 0.0);
+ BOOST_CHECK_EQUAL(icl::cardinality(icl::interval<double>::closed(5.0, 5.0)), 1);
+ BOOST_CHECK_EQUAL(icl::cardinality(icl::interval<std::string>::closed("test", "test")), 1);
+ BOOST_CHECK_EQUAL(icl::cardinality(icl::interval<std::string>::closed("best","test")),
+ icl::cardinality(icl::interval<double>::closed(0.0,0.1)));
+ BOOST_CHECK_EQUAL(icl::cardinality(icl::interval<std::string>::right_open("best","test")),
+ icl::infinity<size_type_of<icl::interval<std::string>::type>::type >::value() );
+ BOOST_CHECK_EQUAL(icl::cardinality(icl::interval<double>::right_open(0.0, 1.0)),
+ icl::infinity<size_type_of<icl::interval<double>::type>::type >::value() );
+}
+
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
+template <class T>
+void interval_equal_4_integral_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ BOOST_CHECK_EQUAL(IntervalT(), IntervalT(v7,v3));
+
+ //I: (I)nside = closed bound
+ //C: left open bound
+ //D: right open bound
+ IntervalT I3_7I = icl::interval<T>::closed(v3,v7);
+ IntervalT I3__8D = icl::interval<T>::right_open(v3,v8);
+ IntervalT C2__7I = icl::interval<T>::left_open(v2,v7);
+ IntervalT C2___8D = icl::interval<T>::open(v2,v8);
+
+ BOOST_CHECK_EQUAL( I3_7I , I3_7I );
+ BOOST_CHECK_EQUAL( I3_7I , I3__8D );
+ BOOST_CHECK_EQUAL( I3_7I , C2__7I );
+ BOOST_CHECK_EQUAL( I3_7I , C2___8D );
+
+ BOOST_CHECK_EQUAL( I3__8D, I3__8D );
+ BOOST_CHECK_EQUAL( I3__8D, C2__7I );
+ BOOST_CHECK_EQUAL( I3__8D, C2___8D );
+
+ BOOST_CHECK_EQUAL( C2__7I , C2__7I );
+ BOOST_CHECK_EQUAL( C2__7I , C2___8D );
+
+ BOOST_CHECK_EQUAL( C2___8D, C2___8D );
+}
+
+template <class T>
+void interval_less_4_integral_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v7,v3), false);
+ BOOST_CHECK_EQUAL(icl::interval<T>::open(v2,v3) < icl::interval<T>::right_open(v7,v7), false);
+ BOOST_CHECK_EQUAL(icl::interval<T>::left_open(v3,v3) < icl::interval<T>::closed(v7,v3), false);
+
+ BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v3,v4), true);
+ BOOST_CHECK_EQUAL(icl::interval<T>::open(v2,v3) < icl::interval<T>::right_open(v7,v8), true);
+
+ //I: (I)nside = closed bound
+ //C: left open bound
+ //D: right open bound
+ IntervalT I3_7I = icl::interval<T>::closed(v3,v7);
+ IntervalT I4_7I = icl::interval<T>::closed(v4,v7);
+
+ IntervalT I3__8D = icl::interval<T>::right_open(v3,v8);
+ IntervalT C2__7I = icl::interval<T>::left_open(v2,v7);
+ IntervalT C2___8D = icl::interval<T>::open(v2,v8);
+
+ BOOST_CHECK_EQUAL( I3_7I < I3_7I , false);
+ BOOST_CHECK_EQUAL( I3_7I < I3__8D , false);
+ BOOST_CHECK_EQUAL( I3_7I < C2__7I , false);
+ BOOST_CHECK_EQUAL( I3_7I < C2___8D , false);
+
+ BOOST_CHECK_EQUAL( I3_7I < I4_7I , true);
+
+
+ BOOST_CHECK_EQUAL( I3__8D< I3__8D , false);
+ BOOST_CHECK_EQUAL( I3__8D< C2__7I , false);
+ BOOST_CHECK_EQUAL( I3__8D< C2___8D , false);
+
+ BOOST_CHECK_EQUAL( C2__7I < C2__7I , false);
+ BOOST_CHECK_EQUAL( C2__7I < C2___8D , false);
+
+ BOOST_CHECK_EQUAL( C2___8D< C2___8D , false);
+}
+
+template <class T>
+void interval_equal_4_bicremental_continuous_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+ T v3 = make<T>(3);
+ T v7 = make<T>(7);
+ BOOST_CHECK_EQUAL(IntervalT(), IntervalT(v7,v3));
+
+ //I: (I)nside = closed bound
+ //O: (O)utside = open bound
+ IntervalT I3_7I = icl::interval<T>::closed(v3,v7);
+ IntervalT I3_7D = icl::interval<T>::right_open(v3,v7);
+ IntervalT C3_7I = icl::interval<T>::left_open(v3,v7);
+ IntervalT C3_7D = icl::interval<T>::open(v3,v7);
+
+ BOOST_CHECK_EQUAL( I3_7I , I3_7I );
+ BOOST_CHECK_EQUAL( I3_7I == I3_7D, false );
+ BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );
+ BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );
+ BOOST_CHECK_EQUAL( I3_7I != I3_7D, true );
+ BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );
+ BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );
+
+ BOOST_CHECK_EQUAL( I3_7D , I3_7D );
+ BOOST_CHECK_EQUAL( I3_7D == C3_7I, false );
+ BOOST_CHECK_EQUAL( I3_7D == C3_7D, false );
+ BOOST_CHECK_EQUAL( I3_7D != C3_7I, true );
+ BOOST_CHECK_EQUAL( I3_7D != C3_7D, true );
+
+ BOOST_CHECK_EQUAL( C3_7I , C3_7I );
+ BOOST_CHECK_EQUAL( C3_7I == C3_7D, false );
+ BOOST_CHECK_EQUAL( C3_7I != C3_7D, true );
+
+ BOOST_CHECK_EQUAL( C3_7D, C3_7D );
+}
+
+template <class T>
+void interval_touches_4_bicremental_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+ T v3 = make<T>(3);
+ T v7 = make<T>(7);
+ T v9 = make<T>(9);
+
+ IntervalT I3_7D = icl::interval<T>::right_open(v3,v7);
+ IntervalT I7_9I = icl::interval<T>::closed(v7,v9);
+ BOOST_CHECK_EQUAL( icl::touches(I3_7D, I7_9I), true );
+
+ IntervalT I3_7I = icl::interval<T>::closed(v3,v7);
+ IntervalT C7_9I = icl::interval<T>::left_open(v7,v9);
+ BOOST_CHECK_EQUAL( icl::touches(I3_7I, C7_9I), true );
+
+ BOOST_CHECK_EQUAL( icl::touches(I3_7D, C7_9I), false );
+ BOOST_CHECK_EQUAL( icl::touches(I3_7I, I7_9I), false );
+}
+
+template <class T>
+void interval_touches_4_integral_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+ T v3 = make<T>(3);
+ T v6 = make<T>(6);
+ T v7 = make<T>(7);
+ T v9 = make<T>(9);
+
+ IntervalT I3_6I = icl::interval<T>::closed(v3,v6);
+ IntervalT I7_9I = icl::interval<T>::closed(v7,v9);
+ BOOST_CHECK_EQUAL( icl::touches(I3_6I, I7_9I), true );
+
+ IntervalT I3_7D = icl::interval<T>::right_open(v3,v7);
+ IntervalT C6_9I = icl::interval<T>::left_open(v6,v9);
+ BOOST_CHECK_EQUAL( icl::touches(I3_7D, C6_9I), true );
+}
+
+template <class T>
+void interval_infix_intersect_4_bicremental_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+
+ IntervalT section;
+ IntervalT I3_7D = I_D(3,7);
+
+ IntervalT I0_3D = I_D(0,3);
+ section = I3_7D & I0_3D;
+ BOOST_CHECK_EQUAL( icl::disjoint(I0_3D, I3_7D), true );
+ BOOST_CHECK_EQUAL( icl::is_empty(section), true );
+ BOOST_CHECK_EQUAL( section, IntervalT() );
+
+ IntervalT I0_5D = I_D(0,5);
+ section = I3_7D & I0_5D;
+ BOOST_CHECK_EQUAL( section, I_D(3,5) );
+
+ IntervalT I0_9D = I_D(0,9);
+ section = I3_7D & I0_9D;
+ BOOST_CHECK_EQUAL( section, I3_7D );
+
+ IntervalT I4_5I = I_I(4,5);
+ section = I3_7D & I4_5I;
+ BOOST_CHECK_EQUAL( section, I4_5I );
+
+ IntervalT C4_6D = C_D(4,6);
+ section = I3_7D & C4_6D;
+ BOOST_CHECK_EQUAL( section, C4_6D );
+
+ IntervalT C4_9I = C_I(4,9);
+ section = I3_7D & C4_9I;
+ BOOST_CHECK_EQUAL( section, C_D(4,7) );
+
+ IntervalT I7_9I = I_I(7,9);
+ section = I3_7D & I7_9I;
+ BOOST_CHECK_EQUAL( icl::exclusive_less(I3_7D, I7_9I), true );
+ BOOST_CHECK_EQUAL( icl::disjoint(I3_7D, I7_9I), true );
+ BOOST_CHECK_EQUAL( icl::is_empty(section), true );
+}
+
+template <class T>
+void interval_subtract_4_bicremental_types()
+{
+ typedef typename icl::interval<T>::type IntervalT;
+
+ IntervalT diff_1, diff_2;
+ IntervalT I0_3D = I_D(0,3);
+ IntervalT I2_6D = I_D(2,6);
+ IntervalT I4_7D = I_D(4,7);
+ IntervalT I6_7D = I_D(6,7);
+ IntervalT I2_4D = I_D(2,4);
+
+ diff_1 = right_subtract(I2_6D, I4_7D);
+ BOOST_CHECK_EQUAL( diff_1, I2_4D );
+
+ diff_1 = right_subtract(I0_3D, I4_7D);
+ BOOST_CHECK_EQUAL( diff_1, I0_3D );
+
+ // ---------------------------------
+ diff_1 = left_subtract(I4_7D, I2_6D);
+ BOOST_CHECK_EQUAL( diff_1, I6_7D );
+
+ diff_1 = left_subtract(I4_7D, I0_3D);
+ BOOST_CHECK_EQUAL( diff_1, I4_7D );
+}
+
+
+#endif // LIBS_ICL_TEST_TEST_ICL_interval_shared_hpp_JOFA_100306__

Added: sandbox/icl/libs/icl/test/test_icl_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,159 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_itl_map_h_JOFA_090119__
+#define LIBS_ICL_TEST_TEST_ICL_itl_map_h_JOFA_090119__
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itl_map_contains_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ typedef std::set<T> SetT;
+ typedef typename MapT::element_type map_element_type;
+
+ IntervalMapT itv_map_a;
+ itv_map_a.add(IDv(2,4,1)).add(IIv(6,7,3));
+
+ MapT map_a;
+ segmental::atomize(map_a, itv_map_a);
+
+ BOOST_CHECK_EQUAL( contains(map_a, MK_u(3)), true );
+ BOOST_CHECK_EQUAL( within(MK_u(3), map_a), true );
+
+ map_element_type key_value_pair(MK_v(6), MK_u(3));
+ BOOST_CHECK( contains(map_a, key_value_pair) );
+ BOOST_CHECK( within(key_value_pair, map_a) );
+
+ //found = map_a.find(MK_v(5));
+
+ //BOOST_CHECK_EQUAL( found == map_a.end(), true );
+ //BOOST_CHECK_EQUAL( map_a(MK_v(5)), MK_u(0) );
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itl_map_find_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+
+ IntervalMapT itv_map_a;
+ itv_map_a.add(IDv(2,4,1)).add(IIv(6,7,3));
+
+ MapT map_a;
+ segmental::atomize(map_a, itv_map_a);
+
+ typename MapT::const_iterator found = map_a.find(MK_v(6));
+
+ BOOST_CHECK_EQUAL( found->second, MK_u(3) );
+ BOOST_CHECK_EQUAL( map_a(MK_v(6)), MK_u(3) );
+
+ found = map_a.find(MK_v(5));
+
+ BOOST_CHECK_EQUAL( found == map_a.end(), true );
+ BOOST_CHECK_EQUAL( map_a(MK_v(5)), MK_u(0) );
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itl_map_inclusion_compare_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ typedef std::set<T> SetT;
+
+ IntervalMapT itv_map_sub_a, itv_map_a, itv_map_super_a,
+ itv_map_b, itv_map_c;
+ itv_map_sub_a.add(IDv(2,4,1)).add(IIv(6,7,3));
+ itv_map_a = itv_map_sub_a;
+ itv_map_a.add(IIv(9,9,1));
+ itv_map_c = itv_map_sub_a;
+ itv_map_c.erase(MK_v(7)).add(IIv(11,11,2));
+ itv_map_b = itv_map_a;
+ itv_map_b.set(IIv(6,7,2));
+
+ MapT map_sub_a, map_a, map_a2, map_b, map_c;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+ segmental::atomize(map_sub_a, itv_map_sub_a);
+
+ map_a2 = map_a;
+ BOOST_CHECK_EQUAL( inclusion_compare(MapT(), MapT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, map_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, map_a2), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, MapT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, map_sub_a), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(MapT(), map_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_sub_a, map_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, map_b), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, map_c), inclusion::unrelated );
+
+ SetT set_sub_a, set_a, set_a2, set_b, set_c;
+ icl::domain(set_a, map_a);
+ icl::domain(set_a2, map_a2);
+ icl::domain(set_sub_a, map_sub_a);
+
+ BOOST_CHECK_EQUAL( inclusion_compare(MapT(), SetT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(SetT(), MapT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(SetT(), SetT()), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, set_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, map_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, set_a2), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, SetT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_a, set_sub_a), inclusion::superset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(SetT(), map_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_sub_a, map_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, SetT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, set_sub_a), inclusion::superset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(SetT(), set_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_sub_a, set_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, map_c), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(map_c, set_a), inclusion::unrelated );
+
+}
+
+
+#endif // LIBS_ICL_TEST_TEST_ICL_itl_map_h_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::itl_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/map.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_map.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "test_icl_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_map_/test_icl_map_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,19 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_map_find_4_bicremental_types, T, discrete_types)
+{ itl_map_find_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_map_inclusion_compare_4_bicremental_types, T, discrete_types)
+{ itl_map_inclusion_compare_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+#endif // BOOST_ICL_TEST_ICL_MAP_CASES_HPP_JOFA_090701

Added: sandbox/icl/libs/icl/test/test_icl_map_/vc9_test_icl_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_map_/vc9_test_icl_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_icl_map"
+ ProjectGUID="{DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}"
+ RootNamespace="Test_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_icl_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_icl_quantifier_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_quantifier_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,315 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2010: 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_ICL_QUANTIFIER_SHARED_H_JOFA_100819__
+#define __TEST_ICL_QUANTIFIER_SHARED_H_JOFA_100819__
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void make_3_icl_maps_and_derivatives_1
+ (icl::map<T,U,Trt>& map_a,
+ icl::map<T,U,Trt>& map_b,
+ icl::map<T,U,Trt>& map_c,
+ std::pair<T,U>& map_pair_a,
+ std::pair<T,U>& map_pair_b,
+ IntervalMap<T,U,Trt>*)
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+
+ map_pair_a = sK_v(5,1);
+ map_pair_b = sK_v(9,1);
+
+ add(map_a, sK_v(3,1));
+ add(map_a, sK_v(4,1));
+ add(map_a, sK_v(5,1));
+ add(map_a, sK_v(5,1));
+ add(map_a, sK_v(6,1));
+ add(map_a, sK_v(7,1));
+
+ add(map_b, sK_v(2,1));
+ add(map_b, sK_v(8,1));
+
+ add(map_c, sK_v(0,2));
+ add(map_c, sK_v(1,2));
+ add(map_c, sK_v(2,2));
+ add(map_c, sK_v(3,2));
+ add(map_c, sK_v(4,2));
+ add(map_c, sK_v(5,2));
+ add(map_c, sK_v(6,2));
+ add(map_c, sK_v(7,2));
+ add(map_c, sK_v(8,2));
+
+ add(map_c, sK_v(3,1));
+ add(map_c, sK_v(4,1));
+ add(map_c, sK_v(5,1));
+ add(map_c, sK_v(6,1));
+
+ add(map_c, sK_v(5,1));
+ add(map_c, sK_v(6,1));
+}
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus)(map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe)(map_a, map_b, map_c, map_pair_a, map_pair_b);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_distinct_equal, map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_distinct_equal, map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_abelian_group_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types()
+{
+ // check abelian group wrt. + and inverability wrt. protonic equality =p= :
+ // (1) (IntervalMapT, +) is an abelian group and
+ // (2) The inverability law: (0 - x) + x =p= 0 holds.
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, map_pair_a, map_pair_b);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_distinct_equal, map_a, map_b, map_c, map_pair_a, map_pair_b);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, map_a, map_b, map_c, map_pair_a, map_pair_b);
+}
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void icl_quantifier_check_containedness_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::map<T,U,Trt> MapT;
+ IntervalMapT aux;
+ MapT map_a, map_b, map_c;
+ std::pair<T,U> map_pair_a, map_pair_b;
+ make_3_icl_maps_and_derivatives_1(map_a, map_b, map_c, map_pair_a, map_pair_b, &aux);
+
+ check_intersection_containedness(map_a, map_c);
+ check_intersection_containedness(map_c, map_pair_a);
+
+ check_union_containedness(map_a, map_c);
+ check_union_containedness(map_c, map_pair_a);
+
+ check_domain_containedness(map_a);
+}
+
+
+#endif // __TEST_ICL_QUANTIFIER_SHARED_H_JOFA_100819__
+

Added: sandbox/icl/libs/icl/test/test_icl_static_interval.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_icl_static_interval.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,24 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_ICL_STATIC_INTERVAL_HPP_JOFA_100930
+#define BOOST_ICL_TEST_ICL_STATIC_INTERVAL_HPP_JOFA_100930
+
+template <class T, class IntervalT>
+void static_interval_ctor_4_ordered_types()
+{
+ BOOST_CHECK_EQUAL(icl::is_empty(IntervalT()), true);
+ BOOST_CHECK_EQUAL(icl::cardinality(IntervalT()), icl::identity_element<typename icl::size_type_of<T>::type>::value());
+ BOOST_CHECK_EQUAL(icl::size(IntervalT()), icl::identity_element<typename icl::size_type_of<T>::type>::value());
+
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT() );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(IntervalT().lower(), IntervalT().upper()) );
+ BOOST_CHECK_EQUAL( IntervalT(), IntervalT(icl::lower(IntervalT()), icl::upper(IntervalT())) );
+}
+
+
+#endif // BOOST_ICL_TEST_ICL_STATIC_INTERVAL_HPP_JOFA_100930

Added: sandbox/icl/libs/icl/test/test_interval_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,19 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef __test_IntervalT_hpp_JOFA_100401__
+#define __test_IntervalT_hpp_JOFA_100401__
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_ctor_4_ordered_types, T, ORDERED_TYPES)
+{ interval_ctor_4_ordered_types<T, std::less, INTERVAL>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_ctor_4_bicremental_types, T, BICREMENTAL_TYPES)
+{ interval_ctor_4_bicremental_types<T, std::less, INTERVAL>();}
+
+#endif // __test_IntervalT_hpp_JOFA_100401__

Added: sandbox/icl/libs/icl/test/test_interval_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,85 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+Function templates to call functions in object oriented or namespace glabal
+versions.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_LIBS_ICL_TEST_INTERVAL_LAWS_HPP_JOFA_101011
+#define BOOST_LIBS_ICL_TEST_INTERVAL_LAWS_HPP_JOFA_101011
+
+#include <boost/icl/detail/notate.hpp>
+#include <boost/icl/detail/design_config.hpp>
+#include <boost/icl/type_traits/interval_type_default.hpp>
+#include <boost/icl/interval.hpp>
+#include <boost/icl/type_traits/is_interval.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+template<class Type>
+typename enable_if<is_interval<Type>, void>::type
+check_border_containedness(const Type& itv)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ domain_type lo = icl::lower(itv);
+ domain_type up = icl::upper(itv);
+
+ //LAW: The empty set is contained in every set
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::identity_element<Type>::value()), true);
+ //LAW: Reflexivity: Every interval contains itself
+ BOOST_CHECK_EQUAL(icl::contains(itv, itv), true);
+
+ if(icl::bounds(itv) == interval_bounds::closed())
+ {
+ BOOST_CHECK_EQUAL(icl::contains(itv, lo), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, up), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: closed(lo,up)), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>::right_open(lo,up)), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: left_open(lo,up)), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: open(lo,up)), true);
+ }
+ else if(icl::bounds(itv) == interval_bounds::right_open())
+ {
+ BOOST_CHECK_EQUAL(icl::contains(itv, lo), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, up), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: closed(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>::right_open(lo,up)), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: left_open(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: open(lo,up)), true);
+ }
+ else if(icl::bounds(itv) == interval_bounds::left_open())
+ {
+ BOOST_CHECK_EQUAL(icl::contains(itv, lo), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, up), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: closed(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>::right_open(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: left_open(lo,up)), true);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: open(lo,up)), true);
+ }
+ else if(icl::bounds(itv) == interval_bounds::open())
+ {
+ BOOST_CHECK_EQUAL(icl::contains(itv, lo), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, up), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: closed(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>::right_open(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: left_open(lo,up)), false);
+ BOOST_CHECK_EQUAL(icl::contains(itv, icl::interval<domain_type>:: open(lo,up)), true);
+ }
+ else
+ {
+ bool interval_borders_are_open_v_left_open_v_right_open_v_closed = true;
+ BOOST_CHECK_EQUAL(interval_borders_are_open_v_left_open_v_right_open_v_closed, false);
+ }
+}
+
+}} // namespace boost icl
+
+#endif // BOOST_ICL_TEST_INTERVAL_LAWS_HPP_JOFA_100908
+

Added: sandbox/icl/libs/icl/test/test_interval_map_/test_interval_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_/test_interval_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_map_shared are tests that should give identical results for all
+// interval_maps: interval_map and split_interval_map.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_interval_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_interval_map_/vc9_test_interval_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_/vc9_test_interval_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_map"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}"
+ RootNamespace="Test_interval_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_map_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,83 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_INTERVAL_MAP_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_INTERVAL_MAP_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_map_fundamentals_4_ordered_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_map_add_sub_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_distinct_4_bicremental_continuous_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_contains_4_bicremental_types, T, bicremental_types)
+{ interval_map_contains_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_contains_key_objects_4_bicremental_types, T, bicremental_types)
+{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_operators_4_bicremental_types, T, bicremental_types)
+{ interval_map_operators_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_erase_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_erase_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_is_disjoint_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_flip_4_bicremental_types, T, bicremental_types)
+{ interval_map_flip_4_bicremental_types<INTERVAL_MAP, T, int>();}
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_find_4_bicremental_types, T, bicremental_types)
+{ interval_map_find_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_set_4_bicremental_types, T, bicremental_types)
+{ interval_map_set_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_inclusion_compare_4_bicremental_types, T, bicremental_types)
+{ interval_map_inclusion_compare_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_std_copy_via_inserter_4_bicremental_types, T, bicremental_types)
+{ interval_map_std_copy_via_inserter_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_element_iter_4_discrete_types, T, discrete_types)
+{ interval_map_element_iter_4_discrete_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+#endif // BOOST_ICL_TEST_INTERVAL_MAP_CASES_HPP_JOFA_090701
+

Added: sandbox/icl/libs/icl/test/test_interval_map_infix_/test_interval_map_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_infix_/test_interval_map_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_map_shared are tests that should give identical results for all
+// interval_maps: interval_map and split_interval_map.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_interval_map_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_interval_map_infix_/vc9_test_interval_map_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_infix_/vc9_test_interval_map_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_map_infix"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}"
+ RootNamespace="Test_interval_map_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_map_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_map_infix_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_infix_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,32 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+#define BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_infix_plus_overload_4_bicremental_types)
+{ interval_map_infix_plus_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_infix_pipe_overload_4_bicremental_types)
+{ interval_map_infix_pipe_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_infix_minus_overload_4_bicremental_types)
+{ interval_map_infix_minus_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_infix_et_overload_4_bicremental_types)
+{ interval_map_infix_et_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_infix_caret_overload_4_bicremental_types)
+{ interval_map_infix_caret_overload_4_bicremental_types<INTERVAL_MAP, bicremental_type_5, int>();}
+
+#endif // BOOST_ICL_FASTEST_INTERVAL_MAP_INFIX_CASES_HPP_JOFA_090702
+

Added: sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/test_interval_map_infix_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/test_interval_map_infix_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,93 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_infix_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_icl_interval_map_mixed_infix_plus_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;
+
+ 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_AUTO_TEST_CASE_TEMPLATE(test_icl_interval_map_mixed_infix_pipe_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;
+
+ 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_AUTO_TEST_CASE_TEMPLATE(test_icl_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));
+
+ join_b .add(CDv(1,3,1)).add(IIv(6,11,3));
+ split_b.add(IDv(0,9,2)).add(IIv(3,6,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_icl_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, 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);
+}
+

Added: sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/vc9_test_interval_map_infix_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_infix_mixed_/vc9_test_interval_map_infix_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_map_infix_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}"
+ RootNamespace="Test_interval_map_infix_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_map_infix_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_map_mixed.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_mixed.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,1573 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_interval_map_mixed_hpp_JOFA_081005__
+#define LIBS_ICL_TEST_TEST_ICL_interval_map_mixed_hpp_JOFA_081005__
+
+
+//------------------------------------------------------------------------------
+//- part1: Basic operations and predicates
+//------------------------------------------------------------------------------
+
+template <class T, class U>
+void interval_map_mixed_ctor_4_ordered_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+
+ T v0 = identity_element<T>::value();
+ U u1 = unit_element<U>::value();
+
+ SplitIntervalMapT split_map(make_pair(v0,u1));
+ IntervalMapT join_map(split_map);
+
+ BOOST_CHECK_EQUAL( hull(split_map).lower(), hull(join_map).lower() );
+ BOOST_CHECK_EQUAL( hull(split_map).upper(), hull(join_map).upper() );
+}
+
+template <class T, class U>
+void interval_map_mixed_equal_4_ordered_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v0 = identity_element<T>::value();
+ U u1 = unit_element<U>::value();
+
+ SplitIntervalMapT split_empty, split_single(make_pair(v0,u1));
+ IntervalMapT join_empty, join_single(make_pair(v0,u1));
+
+ // mixed ==-equality is a strange thing. Most times is does not
+ // make sense. It is better to allow only for same type == equality.
+ BOOST_CHECK_EQUAL( split_empty == split_empty, true );
+ BOOST_CHECK_EQUAL( join_empty == join_empty, true );
+
+ // There were Problems with operator== and emtpy sets.
+ BOOST_CHECK_EQUAL( split_empty == split_single, false );
+ BOOST_CHECK_EQUAL( join_empty == join_single, false );
+
+ BOOST_CHECK_EQUAL( split_single == split_empty, false );
+ BOOST_CHECK_EQUAL( join_single == join_empty, false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, split_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, join_empty), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, split_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, join_empty), true );
+
+ //--------------------------------------------------------------------------
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, split_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, join_single), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, split_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, join_single), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_single, split_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_single, join_empty), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_single, split_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_single, join_empty), false );
+}
+
+template <class T, class U>
+void interval_map_mixed_assign_4_ordered_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v0 = identity_element<T>::value();
+ T v1 = unit_element<T>::value();
+ U u1 = unit_element<U>::value();
+
+ mapping_pair<T,U> v0_u1(v0,u1);
+ mapping_pair<T,U> v1_u1(v1,u1);
+
+ SplitIntervalMapT split_map;
+ IntervalMapT join_map;
+ split_map.add(v0_u1); //NOTE: make_pair(v0,u1); fails
+ join_map = split_map; //=t T& T::operator=(const P&) ...
+
+
+ BOOST_CHECK_EQUAL( hull(split_map).lower(), hull(join_map).lower() );
+ BOOST_CHECK_EQUAL( hull(split_map).upper(), hull(join_map).upper() );
+
+ SplitIntervalMapT split_self = SplitIntervalMapT().add(v0_u1);
+ IntervalMapT join_self = IntervalMapT().add(v1_u1);
+
+ split_self = split_self;
+ join_self = join_self;
+
+ BOOST_CHECK_EQUAL( split_self, split_self );
+ BOOST_CHECK_EQUAL( join_self, join_self );
+}
+
+template <class T, class U>
+void interval_map_mixed_ctor_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I4_5D_1(I4_5D, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I1_3D_1).add(I2_4D_1).add(I4_5D_1);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ IntervalMapT join_map(split_map);
+}
+
+
+template <class T, class U>
+void interval_map_mixed_assign_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I4_5D_1(I4_5D, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I1_3D_1).add(I2_4D_1).add(I4_5D_1);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ IntervalMapT join_map;
+ join_map = split_map;
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 3 );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_equal_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I4_5D_1(I4_5D, u1);
+
+ IntervalMapT join_map;
+ join_map.add(I1_3D_1).add(I2_4D_1).add(I4_5D_1);
+ IntervalMapT join_map2 = join_map;
+ BOOST_CHECK_EQUAL( join_map, join_map2 );
+ BOOST_CHECK_EQUAL( is_element_equal(join_map, join_map2), true );
+
+ SplitIntervalMapT split_map;
+ split_map.add(I1_3D_1).add(I2_4D_1).add(I4_5D_1);
+ SplitIntervalMapT split_map2 = split_map;
+ BOOST_CHECK_EQUAL( split_map, split_map2 );
+ BOOST_CHECK_EQUAL( is_element_equal(split_map2, split_map), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_map, join_map), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_map, split_map), true );
+}
+
+
+template <class T, class U, class Trt>
+void partial_interval_map_mixed_inclusion_compare_4_bicremental_types()
+{
+ typedef interval_map<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ //--------------------------------------------------------------------------
+ // equalities
+ // { 0 1 2 3 4 5 8 9 }
+ // {[0,2)[2,3](3,6) (7,9]}
+ // ->2 ->1 ->1 ->2
+ split_interval_map<T,U,Trt> split_map;
+ interval_map<T,U,Trt> join_map;
+ split_interval_set<T> split_set;
+ separate_interval_set<T> sep_set;
+ interval_set<T> join_set;
+
+ split_map.add(IDv(0,2,2)).add(IIv(2,3,1)).add(CDv(3,6,1)).add(CIv(7,9,2));
+ join_map = split_map;
+ icl::domain(split_set, split_map);
+ icl::domain(sep_set, split_map);
+ icl::domain(join_set, split_map);
+
+ iterative_size(split_map);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(split_set), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(sep_set), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(join_set), 2 );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, join_map), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_map, split_map), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, split_set), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, sep_set ), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, join_set ), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_map , split_set), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_map , sep_set ), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_map , join_set ), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_set, split_map), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(sep_set , split_map), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_set , split_map), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_set, join_map ), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(sep_set , join_map ), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(join_set , join_map ), inclusion::equal );
+
+ //--------------------------------------------------------------------------
+ // inclusions
+ // { 0 1 2 3 4 5 8 9 }
+ // {[0, 2)[2, 3](3, 6) (7, 9]}
+ // ->2 ->1 ->1 ->2
+ // {[0, 2) [3,3](3, 6) (7, 9]}
+ // ->2 ->1 ->1 ->2
+ split_interval_map<T,U,Trt> split_sub_map1 = split_map;
+ split_sub_map1.erase(MK_v(2));
+ BOOST_CHECK_EQUAL( icl::contains(split_sub_map1, MK_v(2)), false );
+
+ interval_map<T,U,Trt> join_sub_map2;
+ join_sub_map2 = split_map;
+ join_sub_map2.erase(MK_v(1));
+ BOOST_CHECK_EQUAL( icl::contains(join_sub_map2, MK_v(1)), false );
+
+ split_interval_set<T> split_sub_set1;
+ separate_interval_set<T> sep_sub_set1;
+ interval_set<T> join_sub_set1;
+
+ icl::domain(split_sub_set1, split_sub_map1);
+ icl::domain(sep_sub_set1, split_sub_map1);
+ icl::domain(join_sub_set1, split_sub_map1);
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_sub_map1, split_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_sub_map2, split_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_sub_map1, join_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_sub_map2, join_map), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_sub_set1, split_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( sep_sub_set1, split_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_sub_set1, split_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_sub_set1, join_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( sep_sub_set1, join_map), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_sub_set1, join_map), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, split_sub_map1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, join_sub_map2), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, split_sub_map1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, join_sub_map2), inclusion::superset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, split_sub_set1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, sep_sub_set1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, join_sub_set1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, split_sub_set1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, sep_sub_set1), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, join_sub_set1), inclusion::superset );
+
+ split_interval_map<T,U,Trt> split_unrel_map11 = split_sub_map1;
+ split_unrel_map11.set(CIv(7,9,1));
+ BOOST_CHECK_EQUAL( split_unrel_map11(MK_v(8)), MK_u(1) );
+
+ interval_map<T,U,Trt> join_unrel_map21 = join_sub_map2;
+ join_unrel_map21.set(K_v(0,1));
+ BOOST_CHECK_EQUAL( join_unrel_map21(MK_v(0)), MK_u(1) );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_unrel_map11, split_map), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_unrel_map21, split_map), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_unrel_map11, join_map), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_unrel_map21, join_map), inclusion::unrelated );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, split_unrel_map11), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(split_map, join_unrel_map21), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, split_unrel_map11), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare( join_map, join_unrel_map21), inclusion::unrelated );
+
+ split_interval_map<T,U,Trt> split_unrel_map1 = split_sub_map1;
+ split_unrel_map1.add(IDv(11,12,1));
+ BOOST_CHECK_EQUAL( split_unrel_map1(MK_v(11)), MK_u(1) );
+
+ interval_map<T,U,Trt> join_unrel_map2 = join_sub_map2;
+ join_unrel_map2.add(K_v(6,1));
+ BOOST_CHECK_EQUAL( join_unrel_map2(MK_v(6)), MK_u(1) );
+}
+
+
+template <class T, class U, class Trt>
+void partial_interval_map_mixed_contains_4_bicremental_types()
+{
+ typedef interval_map<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ //--------------------------------------------------------------------------
+ // { 0 1 2 3 4 5 8 9 }
+ // {[0,2)[2,3](3,6) (7,9]}
+ // ->2 ->1 ->1 ->2
+ split_interval_map<T,U,Trt> split_map;
+ interval_map<T,U,Trt> join_map;
+ split_interval_set<T> split_set;
+ separate_interval_set<T> sep_set;
+ interval_set<T> join_set;
+
+ split_map.add(IDv(0,2,2)).add(IIv(2,3,1)).add(CDv(3,6,1)).add(CIv(7,9,2));
+ join_map = split_map;
+ icl::domain(split_set, split_map);
+ icl::domain(sep_set, split_map);
+ icl::domain(join_set, split_map);
+
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(split_set), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(sep_set), 4 );
+ BOOST_CHECK_EQUAL( iterative_size(join_set), 2 );
+
+ // Key types
+ BOOST_CHECK_EQUAL( icl::contains(split_map, MK_v(0)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, MK_v(5)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, MK_v(9)), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, I_D(2,3)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, I_D(0,6)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, I_D(0,7)), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, I_D(2,3)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, I_D(0,6)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, I_D(0,7)), false );
+
+ // Map types
+ BOOST_CHECK_EQUAL( icl::contains(join_map, K_v(1,2)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, K_v(5,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, K_v(9,2)), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, IDv(2,6,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, IDv(1,6,1)), false );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, IIv(8,9,2)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, IIv(8,9,3)), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, IDv(2,6,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, IDv(1,6,1)), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, IIv(8,9,2)), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, IIv(8,9,3)), false );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, join_map), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, split_map), true );
+ BOOST_CHECK_EQUAL( icl::within(split_map, join_map), true );
+ BOOST_CHECK_EQUAL( icl::within(join_map, split_map), true );
+
+ //--------------------------------------------------------------------------
+ // inclusions
+ // { 0 1 2 3 4 5 8 9 }
+ // {[0, 2)[2, 3](3, 6) (7, 9]}
+ // ->2 ->1 ->1 ->2
+ // {[0, 2) [3,3](3, 6) (7, 9]}
+ // ->2 ->1 ->1 ->2
+ split_interval_map<T,U,Trt> split_sub_map1 = split_map;
+ split_sub_map1.erase(MK_v(2));
+ BOOST_CHECK_EQUAL( icl::contains(split_sub_map1, MK_v(2)), false );
+
+ interval_map<T,U,Trt> join_sub_map2;
+ join_sub_map2 = split_map;
+ join_sub_map2.erase(MK_v(1));
+ BOOST_CHECK_EQUAL( icl::contains(join_sub_map2, MK_v(1)), false );
+
+ split_interval_set<T> split_sub_set1;
+ separate_interval_set<T> sep_sub_set1;
+ interval_set<T> join_sub_set1;
+
+ icl::domain(split_sub_set1, split_sub_map1);
+ icl::domain(sep_sub_set1, split_sub_map1);
+ icl::domain(join_sub_set1, split_sub_map1);
+
+ BOOST_CHECK_EQUAL( icl::within(split_sub_map1, split_map), true );
+ BOOST_CHECK_EQUAL( icl::within(join_sub_map2, split_map), true );
+ BOOST_CHECK_EQUAL( icl::within(split_sub_map1, join_map ), true );
+ BOOST_CHECK_EQUAL( icl::within(join_sub_map2, join_map ), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, split_sub_map1), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, join_sub_map2), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, split_sub_map1), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, join_sub_map2), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, split_sub_set1), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, sep_sub_set1), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, join_sub_set1), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, split_sub_set1), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, sep_sub_set1), true );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, join_sub_set1), true );
+
+ split_interval_map<T,U,Trt> split_unrel_map11 = split_sub_map1;
+ split_unrel_map11.set(CIv(7,9,1));
+ BOOST_CHECK_EQUAL( split_unrel_map11(MK_v(8)), MK_u(1) );
+
+ interval_map<T,U,Trt> join_unrel_map21 = join_sub_map2;
+ join_unrel_map21.set(K_v(0,1));
+ BOOST_CHECK_EQUAL( join_unrel_map21(MK_v(0)), MK_u(1) );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_unrel_map11, split_map), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_unrel_map21, split_map), false );
+ BOOST_CHECK_EQUAL( icl::contains(split_unrel_map11, join_map), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_unrel_map21, join_map), false );
+
+ BOOST_CHECK_EQUAL( icl::within(split_unrel_map11, split_map), false );
+ BOOST_CHECK_EQUAL( icl::within(join_unrel_map21, split_map), false );
+ BOOST_CHECK_EQUAL( icl::within(split_unrel_map11, join_map), false );
+ BOOST_CHECK_EQUAL( icl::within(join_unrel_map21, join_map), false );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_map, split_unrel_map11), false );
+ BOOST_CHECK_EQUAL( icl::contains(split_map, join_unrel_map21), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, split_unrel_map11), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_map, join_unrel_map21), false );
+
+}
+
+//------------------------------------------------------------------------------
+//- part2: Operations
+//------------------------------------------------------------------------------
+
+template <class T, class U>
+void interval_map_mixed_add_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ U u1 = make<U>(1);
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I4_5D_1(I4_5D, u1);
+ mapping_pair<T,U> v1_1(v1, u1);
+ mapping_pair<T,U> v3_1(v3, u1);
+ mapping_pair<T,U> v5_1(v5, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I1_3D_1).add(I2_4D_1);
+ split_map += I4_5D_1;
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ IntervalMapT join_map;
+ join_map += split_map;
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 3 );
+
+ IntervalMapT join_map3;
+ join_map3.add(v1_1).add(v3_1);
+ join_map3 += v5_1;
+ BOOST_CHECK_EQUAL( iterative_size(join_map3), 3 );
+ SplitIntervalMapT split_map3;
+ split_map3 += join_map3;
+ BOOST_CHECK_EQUAL( iterative_size(split_map3), 3 );
+}
+
+template <class T, class U>
+void interval_map_mixed_add2_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I4_5D_1(I4_5D, u1);
+ mapping_pair<T,U> v1_1(v1, u1);
+ mapping_pair<T,U> v3_1(v3, u1);
+ mapping_pair<T,U> v5_1(v5, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I1_3D_1).add(I2_4D_1);
+ split_map |= I4_5D_1;
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 4 );
+ IntervalMapT join_map;
+ join_map |= split_map;
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 3 );
+
+ IntervalMapT join_map3;
+ join_map3.add(v1_1).add(v3_1);
+ join_map3 |= v5_1;
+ BOOST_CHECK_EQUAL( iterative_size(join_map3), 3 );
+ SplitIntervalMapT split_map3;
+ split_map3 |= join_map3;
+ BOOST_CHECK_EQUAL( iterative_size(split_map3), 3 );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_subtract_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ std::pair<IntervalT,U> I0_4D_1(I0_4D, u1);
+ std::pair<IntervalT,U> I2_6D_1(I2_6D, u1);
+ std::pair<IntervalT,U> I3_6D_1(I3_6D, u1);
+ std::pair<IntervalT,U> I5_7D_1(I5_7D, u1);
+ std::pair<IntervalT,U> I7_8D_1(I7_8D, u1);
+ std::pair<IntervalT,U> I8_9D_1(I8_9D, u1);
+ std::pair<IntervalT,U> I8_9I_1(I8_9I, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 7 );
+
+ IntervalMapT join_map;
+ join_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 5 );
+
+ // Make maps to be subtracted
+ SplitIntervalMapT split_sub;
+ split_sub.add(I3_6D_1).add(I8_9D_1);
+
+ IntervalMapT join_sub;
+ join_sub.add(I3_6D_1).add(I8_9D_1);
+
+ //--------------------------------------------------------------------------
+ // Test for split_interval_map
+ SplitIntervalMapT split_diff = split_map;
+ IntervalMapT join_diff = join_map;
+
+ //subtraction combinations
+ split_diff -= split_sub;
+ join_diff -= split_sub;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 7 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 5 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for interval_map. Reinitialize
+ split_diff = split_map;
+ join_diff = join_map;
+
+ //subtraction combinations
+ split_diff -= join_sub;
+ join_diff -= join_sub;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 7 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 5 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_erase_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ std::pair<IntervalT,U> I0_4D_1(I0_4D, u1);
+ std::pair<IntervalT,U> I2_6D_1(I2_6D, u1);
+ std::pair<IntervalT,U> I3_6D_1(I3_6D, u1);
+ std::pair<IntervalT,U> I5_7D_1(I5_7D, u1);
+ std::pair<IntervalT,U> I7_8D_1(I7_8D, u1);
+ std::pair<IntervalT,U> I8_9D_1(I8_9D, u1);
+ std::pair<IntervalT,U> I8_9I_1(I8_9I, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 7 );
+
+ IntervalMapT join_map;
+ join_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 5 );
+
+ // Make sets to be erased
+ SplitIntervalMapT split_sub;
+ split_sub.add(I3_6D_1).add(I8_9D_1);
+
+ IntervalMapT join_sub;
+ join_sub.add(I3_6D_1).add(I8_9D_1);
+
+ //--------------------------------------------------------------------------
+ // Test for split_interval_map
+ SplitIntervalMapT split_diff = split_map;
+ IntervalMapT join_diff = join_map;
+
+ //subtraction combinations
+ erase(split_diff, split_sub);
+ erase(join_diff, split_sub);
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 6 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 5 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for interval_map. Reinitialize
+ split_diff = split_map;
+ join_diff = join_map;
+
+ //subtraction combinations
+ erase(split_diff, join_sub);
+ erase(join_diff, join_sub);
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 6 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 5 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_erase2_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ std::pair<IntervalT,U> I0_4D_1(I0_4D, u1);
+ std::pair<IntervalT,U> I2_6D_1(I2_6D, u1);
+ std::pair<IntervalT,U> I3_6D_1(I3_6D, u1);
+ std::pair<IntervalT,U> I5_7D_1(I5_7D, u1);
+ std::pair<IntervalT,U> I7_8D_1(I7_8D, u1);
+ std::pair<IntervalT,U> I8_9D_1(I8_9D, u1);
+ std::pair<IntervalT,U> I8_9I_1(I8_9I, u1);
+
+ SplitIntervalMapT split_map;
+ split_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(split_map), 7 );
+
+ IntervalMapT join_map;
+ join_map.add(I0_4D_1).add(I2_6D_1).add(I5_7D_1).add(I7_8D_1).add(I8_9I_1);
+ BOOST_CHECK_EQUAL( iterative_size(join_map), 5 );
+
+ // Make sets to be erased
+ SplitIntervalSetT split_sub;
+ split_sub.add(I3_6D).add(I8_9D);
+
+ IntervalSetT join_sub;
+ join_sub.add(I3_6D).add(I8_9D);
+
+ //--------------------------------------------------------------------------
+ // Test for split_interval_map
+ SplitIntervalMapT split_diff = split_map;
+ IntervalMapT join_diff = join_map;
+ SplitIntervalMapT split_diff2 = split_map;
+ IntervalMapT join_diff2 = join_map;
+
+ //erase combinations
+ erase(split_diff, split_sub);
+ erase(join_diff, split_sub);
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 5 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 4 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+
+ //subtraction combinations
+ split_diff2 -= split_sub;
+ join_diff2 -= split_sub;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff2), 5 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff2), 4 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff2, split_diff2), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff2, join_diff2), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff2, split_diff2), true );
+
+ //--------------------------------------------------------------------------
+ // Test for interval_map. Reinitialize
+ split_diff = split_map;
+ join_diff = join_map;
+ split_diff2 = split_map;
+ join_diff2 = join_map;
+
+ //erase combinations
+ erase(split_diff, join_sub);
+ erase(join_diff, join_sub);
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff), 5 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff), 4 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+
+ //subtraction combinations
+ split_diff2 -= join_sub;
+ join_diff2 -= join_sub;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_diff2), 5 );
+ BOOST_CHECK_EQUAL( iterative_size(join_diff2), 4 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff2, join_diff2), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff2, split_diff2), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff2, join_diff2), true );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_insert_erase_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ std::pair<IntervalT,U> I0_4D_1(I0_4D, u1);
+ std::pair<IntervalT,U> I2_6D_1(I2_6D, u1);
+ std::pair<IntervalT,U> I3_6D_1(I3_6D, u1);
+ std::pair<IntervalT,U> I5_7D_1(I5_7D, u1);
+ std::pair<IntervalT,U> I7_8D_1(I7_8D, u1);
+ std::pair<IntervalT,U> I8_9D_1(I8_9D, u1);
+ std::pair<IntervalT,U> I8_9I_1(I8_9I, u1);
+
+ SplitIntervalMapT split_A, split_B, split_all, split_X;
+ IntervalMapT join_A, join_B, join_all, join_X;
+
+ split_all.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1).insert(I7_8D_1).insert(I8_9I_1);
+ split_A.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1);
+ split_B.insert(I7_8D_1).insert(I8_9I_1);
+
+ join_all.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1).insert(I7_8D_1).insert(I8_9I_1);
+ join_A.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1);
+ join_B.insert(I7_8D_1).insert(I8_9I_1);
+
+ //-------------------------------------------------------------------------
+ insert(split_X, split_A);
+ BOOST_CHECK_EQUAL( split_X, split_A );
+ insert(split_X, split_B);
+ BOOST_CHECK_EQUAL( split_X, split_all );
+
+ erase(split_X, split_B);
+ BOOST_CHECK_EQUAL( split_X, split_A );
+ erase(split_X, split_A);
+ BOOST_CHECK_EQUAL( split_X, SplitIntervalMapT() );
+
+ //-------------------------------------------------------------------------
+ insert(join_X, join_A);
+ BOOST_CHECK_EQUAL( join_X, join_A );
+ insert(join_X, join_B);
+ BOOST_CHECK_EQUAL( join_X, join_all );
+
+ erase(join_X, join_B);
+ BOOST_CHECK_EQUAL( join_X, join_A );
+ erase(join_X, join_A);
+ BOOST_CHECK_EQUAL( join_X, IntervalMapT() );
+
+ //-------------------------------------------------------------------------
+ split_X.clear();
+ insert(split_X, join_A);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_A), true );
+ insert(split_X, join_B);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_all), true );
+
+ erase(split_X, join_B);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_A), true );
+ erase(split_X, join_A);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, SplitIntervalMapT()), true );
+
+ //-------------------------------------------------------------------------
+ split_X.clear();
+ insert(join_X, split_A);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, split_A), true );
+ insert(join_X, split_B);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, join_all), true );
+
+ erase(join_X, split_B);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, split_A), true );
+ erase(join_X, split_A);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, IntervalMapT()), true );
+}
+
+template <class T, class U>
+void interval_map_mixed_insert_erase2_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ std::pair<IntervalT,U> I0_4D_1(I0_4D, u1);
+ std::pair<IntervalT,U> I2_6D_1(I2_6D, u1);
+ std::pair<IntervalT,U> I3_6D_1(I3_6D, u1);
+ std::pair<IntervalT,U> I5_7D_1(I5_7D, u1);
+ std::pair<IntervalT,U> I7_8D_1(I7_8D, u1);
+ std::pair<IntervalT,U> I8_9D_1(I8_9D, u1);
+ std::pair<IntervalT,U> I8_9I_1(I8_9I, u1);
+
+ SplitIntervalMapT split_A, split_B, split_all, split_X;
+ IntervalMapT join_A, join_B, join_all, join_X;
+ SplitIntervalSetT split_dA, split_dB;
+ IntervalSetT join_dA, join_dB;
+
+ split_all.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1).insert(I7_8D_1).insert(I8_9I_1);
+ split_A.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1);
+ split_B.insert(I7_8D_1).insert(I8_9I_1);
+
+ join_all.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1).insert(I7_8D_1).insert(I8_9I_1);
+ join_A.insert(I0_4D_1).insert(I2_6D_1).insert(I5_7D_1);
+ join_B.insert(I7_8D_1).insert(I8_9I_1);
+
+ icl::domain(split_dA, split_A);
+ icl::domain(split_dB, split_B);
+ icl::domain(join_dA, join_A);
+ icl::domain(join_dB, join_B);
+
+ //-------------------------------------------------------------------------
+ insert(split_X, split_A);
+ BOOST_CHECK_EQUAL( split_X, split_A );
+ insert(split_X, split_B);
+ BOOST_CHECK_EQUAL( split_X, split_all );
+
+ erase(split_X, split_dB);
+ BOOST_CHECK_EQUAL( split_X, split_A );
+ erase(split_X, split_dA);
+ BOOST_CHECK_EQUAL( split_X, SplitIntervalMapT() );
+
+ //-------------------------------------------------------------------------
+ insert(join_X, join_A);
+ BOOST_CHECK_EQUAL( join_X, join_A );
+ insert(join_X, join_B);
+ BOOST_CHECK_EQUAL( join_X, join_all );
+
+ erase(join_X, join_dB);
+ BOOST_CHECK_EQUAL( join_X, join_A );
+ erase(join_X, join_dA);
+ BOOST_CHECK_EQUAL( join_X, IntervalMapT() );
+
+ //-------------------------------------------------------------------------
+ split_X.clear();
+ insert(split_X, join_A);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_A), true );
+ insert(split_X, join_B);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_all), true );
+
+ erase(split_X, join_dB);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, split_A), true );
+ erase(split_X, join_dA);
+ BOOST_CHECK_EQUAL( is_element_equal(split_X, SplitIntervalMapT()), true );
+
+ //-------------------------------------------------------------------------
+ split_X.clear();
+ insert(join_X, split_A);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, split_A), true );
+ insert(join_X, split_B);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, join_all), true );
+
+ erase(join_X, split_dB);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, split_A), true );
+ erase(join_X, split_dA);
+ BOOST_CHECK_EQUAL( is_element_equal(join_X, IntervalMapT()), true );
+}
+
+template <class T, class U>
+void interval_map_mixed_basic_intersect_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ U u2 = make<U>(2);
+ U u3 = make<U>(3);
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+
+
+ T v6 = make<T>(6);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ std::pair<IntervalT,U> I0_3D_1(I0_3D, u1);
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I1_3D_2(I1_3D, u2);
+ std::pair<IntervalT,U> I1_8D_1(I1_8D, u1);
+ std::pair<const IntervalT,U> I2_7D_1(I2_7D, u1);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I2_3D_3(I2_3D, u3);
+ std::pair<IntervalT,U> I6_7D_1(I6_7D, u1);
+ std::pair<IntervalT,U> I6_7D_3(I6_7D, u3);
+ std::pair<IntervalT,U> I6_8D_1(I6_8D, u1);
+ std::pair<IntervalT,U> I6_8D_2(I6_8D, u2);
+ std::pair<IntervalT,U> I6_9D_1(I6_9D, u1);
+
+ //--------------------------------------------------------------------------
+ // split_interval_map
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= [1 8)
+ //split_AB -> [1 3) [6 8)
+ // &= [2 7)
+ // -> [2 3) [6 7)
+ SplitIntervalMapT split_A, split_B, split_AB, split_ab, split_ab2;
+
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_AB = split_A;
+ split_AB &= I1_8D_1;
+ split_ab.add(I1_3D_2).add(I6_8D_2);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= I1_8D_1) &= I2_7D_1;
+ split_ab2.add(I2_3D_3).add(I6_7D_3);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab2 );
+
+
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // 1 1
+ // &= 1
+ // 1
+ //split_AB -> [1]
+ // 2
+ // += (1 7)
+ // 2
+ // -> [1](1 7)
+ // 2 2
+ split_A.clear();
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_AB = split_A;
+ split_AB &= mapping_pair<T,U>(v1,u1);
+ split_ab.clear();
+ split_ab.add(mapping_pair<T,U>(v1,u2));
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ split_AB &= mapping_pair<T,U>(v1,u1);
+ split_AB += make_pair(IntervalT::open(v1,v7), u2);
+ split_ab2.clear();
+ split_ab2 += make_pair(IntervalT::right_open(v1,v7), u2);
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_basic_intersect2_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ U u2 = make<U>(2);
+ U u3 = make<U>(3);
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+
+
+ T v6 = make<T>(6);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ std::pair<IntervalT,U> I0_3D_1(I0_3D, u1);
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I1_3D_2(I1_3D, u2);
+ std::pair<IntervalT,U> I1_8D_1(I1_8D, u1);
+ std::pair<IntervalT,U> I2_7D_1(I2_7D, u1);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I2_3D_3(I2_3D, u3);
+ std::pair<IntervalT,U> I6_7D_1(I6_7D, u1);
+ std::pair<IntervalT,U> I6_7D_3(I6_7D, u3);
+ std::pair<IntervalT,U> I6_8D_1(I6_8D, u1);
+ std::pair<IntervalT,U> I6_8D_2(I6_8D, u2);
+ std::pair<IntervalT,U> I6_9D_1(I6_9D, u1);
+
+ //--------------------------------------------------------------------------
+ // split_interval_map
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= [1 8)
+ //split_AB -> [1 3) [6 8)
+ // &= [2 7)
+ // -> [2 3) [6 7)
+ SplitIntervalMapT split_A, split_B, split_AB, split_ab, split_ab2;
+
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_AB = split_A;
+ split_AB &= I1_8D;
+ split_ab.add(I1_3D_1).add(I6_8D_1);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= I1_8D) &= I2_7D;
+ split_ab2.add(I2_3D_1).add(I6_7D_1);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab2 );
+
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // 1 1
+ // &= 1
+ // 1
+ //split_AB -> [1]
+ // 2
+ // += (1 7)
+ // 2
+ // -> [1](1 7)
+ // 2 2
+ split_A.clear();
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_AB = split_A;
+ split_AB &= v1;
+ split_ab.clear();
+ split_ab.add(mapping_pair<T,U>(v1,u1));
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ split_AB &= IntervalT(v1);
+ split_AB += make_pair(IntervalT::open(v1,v7), u1);
+ split_ab2.clear();
+ split_ab2 += make_pair(IntervalT::right_open(v1,v7), u1);
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
+
+ split_interval_map<T,U> left, right;
+ left. add(IDv(0,2,2));
+ right.add(IDv(0,2,2));
+ BOOST_CHECK_EQUAL( is_element_equal(left, right), true );
+
+ split_interval_set<T> left2, right2;
+ left2. add(I_D(0,2));
+ right2.add(I_D(0,1));
+ is_element_equal(left2, right2);
+ BOOST_CHECK_EQUAL( is_element_equal(left2, right2), false );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_intersect_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ U u2 = make<U>(2);
+
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+ T v6 = make<T>(6);
+
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_2D = IntervalT::right_open(v1,v2);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I5_8D = IntervalT::right_open(v5,v8);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ std::pair<IntervalT,U> I0_3D_1(I0_3D, u1);
+ std::pair<IntervalT,U> I1_2D_1(I1_2D, u1);
+ std::pair<IntervalT,U> I1_2D_2(I1_2D, u2);
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I1_3D_2(I1_3D, u2);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I2_3D_2(I2_3D, u2);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I5_8D_1(I5_8D, u1);
+ std::pair<IntervalT,U> I6_8D_1(I6_8D, u1);
+ std::pair<IntervalT,U> I6_8D_2(I6_8D, u2);
+ std::pair<IntervalT,U> I6_9D_1(I6_9D, u1);
+
+ //--------------------------------------------------------------------------
+ // split_interval_set
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // 1 1
+ //split_B &= [1 2)[2 4) [5 8)
+ // 1 1 1
+ //split_AB -> [1 2)[2 3) [6 8)
+ // 2 2 2
+ SplitIntervalMapT split_A, split_B, split_AB, split_ab, split_ab_jn;
+ IntervalMapT join_A, join_B, join_AB, join_ab;
+
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_B.add(I1_2D_1).add(I2_4D_1).add(I5_8D_1);
+ split_ab.add(I1_2D_2).add(I2_3D_2).add(I6_8D_2);
+ split_ab_jn.add(I1_3D_2).add(I6_8D_2);
+ split_AB = split_A;
+ split_AB &= split_B;
+ BOOST_CHECK_EQUAL( iterative_size(split_AB), 3 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ //split_A [0 3) [6 9)
+ // 1 1
+ //join_B &= [1 4) [5 8)
+ // 1 1
+ //split_AB -> [1 3) [6 8)
+ // 2 2
+ split_AB = split_A;
+ join_B = split_B;
+ split_AB &= join_B;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_AB), 2 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab_jn );
+}
+
+
+
+template <class T, class U>
+void interval_map_mixed_intersect2_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ U u2 = make<U>(2);
+
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+ T v6 = make<T>(6);
+
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_2D = IntervalT::right_open(v1,v2);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I5_8D = IntervalT::right_open(v5,v8);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ std::pair<IntervalT,U> I0_3D_1(I0_3D, u1);
+ std::pair<IntervalT,U> I1_2D_1(I1_2D, u1);
+ std::pair<IntervalT,U> I1_2D_2(I1_2D, u2);
+ std::pair<IntervalT,U> I1_3D_1(I1_3D, u1);
+ std::pair<IntervalT,U> I1_3D_2(I1_3D, u2);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I2_3D_2(I2_3D, u2);
+ std::pair<IntervalT,U> I2_4D_1(I2_4D, u1);
+ std::pair<IntervalT,U> I5_8D_1(I5_8D, u1);
+ std::pair<IntervalT,U> I6_8D_1(I6_8D, u1);
+ std::pair<IntervalT,U> I6_8D_2(I6_8D, u2);
+ std::pair<IntervalT,U> I6_9D_1(I6_9D, u1);
+
+ //--------------------------------------------------------------------------
+ // split_interval_set
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // 1 1
+ //split_B &= [1 2)[2 4) [5 8)
+ //split_AB -> [1 2)[2 3) [6 8)
+ // 1 1 1
+ SplitIntervalMapT split_A, split_AB, split_ab, split_ab_jn;
+ SplitIntervalSetT split_B;
+ IntervalMapT join_A, join_AB, join_ab;
+ IntervalSetT join_B;
+
+ split_A.add(I0_3D_1).add(I6_9D_1);
+ split_B.add(I1_2D).add(I2_4D).add(I5_8D);
+ split_ab.add(I1_2D_1).add(I2_3D_1).add(I6_8D_1);
+ split_ab_jn.add(I1_3D_1).add(I6_8D_1);
+ split_AB = split_A;
+ split_AB &= split_B;
+ BOOST_CHECK_EQUAL( iterative_size(split_AB), 3 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ //split_A [0 3) [6 9)
+ // 1 1
+ //join_B &= [1 4) [5 8)
+ //split_AB -> [1 3) [6 8)
+ // 1 1
+ split_AB = split_A;
+ join_B = split_B;
+ split_AB &= join_B;
+
+ BOOST_CHECK_EQUAL( iterative_size(split_AB), 2 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab_jn );
+}
+
+
+template <class T, class U>
+void interval_map_mixed_disjoint_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v6 = make<T>(6);
+
+ IntervalT I0_2D = IntervalT::right_open(v0,v2);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I3_4D = IntervalT::right_open(v3,v4);
+ IntervalT I4_4I = IntervalT::closed(v4,v4);
+ IntervalT C4_6D = IntervalT::open(v4,v6);
+ IntervalT I6_6I = IntervalT::closed(v6,v6);
+
+ std::pair<IntervalT,U> I0_2D_1(I0_2D, u1);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I3_4D_1(I3_4D, u1);
+ std::pair<IntervalT,U> I4_4I_1(I4_4I, u1);
+ std::pair<IntervalT,U> C4_6D_1(C4_6D, u1);
+ std::pair<IntervalT,U> I6_6I_1(I6_6I, u1);
+
+ //--------------------------------------------------------------------------
+ //split_A: [0 2) [4 4] [6 6]
+ //split_B: [2 3)[3 4) (4 6)
+ SplitIntervalMapT split_A, split_B;
+
+ split_A.add(I0_2D_1).add(I4_4I_1).add(I6_6I_1);
+ split_B.add(I2_3D_1).add(I3_4D_1).add(C4_6D_1);
+
+ IntervalMapT join_A(split_A), join_B(split_B);
+
+ BOOST_CHECK_EQUAL( disjoint(split_A, split_B), true );
+ BOOST_CHECK_EQUAL( disjoint(split_A, join_B), true );
+
+ BOOST_CHECK_EQUAL( disjoint(join_A, split_B), true );
+ BOOST_CHECK_EQUAL( disjoint(join_A, join_B), true );
+}
+
+template<class Type>
+struct size_greater_1 : public icl::property<Type>
+{
+ bool operator()(const Type& value)const
+ {
+ return icl::size(value.first) > 1 ;
+ }
+};
+
+
+template <class T, class U>
+void interval_map_mixed_erase_if_4_integral_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef split_interval_map<T,U> SplitIntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef split_interval_set<T> SplitIntervalSetT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ U u1 = make<U>(1);
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v6 = make<T>(6);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I3_4D = IntervalT::right_open(v3,v4);
+ IntervalT I4_4I = IntervalT::closed(v4,v4);
+ IntervalT C4_6D = IntervalT::open(v4,v6);
+ IntervalT I6_6I = IntervalT::closed(v6,v6);
+
+ std::pair<IntervalT,U> I0_3D_1(I0_3D, u1);
+ std::pair<IntervalT,U> I2_3D_1(I2_3D, u1);
+ std::pair<IntervalT,U> I3_4D_1(I3_4D, u1);
+ std::pair<IntervalT,U> I4_4I_1(I4_4I, u1);
+ std::pair<IntervalT,U> C4_6D_1(C4_6D, u1);
+ std::pair<IntervalT,U> I6_6I_1(I6_6I, u1);
+
+ //--------------------------------------------------------------------------
+ //split_A: [0 2) [4 4] [6 6]
+ //split_B: [2 3)[3 4) (4 6)
+ SplitIntervalMapT split_A, split_B;
+
+ split_A.add(I0_3D_1).add(I4_4I_1).add(I6_6I_1);
+ split_B.add(I4_4I_1).add(I6_6I_1);
+
+ icl::erase_if(size_greater_1<typename SplitIntervalMapT::value_type>(), split_A);
+
+ BOOST_CHECK_EQUAL( split_A, split_B );
+}
+
+//------------------------------------------------------------------------------
+//- infix operators
+//------------------------------------------------------------------------------
+
+template <class T, class U>
+void interval_map_mixed_infix_plus_overload_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ interval_map<T,U> join_a;
+ split_interval_map<T,U> split_a;
+
+ 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);
+}
+
+template <class T, class U>
+void interval_map_mixed_infix_pipe_overload_4_bicremental_types()
+{
+ typedef interval_map<T,U> IntervalMapT;
+ interval_map<T,U> join_a;
+ split_interval_map<T,U> split_a;
+
+ 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);
+}
+
+template <class T, class U>
+void interval_map_mixed_infix_minus_overload_4_bicremental_types()
+{
+ 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));
+
+ join_b .add(CDv(1,3,1)).add(IIv(6,11,3));
+ split_b.add(IDv(0,9,2)).add(IIv(3,6,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);
+}
+
+template <class T, class U>
+void interval_map_mixed_infix_et_overload_4_bicremental_types()
+{
+ 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, 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);
+}
+
+
+
+#endif // LIBS_ICL_TEST_TEST_ICL_interval_map_mixed_hpp_JOFA_081005__
+
+

Added: sandbox/icl/libs/icl/test/test_interval_map_mixed2_/test_interval_map_mixed2.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_mixed2_/test_interval_map_mixed2.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,82 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_map_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_add_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_add_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_add2_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_add2_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_subtract_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_subtract_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_erase_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_erase_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_erase2_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_erase2_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_insert_erase_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_insert_erase_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_insert_erase2_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_insert_erase2_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_basic_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_basic_intersect_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_basic_intersect2_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_basic_intersect2_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_intersect_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_intersect2_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_intersect2_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_disjoint_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_disjoint_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_mixed_erase_if_4_integral_types, T, integral_types)
+{ interval_map_mixed_erase_if_4_integral_types<T, int>(); }
+

Added: sandbox/icl/libs/icl/test/test_interval_map_mixed2_/vc9_test_interval_map_mixed2.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_mixed2_/vc9_test_interval_map_mixed2.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_map_mixed2"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}"
+ RootNamespace="Test_interval_map_mixed2"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_map_mixed2.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_map_mixed_/test_interval_map_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_mixed_/test_interval_map_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,62 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_map_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_ctor_4_ordered_types, T, ordered_types)
+{ interval_map_mixed_ctor_4_ordered_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_equal_4_ordered_types, T, ordered_types)
+{ interval_map_mixed_equal_4_ordered_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_assign_4_ordered_types, T, ordered_types)
+{ interval_map_mixed_assign_4_ordered_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_ctor_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_assign_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_assign_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_map_mixed_equal_4_bicremental_types, T, bicremental_types)
+{ interval_map_mixed_equal_4_bicremental_types<T, int>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_interval_map_mixed_inclusion_compare_4_bicremental_types, T, bicremental_types)
+{ partial_interval_map_mixed_inclusion_compare_4_bicremental_types<T, int, partial_absorber>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_interval_map_mixed_contains_4_bicremental_types, T, bicremental_types)
+{ partial_interval_map_mixed_contains_4_bicremental_types<T, int, partial_absorber>(); }
+

Added: sandbox/icl/libs/icl/test/test_interval_map_mixed_/vc9_test_interval_map_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_mixed_/vc9_test_interval_map_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_map_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}"
+ RootNamespace="Test_interval_map_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_map_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_map_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_map_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,1316 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_interval_map_shared_h_JOFA_081005__
+#define LIBS_ICL_TEST_TEST_ICL_interval_map_shared_h_JOFA_081005__
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_fundamentals_4_ordered_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::size_type size_T;
+ typedef typename IntervalMapT::difference_type diff_T;
+
+ // ordered types is the largest set of instance types.
+ // Because we can not generate values via incrementation for e.g. string,
+ // we are able to test operations only for the most basic values
+ // identity_element (0, empty, T() ...) and unit_element.
+
+ //T v0 = identity_element<T>();
+ //T v1 = unit_element<T>();
+ T v0 = identity_element<T>::value();
+ T v1 = unit_element<T>::value();
+ IntervalT I0_0I(v0);
+ IntervalT I1_1I(v1);
+ IntervalT I0_1I(v0, v1, interval_bounds::closed());
+ U u1 = unit_element<U>::value();
+
+ //-------------------------------------------------------------------------
+ //empty set
+ //-------------------------------------------------------------------------
+ BOOST_CHECK_EQUAL(IntervalMapT().empty(), true);
+ BOOST_CHECK_EQUAL(icl::is_empty(IntervalMapT()), true);
+ BOOST_CHECK_EQUAL(cardinality(IntervalMapT()), identity_element<size_T>::value());
+ BOOST_CHECK_EQUAL(IntervalMapT().size(), identity_element<size_T>::value());
+ BOOST_CHECK_EQUAL(icl::size(IntervalMapT()), identity_element<size_T>::value());
+ BOOST_CHECK_EQUAL(interval_count(IntervalMapT()), 0);
+ BOOST_CHECK_EQUAL(IntervalMapT().iterative_size(), 0);
+ BOOST_CHECK_EQUAL(iterative_size(IntervalMapT()), 0);
+ BOOST_CHECK_EQUAL(IntervalMapT(), IntervalMapT());
+
+ IntervalT mt_interval = identity_element<IntervalT >::value();
+ BOOST_CHECK_EQUAL(mt_interval, IntervalT());
+ typename IntervalMapT::value_type mt_u1 = make_pair(mt_interval, u1);
+ IntervalMapT mt_map = identity_element<IntervalMapT >::value();
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ //adding emptieness to emptieness yields emptieness ;)
+ mt_map.add(mt_u1).add(mt_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ mt_map.insert(mt_u1).insert(mt_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ (mt_map += mt_u1) += mt_u1;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ BOOST_CHECK_EQUAL(hull(mt_map), identity_element<IntervalT >::value());
+
+ //subtracting emptieness
+ mt_map.subtract(mt_u1).subtract(mt_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ mt_map.erase(mt_interval).erase(mt_interval);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ (mt_map -= mt_u1) -= mt_u1;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ //subtracting elements form emptieness
+ typename IntervalMapT::domain_mapping_type v0_u1 = make_pair(v0,u1);
+ typename IntervalMapT::domain_mapping_type v1_u1 = make_pair(v1,u1);
+ //mt_map.subtract(make_pair(v0,u1)).subtract(make_pair(v1,u1));
+ mt_map.subtract(v0_u1).subtract(v1_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ mt_map.erase(v0_u1).erase(v1_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ (mt_map -= v0_u1) -= v1_u1;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ //subtracting intervals form emptieness
+ typename IntervalMapT::segment_type I0_0I_u1 = make_pair(I0_0I,u1);
+ typename IntervalMapT::segment_type I0_1I_u1 = make_pair(I0_1I,u1);
+ typename IntervalMapT::segment_type I1_1I_u1 = make_pair(I1_1I,u1);
+ mt_map.subtract(I0_1I_u1).subtract(I1_1I_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ mt_map.erase(I0_1I_u1).erase(I1_1I_u1);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ (mt_map -= I0_1I_u1) -= I1_1I_u1;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ mt_map.erase(I0_1I).erase(I1_1I);
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+ //insecting emptieness
+ (mt_map &= mt_u1) &= mt_u1;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+ (mt_map &= mt_interval) &= mt_interval;
+ BOOST_CHECK_EQUAL(mt_map, IntervalMapT());
+
+
+
+ //-------------------------------------------------------------------------
+ //unary set
+ //-------------------------------------------------------------------------
+ IntervalMapT single_I0_0I_u1_from_element(v0_u1);
+ IntervalMapT single_I0_0I_u1_from_interval(I0_0I_u1);
+ IntervalMapT single_I0_0I_u1(single_I0_0I_u1_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I0_0I_u1_from_element, single_I0_0I_u1_from_interval);
+ BOOST_CHECK_EQUAL(single_I0_0I_u1_from_element, single_I0_0I_u1);
+ BOOST_CHECK_EQUAL(hull(single_I0_0I_u1), I0_0I);
+ BOOST_CHECK_EQUAL(hull(single_I0_0I_u1).lower(), I0_0I.lower());
+ BOOST_CHECK_EQUAL(hull(single_I0_0I_u1).upper(), I0_0I.upper());
+
+ IntervalMapT single_I1_1I_u1_from_element(v1_u1);
+ IntervalMapT single_I1_1I_u1_from_interval(I1_1I_u1);
+ IntervalMapT single_I1_1I_u1(single_I1_1I_u1_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I1_1I_u1_from_element, single_I1_1I_u1_from_interval);
+ BOOST_CHECK_EQUAL(single_I1_1I_u1_from_element, single_I1_1I_u1);
+
+ IntervalMapT single_I0_1I_u1_from_interval(I0_1I_u1);
+ IntervalMapT single_I0_1I_u1(single_I0_1I_u1_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I0_1I_u1_from_interval, single_I0_1I_u1);
+ BOOST_CHECK_EQUAL(hull(single_I0_1I_u1), I0_1I);
+ BOOST_CHECK_EQUAL(hull(single_I0_1I_u1).lower(), I0_1I.lower());
+ BOOST_CHECK_EQUAL(hull(single_I0_1I_u1).upper(), I0_1I.upper());
+
+ //contains predicate
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_0I_u1, v0), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_0I_u1, v0_u1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_0I_u1, I0_0I_u1), true);
+
+ BOOST_CHECK_EQUAL(icl::contains(single_I1_1I_u1, v1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I1_1I_u1, v1_u1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I1_1I_u1, I1_1I_u1), true);
+
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, v0), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, I0_1I_u1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, v1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, I1_1I_u1), true);
+
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, single_I0_0I_u1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, single_I1_1I_u1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I_u1, single_I0_1I_u1), true);
+
+ BOOST_CHECK_EQUAL(cardinality(single_I0_0I_u1), unit_element<size_T>::value());
+ BOOST_CHECK_EQUAL(single_I0_0I_u1.size(), unit_element<size_T>::value());
+ BOOST_CHECK_EQUAL(interval_count(single_I0_0I_u1), 1);
+ BOOST_CHECK_EQUAL(single_I0_0I_u1.iterative_size(), 1);
+ BOOST_CHECK_EQUAL(iterative_size(single_I0_0I_u1), 1);
+
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_ctor_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v4 = make<T>(4);
+ U u2 = make<U>(2);
+ IntervalT I4_4I(v4);
+ typename IntervalMapT::domain_mapping_type v4_u2(v4,u2);
+ typename IntervalMapT::value_type I4_4I_u2(I4_4I,u2);
+
+ IntervalMapT _I4_4I_u2;
+ BOOST_CHECK_EQUAL( _I4_4I_u2.empty(), true );
+ IntervalMapT _I4_4I_u2_1;
+ IntervalMapT _I4_4I_u2_2;
+ IntervalMapT _I4_4I_u2_3;
+ _I4_4I_u2 += v4_u2;
+ _I4_4I_u2_1 += I4_4I_u2;
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_1 );
+ _I4_4I_u2_2.add(v4_u2);
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_2 );
+ _I4_4I_u2_3.add(I4_4I_u2);
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_3 );
+
+ _I4_4I_u2.clear();
+ _I4_4I_u2.add(I4_4I_u2).add(I4_4I_u2);
+ IntervalMapT _I4_4I_u4(make_pair(I4_4I, make<U>(4)));
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u4 );
+
+ _I4_4I_u2.clear();
+ _I4_4I_u2.insert(I4_4I_u2).insert(I4_4I_u2);
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_1 );
+
+ BOOST_CHECK_EQUAL( cardinality(_I4_4I_u2), unit_element<typename IntervalMapT::size_type>::value() );
+ BOOST_CHECK_EQUAL( _I4_4I_u2.size(), unit_element<typename IntervalMapT::size_type>::value() );
+ BOOST_CHECK_EQUAL( interval_count(_I4_4I_u2), 1 );
+ BOOST_CHECK_EQUAL( _I4_4I_u2.iterative_size(), 1 );
+ BOOST_CHECK_EQUAL( iterative_size(_I4_4I_u2), 1 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).lower(), v4 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).upper(), v4 );
+
+ IntervalMapT _I4_4I_u2_copy(_I4_4I_u2);
+ IntervalMapT _I4_4I_u2_assigned;
+ _I4_4I_u2_assigned = _I4_4I_u2;
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_copy );
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_assigned );
+
+ _I4_4I_u2_assigned.clear();
+ BOOST_CHECK_EQUAL( true, _I4_4I_u2_assigned.empty() );
+
+ _I4_4I_u2_assigned.swap(_I4_4I_u2_copy);
+ BOOST_CHECK_EQUAL( true, _I4_4I_u2_copy.empty() );
+ BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_assigned );
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_add_sub_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v5 = make<T>(5);
+ T v6 = make<T>(6);
+ T v9 = make<T>(9);
+ U u1 = make<U>(1);
+ IntervalT I5_6I(v5,v6, interval_bounds::closed());
+ IntervalT I5_9I(v5,v9, interval_bounds::closed());
+ IntervalT I0_9I = IntervalT::closed(v0, v9);
+ typename IntervalMapT::domain_mapping_type v0_u1 = make_pair(v0, u1);
+ typename IntervalMapT::domain_mapping_type v9_u1 = make_pair(v9, u1);
+ typename IntervalMapT::value_type I5_6I_u1 = make_pair(I5_6I, u1);
+ typename IntervalMapT::value_type I5_9I_u1 = make_pair(I5_9I, u1);
+ typename IntervalMapT::value_type I0_9I_u1 = make_pair(IntervalT::closed(v0, v9), u1);
+
+ BOOST_CHECK_EQUAL( IntervalMapT(I5_6I_u1).add(v0_u1).add(v9_u1),
+ IntervalMapT().add(v9_u1).add(I5_6I_u1).add(v0_u1) );
+
+ IntervalMapT map_A = IntervalMapT(I5_6I_u1).add(v0_u1).add(v9_u1);
+ IntervalMapT map_B = IntervalMapT().insert(v9_u1).insert(I5_6I_u1).insert(v0_u1);
+ BOOST_CHECK_EQUAL( map_A, map_B );
+ BOOST_CHECK_EQUAL( hull(map_A), I0_9I );
+ BOOST_CHECK_EQUAL( hull(map_A).lower(), I0_9I.lower() );
+ BOOST_CHECK_EQUAL( hull(map_A).upper(), I0_9I.upper() );
+
+ IntervalMapT map_A1 = map_A, map_B1 = map_B,
+ map_A2 = map_A, map_B2 = map_B;
+
+ map_A1.subtract(I5_6I_u1).subtract(v9_u1);
+ map_B1.erase(v9_u1).erase(I5_6I_u1);
+ BOOST_CHECK_EQUAL( map_A1, map_B1 );
+
+ map_B1 = map_B;
+ map_B2.erase(v9).erase(I5_6I);
+ BOOST_CHECK_EQUAL( map_A1, map_B2 );
+
+ map_A2.subtract(I5_9I_u1);
+ map_B2.erase(I5_9I);
+ BOOST_CHECK_EQUAL( map_A2, map_B2 );
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_distinct_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMap<T,U>::size_type size_T;
+ typedef typename IntervalMap<T,U>::difference_type diff_T;
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+ U u1 = make<U>(1);
+ typename IntervalMapT::domain_mapping_type v1_u1(v1,u1);
+ typename IntervalMapT::domain_mapping_type v3_u1(v3,u1);
+ typename IntervalMapT::domain_mapping_type v5_u1(v5,u1);
+
+ size_T s3 = make<size_T>(3);
+
+ IntervalMapT is_1_3_5;
+ is_1_3_5.add(v1_u1).add(v3_u1).add(v5_u1);
+
+ BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_distinct_4_bicremental_continuous_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::size_type size_T;
+ typedef typename IntervalMapT::difference_type diff_T;
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+ U u1 = make<U>(1);
+ typename IntervalMapT::domain_mapping_type v1_u1(v1,u1);
+ typename IntervalMapT::domain_mapping_type v3_u1(v3,u1);
+ typename IntervalMapT::domain_mapping_type v5_u1(v5,u1);
+
+ size_T s3 = make<size_T>(3);
+ diff_T d0 = make<diff_T>(0);
+ diff_T d2 = make<diff_T>(2);
+
+ IntervalMapT is_1_3_5;
+ is_1_3_5.add(v1_u1).add(v3_u1).add(v5_u1);
+
+ BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ icl::length(is_1_3_5);
+ BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
+ BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
+
+
+ IntervalMapT is_123_5;
+ is_123_5 = is_1_3_5;
+ //OPROM: open problem: Ambiguity resolving value_type and mapping_type for overloaded o= operators.
+ //is_123_5 += make_pair(IntervalT::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
+ //is_123_5 += make_pair<IntervalT, U>(IntervalT::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
+ //USASO: unsatisfctory solution 1: explicit IntervalMapT::value_type instead of make_pair
+ is_123_5 += typename IntervalMapT::value_type(IntervalT::open(v1,v3),u1);
+ //USASO: unsatisfctory solution 2: not implementing mapping_type version of o=
+
+ BOOST_CHECK_EQUAL( cardinality(is_123_5), icl::infinity<size_T>::value() );
+ BOOST_CHECK_EQUAL( is_123_5.size(), icl::infinity<size_T>::value() );
+ BOOST_CHECK_EQUAL( icl::length(is_123_5), d2 );
+
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_isolate_4_bicremental_continuous_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::size_type size_T;
+ typedef typename IntervalMapT::difference_type diff_T;
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v4 = make<T>(4);
+ U u1 = make<U>(1);
+ IntervalT I0_4I = IntervalT::closed(v0,v4);
+ IntervalT C0_2D = IntervalT::open(v0,v2);
+ IntervalT C2_4D = IntervalT::open(v2,v4);
+ typename IntervalMapT::value_type I0_4I_u1(I0_4I,u1);
+ typename IntervalMapT::value_type C0_2D_u1(C0_2D,u1);
+ typename IntervalMapT::value_type C2_4D_u1(C2_4D,u1);
+ // {[0 4]}
+ // - { (0,2) (2,4) }
+ // = {[0] [2] [4]}
+ IntervalMapT iso_map = IntervalMapT(I0_4I_u1);
+ IntervalMapT gap_set;
+ gap_set.add(C0_2D_u1).add(C2_4D_u1);
+ iso_map -= gap_set;
+
+ BOOST_CHECK_EQUAL( cardinality(iso_map), static_cast<size_T>(3) );
+ BOOST_CHECK_EQUAL( iso_map.iterative_size(), static_cast<std::size_t>(3) );
+ BOOST_CHECK_EQUAL( iterative_size(iso_map), static_cast<std::size_t>(3) );
+ BOOST_CHECK_EQUAL( iterative_size(iso_map), static_cast<std::size_t>(3) );
+
+ IntervalMapT iso_map2;
+ iso_map2.add(I0_4I_u1);
+ iso_map2.subtract(C0_2D_u1).subtract(C2_4D_u1);
+
+ IntervalMapT iso_map3(I0_4I_u1);
+ (iso_map3 -= C0_2D_u1) -= C2_4D_u1;
+
+ IntervalMapT iso_map4;
+ iso_map4.insert(I0_4I_u1);
+ iso_map4.erase(C0_2D_u1).erase(C2_4D_u1);
+
+ BOOST_CHECK_EQUAL( iso_map, iso_map2 );
+ BOOST_CHECK_EQUAL( iso_map, iso_map3 );
+ BOOST_CHECK_EQUAL( iso_map, iso_map4 );
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_contains_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::set_type IntervalSetT;
+ IntervalMapT itv_map; itv_map.add(K_v(3,1));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(3)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, K_v(3,1)), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(IntervalMapT().add(K_v(3,1)), K_v(3,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(IntervalMapT().add(K_v(3,1)), MK_v(3)), true );
+ BOOST_CHECK_EQUAL( icl::contains(IntervalMapT().insert(K_v(3,1)), K_v(3,1)), true );
+ itv_map.clear();
+ BOOST_CHECK_EQUAL( icl::contains((itv_map += IIv(3,7,1)), IIv(3,7,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, IIv(3,7,2)), false );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(3,7)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(4,6)), true );
+ BOOST_CHECK_EQUAL( icl::contains((itv_map += CIv(7,9,1)),IIv(3,9,1)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(4,8)), true );
+ BOOST_CHECK_EQUAL( icl::contains((itv_map += IIv(11,12,1)), IIv(3,12,1)), false );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(4,11)), false );
+
+ IntervalMapT itv_map0 = itv_map;
+
+ itv_map.clear();
+ IntervalMapT itv_map2(IIv(5,8,1));
+ itv_map2.add(K_v(9,1)).add(K_v(11,1));
+ itv_map += itv_map2;
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_map2), true );
+ IntervalSetT itv_set2;
+ icl::domain(itv_set2, itv_map2);
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_set2), true );
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_contains_key_objects_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::set_type IntervalSetT;
+ IntervalMapT itv_map;
+
+ itv_map.add(IDv(1,3,1));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(0)), false );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(2)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(3)), false );
+
+ itv_map.add(IDv(3,6,2));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(0,0)), false );
+ contains(itv_map, I_I(2,4));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(2,4)), true );
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, I_I(6,6)), false );
+
+ itv_map.add(IDv(8,9,2));
+
+ IntervalSetT itv_set;
+ itv_set.add(C_I(1,2)).add(C_D(2,6)).add(I_I(8,8));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_set), true );
+ itv_set.add(I_I(1,4));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_set), true );
+ itv_set.add(I_I(1,4));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_set), true );
+ itv_set.add(I_I(7,7));
+ BOOST_CHECK_EQUAL( icl::contains(itv_map, itv_set), false );
+
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_operators_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ U u1 = make<U>(1);
+ typename IntervalMapT::interval_type I3_5I(IntervalT::closed(v3,v5));
+ typename IntervalMapT::value_type I0_1I_u1(IntervalT::closed(v0,v1),u1);
+ typename IntervalMapT::value_type I3_5I_u1(IntervalT::closed(v3,v5),u1);
+ typename IntervalMapT::value_type I7_8I_u1(IntervalT::closed(v7,v8),u1);
+
+ IntervalMapT left, left2, right, all, section, complement;
+ left.add(I0_1I_u1).add(I3_5I_u1);
+ (right += I3_5I_u1) += I7_8I_u1;
+ BOOST_CHECK_EQUAL( disjoint(left, right), false );
+ BOOST_CHECK_EQUAL( intersects(left, right), true );
+
+ (all += left) += right;
+ (section += left) &= right;
+ all -= section;
+ complement += all;
+ //complement.erase(I3_5I);
+ icl::erase(complement, section);
+ BOOST_CHECK_EQUAL( disjoint(section, complement), true );
+ BOOST_CHECK_EQUAL( intersects(section, complement), false );
+}
+
+
+// Test for nontrivial intersection of interval maps with intervals and values
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_base_intersect_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_4D = IntervalT::right_open(v1,v4);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I5_8D = IntervalT::right_open(v5,v8);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
+ typename IntervalMapT::value_type I6_9D_1(I6_9D, u1);
+ typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);
+ typename IntervalMapT::value_type I6_8D_1(I6_8D, u1);
+ typename IntervalMapT::value_type I2_3D_1(I2_3D, u1);
+ typename IntervalMapT::value_type I6_7D_1(I6_7D, u1);
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // &= [1 8)
+ //map_AB -> [1 3) [6 8)
+ // 1 1
+ // &= [2 7)
+ // -> [2 3) [6 7)
+ // 1 1
+ IntervalMap<T,U> map_A, map_AB, map_ab, map_ab2;
+ interval_set<T> set_B;
+ map_A.add(I0_3D_1).add(I6_9D_1);
+ map_AB = map_A;
+ map_AB &= I1_8D;
+ map_ab.add(I1_3D_1).add(I6_8D_1);
+
+ BOOST_CHECK_EQUAL( map_AB, map_ab );
+
+ map_AB = map_A;
+ (map_AB &= I1_8D) &= I2_7D;
+ map_ab2.add(I2_3D_1).add(I6_7D_1);
+
+ BOOST_CHECK_EQUAL( map_AB, map_ab2 );
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // &= [1 4) [5 8)
+ //map_AB -> [1 3) [6 8)
+ // 1 1
+ // &= [2 4) [5 7)
+ // -> [2 3) [6 7)
+ // 1 1
+ map_A.clear();
+ map_A.add(I0_3D_1).add(I6_9D_1);
+ set_B.add(I1_4D).add(I5_8D);
+ map_AB = map_A;
+
+ map_AB &= set_B;
+ map_ab.clear();
+ map_ab.add(I1_3D_1).add(I6_8D_1);
+ BOOST_CHECK_EQUAL( map_AB, map_ab );
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // &= 1
+ //map_AB -> [1]
+ // 1
+
+ map_A.clear();
+ map_A.add(I0_3D_1).add(I6_9D_1);
+ map_AB = map_A;
+ map_AB &= v1;
+ map_ab.clear();
+ map_ab.add(mapping_pair<T,U>(v1,u1));
+
+ BOOST_CHECK_EQUAL( map_AB, map_ab );
+}
+
+
+// Test for nontrivial erasure of interval maps with intervals and interval sets
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_base_erase_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_1D = IntervalT::right_open(v0,v1);
+ IntervalT I0_2D = IntervalT::right_open(v0,v2);
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_4D = IntervalT::right_open(v1,v4);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I5_8D = IntervalT::right_open(v5,v8);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+ IntervalT I7_9D = IntervalT::right_open(v7,v9);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+
+ typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
+ typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
+ typename IntervalMapT::value_type I0_2D_1(I0_2D, u1);
+ typename IntervalMapT::value_type I6_9D_1(I6_9D, u1);
+ typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);
+ typename IntervalMapT::value_type I6_8D_1(I6_8D, u1);
+ typename IntervalMapT::value_type I2_3D_1(I2_3D, u1);
+ typename IntervalMapT::value_type I6_7D_1(I6_7D, u1);
+ typename IntervalMapT::value_type I7_9D_1(I7_9D, u1);
+ typename IntervalMapT::value_type I8_9D_1(I8_9D, u1);
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // erase [2 7)
+ //map_A2 -> [0 2) [7 9)
+ // 1 1
+ // erase [1 8)
+ // -> [0 1) [8 9)
+ // 1 1
+ IntervalMap<T,U> map_A, map_A2, map_A3, map_check2, map_check3;
+ interval_set<T> set_B;
+ map_A.add(I0_3D_1).add(I6_9D_1);
+ map_A2 = map_A;
+ map_A2.erase(I2_7D);
+ map_check2.add(I0_2D_1).add(I7_9D_1);
+ BOOST_CHECK_EQUAL( map_A2, map_check2 );
+
+ map_A3 = map_A2;
+ map_A3.erase(I1_8D);
+ map_check3.add(I0_1D_1).add(I8_9D_1);
+ BOOST_CHECK_EQUAL( map_A3, map_check3 );
+
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // erase [2 7)
+ // -> [0 2) [7 9)
+ // 1 1
+ // erase [1 8)
+ // -> [0 1) [8 9)
+ // 1 1
+ map_A3 = map_A;
+ map_A3.erase(I2_7D).erase(I1_8D);
+ BOOST_CHECK_EQUAL( map_A3, map_check3 );
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // -= [2 7)
+ // -> [0 2) [7 9)
+ // 1 1
+ // -= [1 8)
+ // -> [0 1) [8 9)
+ // 1 1
+ map_A3 = map_A;
+ (map_A3 -= I2_7D) -= I1_8D;
+ BOOST_CHECK_EQUAL( map_A3, map_check3 );
+
+ //--------------------------------------------------------------------------
+ //map_A [0 3) [6 9)
+ // 1 1
+ // erase [2 4) [5 7)
+ // -> [0 2) [7 9)
+ // 1 1
+ map_A3 = map_A;
+ set_B.add(I2_4D).add(I5_7D);
+ map_A3 -= set_B;
+ BOOST_CHECK_EQUAL( map_A3, map_check2 );
+}
+
+
+// Test first_collision
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_base_is_disjoint_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMap<T,U>::interval_set_type IntervalSetT;
+
+ 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);
+
+ IntervalT I0_1D = IntervalT::right_open(v0,v1);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+
+ typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
+ typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);
+ typename IntervalMapT::value_type I3_6D_1(I3_6D, u1);
+ typename IntervalMapT::value_type I5_7D_1(I5_7D, u1);
+ typename IntervalMapT::value_type I6_8D_1(I6_8D, u1);
+ typename IntervalMapT::value_type I8_9D_1(I8_9D, u1);
+
+ //--------------------------------------------------------------------------
+ //map_A [1 3) [6 8)
+ // 1 1
+ //map_B [0 1) [3 6) [8 9)
+ // 1 1 1
+ IntervalMapT map_A, map_B;
+ IntervalSetT set_A, set_B;
+
+ map_A.add(I1_3D_1).add(I6_8D_1);
+ map_B.add(I0_1D_1).add(I3_6D_1).add(I8_9D_1);
+ BOOST_CHECK_EQUAL( disjoint(map_A, map_B), true );
+ BOOST_CHECK_EQUAL( disjoint(map_B, map_A), true );
+ BOOST_CHECK_EQUAL( intersects(map_A, map_B), false );
+ BOOST_CHECK_EQUAL( intersects(map_B, map_A), false );
+
+ icl::domain(set_A, map_A);
+ icl::domain(set_B, map_B);
+ BOOST_CHECK_EQUAL( disjoint(map_A, set_B), true );
+ BOOST_CHECK_EQUAL( disjoint(set_B, map_A), true );
+ BOOST_CHECK_EQUAL( disjoint(set_A, map_B), true );
+ BOOST_CHECK_EQUAL( disjoint(map_B, set_A), true );
+ BOOST_CHECK_EQUAL( intersects(map_A, set_B), false );
+ BOOST_CHECK_EQUAL( intersects(set_B, map_A), false );
+ BOOST_CHECK_EQUAL( intersects(set_A, map_B), false );
+ BOOST_CHECK_EQUAL( intersects(map_B, set_A), false );
+
+ map_A += I5_7D_1;
+
+ BOOST_CHECK_EQUAL( disjoint(map_A, map_B), false );
+ BOOST_CHECK_EQUAL( disjoint(map_B, map_A), false );
+ BOOST_CHECK_EQUAL( intersects(map_A, map_B), true );
+ BOOST_CHECK_EQUAL( intersects(map_B, map_A), true );
+
+ icl::domain(set_A, map_A);
+ icl::domain(set_B, map_B);
+ BOOST_CHECK_EQUAL( disjoint(map_A, set_B), false );
+ BOOST_CHECK_EQUAL( disjoint(set_B, map_A), false );
+ BOOST_CHECK_EQUAL( disjoint(set_A, map_B), false );
+ BOOST_CHECK_EQUAL( disjoint(map_B, set_A), false );
+ BOOST_CHECK_EQUAL( intersects(map_A, set_B), true );
+ BOOST_CHECK_EQUAL( intersects(set_B, map_A), true );
+ BOOST_CHECK_EQUAL( intersects(set_A, map_B), true );
+ BOOST_CHECK_EQUAL( intersects(map_B, set_A), true );
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_flip_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef IntervalMapT IMap;
+
+ IntervalMapT set_a;
+ //[0 2)
+ // 1
+ // [1 3)
+ // 1
+ //[0 1) [2 3) : {[0 2)->1} ^= ([2 3)->1)
+ // 1 1
+ //BOOST_CHECK_EQUAL(IMap(IDv(0,2,1)) ^= (IDv(1,3,1)), IMap(IDv(0,1,1)) + IDv(2,3,1));
+ set_a = IMap(IDv(0,2,1));
+ IntervalMapT set_b = set_a;
+ BOOST_CHECK_EQUAL(set_a ^= IDv(1,3,1), IMap(IDv(0,1,1)) + IDv(2,3,1));
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_infix_plus_overload_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalMapT map_a, map_b;
+ 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));
+
+ BOOST_CHECK_EQUAL(map_a + map_b, map_b + map_a);
+ //This checks all cases of is_interval_map_derivative<T>
+ 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);
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_infix_pipe_overload_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalMapT map_a, map_b;
+ 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));
+
+ BOOST_CHECK_EQUAL(map_a | map_b, map_b | map_a);
+ //This checks all cases of is_interval_map_derivative<T>
+ 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);
+}
+
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_infix_minus_overload_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalT itv = C_D(4,11);
+ typename IntervalMapT::interval_mapping_type itv_v = CDv(4,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;
+ split_interval_set<T> split_set_a;
+ join_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,9));
+ sep_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,11));
+ 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_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);
+ BOOST_CHECK_EQUAL((map_b - val_pair2) + val_pair2, (map_b + val_pair2) - val_pair2);
+ 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, (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) + 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);
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_infix_et_overload_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalT itv = C_D(4,11);
+
+ IntervalMapT map_a, map_b;
+ 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));
+
+ interval_set<T> join_set_a;
+ separate_interval_set<T> sep_set_a;
+ split_interval_set<T> split_set_a;
+ join_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,9));
+ sep_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,11));
+ 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_b & map_a);
+
+ //This checks all cases of is_interval_map_derivative<T>
+ 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_derivative<T>
+ BOOST_CHECK_EQUAL(map_a & itv, itv & map_a);
+ BOOST_CHECK_EQUAL(map_b & MK_v(8), MK_v(8) & 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);
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_infix_caret_overload_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalT itv = C_D(4,11);
+
+ IntervalMapT map_a, map_b;
+ 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));
+
+ interval_set<T> join_set_a;
+ separate_interval_set<T> sep_set_a;
+ split_interval_set<T> split_set_a;
+ join_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,9));
+ sep_set_a .add(I_D(0,4)).add(I_I(4,6)).add(I_D(5,11));
+ 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_b ^ map_a);
+
+ //This checks all cases of is_interval_map_derivative<T>
+ 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);
+}
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_find_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalMapT map_a;
+ map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+
+ typename IntervalMapT::const_iterator found = map_a.find(MK_v(6));
+
+ BOOST_CHECK_EQUAL( found->second, MK_u(3) );
+ BOOST_CHECK_EQUAL( map_a(MK_v(6)), MK_u(3) );
+
+ found = map_a.find(MK_v(5));
+
+ BOOST_CHECK_EQUAL( found == map_a.end(), true );
+ BOOST_CHECK_EQUAL( map_a(MK_v(5)), MK_u(0) );
+}
+
+
+template <template<class T, class U,
+ class Traits = partial_absorber,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap,
+ class T, class U>
+void interval_map_set_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalMapT map_a;
+ map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+
+ BOOST_CHECK_EQUAL( icl::contains(map_a.set(CDv(2,10,4)), CDv(2,10,4)), true );
+ BOOST_CHECK_EQUAL( icl::contains(map_a.set(K_v(4,5)), K_v(4,5)), true );
+ BOOST_CHECK_EQUAL( icl::contains(map_a.set(K_v(4,5)).set(CDv(3,5,6)), CDv(3,5,6)), true );
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void interval_map_inclusion_compare_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMap<T,U,Trt>::set_type IntervalSetT;
+ typedef icl::map<T,U,Trt> MapT;
+ typedef std::set<T> SetT;
+
+ IntervalMapT itv_map_sub_a, itv_map_a, itv_map_a2, itv_map_super_a,
+ itv_map_b, itv_map_c;
+ itv_map_sub_a.add(IDv(2,4,1)).add(IIv(6,7,3));
+ itv_map_a = itv_map_sub_a;
+ itv_map_a.add(IIv(9,9,1));
+ itv_map_a2 = itv_map_a;
+ itv_map_c = itv_map_sub_a;
+ itv_map_c.erase(MK_v(7)).add(IIv(11,11,2));
+ itv_map_b = itv_map_a;
+ itv_map_b.set(IIv(6,7,2));
+
+
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalMapT(), IntervalMapT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, itv_map_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, itv_map_a2), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, IntervalMapT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, itv_map_sub_a), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalMapT(), itv_map_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_sub_a, itv_map_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, itv_map_b), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, itv_map_c), inclusion::unrelated );
+
+ IntervalSetT set_sub_a, set_a, set_a2, set_b, set_c;
+ icl::domain(set_a, itv_map_a);
+ icl::domain(set_a2, itv_map_a2);
+ icl::domain(set_sub_a, itv_map_sub_a);
+
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalMapT(), IntervalSetT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalSetT(), IntervalMapT()), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalSetT(), IntervalSetT()), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, set_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, itv_map_a), inclusion::equal );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, set_a2), inclusion::equal );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, IntervalSetT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_a, set_sub_a), inclusion::superset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalSetT(), itv_map_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_sub_a, itv_map_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, IntervalSetT()), inclusion::superset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, set_sub_a), inclusion::superset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(IntervalSetT(), set_a), inclusion::subset );
+ BOOST_CHECK_EQUAL( inclusion_compare(set_sub_a, set_a), inclusion::subset );
+
+ BOOST_CHECK_EQUAL( inclusion_compare(set_a, itv_map_c), inclusion::unrelated );
+ BOOST_CHECK_EQUAL( inclusion_compare(itv_map_c, set_a), inclusion::unrelated );
+
+}
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void interval_map_std_copy_via_inserter_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT; //Nedded for the test value generator
+ typedef typename IntervalMapT::interval_type IntervalT;
+
+ // Check equality of copying using handcoded loop or std::copy via inserter.
+ typedef std::pair<IntervalT, U> SegmentT;
+ std::vector<SegmentT> seg_vec_a;
+ IntervalMapT std_copied_map;
+
+ // For an empty sequence
+ test_interval_map_copy_via_inserter(seg_vec_a, std_copied_map);
+
+ // For an singleton sequence
+ seg_vec_a.push_back(IDv(0,1,1));
+ test_interval_map_copy_via_inserter(seg_vec_a, std_copied_map);
+
+ // Two separate segments
+ seg_vec_a.push_back(IDv(3,5,1));
+ test_interval_map_copy_via_inserter(seg_vec_a, std_copied_map);
+
+ // Touching case
+ seg_vec_a.push_back(IDv(5,7,1));
+ test_interval_map_copy_via_inserter(seg_vec_a, std_copied_map);
+
+ // Overlapping case
+ seg_vec_a.push_back(IDv(6,9,1));
+ test_interval_map_copy_via_inserter(seg_vec_a, std_copied_map);
+
+}
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void interval_map_element_iter_4_discrete_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::element_iterator ReptatorT;
+ typedef std::vector<std::pair<T,U> > VectorT;
+
+ IntervalMapT map_a;
+ map_a.insert(IIv(1,3,1)).insert(IIv(6,7,2));
+
+ typename IntervalMapT::atomized_type ato_map_a;
+ ReptatorT el_it = elements_begin(map_a);
+
+ VectorT vec(5), cev(5);
+ vec[0]=sK_v(1,1);vec[1]=sK_v(2,1);vec[2]=sK_v(3,1);vec[3]=sK_v(6,2);vec[4]=sK_v(7,2);
+ cev[0]=sK_v(7,2);cev[1]=sK_v(6,2);cev[2]=sK_v(3,1);cev[3]=sK_v(2,1);cev[4]=sK_v(1,1);
+
+ VectorT dest;
+ std::copy(elements_begin(map_a), elements_end(map_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( vec == dest, true );
+
+ dest.clear();
+ std::copy(elements_rbegin(map_a), elements_rend(map_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( cev == dest, true );
+
+ dest.clear();
+ std::reverse_copy(elements_rbegin(map_a), elements_rend(map_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( vec == dest, true );
+
+ dest.clear();
+ std::reverse_copy(elements_begin(map_a), elements_end(map_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( cev == dest, true );
+
+}
+
+#endif // LIBS_ICL_TEST_TEST_ICL_interval_map_shared_h_JOFA_080920__
+

Added: sandbox/icl/libs/icl/test/test_interval_quantifier_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_quantifier_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,307 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef __TEST_INTERVAL_QUANTIFIER_SHARED_H_JOFA_090119__
+#define __TEST_INTERVAL_QUANTIFIER_SHARED_H_JOFA_090119__
+
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void make_3_itv_maps_and_derivatives_1
+ (IntervalMap<T,U,Trt>& itv_map_a,
+ IntervalMap<T,U,Trt>& itv_map_b,
+ IntervalMap<T,U,Trt>& itv_map_c,
+ typename IntervalMap<T,U,Trt>::interval_mapping_type& val_pair,
+ mapping_pair<T,U>& map_pair)
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+
+ 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));
+
+ val_pair = IDv(6,9,1);
+ map_pair = K_v(5,1);
+}
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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 = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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 Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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 Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, val_pair, map_pair);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, 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);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types()
+{
+ // check abelian group wrt. + and inverability wrt. protonic equality =p= :
+ // (1) (IntervalMapT, +) is an abelian group and
+ // (2) The inverability law: (0 - x) + x =p= 0 holds.
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ 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);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+}
+
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_inner_complementarity_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMap<T,U,Trt>::set_type IntervalSetT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ has_inner_complementarity<IntervalMapT,IntervalSetT>(map_a);
+ has_inner_complementarity<IntervalMapT,IntervalSetT>(map_b);
+ has_inner_complementarity<IntervalMapT,IntervalSetT>(map_c);
+}
+
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_length_complementarity_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef typename IntervalMap<T,U,Trt>::set_type IntervalSetT;
+ IntervalMapT map_a, map_b, map_c;
+ typename IntervalMapT::interval_mapping_type val_pair;
+ mapping_pair<T,U> map_pair;
+ make_3_itv_maps_and_derivatives_1(map_a, map_b, map_c, val_pair, map_pair);
+
+ has_length_complementarity(map_a);
+ has_length_complementarity(map_b);
+ has_length_complementarity(map_c);
+
+ has_length_as_distance<IntervalMapT,IntervalSetT>(map_a);
+ has_length_as_distance<IntervalMapT,IntervalSetT>(map_b);
+ has_length_as_distance<IntervalMapT,IntervalSetT>(map_c);
+}
+
+
+
+#endif // __TEST_INTERVAL_QUANTIFIER_SHARED_H_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_interval_set_/test_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_/test_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set unit test
+#include <string>
+#include <vector>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET interval_set
+#include "../test_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_interval_set_/vc9_test_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_/vc9_test_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}"
+ RootNamespace="Test_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,66 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_INTERVAL_SET_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_INTERVAL_SET_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_set_fundamentals_4_ordered_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_set_ctor_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_set_add_sub_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_set_distinct_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_distinct_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_isolate_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_element_compare_4_bicremental_types, T, bicremental_types)
+{ interval_set_element_compare_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_contains_4_bicremental_types, T, bicremental_types)
+{ interval_set_contains_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_operators_4_bicremental_types, T, bicremental_types)
+{ interval_set_operators_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_set_base_intersect_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_flip_4_bicremental_types, T, bicremental_types)
+{ interval_set_flip_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_find_4_bicremental_types, T, bicremental_types)
+{ interval_set_find_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_element_iter_4_discrete_types, T, discrete_types)
+{ interval_set_element_iter_4_discrete_types<INTERVAL_SET, T>();}
+
+#endif // BOOST_ICL_TEST_INTERVAL_SET_CASES_HPP_JOFA_090701
+
+
+

Added: sandbox/icl/libs/icl/test/test_interval_set_infix_/test_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_infix_/test_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET interval_set
+#include "../test_interval_set_infix_cases.hpp"
+
+
+

Added: sandbox/icl/libs/icl/test/test_interval_set_infix_/vc9_test_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_infix_/vc9_test_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D1623E950E}"
+ RootNamespace="test_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_set_infix_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_infix_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_plus_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_pipe_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_minus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_minus_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_et_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_caret_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_caret_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+#endif // BOOST_ICL_TEST_INTERVAL_SET_INFIX_CASES_HPP_JOFA_090701
+
+
+

Added: sandbox/icl/libs/icl/test/test_interval_set_laws_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_laws_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,226 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_interval_set_laws_shared_h_JOFA_090201__
+#define LIBS_ICL_TEST_TEST_ICL_interval_set_laws_shared_h_JOFA_090201__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, segm, elem);
+ CHECK_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, segm, elem);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_partial_invertive_monoid_plus_prot_inv_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus)(set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe)(set_a, set_b, set_c, segm, elem);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_distinct_equal, set_a, set_b, set_c, segm, elem);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_distinct_equal, set_a, set_b, set_c, segm, elem);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_group_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0 |
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_group_plus_prot_inv_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 segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_distinct_equal, set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, set_a, set_b, set_c, segm, elem);
+}
+
+#endif // LIBS_ICL_TEST_TEST_ICL_interval_set_laws_shared_h_JOFA_090201__
+

Added: sandbox/icl/libs/icl/test/test_interval_set_mixed.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_mixed.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,877 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef __fastest_icl_interval_set_mixed_h_JOFA_090702__
+#define __fastest_icl_interval_set_mixed_h_JOFA_090702__
+
+template <class T>
+void interval_set_mixed_ctor_4_ordered_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = identity_element<T>::value();
+
+ split_interval_set<T> split_set(v0);
+ separate_interval_set<T> sep_set(split_set);
+ interval_set<T> join_set(sep_set);
+
+ BOOST_CHECK_EQUAL( hull(split_set).lower(), hull(sep_set).lower() );
+ BOOST_CHECK_EQUAL( hull(split_set).lower(), hull(join_set).lower() );
+}
+
+template <class T>
+void interval_set_mixed_equal_4_ordered_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = identity_element<T>::value();
+
+ split_interval_set<T> split_empty, split_single(v0);
+ separate_interval_set<T> sep_empty, sep_single(v0);
+ interval_set<T> join_empty, join_single(v0);
+
+ // mixed ==-equality is a strange thing. Most times is does not
+ // make sense. It is better to allow only for same type == equality.
+ BOOST_CHECK_EQUAL( split_empty == split_empty, true );
+ BOOST_CHECK_EQUAL( sep_empty == sep_empty, true );
+ BOOST_CHECK_EQUAL( join_empty == join_empty, true );
+
+ // There were Problems with operator== and emtpy sets.
+ BOOST_CHECK_EQUAL( split_empty == split_single, false );
+ BOOST_CHECK_EQUAL( sep_empty == sep_single, false );
+ BOOST_CHECK_EQUAL( join_empty == join_single, false );
+
+ BOOST_CHECK_EQUAL( split_single == split_empty, false );
+ BOOST_CHECK_EQUAL( sep_single == sep_empty, false );
+ BOOST_CHECK_EQUAL( join_single == join_empty, false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, split_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, sep_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, join_empty), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, split_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, sep_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, join_empty), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, split_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, sep_empty), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, join_empty), true );
+
+ //--------------------------------------------------------------------------
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, split_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, sep_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_empty, join_single), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, split_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, sep_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_empty, join_single), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, split_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, sep_single), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_empty, join_single), false );
+
+ //--------------------------------------------------------------------------
+ BOOST_CHECK_EQUAL( is_element_equal(split_single, split_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_single, sep_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(split_single, join_empty), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(sep_single, split_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_single, sep_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_single, join_empty), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_single, split_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_single, sep_empty), false );
+ BOOST_CHECK_EQUAL( is_element_equal(join_single, join_empty), false );
+
+}
+
+template <class T>
+void interval_set_mixed_assign_4_ordered_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = identity_element<T>::value();
+ T v1 = unit_element<T>::value();
+
+ split_interval_set<T> split_set;
+ separate_interval_set<T> sep_set;
+ interval_set<T> join_set;
+ split_set.add(v0);
+ sep_set = split_set;
+ join_set = sep_set;
+
+ BOOST_CHECK_EQUAL( hull(split_set).lower(), hull(sep_set).lower() );
+ BOOST_CHECK_EQUAL( hull(split_set).lower(), hull(join_set).lower() );
+
+ split_interval_set<T> split_self = split_interval_set<T>().add(v0);
+ separate_interval_set<T> sep_self = separate_interval_set<T>().add(v0).add(v1);
+ interval_set<T> join_self = interval_set<T>().add(v1);
+
+ split_self = split_self;
+ sep_self = sep_self;
+ join_self = join_self;
+
+ BOOST_CHECK_EQUAL( split_self, split_self );
+ BOOST_CHECK_EQUAL( sep_self, sep_self );
+ BOOST_CHECK_EQUAL( join_self, join_self );
+}
+
+template <class T>
+void interval_set_mixed_ctor_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ split_interval_set<T> split_set;
+ split_set.add(I1_3D).add(I2_4D).add(I4_5D);
+ BOOST_CHECK_EQUAL( split_set.iterative_size(), 4 );
+ separate_interval_set<T> sep_set(split_set);
+ BOOST_CHECK_EQUAL( sep_set.iterative_size(), 4 );
+ interval_set<T> join_set(split_set);
+ BOOST_CHECK_EQUAL( join_set.iterative_size(), 1 );
+
+ separate_interval_set<T> sep_set2;
+ sep_set2.add(I1_3D).add(I2_4D).add(I4_5D);
+ BOOST_CHECK_EQUAL( sep_set2.iterative_size(), 2 );
+ split_interval_set<T> split_set2(sep_set2);
+ BOOST_CHECK_EQUAL( split_set2.iterative_size(), 2 );
+ interval_set<T> join_set2(sep_set2);
+ BOOST_CHECK_EQUAL( join_set2.iterative_size(), 1 );
+}
+
+template <class T>
+void interval_set_mixed_assign_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ split_interval_set<T> split_set;
+ split_set.add(I1_3D).add(I2_4D).add(I4_5D);
+ BOOST_CHECK_EQUAL( split_set.iterative_size(), 4 );
+ separate_interval_set<T> sep_set;
+ sep_set = split_set;
+ BOOST_CHECK_EQUAL( sep_set.iterative_size(), 4 );
+ interval_set<T> join_set;
+ join_set = split_set;
+ BOOST_CHECK_EQUAL( join_set.iterative_size(), 1 );
+
+ separate_interval_set<T> sep_set2;
+ sep_set2.add(I1_3D).add(I2_4D).add(I4_5D);
+ BOOST_CHECK_EQUAL( sep_set2.iterative_size(), 2 );
+ split_interval_set<T> split_set2;
+ split_set2 = sep_set2;
+ BOOST_CHECK_EQUAL( split_set2.iterative_size(), 2 );
+ interval_set<T> join_set2;
+ join_set2 = sep_set2;
+ BOOST_CHECK_EQUAL( join_set2.iterative_size(), 1 );
+}
+
+
+template <class T>
+void interval_set_mixed_equal_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ interval_set<T> join_set;
+ join_set.add(I1_3D).add(I2_4D).add(I4_5D);
+ interval_set<T> join_set2 = join_set;
+ BOOST_CHECK_EQUAL( join_set, join_set2 );
+ BOOST_CHECK_EQUAL( is_element_equal(join_set, join_set2), true );
+
+ separate_interval_set<T> sep_set;
+ sep_set.add(I1_3D).add(I2_4D).add(I4_5D);
+
+ separate_interval_set<T> sep_set2 = sep_set;
+ BOOST_CHECK_EQUAL( sep_set, sep_set2 );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_set2, sep_set), true );
+
+ split_interval_set<T> split_set;
+ split_set.add(I1_3D).add(I2_4D).add(I4_5D);
+ split_interval_set<T> split_set2 = split_set;
+ BOOST_CHECK_EQUAL( split_set, split_set2 );
+ BOOST_CHECK_EQUAL( is_element_equal(split_set2, split_set), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_set, join_set), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_set, sep_set), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_set, sep_set), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_set, split_set), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_set, join_set), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_set, split_set), true );
+}
+
+template <class T>
+void interval_set_mixed_contains_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ split_interval_set<T> split_set;
+ split_set.add(I_D(0,4)).add(I_D(4,8));
+ BOOST_CHECK_EQUAL( icl::contains(split_set, MK_v(4)), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_set, C_D(2,5)), true );
+
+ interval_set<T> join_set_gap4(split_set.erase(MK_v(4)));
+ BOOST_CHECK_EQUAL( icl::contains(join_set_gap4, MK_v(4)), false );
+ BOOST_CHECK_EQUAL( icl::contains(join_set_gap4, C_D(2,5)), false );
+
+ BOOST_CHECK_EQUAL( icl::contains(split_set, split_set), true );
+ BOOST_CHECK_EQUAL( icl::contains(split_set, join_set_gap4), true );
+
+}
+
+template <class T>
+void interval_set_mixed_add_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I4_5D = IntervalT::right_open(v4,v5);
+
+ split_interval_set<T> split_set;
+ split_set.add(I1_3D).add(I2_4D);
+ split_set += I4_5D;
+ BOOST_CHECK_EQUAL( split_set.iterative_size(), 4 );
+ separate_interval_set<T> sep_set;
+ sep_set += split_set;
+ BOOST_CHECK_EQUAL( sep_set.iterative_size(), 4 );
+ interval_set<T> join_set;
+ join_set += split_set;
+ BOOST_CHECK_EQUAL( join_set.iterative_size(), 1 );
+
+ separate_interval_set<T> sep_set2;
+ sep_set2.add(I1_3D).add(I2_4D);
+ sep_set2 += I4_5D;
+ BOOST_CHECK_EQUAL( sep_set2.iterative_size(), 2 );
+ split_interval_set<T> split_set2;
+ split_set2 += sep_set2;
+ BOOST_CHECK_EQUAL( split_set2.iterative_size(), 2 );
+ interval_set<T> join_set2;
+ join_set2 += sep_set2;
+ BOOST_CHECK_EQUAL( join_set2.iterative_size(), 1 );
+
+ interval_set<T> join_set3;
+ join_set3.add(v1).add(v3);
+ join_set3 += v5;
+ BOOST_CHECK_EQUAL( join_set3.iterative_size(), 3 );
+ split_interval_set<T> split_set3;
+ split_set3 += join_set3;
+ BOOST_CHECK_EQUAL( split_set3.iterative_size(), 3 );
+ separate_interval_set<T> sep_set3;
+ sep_set3 += join_set3;
+ BOOST_CHECK_EQUAL( join_set3.iterative_size(), 3 );
+}
+
+template <class T>
+void interval_set_mixed_subtract_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ split_interval_set<T> split_set;
+ split_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( split_set.iterative_size(), 7 );
+
+ separate_interval_set<T> sep_set;
+ sep_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( sep_set.iterative_size(), 3 );
+
+ interval_set<T> join_set;
+ join_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( join_set.iterative_size(), 1 );
+
+ // Make sets to be subtracted
+ split_interval_set<T> split_sub;
+ split_sub.add(I3_6D).add(I8_9D);
+
+ separate_interval_set<T> sep_sub;
+ sep_sub.add(I3_6D).add(I8_9D);
+
+ interval_set<T> join_sub;
+ join_sub.add(I3_6D).add(I8_9D);
+
+ //--------------------------------------------------------------------------
+ // Test for split_interval_set
+ split_interval_set<T> split_diff = split_set;
+ separate_interval_set<T> sep_diff = sep_set;
+ interval_set<T> join_diff = join_set;
+
+ //subtraction combinations
+ split_diff -= split_sub;
+ sep_diff -= split_sub;
+ join_diff -= split_sub;
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for separate_interval_set. Reinitialize
+ split_diff = split_set;
+ sep_diff = sep_set;
+ join_diff = join_set;
+
+ //subtraction combinations
+ split_diff -= sep_sub;
+ sep_diff -= sep_sub;
+ join_diff -= sep_sub;
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, sep_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for interval_set. Reinitialize
+ split_diff = split_set;
+ sep_diff = sep_set;
+ join_diff = join_set;
+
+ //subtraction combinations
+ split_diff -= join_sub;
+ sep_diff -= join_sub;
+ join_diff -= join_sub;
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+}
+
+
+template <class T>
+void interval_set_mixed_erase_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ 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);
+
+ IntervalT I0_4D = IntervalT::right_open(v0,v4);
+ IntervalT I2_6D = IntervalT::right_open(v2,v6);
+ IntervalT I3_6D = IntervalT::right_open(v3,v6);
+ IntervalT I5_7D = IntervalT::right_open(v5,v7);
+ IntervalT I7_8D = IntervalT::right_open(v7,v8);
+ IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I8_9I = IntervalT::closed(v8,v9);
+
+ split_interval_set<T> split_set;
+ split_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( split_set.iterative_size(), 7 );
+
+ separate_interval_set<T> sep_set;
+ sep_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( sep_set.iterative_size(), 3 );
+
+ interval_set<T> join_set;
+ join_set.add(I0_4D).add(I2_6D).add(I5_7D).add(I7_8D).add(I8_9I);
+ BOOST_CHECK_EQUAL( join_set.iterative_size(), 1 );
+
+ // Make sets to be subtracted
+ split_interval_set<T> split_sub;
+ split_sub.add(I3_6D).add(I8_9D);
+
+ separate_interval_set<T> sep_sub;
+ sep_sub.add(I3_6D).add(I8_9D);
+
+ interval_set<T> join_sub;
+ join_sub.add(I3_6D).add(I8_9D);
+
+ //--------------------------------------------------------------------------
+ // Test for split_interval_set
+ split_interval_set<T> split_diff = split_set;
+ separate_interval_set<T> sep_diff = sep_set;
+ interval_set<T> join_diff = join_set;
+
+ //subtraction combinations
+ erase(split_diff, split_sub);
+ erase(sep_diff, split_sub);
+ erase(join_diff, split_sub);
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for separate_interval_set. Reinitialize
+ split_diff = split_set;
+ sep_diff = sep_set;
+ join_diff = join_set;
+
+ //subtraction combinations
+ erase(split_diff, sep_sub);
+ erase(sep_diff, sep_sub);
+ erase(join_diff, sep_sub);
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(split_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, sep_diff), true );
+
+ //--------------------------------------------------------------------------
+ // Test for interval_set. Reinitialize
+ split_diff = split_set;
+ sep_diff = sep_set;
+ join_diff = join_set;
+
+ //subtraction combinations
+ erase(split_diff, join_sub);
+ erase(sep_diff, join_sub);
+ erase(join_diff, join_sub);
+
+ BOOST_CHECK_EQUAL( split_diff.iterative_size(), 5 );
+ BOOST_CHECK_EQUAL( sep_diff.iterative_size(), 4 );
+ BOOST_CHECK_EQUAL( join_diff.iterative_size(), 3 );
+
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, split_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, sep_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(sep_diff, join_diff), true );
+ BOOST_CHECK_EQUAL( is_element_equal(join_diff, join_diff), true );
+}
+
+template <class T>
+void interval_set_mixed_basic_intersect_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v6 = make<T>(6);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ //--------------------------------------------------------------------------
+ // split_interval_set
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= [1 8)
+ //split_AB -> [1 3) [6 8)
+ // &= [2 7)
+ // -> [2 3) [6 7)
+ split_interval_set<T> split_A, split_B, split_AB, split_ab, split_ab2;
+
+ split_A.add(I0_3D).add(I6_9D);
+ split_AB = split_A;
+ split_AB &= I1_8D;
+ split_ab.add(I1_3D).add(I6_8D);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= I1_8D) &= I2_7D;
+ split_ab2.add(I2_3D).add(I6_7D);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab2 );
+
+
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= 1
+ //split_AB -> [1]
+ // += (1 7)
+ // -> [1](1 7)
+ split_A.add(I0_3D).add(I6_9D);
+ split_AB = split_A;
+ split_AB &= v1;
+ split_ab.clear();
+ split_ab.add(v1);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= v1) += IntervalT::open(v1,v7);
+ split_ab2.clear();
+ split_ab2 += IntervalT::right_open(v1,v7);
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
+}
+
+template <class T>
+void interval_set_mixed_intersect_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v5 = make<T>(5);
+ T v6 = make<T>(6);
+
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_2D = IntervalT::right_open(v1,v2);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I2_4D = IntervalT::right_open(v2,v4);
+ IntervalT I5_8D = IntervalT::right_open(v5,v8);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ //--------------------------------------------------------------------------
+ // split_interval_set
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ //split_B &= [1 2)[2 4) [5 8)
+ //split_AB -> [1 2)[2 3) [6 8)
+ split_interval_set<T> split_A, split_B, split_AB, split_ab, split_ab_jn;
+ separate_interval_set<T> sep_A, sep_B, sep_AB, sep_ab;
+ interval_set<T> join_A, join_B, join_AB, join_ab;
+
+ split_A.add(I0_3D).add(I6_9D);
+ split_B.add(I1_2D).add(I2_4D).add(I5_8D);
+ split_ab.add(I1_2D).add(I2_3D).add(I6_8D);
+ split_ab_jn.add(I1_3D).add(I6_8D);
+ split_AB = split_A;
+ split_AB &= split_B;
+ BOOST_CHECK_EQUAL( split_AB.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ //split_A [0 3) [6 9)
+ //sep_B &= [1 2)[2 4) [5 8)
+ //split_AB -> [1 2)[2 3) [6 8)
+ split_AB = split_A;
+ sep_B = split_B;
+ split_AB &= sep_B;
+ BOOST_CHECK_EQUAL( split_AB.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ //split_A [0 3) [6 9)
+ //join_B &= [1 4) [5 8)
+ //split_AB -> [1 3) [6 8)
+ split_AB = split_A;
+ join_B = split_B;
+ split_AB &= join_B;
+
+ BOOST_CHECK_EQUAL( split_AB.iterative_size(), 2 );
+ BOOST_CHECK_EQUAL( split_AB, split_ab_jn );
+
+ //--------------------------------------------------------------------------
+ // separate_interval_set
+ //--------------------------------------------------------------------------
+ //sep_A [0 3) [6 9)
+ //sep_B &= [1 2)[2 4) [5 8)
+ //sep_AB -> [1 2)[2 3) [6 8)
+ sep_ab = split_ab;
+ BOOST_CHECK_EQUAL( sep_ab.iterative_size(), 3 );
+
+ sep_AB = split_A;
+ sep_B = split_B;
+ sep_AB &= sep_B;
+
+ BOOST_CHECK_EQUAL( sep_AB.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( sep_AB, sep_ab );
+
+ //sep_A [0 3) [6 9)
+ //split_B &= [1 2)[2 4) [5 8)
+ //sep_AB -> [1 2)[2 3) [6 8)
+ sep_AB = split_A;
+ sep_AB &= split_B;
+
+ BOOST_CHECK_EQUAL( sep_AB.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( sep_AB, sep_ab );
+
+ //sep_A [0 3) [6 9)
+ //join_B &= [1 4) [5 8)
+ //sep_AB -> [1 3) [6 8)
+ separate_interval_set<T> sep_ab_jn = split_ab_jn;
+ sep_AB = split_A;
+ join_B = split_B;
+ sep_AB &= join_B;
+
+ BOOST_CHECK_EQUAL( sep_AB.iterative_size(), 2 );
+ BOOST_CHECK_EQUAL( sep_AB, sep_ab_jn );
+
+ //--------------------------------------------------------------------------
+ // separate_interval_set
+ //--------------------------------------------------------------------------
+ //join_A [0 3) [6 9)
+ //join_B &= [1 4) [5 8)
+ //join_AB -> [1 3) [6 8)
+ join_ab = split_ab;
+ BOOST_CHECK_EQUAL( join_ab.iterative_size(), 2 );
+
+ join_AB = split_A;
+ join_B = split_B;
+ join_AB &= sep_B;
+
+ BOOST_CHECK_EQUAL( join_AB.iterative_size(), 2 );
+ BOOST_CHECK_EQUAL( join_AB, join_ab );
+
+ //join_A [0 3) [6 9)
+ //split_B &= [1 2)[2 4) [5 8)
+ //join_AB -> [1 3) [6 8)
+ join_AB = split_A;
+ join_AB &= split_B;
+
+ BOOST_CHECK_EQUAL( join_AB.iterative_size(), 2 );
+ BOOST_CHECK_EQUAL( join_AB, join_ab );
+
+ //join_A [0 3) [6 9)
+ //sep_B &= [1 2)[2 4) [5 8)
+ //join_AB -> [1 3) [6 8)
+ join_AB = split_A;
+ join_AB &= sep_B;
+
+ BOOST_CHECK_EQUAL( join_AB.iterative_size(), 2 );
+ BOOST_CHECK_EQUAL( join_AB, join_ab );
+
+}
+
+
+template <class T>
+void interval_set_mixed_disjoint_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v4 = make<T>(4);
+ T v6 = make<T>(6);
+
+ IntervalT I0_2D = IntervalT::right_open(v0,v2);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I3_4D = IntervalT::right_open(v3,v4);
+ IntervalT I4_4I = IntervalT::closed(v4,v4);
+ IntervalT C4_6D = IntervalT::open(v4,v6);
+ IntervalT I6_6I = IntervalT::closed(v6,v6);
+
+ //--------------------------------------------------------------------------
+ //split_A: [0 2) [4 4] [6 6]
+ //split_B: [2 3)[3 4) (4 6)
+ split_interval_set<T> split_A, split_B;
+
+ split_A.add(I0_2D).add(I4_4I).add(I6_6I);
+ split_B.add(I2_3D).add(I3_4D).add(C4_6D);
+
+ separate_interval_set<T> sep_A(split_A), sep_B(split_B);
+ interval_set<T> join_A(split_A), join_B(split_B);
+
+ BOOST_CHECK_EQUAL( disjoint(split_A, split_B), true );
+ BOOST_CHECK_EQUAL( disjoint(split_A, sep_B), true );
+ BOOST_CHECK_EQUAL( disjoint(split_A, join_B), true );
+
+ BOOST_CHECK_EQUAL( disjoint(sep_A, split_B), true );
+ BOOST_CHECK_EQUAL( disjoint(sep_A, sep_B), true );
+ BOOST_CHECK_EQUAL( disjoint(sep_A, join_B), true );
+
+ BOOST_CHECK_EQUAL( disjoint(join_A, split_B), true );
+ BOOST_CHECK_EQUAL( disjoint(join_A, sep_B), true );
+ BOOST_CHECK_EQUAL( disjoint(join_A, join_B), true );
+}
+
+template <class T>
+void interval_set_mixed_infix_plus_overload_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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 );
+}
+
+template <class T> void interval_set_mixed_infix_pipe_overload_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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 );
+}
+
+template <class T>
+void interval_set_mixed_infix_minus_overload_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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 );
+}
+
+template <class T> void interval_set_mixed_infix_et_overload_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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 );
+}
+
+template <class T> void interval_set_mixed_infix_caret_overload_4_bicremental_types()
+{
+ typedef interval_set<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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 );
+}
+
+#endif // __fastest_icl_interval_set_mixed_h_JOFA_090702__

Added: sandbox/icl/libs/icl/test/test_interval_set_mixed_/test_interval_set_mixed.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_mixed_/test_interval_set_mixed.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,96 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_set_mixed unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+#include "../test_interval_set_mixed.hpp"
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_ctor_4_ordered_types, T, ordered_types)
+{ interval_set_mixed_ctor_4_ordered_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_equal_4_ordered_types, T, ordered_types)
+{ interval_set_mixed_equal_4_ordered_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_assign_4_ordered_types, T, ordered_types)
+{ interval_set_mixed_assign_4_ordered_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_ctor_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_assign_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_assign_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_equal_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_equal_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_contains_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_contains_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_add_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_add_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_subtract_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_subtract_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_erase_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_erase_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_basic_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_basic_intersect_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_disjoint_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_disjoint_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_infix_plus_overload_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_infix_pipe_overload_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_infix_minus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_infix_minus_overload_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_infix_et_overload_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_mixed_infix_caret_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_mixed_infix_caret_overload_4_bicremental_types<T>(); }
+

Added: sandbox/icl/libs/icl/test/test_interval_set_mixed_/vc9_test_interval_set_mixed.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_mixed_/vc9_test_interval_set_mixed.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_set_mixed"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}"
+ RootNamespace="Test_interval_set_mixed"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_interval_set_mixed.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_interval_set_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_interval_set_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,800 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_interval_set_shared_h_JOFA_080920__
+#define LIBS_ICL_TEST_TEST_ICL_interval_set_shared_h_JOFA_080920__
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_fundamentals_4_ordered_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef typename IntervalSet<T>::size_type size_T;
+ typedef typename IntervalSet<T>::difference_type diff_T;
+
+ // ordered types is the largest set of instance types.
+ // Because we can not generate values via incrementation for e.g. string,
+ // we are able to test operations only for the most basic values
+ // identity_element (0, empty, T() ...) and unit_element.
+
+ T v0 = identity_element<T>::value();
+ T v1 = unit_element<T>::value();
+ IntervalT I0_0I(v0);
+ IntervalT I1_1I(v1);
+ IntervalT I0_1I(v0, v1, interval_bounds::closed());
+
+ //-------------------------------------------------------------------------
+ //empty set
+ //-------------------------------------------------------------------------
+ BOOST_CHECK_EQUAL(IntervalSet<T>().empty(), true);
+ BOOST_CHECK_EQUAL(icl::is_empty(IntervalSet<T>()), true);
+ BOOST_CHECK_EQUAL(cardinality(IntervalSet<T>()), identity_element<size_T>::value());
+ BOOST_CHECK_EQUAL(IntervalSet<T>().size(), identity_element<size_T>::value());
+ BOOST_CHECK_EQUAL(interval_count(IntervalSet<T>()), 0);
+ BOOST_CHECK_EQUAL(IntervalSet<T>().iterative_size(), 0);
+ BOOST_CHECK_EQUAL(iterative_size(IntervalSet<T>()), 0);
+ BOOST_CHECK_EQUAL(IntervalSet<T>(), IntervalSet<T>());
+
+ IntervalT mt_interval = identity_element<IntervalT>::value();
+ BOOST_CHECK_EQUAL(mt_interval, IntervalT());
+ IntervalSet<T> mt_set = identity_element<IntervalSet<T> >::value();
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+
+ //adding emptieness to emptieness yields emptieness ;)
+ mt_set.add(mt_interval).add(mt_interval);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ mt_set.insert(mt_interval).insert(mt_interval);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ (mt_set += mt_interval) += mt_interval;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ BOOST_CHECK_EQUAL(hull(mt_set), identity_element<IntervalT >::value());
+
+ //subtracting emptieness
+ mt_set.subtract(mt_interval).subtract(mt_interval);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ mt_set.erase(mt_interval).erase(mt_interval);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ (mt_set -= mt_interval) -= mt_interval;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+
+ //subtracting elements form emptieness
+ mt_set.subtract(v0).subtract(v1);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ mt_set.erase(v0).erase(v1);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ (mt_set -= v1) -= v0;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+
+ //subtracting intervals form emptieness
+ mt_set.subtract(I0_1I).subtract(I1_1I);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ mt_set.erase(I0_1I).erase(I1_1I);
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ (mt_set -= I1_1I) -= I0_1I;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+
+ //insecting emptieness
+ //mt_set.insect(mt_interval).insect(mt_interval);
+ //BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ (mt_set &= mt_interval) &= mt_interval;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ //insecting emptieness with elements
+ (mt_set &= v1) &= v0;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+ //insecting emptieness with intervals
+ (mt_set &= I1_1I) &= I0_1I;
+ BOOST_CHECK_EQUAL(mt_set, IntervalSet<T>());
+
+ //-------------------------------------------------------------------------
+ //unary set
+ //-------------------------------------------------------------------------
+ IntervalSet<T> single_I0_0I_from_element(v0);
+ IntervalSet<T> single_I0_0I_from_interval(I0_0I);
+ IntervalSet<T> single_I0_0I(single_I0_0I_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I0_0I_from_element, single_I0_0I_from_interval);
+ BOOST_CHECK_EQUAL(single_I0_0I_from_element, single_I0_0I);
+ BOOST_CHECK_EQUAL(icl::hull(single_I0_0I).lower(), I0_0I.lower());
+ BOOST_CHECK_EQUAL(icl::hull(single_I0_0I).upper(), I0_0I.upper());
+
+ IntervalSet<T> single_I1_1I_from_element(v1);
+ IntervalSet<T> single_I1_1I_from_interval(I1_1I);
+ IntervalSet<T> single_I1_1I(single_I1_1I_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I1_1I_from_element, single_I1_1I_from_interval);
+ BOOST_CHECK_EQUAL(single_I1_1I_from_element, single_I1_1I);
+
+ IntervalSet<T> single_I0_1I_from_interval(I0_1I);
+ IntervalSet<T> single_I0_1I(single_I0_1I_from_interval);
+
+ BOOST_CHECK_EQUAL(single_I0_1I_from_interval, single_I0_1I);
+ BOOST_CHECK_EQUAL(hull(single_I0_1I), I0_1I);
+ BOOST_CHECK_EQUAL(hull(single_I0_1I).lower(), I0_1I.lower());
+ BOOST_CHECK_EQUAL(hull(single_I0_1I).upper(), I0_1I.upper());
+
+ //contains predicate
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_0I, v0), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_0I, I0_0I), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I1_1I, v1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I1_1I, I1_1I), true);
+
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, v0), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, I0_1I), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, v1), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, I1_1I), true);
+
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, single_I0_0I), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, single_I1_1I), true);
+ BOOST_CHECK_EQUAL(icl::contains(single_I0_1I, single_I0_1I), true);
+
+ BOOST_CHECK_EQUAL(cardinality(single_I0_0I), unit_element<size_T>::value());
+ BOOST_CHECK_EQUAL(single_I0_0I.size(), unit_element<size_T>::value());
+ BOOST_CHECK_EQUAL(interval_count(single_I0_0I), 1);
+ BOOST_CHECK_EQUAL(single_I0_0I.iterative_size(), 1);
+ BOOST_CHECK_EQUAL(iterative_size(single_I0_0I), 1);
+}
+
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_ctor_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v4 = make<T>(4);
+ IntervalT I4_4I(v4);
+
+ IntervalSet<T> _I4_4I;
+ BOOST_CHECK_EQUAL( _I4_4I.empty(), true );
+ IntervalSet<T> _I4_4I_1;
+ IntervalSet<T> _I4_4I_2;
+ IntervalSet<T> _I4_4I_3;
+ _I4_4I += v4;
+ _I4_4I_1 += I4_4I;
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_1 );
+ _I4_4I_2.add(v4);
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_2 );
+ _I4_4I_3.add(I4_4I);
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_3 );
+ _I4_4I_1.add(v4).add(I4_4I);
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_1 );
+ _I4_4I_1.insert(v4).insert(I4_4I);
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_1 );
+ (_I4_4I_1 += v4) += I4_4I;
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_1 );
+
+ BOOST_CHECK_EQUAL( cardinality(_I4_4I), unit_element<typename IntervalSet<T>::size_type>::value() );
+ BOOST_CHECK_EQUAL( _I4_4I.size(), unit_element<typename IntervalSet<T>::size_type>::value() );
+ BOOST_CHECK_EQUAL( interval_count(_I4_4I), 1 );
+ BOOST_CHECK_EQUAL( _I4_4I.iterative_size(), 1 );
+ BOOST_CHECK_EQUAL( iterative_size(_I4_4I), 1 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I).lower(), v4 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I).upper(), v4 );
+
+ IntervalSet<T> _I4_4I_copy(_I4_4I);
+ IntervalSet<T> _I4_4I_assigned;
+ _I4_4I_assigned = _I4_4I;
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_copy );
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_assigned );
+ _I4_4I_assigned.clear();
+ BOOST_CHECK_EQUAL( true, _I4_4I_assigned.empty() );
+
+ _I4_4I_assigned.swap(_I4_4I_copy);
+ BOOST_CHECK_EQUAL( true, _I4_4I_copy.empty() );
+ BOOST_CHECK_EQUAL( _I4_4I, _I4_4I_assigned );
+
+}
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_add_sub_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ T v0 = make<T>(0);
+ T v5 = make<T>(5);
+ T v6 = make<T>(6);
+ T v9 = make<T>(9);
+ IntervalT I5_6I(v5,v6,interval_bounds::closed());
+ IntervalT I5_9I(v5,v9,interval_bounds::closed());
+ IntervalT I0_9I = IntervalT::closed(v0, v9);
+
+ BOOST_CHECK_EQUAL( IntervalSet<T>(I5_6I).add(v0).add(v9),
+ IntervalSet<T>().insert(v9).insert(I5_6I).insert(v0) );
+
+ IntervalSet<T> set_A = IntervalSet<T>(I5_6I).add(v0).add(v9);
+ IntervalSet<T> set_B = IntervalSet<T>().insert(v9).insert(I5_6I).insert(v0);
+ BOOST_CHECK_EQUAL( set_A, set_B );
+ BOOST_CHECK_EQUAL( hull(set_A), I0_9I );
+ BOOST_CHECK_EQUAL( hull(set_A).lower(), I0_9I.lower() );
+ BOOST_CHECK_EQUAL( hull(set_A).upper(), I0_9I.upper() );
+
+ IntervalSet<T> set_A1 = set_A, set_B1 = set_B,
+ set_A2 = set_A, set_B2 = set_B;
+
+ set_A1.subtract(I5_6I).subtract(v9);
+ set_B1.erase(v9).erase(I5_6I);
+ BOOST_CHECK_EQUAL( set_A1, set_B1 );
+
+ set_A2.subtract(I5_9I);
+ set_B2.erase(I5_9I);
+ BOOST_CHECK_EQUAL( set_A1, set_B1 );
+ BOOST_CHECK_EQUAL( set_A1, set_A2 );
+ BOOST_CHECK_EQUAL( set_B1, set_B2 );
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_distinct_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef typename IntervalSet<T>::size_type size_T;
+ typedef typename IntervalSet<T>::difference_type diff_T;
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+
+ size_T s3 = make<size_T>(3);
+
+
+ IntervalSet<T> is_1_3_5;
+ is_1_3_5.add(v1).add(v3).add(v5);
+
+ BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_distinct_4_bicremental_continuous_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef typename IntervalSet<T>::size_type size_T;
+ typedef typename IntervalSet<T>::difference_type diff_T;
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+
+ size_T s3 = make<size_T>(3);
+ diff_T d0 = make<diff_T>(0);
+ diff_T d2 = make<diff_T>(2);
+
+ IntervalSet<T> is_1_3_5;
+ is_1_3_5.add(v1).add(v3).add(v5);
+
+ BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
+ BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
+
+
+
+ IntervalSet<T> is_123_5;
+ is_123_5 = is_1_3_5;
+ is_123_5 += IntervalT::open(v1,v3);
+
+ BOOST_CHECK_EQUAL( cardinality(is_123_5), icl::infinity<size_T>::value() );
+ BOOST_CHECK_EQUAL( is_123_5.size(), icl::infinity<size_T>::value() );
+ BOOST_CHECK_EQUAL( icl::length(is_123_5), d2 );
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_isolate_4_bicremental_continuous_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef typename IntervalSet<T>::size_type size_T;
+ typedef typename IntervalSet<T>::difference_type diff_T;
+
+ T v0 = make<T>(0);
+ T v2 = make<T>(2);
+ T v4 = make<T>(4);
+ IntervalT I0_4I = IntervalT::closed(v0,v4);
+ IntervalT C0_2D = IntervalT::open(v0,v2);
+ IntervalT C2_4D = IntervalT::open(v2,v4);
+ // {[0 4]}
+ // - { (0,2) (2,4) }
+ // = {[0] [2] [4]}
+ IntervalSet<T> iso_set = IntervalSet<T>(I0_4I);
+ IntervalSet<T> gap_set;
+ gap_set.add(C0_2D).add(C2_4D);
+ BOOST_CHECK_EQUAL( true, true );
+ iso_set -= gap_set;
+
+ BOOST_CHECK_EQUAL( cardinality(iso_set), static_cast<size_T>(3) );
+ BOOST_CHECK_EQUAL( iso_set.iterative_size(), static_cast<std::size_t>(3) );
+ BOOST_CHECK_EQUAL( iterative_size(iso_set), static_cast<std::size_t>(3) );
+
+ IntervalSet<T> iso_set2;
+ iso_set2.add(I0_4I);
+ iso_set2.subtract(C0_2D).subtract(C2_4D);
+
+ IntervalSet<T> iso_set3(I0_4I);
+ (iso_set3 -= C0_2D) -= C2_4D;
+
+ IntervalSet<T> iso_set4;
+ iso_set4.insert(I0_4I);
+ iso_set4.erase(C0_2D).erase(C2_4D);
+
+ BOOST_CHECK_EQUAL( iso_set, iso_set2 );
+ BOOST_CHECK_EQUAL( iso_set, iso_set3 );
+ BOOST_CHECK_EQUAL( iso_set, iso_set4 );
+}
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_element_compare_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef IntervalSet<T> ISet;
+
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(), ISet()), true );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(), ISet(I_D(0,1))), false );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,1)), ISet()), false );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,1)), ISet(I_D(0,1))), true );
+
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,5)), ISet(I_D(3,8))), false );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(3,8)), ISet(I_D(0,5))), false );
+
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,1)), ISet(I_D(0,1)) ), true );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,1)), ISet(I_D(0,1))+I_D(1,2) ), false );
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(1,2)+ISet(I_D(0,1)), ISet(I_D(0,1)) ), false );
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(1,2)+ISet(I_D(0,1)), ISet(I_D(0,1))+I_D(1,2) ), true );
+
+ //[0 1)[1 2)
+ //[0 2)
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(0,1)+ISet(I_D(1,2)), ISet(I_D(0,2)) ), true );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,2)), ISet(I_D(0,1))+I_D(1,2) ), true );
+
+ //[0 1) [2 3)
+ //[0 3)
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(0,1)+ISet(I_D(2,3)), ISet(I_D(0,3)) ), false );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(0,3)), ISet(I_D(0,1))+I_D(2,3) ), false );
+
+ //[0 2)[2 4)
+ // [1 4)
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(0,2)+ISet(I_D(2,4)), ISet(I_D(1,4)) ), false );
+ BOOST_CHECK_EQUAL( is_element_equal( ISet(I_D(1,4)), ISet(I_D(0,2))+I_D(2,4) ), false );
+
+ //[0 2)[2 4)
+ //[0 1)[1 3)[3 4)
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(0,2)+ISet(I_D(2,4)), I_D(0,1)+ISet(I_D(1,4))+I_D(3,4) ), true );
+ BOOST_CHECK_EQUAL( is_element_equal( I_D(0,1)+ISet(I_D(1,4))+I_D(3,4), I_D(0,2)+ISet(I_D(2,4)) ), true );
+}
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_contains_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ //LAW: x.add(e).contains(e);
+ //LAW: z = x + y => contains(z, x) && contains(z, y);
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+ T v11 = make<T>(11);
+ IntervalSet<T> is(v1);
+ BOOST_CHECK_EQUAL( icl::contains(is, v1), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(IntervalSet<T>().add(make<T>(2)), make<T>(2)), true );
+ BOOST_CHECK_EQUAL( icl::contains(IntervalSet<T>().insert(make<T>(2)), make<T>(2)), true );
+ BOOST_CHECK_EQUAL( icl::contains((is += IntervalT(v3,v7)), IntervalT(v3,v7)), true );
+
+ IntervalSet<T> is0 = is;
+
+ IntervalSet<T> is2(IntervalT::closed(v5,v8));
+ is2.add(v9).add(v11);
+ is += is2;
+ BOOST_CHECK_EQUAL( contains(is, is2), true );
+
+ is = is0;
+ IntervalSet<T> is3(IntervalT::closed(v5,v8));
+ is3.insert(v9).insert(v11);
+ is += is3;
+ BOOST_CHECK_EQUAL( contains(is, is3), true );
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_operators_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v3 = make<T>(3);
+ T v5 = make<T>(5);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ IntervalSet<T> left, left2, right, all, all2, section, complement, naught;
+ left.add(IntervalT::closed(v0,v1)).add(IntervalT::closed(v3,v5));
+ (right += IntervalT::closed(v3,v5)) += IntervalT::closed(v7,v8);
+
+ BOOST_CHECK_EQUAL( disjoint(left, right), false );
+
+ (all += left) += right;
+ (section += left) &= right;
+ (complement += all) -= section;
+ (all2 += section) += complement;
+
+ BOOST_CHECK_EQUAL( disjoint(section, complement), true );
+ BOOST_CHECK_EQUAL( all, all2 );
+
+ BOOST_CHECK_EQUAL( icl::contains(all, left), true );
+ BOOST_CHECK_EQUAL( icl::contains(all, right), true );
+ BOOST_CHECK_EQUAL( icl::contains(all, complement), true );
+
+ BOOST_CHECK_EQUAL( icl::contains(left, section), true );
+ BOOST_CHECK_EQUAL( icl::contains(right, section), true );
+
+ BOOST_CHECK_EQUAL( within(left, all), true );
+ BOOST_CHECK_EQUAL( within(right, all), true );
+ BOOST_CHECK_EQUAL( within(complement, all), true );
+ BOOST_CHECK_EQUAL( within(section, left), true );
+ BOOST_CHECK_EQUAL( within(section, right), true );
+}
+
+
+// Test for nontrivial intersection of interval sets with intervals and values
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_base_intersect_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ T v0 = make<T>(0);
+ T v1 = make<T>(1);
+ T v2 = make<T>(2);
+ T v3 = make<T>(3);
+ T v6 = make<T>(6);
+ T v7 = make<T>(7);
+ T v8 = make<T>(8);
+ T v9 = make<T>(9);
+
+ IntervalT I0_3D = IntervalT::right_open(v0,v3);
+ IntervalT I1_3D = IntervalT::right_open(v1,v3);
+ IntervalT I1_8D = IntervalT::right_open(v1,v8);
+ IntervalT I2_7D = IntervalT::right_open(v2,v7);
+ IntervalT I2_3D = IntervalT::right_open(v2,v3);
+ IntervalT I6_7D = IntervalT::right_open(v6,v7);
+ IntervalT I6_8D = IntervalT::right_open(v6,v8);
+ IntervalT I6_9D = IntervalT::right_open(v6,v9);
+
+ //--------------------------------------------------------------------------
+ // IntervalSet
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= [1 8)
+ //split_AB -> [1 3) [6 8)
+ // &= [2 7)
+ // -> [2 3) [6 7)
+ IntervalSet<T> split_A, split_B, split_AB, split_ab, split_ab2;
+
+ split_A.add(I0_3D).add(I6_9D);
+ split_AB = split_A;
+ split_AB &= I1_8D;
+ split_ab.add(I1_3D).add(I6_8D);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= I1_8D) &= I2_7D;
+ split_ab2.add(I2_3D).add(I6_7D);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab2 );
+
+
+ //--------------------------------------------------------------------------
+ //split_A [0 3) [6 9)
+ // &= 1
+ //split_AB -> [1]
+ // += (1 7)
+ // -> [1](1 7)
+ split_A.add(I0_3D).add(I6_9D);
+ split_AB = split_A;
+ split_AB &= v1;
+ split_ab.clear();
+ split_ab.add(v1);
+
+ BOOST_CHECK_EQUAL( split_AB, split_ab );
+
+ split_AB = split_A;
+ (split_AB &= v1) += IntervalT::open(v1,v7);
+ split_ab2.clear();
+ split_ab2 += IntervalT::right_open(v1,v7);
+
+ BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_flip_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef IntervalSetT ISet;
+
+ IntervalSetT set_a, set_b, lhs, rhs;
+ //[0 2)
+ // [1 3)
+ //[0 1) [2 3) : {[0 2)} ^= [2 3)
+ //gcc seed ambiguities with std::_Ios_Iostate& std::operator^= here:
+ // BOOST_CHECK_EQUAL(ISet(I_D(0,2)) ^= I_D(1,3), ISet(I_D(0,1)) + I_D(2,3));
+ set_a = ISet(I_D(0,2));
+ BOOST_CHECK_EQUAL(set_a ^= I_D(1,3), ISet(I_D(0,1)) + I_D(2,3));
+
+ // [1 3)
+ //[0 2)
+ //[0 1) [2 3) : {[1 3)} ^= [0 2)
+ set_a = ISet(I_D(1,3));
+ BOOST_CHECK_EQUAL(set_a ^= I_D(0,2), ISet(I_D(0,1)) + I_D(2,3));
+
+ //[0 2) (3 5]
+ // [1 3)
+ //[0 1) [2 3) (3 5] : a ^= b
+ set_a.clear();
+ set_a.add(I_D(0,2)).add(C_I(3,5));
+ set_b.add(I_D(1,3));
+ lhs = set_a;
+ lhs ^= set_b;
+ rhs.add(I_D(0,1)).add(I_D(2,3)).add(C_I(3,5));
+ BOOST_CHECK_EQUAL(lhs, rhs);
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_plus_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a + set_b, set_b + set_a);
+ // This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a + itv, itv + set_a);
+ BOOST_CHECK_EQUAL(set_b + MK_v(4), MK_v(4) + set_b);
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_pipe_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a | set_b, set_b | set_a);
+ //This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a | itv, itv | set_a);
+ BOOST_CHECK_EQUAL(set_b | MK_v(4), MK_v(4) | set_b);
+}
+
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_minus_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a - set_b, (set_b + set_a) - set_b);
+ //This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a - itv, (itv + set_a) - itv);
+ BOOST_CHECK_EQUAL(set_b - MK_v(4), (MK_v(4) + set_b) - MK_v(4));
+}
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_et_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a & set_b, set_b & set_a);
+ //This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a & itv, itv & set_a);
+ BOOST_CHECK_EQUAL(set_b & MK_v(4), MK_v(4) & set_b);
+}
+
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_caret_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a ^ set_b, set_b ^ set_a);
+ //This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a ^ itv, itv ^ set_a);
+ BOOST_CHECK_EQUAL(set_b ^ MK_v(4), MK_v(4) ^ set_b);
+}
+
+
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_find_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ IntervalT itv = I_D(3,5);
+
+ IntervalSetT set_a;
+ set_a.add(C_D(1,3)).add(I_I(6,11));
+
+ typename IntervalSetT::const_iterator found = set_a.find(MK_v(6));
+
+ BOOST_CHECK_EQUAL( *found, I_I(6,11) );
+
+ found = set_a.find(MK_v(5));
+
+ BOOST_CHECK_EQUAL( found == set_a.end(), true );
+}
+
+template <template< class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, T),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_element_iter_4_discrete_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::vector<T> VectorT;
+
+ IntervalSetT set_a;
+ set_a.add(I_I(1,3)).add(I_I(6,7));
+
+ VectorT vec(5), cev(5);
+ vec[0]=MK_v(1);vec[1]=MK_v(2);vec[2]=MK_v(3);vec[3]=MK_v(6);vec[4]=MK_v(7);
+ cev[0]=MK_v(7);cev[1]=MK_v(6);cev[2]=MK_v(3);cev[3]=MK_v(2);cev[4]=MK_v(1);
+
+ VectorT dest;
+ std::copy(elements_begin(set_a), elements_end(set_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( vec == dest, true );
+
+ dest.clear();
+ std::copy(elements_rbegin(set_a), elements_rend(set_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( cev == dest, true );
+
+ dest.clear();
+ std::reverse_copy(elements_begin(set_a), elements_end(set_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( cev == dest, true );
+
+ dest.clear();
+ std::reverse_copy(elements_rbegin(set_a), elements_rend(set_a), std::back_inserter(dest));
+ BOOST_CHECK_EQUAL( vec == dest, true );
+}
+
+#endif // LIBS_ICL_TEST_TEST_ICL_interval_set_shared_h_JOFA_080920__
+

Added: sandbox/icl/libs/icl/test/test_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,793 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_LIBS_ICL_TEST_ICL_LAWS_HPP_JOFA_090119
+#define BOOST_LIBS_ICL_TEST_ICL_LAWS_HPP_JOFA_090119
+
+#include <functional>
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/associative_interval_container.hpp>
+
+namespace boost{namespace icl
+{
+
+template<class Type>
+struct equality : std::binary_function<Type,Type,bool>
+{
+ typedef bool (type)(const Type&, const Type&);
+};
+
+//------------------------------------------------------------------------------
+// Associativity
+//------------------------------------------------------------------------------
+
+// The definition of a boost test via a macro, that allows to be instantiated for
+// different operator signs 'op_sign'. For every 'op_sign' a separate function
+// template is generated by appending the suffic 'op_tag' to the function
+// name.
+// So this is the function template via macro that checks the law
+// associativity for an operator 'op_sign'
+#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) \
+{ \
+ Type left = (a op_sign b) op_sign c; \
+ Type right = a op_sign (b op_sign c); \
+ BOOST_CHECK(left==right); \
+}
+
+#define DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
+template<class Type, class TypeB, class TypeC> \
+void check_associativity_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ Type left = (a op_sign b) op_sign c; \
+ Type right = a op_sign (b op_sign c); \
+ BOOST_CHECK((*equal)(left,right)); \
+}
+
+// Here we define the call of the test function thats definition
+// template has been generated by the macro above.
+#define CHECK_ASSOCIATIVITY_WRT(op_tag) check_associativity_wrt_##op_tag
+#define CHECK_ASSOCIATIVITY_WRT_EQUAL(op_tag) check_associativity_wrt_equal_##op_tag
+
+// Here we actually generate function templates by calling the defining
+// macros.
+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
+//------------------------------------------------------------------------------
+
+#define DEFINE_RIGHT_NEUTRALITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
+template<class Type> \
+void check_right_neutrality_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& a, const Type& identity_element) \
+{ \
+ Type left = a op_sign identity_element; \
+ Type right = identity_element; \
+ BOOST_CHECK((*equal)(left,right)); \
+}
+
+#define DEFINE_RIGHT_NEUTRALITY_CHECK_WRT(op_tag, op_sign) \
+template<class Type> \
+void check_right_neutrality_wrt_##op_tag \
+(typename equality<Type>::type* equal, const Type& a, const Type& identity_element) \
+{ \
+ Type left = a op_sign identity_element; \
+ Type right = identity_element; \
+ BOOST_CHECK(left==right); \
+}
+
+#define DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
+template<class Type> \
+void check_neutrality_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& a, const Type& identity_element) \
+{ \
+ Type left = a op_sign identity_element; \
+ Type right = identity_element op_sign a; \
+ BOOST_CHECK((*equal)(left,right)); \
+}
+
+#define DEFINE_NEUTRALITY_CHECK_WRT(op_tag, op_sign) \
+template<class Type> \
+void check_neutrality_wrt_##op_tag \
+(const Type& a, const Type& identity_element) \
+{ \
+ Type left = a op_sign identity_element; \
+ Type right = identity_element op_sign a; \
+ BOOST_CHECK(left==right); \
+}
+
+#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 (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
+//------------------------------------------------------------------------------
+
+#define DEFINE_COMMUTATIVITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
+template<class Type, class TypeB> \
+void check_commutativity_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& a, const TypeB& b) \
+{ \
+ Type left = a op_sign b; \
+ Type right = b op_sign a; \
+ BOOST_CHECK((*equal)(left,right)); \
+}
+
+#define DEFINE_COMMUTATIVITY_CHECK_WRT(op_tag, op_sign) \
+template<class Type, class TypeB> \
+ void check_commutativity_wrt_##op_tag(const Type& a, const TypeB& b) \
+{ \
+ Type left = a op_sign b; \
+ Type right = b op_sign a; \
+ BOOST_CHECK(left==right); \
+}
+
+#define CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag) check_commutativity_wrt_equal_##op_tag
+#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 (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, ^ );
+
+//------------------------------------------------------------------------------
+// Natural inversion
+//------------------------------------------------------------------------------
+
+#define DEFINE_PARTIAL_INVERSION_CHECK_WRT_EQUAL(plus_tag, plus_sign) \
+template<class Type> \
+ void check_partial_inversion_wrt_equal_##plus_tag \
+(typename equality<Type>::type* equal, const Type& identity_element, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK((*equal)(positive_difference, identity_element)); \
+}
+
+#define DEFINE_PARTIAL_INVERSION_CHECK_WRT(plus_tag, plus_sign) \
+template<class Type> \
+ void check_partial_inversion_wrt_##plus_tag \
+(const Type& identity_element, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK(positive_difference==identity_element); \
+}
+
+#define CHECK_PARTIAL_INVERSION_WRT_EQUAL(plus_tag) check_partial_inversion_wrt_equal_##plus_tag
+#define CHECK_PARTIAL_INVERSION_WRT(plus_tag) check_partial_inversion_wrt_##plus_tag
+
+DEFINE_PARTIAL_INVERSION_CHECK_WRT (plus, + );
+DEFINE_PARTIAL_INVERSION_CHECK_WRT_EQUAL(plus, + );
+DEFINE_PARTIAL_INVERSION_CHECK_WRT (pipe, | );
+DEFINE_PARTIAL_INVERSION_CHECK_WRT_EQUAL(pipe, | );
+
+//------------------------------------------------------------------------------
+// Inverse
+//------------------------------------------------------------------------------
+
+#define DEFINE_INVERSE_CHECK_WRT_EQUAL(plus_tag, plus_sign) \
+template<class Type> \
+ void check_inverse_wrt_equal_##plus_tag \
+(typename equality<Type>::type* equal, const Type& identity_element, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK((*equal)(positive_difference, identity_element)); \
+ Type negative_difference = (identity_element - var_a) plus_sign var_a; \
+ BOOST_CHECK((*equal)(negative_difference, identity_element)); \
+}
+
+#define DEFINE_INVERSE_CHECK_WRT(plus_tag, plus_sign) \
+template<class Type> \
+ void check_inverse_wrt_##plus_tag \
+(const Type& identity_element, const Type& var_a) \
+{ \
+ Type positive_difference = var_a - var_a; \
+ BOOST_CHECK(positive_difference==identity_element); \
+ Type negative_difference = (identity_element - var_a) plus_sign var_a; \
+ BOOST_CHECK(negative_difference==identity_element); \
+}
+
+#define CHECK_INVERSE_WRT_EQUAL(plus_tag) check_inverse_wrt_equal_##plus_tag
+#define CHECK_INVERSE_WRT(plus_tag) check_inverse_wrt_##plus_tag
+
+DEFINE_INVERSE_CHECK_WRT (plus, + );
+DEFINE_INVERSE_CHECK_WRT_EQUAL(plus, + );
+DEFINE_INVERSE_CHECK_WRT (pipe, | );
+DEFINE_INVERSE_CHECK_WRT_EQUAL(pipe, | );
+
+//------------------------------------------------------------------------------
+// Containedness laws (Valid for sets, NOT for maps)
+//------------------------------------------------------------------------------
+template<class Type, class TypeB>
+void check_intersection_containedness(const Type& a, const TypeB& b)
+{
+ BOOST_CHECK_EQUAL(contains(a, a & b), true);
+ BOOST_CHECK_EQUAL(contains(a, b & a), true);
+ BOOST_CHECK_EQUAL(within(a & b, a), true);
+ BOOST_CHECK_EQUAL(within(b & a, a), true);
+}
+
+template<class Type, class TypeB>
+void check_union_containedness(const Type& a, const TypeB& b)
+{
+ BOOST_CHECK_EQUAL(within(a, a + b), true);
+ BOOST_CHECK_EQUAL(within(a, b + a), true);
+ BOOST_CHECK_EQUAL(contains(a + b, a), true);
+ BOOST_CHECK_EQUAL(contains(b + a, a), true);
+}
+
+template<class MapT>
+void check_domain_containedness(const MapT& a)
+{
+ typedef typename MapT::set_type set_type;
+ set_type dom;
+ domain(dom, a);
+ BOOST_CHECK_EQUAL(within(dom, a), true);
+ BOOST_CHECK_EQUAL(contains(a, dom), true);
+
+ if(!dom.empty())
+ {
+ typename MapT::domain_type a1 = *dom.begin();
+ BOOST_CHECK_EQUAL(within(a1, a), true);
+ BOOST_CHECK_EQUAL(contains(a, a1), true);
+ }
+}
+
+//------------------------------------------------------------------------------
+// Laws on inner complement, between and distance
+//------------------------------------------------------------------------------
+template<class Type, class SetT>
+bool check_length_as_distance( const Type& object
+ , SetT& in_between
+ , typename Type::difference_type& between_len
+ , typename Type::difference_type& obj_dist )
+{
+ //LAW LengthAsDistance: distance(x) == length(between(x))
+ icl::between(in_between, object);
+ between_len = icl::length(in_between);
+ obj_dist = icl::distance(object);
+ BOOST_CHECK_EQUAL(obj_dist, between_len);
+ return obj_dist == between_len;
+}
+
+template<class Type, class SetT>
+bool has_length_as_distance(const Type& object)
+{
+ typedef typename Type::difference_type DiffT;
+ SetT in_between; DiffT between_len, obj_dist;
+ return check_length_as_distance(object, in_between, between_len, obj_dist);
+}
+
+template<class Type>
+bool check_length_complementarity( const Type& object
+ , typename Type::difference_type& obj_len
+ , typename Type::difference_type& obj_dist
+ , typename Type::difference_type& hull_len )
+{
+ //LAW Length Complementarity: length(x) + distance(x) == length(hull(x))
+ obj_len = icl::length(object);
+ obj_dist = icl::distance(object);
+ hull_len = icl::length(hull(object));
+ BOOST_CHECK_EQUAL(obj_len + obj_dist, hull_len);
+ return obj_len + obj_dist == hull_len;
+}
+
+template<class Type>
+bool has_length_complementarity(const Type& object)
+{
+ typedef typename Type::difference_type DiffT;
+ DiffT obj_len, obj_dist, hull_len;
+ return check_length_complementarity(object, obj_len, obj_dist, hull_len);
+}
+
+template<class Type, class SetT>
+bool check_inner_complementarity(const Type& object, SetT& in_between, SetT& lhs, SetT& rhs)
+{
+ //LAW Inner Complementarity1: domain(x) + between(x) =e= hull(x)
+ //LAW Inner Complementarity2: join(domain(x) + between(x)) == hull(x)
+ SetT dom;
+ icl::domain(dom, object);
+ lhs = dom + between(in_between, object);
+ join(lhs);
+ rhs = SetT(hull(object));
+ BOOST_CHECK_EQUAL(lhs, rhs);
+ return lhs == rhs;
+}
+
+
+template<class Type, class SetT>
+bool has_inner_complementarity(const Type& object)
+{
+ SetT in_between, lhs, rhs;
+ return check_inner_complementarity(object, in_between, lhs, rhs);
+}
+
+
+
+//==============================================================================
+// Law tests are now combined to test algebraic concepts.
+//------------------------------------------------------------------------------
+// Monodid EAN
+//------------------------------------------------------------------------------
+
+#define DEFINE_MONOID_CHECK_WRT_EQUAL(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_monoid_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& identity_element, \
+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,identity_element); \
+}
+
+#define DEFINE_MONOID_CHECK_WRT(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_monoid_wrt_##op_tag \
+(const Type& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ASSOCIATIVITY_WRT(op_tag)(a,b,c); \
+ CHECK_NEUTRALITY_WRT(op_tag)(a,identity_element); \
+}
+
+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& identity_element, \
+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,identity_element); \
+ CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag)(equal,a,b); \
+ CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag)(equal,a,c); \
+}
+
+#define DEFINE_ABELIAN_MONOID_CHECK_WRT(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_abelian_monoid_wrt_##op_tag \
+(const Type& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ASSOCIATIVITY_WRT(op_tag)(a,b,c); \
+ CHECK_NEUTRALITY_WRT(op_tag)(a,identity_element); \
+ 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 monodid EANC with partial inversion
+//------------------------------------------------------------------------------
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT_EQUAL(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_partial_invertive_monoid_wrt_equal_##op_tag \
+(typename equality<Type>::type* equal, const Type& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal,identity_element,a,b,c); \
+ CHECK_PARTIAL_INVERSION_WRT_EQUAL(op_tag)(equal,identity_element,a); \
+}
+
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT(op_tag) \
+template<class Type, class TypeB, class TypeC> \
+void check_partial_invertive_monoid_wrt_##op_tag \
+(const Type& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(identity_element,a,b,c); \
+ CHECK_PARTIAL_INVERSION_WRT(op_tag)(identity_element,a); \
+}
+
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT_EQUAL(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT_EQUAL(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT_EQUAL(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT(caret);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_WRT_EQUAL(caret);
+
+#define CHECK_PARTIAL_INVERTIVE_MONOID_WRT(op_tag) check_partial_invertive_monoid_wrt_##op_tag
+#define CHECK_PARTIAL_INVERTIVE_MONOID_WRT_EQUAL(op_tag) check_partial_invertive_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& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal,identity_element,a,b,c); \
+ CHECK_INVERSE_WRT_EQUAL(op_tag)(equal,identity_element,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& identity_element, \
+const Type& a, const TypeB& b, const TypeC& c) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(identity_element,a,b,c); \
+ CHECK_INVERSE_WRT(op_tag)(identity_element,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 \
+(typename equality<TypeA>::type* equal, const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<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)(icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_MONOID_WRT(op_tag)(icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_MONOID_WRT(op_tag)(icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_MONOID_WRT(op_tag)(icl::identity_element<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 \
+(typename equality<TypeA>::type* equal, const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<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)(icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_MONOID_WRT(op_tag)(icl::identity_element<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 modoid with partial inversion permuted
+//------------------------------------------------------------------------------
+
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_partial_invertive_monoid_permuted_wrt_equal_##op_tag \
+(typename equality<TypeA>::type* equal, const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT(op_tag) \
+template<class TypeA, class TypeB, class Assoc> \
+void check_partial_invertive_monoid_permuted_wrt_##op_tag \
+(const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT(op_tag)(icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT(op_tag)(icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT(op_tag)(icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_WRT(op_tag)(icl::identity_element<TypeB>::value(), var_b, assoc, var_a);\
+}
+
+
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT_EQUAL(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT_EQUAL(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT_EQUAL(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT(caret);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_PERMUTED_WRT_EQUAL(caret);
+
+#define CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT(op_tag) check_partial_invertive_monoid_permuted_wrt_##op_tag
+#define CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT_EQUAL(op_tag) check_partial_invertive_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 \
+(typename equality<TypeA>::type* equal, const TypeA& var_a, const TypeB& var_b, const Assoc& assoc) \
+{ \
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(equal, icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_GROUP_WRT_EQUAL(op_tag)(equal, icl::identity_element<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)(icl::identity_element<TypeA>::value(), var_a, var_b, assoc);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(icl::identity_element<TypeA>::value(), var_a, assoc, var_b);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(icl::identity_element<TypeB>::value(), var_b, var_a, assoc);\
+ CHECK_ABELIAN_GROUP_WRT(op_tag)(icl::identity_element<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 \
+(typename equality<TypeA>::type* equal, 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)(equal, var_a, var_b, var_c);\
+ CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, ass_a);\
+ CHECK_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, 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 \
+(typename equality<TypeA>::type* equal, 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)(equal, var_a, var_b, var_c);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, ass_a);\
+ CHECK_ABELIAN_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, 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 partial invertive modoid instance
+//------------------------------------------------------------------------------
+
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT_EQUAL(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_partial_invertive_monoid_instance_wrt_equal_##op_tag \
+(typename equality<TypeA>::type* equal, const TypeA& var_a, const TypeB& var_b, const TypeC& var_c, \
+ const AssocA& ass_a, const AssocB& ass_b) \
+{ \
+ CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, var_c);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, ass_a);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, ass_b);\
+}
+
+#define DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT(op_tag) \
+template<class TypeA, class TypeB, class TypeC, class AssocA, class AssocB> \
+void check_partial_invertive_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_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, var_c);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_a);\
+ CHECK_PARTIAL_INVERTIVE_MONOID_PERMUTED_WRT(op_tag)(var_a, var_b, ass_b);\
+}
+
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT_EQUAL(plus);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT_EQUAL(pipe);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT_EQUAL(et);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT(caret);
+DEFINE_PARTIAL_INVERTIVE_MONOID_CHECK_INSTANCE_WRT_EQUAL(caret);
+
+#define CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(op_tag) check_partial_invertive_monoid_instance_wrt_##op_tag
+#define CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(op_tag) check_partial_invertive_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 \
+(typename equality<TypeA>::type* equal, 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)(equal, var_a, var_b, var_c);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag)(equal, var_a, var_b, ass_a);\
+ CHECK_ABELIAN_GROUP_PERMUTED_WRT_EQUAL(op_tag)(equal, 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
+
+}} // namespace icl boost
+
+#endif // LIBS_ICL_TEST_TEST_ICL_laws_h_JOFA_080920__
+

Added: sandbox/icl/libs/icl/test/test_misc_/test_misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_misc_/test_misc.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,181 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::misc unit test
+#include <string>
+#include <vector>
+#include <boost/mpl/list.hpp>
+#include <boost/icl/iterator.hpp>
+#include "../unit_test_unwarned.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/type_traits/is_same.hpp>
+#include <boost/icl/rational.hpp>
+
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE(test_law_complementarity)
+{
+ //LAW Inner complementarity: x + between(x) == hull(x)
+ //LAW: length(x) + length(between(x)) = length(hull(x))
+ typedef interval_map<rational<int>, int> RatioMapT;
+ typedef interval_set<rational<int> > RatioSetT;
+ typedef RatioSetT::interval_type IntervalT;
+ typedef RatioSetT::element_type RatT;
+ typedef RatioSetT::difference_type DiffT;
+
+ RatioSetT set_a;
+ (((set_a += IntervalT(RatT(0), RatT(1) ) )
+ -= IntervalT(RatT(1,9), RatT(2,9)) )
+ -= IntervalT(RatT(3,9), RatT(4,9)) )
+ -= IntervalT(RatT(5,9), RatT(6,9));
+
+ RatioSetT between_a = RatioSetT(hull(set_a)) - set_a;
+ RatioSetT between_a2;
+ between(between_a2, set_a);
+ BOOST_CHECK_EQUAL( between_a, between_a2 );
+
+ DiffT len_set_a = length(set_a);
+ DiffT len_between_a = length(between_a);
+
+ //cout << set_a << " length= " << len_set_a << endl;
+ //cout << between_a << " length= " << len_between_a << endl;
+
+ RatioSetT span_a = set_a + between_a;
+ RatioSetT hull_a = RatioSetT(hull(set_a));
+ //cout << span_a << endl;
+
+ BOOST_CHECK_EQUAL( span_a, hull_a );
+ BOOST_CHECK_EQUAL( len_set_a + len_between_a, length(hull_a) );
+
+ BOOST_CHECK((has_inner_complementarity<RatioSetT,RatioSetT>(set_a)));
+ BOOST_CHECK((has_length_complementarity(set_a)));
+ BOOST_CHECK((has_length_as_distance<RatioSetT,RatioSetT>(set_a)));
+}
+
+
+BOOST_AUTO_TEST_CASE(test_between)
+{
+ //LAW: between(a,b) == between(b,a);
+ typedef int T;
+ typedef interval<T>::type IntervalT;
+ typedef interval_set<T> IntervalSetT;
+
+ IntervalT itv_a = I_D(1,3);
+ IntervalT itv_b = I_D(5,7);
+
+ IntervalT beween_a_b = between(itv_a, itv_b);
+ IntervalT beween_b_a = between(itv_b, itv_a);
+
+ //cout << beween_a_b << endl;
+ //cout << beween_b_a << endl;
+ BOOST_CHECK_EQUAL( beween_a_b, beween_b_a );
+}
+
+
+BOOST_AUTO_TEST_CASE(element_iteration)
+{
+ interval_map<int,int> map_a;
+ map_a += make_pair(interval<int>::right_open(0,3),1);
+ //cout << map_a << endl;
+
+ //for(interval_map<int,int>::element_iterator elem = elements_begin(map_a);
+ // elem != elements_end(map_a); elem++)
+ // cout << "(" << elem->first << "," << elem->second << ")";
+ //cout << "\n-------------------------------------\n";
+
+ std::pair<const int, int> search_pair(2,1);
+
+ //interval_map<int,int>::element_const_iterator found
+ interval_map<int,int>::element_iterator found
+ = std::find(elements_begin(map_a), elements_end(map_a), search_pair);
+ // cout << "(" << found->first << "," << found->second << ")\n";
+ BOOST_CHECK_EQUAL( found->first, 2 );
+ BOOST_CHECK_EQUAL( found->second, 1 );
+
+ // Assignment of an associated value via element_iterator
+ const_cast<int&>(found->second) = 2;
+ // cout << map_a << endl;
+ BOOST_CHECK_EQUAL( map_a.begin()->second, 2 );
+}
+
+
+BOOST_AUTO_TEST_CASE(test_interval_bounds_1)
+{
+ BOOST_CHECK_EQUAL(left_bracket(interval_bounds::closed()), "[");
+ BOOST_CHECK_EQUAL(left_bracket(interval_bounds::right_open()), "[");
+ BOOST_CHECK_EQUAL(left_bracket(interval_bounds::left_open()), "(");
+ BOOST_CHECK_EQUAL(left_bracket(interval_bounds::open()), "(");
+ BOOST_CHECK_EQUAL(right_bracket(interval_bounds::closed()), "]");
+ BOOST_CHECK_EQUAL(right_bracket(interval_bounds::right_open()), ")");
+ BOOST_CHECK_EQUAL(right_bracket(interval_bounds::left_open()), "]");
+ BOOST_CHECK_EQUAL(right_bracket(interval_bounds::open()), ")");
+
+ continuous_interval<double> a_1 = continuous_interval<double>(-5.0, -2.3, interval_bounds::closed());
+ continuous_interval<double> b_1 = continuous_interval<double>(-2.6, 4.0, interval_bounds::closed());
+
+ split_interval_set<double> a, b, a_o_b, b_o_a;
+ a_o_b += a_1;
+ a_o_b += b_1;
+
+ b_o_a += b_1;
+ b_o_a += a_1;
+
+ BOOST_CHECK_EQUAL(a_o_b, b_o_a);
+
+ continuous_interval<double> c_1 = continuous_interval<double>(1.0, 3.0, interval_bounds::closed());
+ continuous_interval<double> b_2 = right_subtract(b_1, c_1);
+
+ BOOST_CHECK_EQUAL(b_2.bounds(), interval_bounds::right_open());
+ BOOST_CHECK_EQUAL(icl::bounds(b_2), interval_bounds::right_open());
+
+ continuous_interval<double> L0T = continuous_interval<double>(0.0, 0.0, interval_bounds::closed());
+ continuous_interval<double> C0T = continuous_interval<double>(0.0, 0.0, interval_bounds::left_open());
+ continuous_interval<double> L0D = continuous_interval<double>(0.0, 0.0, interval_bounds::right_open());
+ continuous_interval<double> C0D = continuous_interval<double>(0.0, 0.0, interval_bounds::open());
+
+ BOOST_CHECK_EQUAL(icl::is_empty(L0T), false);
+ BOOST_CHECK_EQUAL(icl::is_empty(C0T), true);
+ BOOST_CHECK_EQUAL(icl::is_empty(L0D), true);
+ BOOST_CHECK_EQUAL(icl::is_empty(C0D), true);
+
+
+ continuous_interval<double> L0_1T = continuous_interval<double>(0.0, 1.0, interval_bounds::closed());
+ continuous_interval<double> L1_2T = continuous_interval<double>(1.0, 2.0, interval_bounds::closed());
+ BOOST_CHECK_EQUAL(icl::exclusive_less(L0_1T, L1_2T), false);
+ BOOST_CHECK_EQUAL(icl::inner_bounds(L0_1T, L1_2T) == interval_bounds::open(), true);
+
+ continuous_interval<double> L0_1D = continuous_interval<double>(0.0, 1.0, interval_bounds::right_open());
+ BOOST_CHECK_EQUAL(icl::exclusive_less(L0_1D, L1_2T), true);
+ BOOST_CHECK_EQUAL(icl::inner_bounds(L0_1D, L1_2T) == interval_bounds::right_open(), true);
+
+ continuous_interval<double> C1_2T = continuous_interval<double>(1.0, 2.0, interval_bounds::left_open());
+ BOOST_CHECK_EQUAL(icl::exclusive_less(L0_1T, C1_2T), true);
+ BOOST_CHECK_EQUAL(icl::inner_bounds(L0_1T, C1_2T) == interval_bounds::left_open(), true);
+
+ BOOST_CHECK_EQUAL(icl::exclusive_less(L0_1D, C1_2T), true);
+ BOOST_CHECK_EQUAL(icl::inner_bounds(L0_1D, C1_2T) == interval_bounds::closed(), true);
+
+ BOOST_CHECK_EQUAL(static_cast<int>(icl::right(L0_1T.bounds()).bits()), 1);
+ BOOST_CHECK_EQUAL(static_cast<int>(icl::right(L0_1D.bounds()).bits()), 0);
+
+ BOOST_CHECK_EQUAL(icl::right_bounds(L0_1D, L0_1T), interval_bounds::left_open());
+}
+

Added: sandbox/icl/libs/icl/test/test_misc_/vc9_test_misc.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_misc_/vc9_test_misc.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_misc"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}"
+ RootNamespace="Test_misc"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_misc.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_partial_icl_quantifier_/test_partial_icl_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/test_partial_icl_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::partial_icl_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_partial_icl_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/vc9_test_partial_icl_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_icl_quantifier_/vc9_test_partial_icl_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_partial_icl_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}"
+ RootNamespace="Test_partial_icl_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_partial_icl_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_partial_icl_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_icl_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,76 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+#define BOOST_ICL_TEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+
+//------------------------------------------------------------------------------
+// partial_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_icl_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_icl_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_icl_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_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_icl_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// partial_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_icl_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_icl_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_monoid_et_4_bicremental_types<T, int, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_icl_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_icl_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_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_icl_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types, T, bicremental_types)
+{ icl_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types<T, int, partial_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
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(test_itl_partial_icl_quantifier_check_containedness_4_bicremental_types)
+{ icl_quantifier_check_containedness_4_bicremental_types<bicremental_type_1, mono, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(test_itl_partial_enricher_icl_quantifier_check_containedness_4_bicremental_types)
+{ icl_quantifier_check_containedness_4_bicremental_types<bicremental_type_1, mono, partial_enricher, INTERVAL_MAP>();}
+
+
+#endif // BOOST_ICL_TEST_PARTIAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+

Added: sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/test_partial_interval_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/test_partial_interval_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::partial_interval_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_partial_interval_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/vc9_test_partial_interval_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_interval_quantifier_/vc9_test_partial_interval_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_partial_interval_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}"
+ RootNamespace="Test_partial_interval_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_partial_interval_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_partial_interval_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_partial_interval_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,86 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_PARTIAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_PARTIAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+
+//------------------------------------------------------------------------------
+// partial_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_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_itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types<T, int, partial_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// partial_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, int, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, partial_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_partial_enricher_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_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_itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types<T, int, partial_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
+
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_enricher_itv_quantifier_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<T, int, partial_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_enricher_itv_quantifier_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<T, double, partial_enricher, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_absorber_itv_quantifier_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<T, int, partial_absorber, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_partial_absorber_itv_quantifier_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<T, double, partial_absorber, interval_map>();}
+
+
+
+#endif // BOOST_ICL_TEST_PARTIAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+

Added: sandbox/icl/libs/icl/test/test_quantifier_icl_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_quantifier_icl_map.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,298 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_quantifier_itl_map_h_JOFA_090119__
+#define LIBS_ICL_TEST_TEST_ICL_quantifier_itl_map_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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_distinct_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_distinct_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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_plus_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalMap<T,U,Trt> IntervalMapT;
+ typedef icl::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;
+ segmental::atomize(map_a, itv_map_a);
+ segmental::atomize(map_b, itv_map_b);
+ segmental::atomize(map_c, itv_map_c);
+
+ typename MapT::value_type map_pair1 = sK_v(5,1);
+ typename 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_distinct_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, map_a, map_b, map_c, map_pair1, map_pair2);
+}
+
+#endif // LIBS_ICL_TEST_TEST_ICL_quantifier_itl_map_h_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_quantifier_map_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_quantifier_map_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,250 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_itv_quantifier_shared_h_JOFA_090119__
+#define LIBS_ICL_TEST_TEST_ICL_itv_quantifier_shared_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_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 = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_monoid_et_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(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 Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_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_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 Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_monoid_et_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_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);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_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_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (map_a, map_b, map_c, val_pair, map_pair);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_partial_invertive_monoid_plus_prot_inv_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_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);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_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_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);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0 |
+//------------------------------------------------------------------------------
+template <class T, class U, class Trt,
+ template<class T, class U,
+ class Traits = Trt,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, U),
+ ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalMap
+ >
+void itv_quantifier_check_abelian_group_plus_prot_inv_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_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);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, map_a, map_b, map_c, val_pair, map_pair);
+}
+
+#endif // LIBS_ICL_TEST_TEST_ICL_itv_quantifier_shared_h_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_separate_interval_set_/test_separate_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_separate_interval_set_/test_separate_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::separate_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET separate_interval_set
+#include "../test_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_separate_interval_set_/vc9_test_separate_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_separate_interval_set_/vc9_test_separate_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_separate_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}"
+ RootNamespace="Test_separate_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_separate_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ClassDiagram1.cd"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/test_separate_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/test_separate_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::separate_interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET separate_interval_set
+#include "../test_interval_set_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/vc9_test_separate_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_separate_interval_set_infix_/vc9_test_separate_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_separate_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D2623E950E}"
+ RootNamespace="test_separate_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_separate_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_set_icl_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,174 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_set_itl_set_h_JOFA_090119__
+#define LIBS_ICL_TEST_TEST_ICL_set_itl_set_h_JOFA_090119__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::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;
+ segmental::atomize(set_a, itv_set_a);
+ segmental::atomize(set_b, itv_set_b);
+ segmental::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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::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;
+ segmental::atomize(set_a, itv_set_a);
+ segmental::atomize(set_b, itv_set_b);
+ segmental::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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::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;
+ segmental::atomize(set_a, itv_set_a);
+ segmental::atomize(set_b, itv_set_b);
+ segmental::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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::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;
+ segmental::atomize(set_a, itv_set_a);
+ segmental::atomize(set_b, itv_set_b);
+ segmental::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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void itl_set_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+ typedef std::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;
+ segmental::atomize(set_a, itv_set_a);
+ segmental::atomize(set_b, itv_set_b);
+ segmental::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 // LIBS_ICL_TEST_TEST_ICL_set_itl_set_h_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,40 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::set_itl_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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 <set>
+#include <boost/interprocess/containers/set.hpp>
+#include <boost/icl/associative_element_container.hpp>
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_icl_set.hpp"
+
+#include "test_set_icl_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_monoid_plus_4_bicremental_types, T, discrete_types)
+{ itl_set_check_monoid_plus_4_bicremental_types<T, interval_set>();}
+ //MEMO: interval_set
+// is used here pragmatically to be able to recycle test code for initializing
+// sets. These interval_set are then converted to icl::set by atomize.
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_abelian_monoid_plus_4_bicremental_types, T, discrete_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, discrete_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, discrete_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, interval_set>();}
+
+#endif // BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+
+

Added: sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set_/test_set_icl_set_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -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, discrete_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, discrete_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, discrete_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, discrete_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, interval_set>();}
+

Added: sandbox/icl/libs/icl/test/test_set_icl_set_/vc9_test_set_icl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set_/vc9_test_set_icl_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_set_icl_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_set_icl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_set_icl_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_icl_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,29 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_itl_set_check_monoid_plus_4_bicremental_types, T, discrete_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, discrete_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, discrete_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, discrete_types)
+{ itl_set_check_partial_invertive_monoid_plus_4_bicremental_types<T, INTERVAL_SET>();}
+
+#endif // BOOST_ICL_TEST_SET_ICL_SET_CASES_HPP_JOFA_090701
+
+

Added: sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::set_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_set.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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"
+
+#include "test_set_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_interval_set_/test_set_interval_set_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,118 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090701
+
+//------------------------------------------------------------------------------
+// interval_set
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_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_icl_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_icl_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_icl_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>();}
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_set_check_containedness_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_split_interval_set_check_containedness_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<T, split_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_separate_interval_set_check_containedness_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_containedness_4_bicremental_types<T, separate_interval_set>();}
+
+//------------------------------------------------------------------------------
+// Inner Complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_set_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_separate_interval_set_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<T, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_split_interval_set_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_inner_complementarity_4_bicremental_types<T, split_interval_set>();}
+
+//------------------------------------------------------------------------------
+// Inner Complement and Distance
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_icl_interval_set_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<T, interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_separate_interval_set_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<T, separate_interval_set>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_split_interval_set_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ interval_set_check_length_complementarity_4_bicremental_types<T, split_interval_set>();}
+
+
+
+#endif // BOOST_ICL_TEST_SET_INTERVAL_SET_CASES_HPP_JOFA_090701
+

Added: sandbox/icl/libs/icl/test/test_set_interval_set_/vc9_test_set_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_interval_set_/vc9_test_set_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -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="4"
+ 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="Source Files"
+ 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="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_set_interval_set_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_set_interval_set_shared.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,261 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef LIBS_ICL_TEST_TEST_ICL_set_interval_set_h_JOFA_090119__
+#define LIBS_ICL_TEST_TEST_ICL_set_interval_set_h_JOFA_090119__
+
+
+
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void make_3_interval_sets_and_derivatives_1
+ (IntervalSet<T>& set_a,
+ IntervalSet<T>& set_b,
+ IntervalSet<T>& set_c,
+ typename IntervalSet<T>::segment_type& segm_d,
+ typename IntervalSet<T>::element_type& elem_e)
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::segment_type IntervalT;
+ typedef typename IntervalSetT::segment_type segment_type;
+ typedef typename IntervalSetT::element_type element_type;
+
+ segm_d = I_D(6,9);
+ elem_e = MK_v(5);
+
+ 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));
+}
+
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::interval_type IntervalT;
+
+ 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);
+}
+
+
+//------------------------------------------------------------------------------
+// Containedness
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_containedness_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::segment_type segment_type;
+ typedef typename IntervalSetT::element_type element_type;
+
+ IntervalSetT set_a, set_b, set_c;
+ segment_type segm_d;
+ element_type elem_e;
+ make_3_interval_sets_and_derivatives_1(set_a, set_b, set_c, segm_d, elem_e);
+
+ check_intersection_containedness(set_a, set_c);
+ check_intersection_containedness(set_b, segm_d);
+ check_intersection_containedness(set_c, elem_e);
+
+ check_union_containedness(set_c, set_c);
+ check_union_containedness(set_b, segm_d);
+ check_union_containedness(set_a, elem_e);
+}
+
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_inner_complementarity_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::segment_type segment_type;
+ typedef typename IntervalSetT::element_type element_type;
+
+ IntervalSetT set_a, set_b, set_c;
+ segment_type segm_d;
+ element_type elem_e;
+ make_3_interval_sets_and_derivatives_1(set_a, set_b, set_c, segm_d, elem_e);
+
+ has_inner_complementarity<IntervalSetT,IntervalSetT>(set_a);
+ has_inner_complementarity<IntervalSetT,IntervalSetT>(set_b);
+ has_inner_complementarity<IntervalSetT,IntervalSetT>(set_c);
+}
+
+template <class T,
+ template<class T,
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, T, Compare),
+ ICL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_length_complementarity_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ typedef typename IntervalSetT::segment_type segment_type;
+ typedef typename IntervalSetT::element_type element_type;
+
+ IntervalSetT set_a, set_b, set_c;
+ segment_type segm_d;
+ element_type elem_e;
+ make_3_interval_sets_and_derivatives_1(set_a, set_b, set_c, segm_d, elem_e);
+
+ has_length_complementarity(set_a);
+ has_length_complementarity(set_b);
+ has_length_complementarity(set_c);
+
+ has_length_as_distance<IntervalSetT,IntervalSetT>(set_a);
+ has_length_as_distance<IntervalSetT,IntervalSetT>(set_b);
+ has_length_as_distance<IntervalSetT,IntervalSetT>(set_c);
+}
+
+
+
+#endif // LIBS_ICL_TEST_TEST_ICL_set_interval_set_h_JOFA_090119__
+

Added: sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_map unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_map_shared.hpp"
+
+#define INTERVAL_MAP split_interval_map
+#include "../test_interval_map_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_map_/test_split_interval_map_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,72 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_map_fundamentals_4_ordered_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_map_ctor_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_map_add_sub_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_map_distinct_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_distinct_4_bicremental_continuous_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_map_isolate_4_bicremental_continuous_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_contains_4_bicremental_types, T, bicremental_types)
+{ interval_map_contains_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_operators_4_bicremental_types, T, bicremental_types)
+{ interval_map_operators_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_intersect_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_erase_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_erase_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_base_is_disjoint_4_bicremental_types, T, bicremental_types)
+{ interval_map_base_is_disjoint_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_plus_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_pipe_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_et_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_infix_caret_overload_4_bicremental_types, T, bicremental_types)
+{ interval_map_infix_caret_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_find_4_bicremental_types, T, bicremental_types)
+{ interval_map_find_4_bicremental_types<split_interval_map, T, int>();}
+

Added: sandbox/icl/libs/icl/test/test_split_interval_map_/vc9_test_split_interval_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_map_/vc9_test_split_interval_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_split_interval_map"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}"
+ RootNamespace="Test_split_interval_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_split_interval_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_split_interval_map_infix_/test_split_interval_map_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_map_infix_/test_split_interval_map_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,36 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_map_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_map_shared are tests that should give identical results for all
+// interval_maps: interval_map and split_interval_map.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP split_interval_map
+#include "../test_interval_map_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_split_interval_map_infix_/vc9_test_split_interval_map_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_map_infix_/vc9_test_split_interval_map_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_split_interval_map_infix"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}"
+ RootNamespace="Test_split_interval_map_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_split_interval_map_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_set unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET split_interval_set
+#include "../test_interval_set_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_set_/test_split_interval_set_shared.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,60 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_fundamentals_4_ordered_types, T, ordered_types)
+{ interval_set_fundamentals_4_ordered_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_set_ctor_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_add_sub_4_bicremental_types, T, bicremental_types)
+{ interval_set_add_sub_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_types, T, bicremental_types)
+{ interval_set_distinct_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_distinct_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_distinct_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_isolate_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_set_isolate_4_bicremental_continuous_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_element_compare_4_bicremental_types, T, bicremental_types)
+{ interval_set_element_compare_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_contains_4_bicremental_types, T, bicremental_types)
+{ interval_set_contains_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_operators_4_bicremental_types, T, bicremental_types)
+{ interval_set_operators_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_base_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_set_base_intersect_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_plus_overload_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_find_4_bicremental_types, T, bicremental_types)
+{ interval_set_find_4_bicremental_types<INTERVAL_SET, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_set_find_4_bicremental_types, T, bicremental_types)
+{ interval_set_find_4_bicremental_types<INTERVAL_SET, T>();}
+
+

Added: sandbox/icl/libs/icl/test/test_split_interval_set_/vc9_test_split_interval_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_set_/vc9_test_split_interval_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_split_interval_set"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}"
+ RootNamespace="Test_split_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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_split_interval_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_interval_set_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_split_interval_set_infix_/test_split_interval_set_infix.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_set_infix_/test_split_interval_set_infix.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,33 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::split_interval_set_infix unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+#include <boost/test/test_case_template.hpp>
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_set_shared.hpp"
+
+#define INTERVAL_SET split_interval_set
+#include "../test_interval_set_infix_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_split_interval_set_infix_/vc9_test_split_interval_set_infix.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_split_interval_set_infix_/vc9_test_split_interval_set_infix.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_split_interval_set_infix"
+ ProjectGUID="{A731623C-94BC-4666-A419-35D3623E950E}"
+ RootNamespace="test_split_interval_set_infix"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_split_interval_set_infix.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_total_icl_quantifier_/test_total_icl_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_icl_quantifier_/test_total_icl_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::total_icl_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_total_interval_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_total_icl_quantifier_/vc9_test_total_icl_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_icl_quantifier_/vc9_test_total_icl_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_total_icl_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}"
+ RootNamespace="Test_total_icl_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_total_icl_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_total_icl_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_icl_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,81 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_TOTAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+#define BOOST_ICL_TEST_TOTAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, double, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_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_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_discrete_codomain, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_1, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, float, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_2, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, boost::rational<int>, total_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// total_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<T, float, total_enricher, INTERVAL_MAP>();}
+
+// (0-x) + x =p= 0 | total absorber
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_discrete_codomain, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_continuous_codomain_1, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, double, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_continuous_codomain_2, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, boost::rational<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
+
+#endif // BOOST_ICL_TEST_TOTAL_ICL_QUANTIFIER_CASES_HPP_JOFA_100819
+

Added: sandbox/icl/libs/icl/test/test_total_interval_quantifier_/test_total_interval_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_interval_quantifier_/test_total_interval_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::total_interval_quantifier unit test
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.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/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// 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_interval_quantifier_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../test_total_interval_quantifier_cases.hpp"
+
+

Added: sandbox/icl/libs/icl/test/test_total_interval_quantifier_/vc9_test_total_interval_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_interval_quantifier_/vc9_test_total_interval_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_total_interval_quantifier"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}"
+ RootNamespace="Test_total_interval_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_total_interval_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_total_interval_quantifier_cases.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_total_interval_quantifier_cases.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,100 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+#define BOOST_ICL_TEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+
+//------------------------------------------------------------------------------
+// total_absorber
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, double, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_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_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_discrete_codomain, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, int, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_1, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, float, total_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_itv_quantifier_check_abelian_group_plus_4_bicremental_domain_and_continuous_codomain_2, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_4_bicremental_types<T, boost::rational<int>, total_absorber, INTERVAL_MAP>();}
+
+//------------------------------------------------------------------------------
+// total_enricher
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_plus_4_bicremental_types<T, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_monoid_et_4_bicremental_types<T, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_monoid_plus_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_plus_4_bicremental_types<T, std::string, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_monoid_et_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_abelian_monoid_et_4_bicremental_types<T, float, total_enricher, INTERVAL_MAP>();}
+
+// (0-x) + x =p= 0 | total absorber
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_discrete_codomain, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, int, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_continuous_codomain_1, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, double, total_enricher, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_domain_and_continuous_codomain_2, T, bicremental_types)
+{ itv_quantifier_check_abelian_group_plus_prot_inv_4_bicremental_types<T, boost::rational<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
+
+//------------------------------------------------------------------------------
+// Inner complement
+//------------------------------------------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<T, int, total_enricher, interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_enricher_itv_quantifier_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<T, double, total_enricher, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_absorber_itv_quantifier_check_inner_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_inner_complementarity_4_bicremental_types<T, int, total_absorber, split_interval_map>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_total_absorber_itv_quantifier_check_length_complementarity_4_bicremental_types, T, bicremental_types)
+{ itv_quantifier_check_length_complementarity_4_bicremental_types<T, double, total_absorber, interval_map>();}
+
+#endif // BOOST_ICL_TEST_TOTAL_INTERVAL_QUANTIFIER_CASES_HPP_JOFA_090701
+

Added: sandbox/icl/libs/icl/test/test_type_lists.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_type_lists.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,141 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_TYPE_LISTS_HPP_JOFA_080916
+#define BOOST_ICL_TEST_TYPE_LISTS_HPP_JOFA_080916
+
+#include <boost/mpl/list.hpp>
+
+// interval instance types
+#include <boost/icl/gregorian.hpp>
+#include <boost/icl/ptime.hpp>
+#include <boost/icl/rational.hpp>
+
+#if(_MSC_VER < 1500 && defined(_DEBUG) ) // 1500 = MSVC-9.0
+typedef int boost_posix_time_ptime;
+#else
+typedef boost::posix_time::ptime boost_posix_time_ptime;
+#endif
+
+typedef ::boost::mpl::list<
+ unsigned short, unsigned int, unsigned long
+ ,short, int, long, long long
+ ,float, double, long double
+ ,boost::rational<int>
+ ,boost_posix_time_ptime
+// ,boost::gregorian::date
+> bicremental_types;
+
+typedef unsigned int bicremental_type_1;
+typedef int bicremental_type_2;
+typedef double bicremental_type_3;
+typedef boost::rational<int> bicremental_type_4;
+typedef boost_posix_time_ptime bicremental_type_5;
+typedef unsigned short bicremental_type_6;
+typedef short bicremental_type_7;
+typedef float bicremental_type_8;
+
+typedef ::boost::mpl::list<
+ short, int, long, long long
+ ,float, double, long double
+ ,boost::rational<int>
+> signed_bicremental_types;
+
+typedef int signed_bicremental_type_1;
+typedef double signed_bicremental_type_2;
+typedef boost::rational<int> signed_bicremental_type_3;
+typedef short signed_bicremental_type_4;
+typedef float signed_bicremental_type_5;
+
+//DBG short list for debugging
+typedef ::boost::mpl::list<
+ int
+> debug_types;
+
+typedef ::boost::mpl::list<
+ float, double, long double
+ ,boost::rational<int>
+> bicremental_continuous_types;
+
+typedef float bicremental_continuous_type_1;
+typedef double bicremental_continuous_type_2;
+typedef boost::rational<int> bicremental_continuous_type_3;
+
+
+typedef ::boost::mpl::list<
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
+ ,short, int, long, long long
+> integral_types;
+
+typedef int integral_type_1;
+typedef unsigned int integral_type_2;
+typedef short integral_type_3;
+typedef unsigned int integral_type_4;
+
+typedef ::boost::mpl::list<
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
+ ,short, int, long
+ ,boost_posix_time_ptime
+// ,boost::gregorian::date
+> discrete_types;
+
+typedef int discrete_type_1;
+typedef boost_posix_time_ptime discrete_type_2;
+typedef unsigned int discrete_type_3;
+typedef short discrete_type_4;
+typedef unsigned int discrete_type_5;
+
+typedef ::boost::mpl::list<
+ short, int, long
+> signed_discrete_types;
+
+typedef int signed_discrete_type_1;
+typedef short signed_discrete_type_2;
+typedef long signed_discrete_type_3;
+
+typedef ::boost::mpl::list<
+ float, double, long double
+ ,boost::rational<int>
+> numeric_continuous_types;
+
+typedef double numeric_continuous_type_1;
+typedef float numeric_continuous_type_2;
+typedef boost::rational<int> numeric_continuous_type_3;
+typedef long double numeric_continuous_type_4;
+
+typedef ::boost::mpl::list<
+ float, double, long double
+ ,boost::rational<int>
+ ,std::string
+> continuous_types;
+
+typedef double continuous_type_1;
+typedef float continuous_type_2;
+typedef boost::rational<int> continuous_type_3;
+typedef std::string continuous_type_4;
+
+typedef ::boost::mpl::list<
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
+ ,short, int, long, long long
+ ,float, double, long double
+ ,boost::rational<int>
+ ,std::string
+ ,boost_posix_time_ptime
+// ,boost::gregorian::date
+> ordered_types;
+
+typedef int ordered_type_1;
+typedef std::string ordered_type_2;
+typedef boost_posix_time_ptime ordered_type_3;
+typedef boost::rational<int> ordered_type_4;
+typedef double ordered_type_5;
+
+#endif
+

Added: sandbox/icl/libs/icl/test/test_type_traits_/test_type_traits.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_type_traits_/test_type_traits.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,129 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::test_type_traits unit test
+
+#include <limits>
+#include <complex>
+#include <string>
+#include <vector>
+#include <set>
+#include <boost/mpl/list.hpp>
+#include <boost/icl/iterator.hpp>
+#include "../unit_test_unwarned.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/type_traits/is_same.hpp>
+
+#include <boost/icl/rational.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+void digits_of_numeric_types()
+{
+ cout << "--- limits ---\n";
+ cout << "max<char> = " << (std::numeric_limits<char>::max)() << endl;
+ cout << "max<char> = " << static_cast<int>((std::numeric_limits<char>::max)()) << endl;
+ cout << "-----------------------------------\n";
+ cout << "digits<char> = " << std::numeric_limits<char>::digits << endl;
+ cout << "digits<short> = " << std::numeric_limits<short>::digits << endl;
+ cout << "digits<float> = " << std::numeric_limits<float>::digits << endl;
+ cout << "digits<double> = " << std::numeric_limits<double>::digits << endl;
+ cout << "digits<complex<double>> = " << std::numeric_limits<std::complex<double> >::digits << endl;
+ cout << "digits<string> = " << std::numeric_limits<std::string>::digits << endl;
+}
+
+BOOST_AUTO_TEST_CASE(test_icl_infinity)
+{
+ BOOST_CHECK_EQUAL(icl::infinity<int>::value(), (std::numeric_limits<int>::max)());
+ BOOST_CHECK(0 != icl::infinity<int>::value());
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_is_continuous_type_T, T, continuous_types)
+{
+ BOOST_CHECK(is_continuous<T>::value);
+ BOOST_CHECK(!is_discrete<T>::value);
+}
+
+BOOST_AUTO_TEST_CASE(test_is_continuous_type)
+{
+ BOOST_CHECK(is_continuous<std::vector<int> >::value);
+ BOOST_CHECK(!is_discrete<std::vector<int> >::value);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_is_discrete_type_T, T, discrete_types)
+{
+ BOOST_CHECK(is_discrete<T>::value);
+ BOOST_CHECK(!is_continuous<T>::value);
+}
+
+BOOST_AUTO_TEST_CASE(test_is_discrete_type)
+{
+ BOOST_CHECK(is_discrete<boost::gregorian::date>::value);
+ BOOST_CHECK(!is_continuous<boost::gregorian::date>::value);
+}
+
+BOOST_AUTO_TEST_CASE(test_is_key_container_of)
+{
+ BOOST_CHECK((!is_key_container_of<int, icl::map<int,int> >::value));
+ BOOST_CHECK((!is_key_container_of<std::pair<int,int> , icl::map<int,int> >::value));
+ BOOST_CHECK(( is_key_container_of<std::set<int>, std::set<int> >::value));
+ BOOST_CHECK(( is_key_container_of<std::set<int>, icl::map<int,int> >::value));
+ BOOST_CHECK(( is_key_container_of<icl::map<int,int>, icl::map<int,int> >::value));
+}
+
+BOOST_AUTO_TEST_CASE(test_is_set_4_std_set)
+{
+ BOOST_CHECK( (is_set<std::set<int> >::value) );
+ BOOST_CHECK( (is_element_set<std::set<int> >::value) );
+ BOOST_CHECK( (!is_map<std::set<int> >::value) );
+}
+
+BOOST_AUTO_TEST_CASE(test_miscellaneous_type_traits)
+{
+ typedef interval_set<int> IntervalSetT;
+ typedef icl::map<int,int> MapII;
+
+ BOOST_CHECK(has_codomain_type<MapII>::value);
+ BOOST_CHECK((is_same<MapII::codomain_type, int>::value));
+
+ BOOST_CHECK((is_map<MapII>::value));
+ BOOST_CHECK((is_icl_container<MapII>::value));
+
+ BOOST_CHECK((is_fragment_of<IntervalSetT::element_type, IntervalSetT>::value));
+ BOOST_CHECK((is_fragment_of<IntervalSetT::segment_type, IntervalSetT>::value));
+ BOOST_CHECK((!is_fragment_of<double, IntervalSetT>::value));
+
+ BOOST_CHECK((boost::detail::is_incrementable<int>::value));
+ BOOST_CHECK((boost::detail::is_incrementable<double>::value));
+ BOOST_CHECK((!boost::detail::is_incrementable<std::string>::value));
+
+ BOOST_CHECK((is_floating_point<long double>::value));
+ BOOST_CHECK((is_floating_point<double>::value));
+ BOOST_CHECK((is_floating_point<float>::value));
+
+ BOOST_CHECK( (is_same<key_type_of<std::set<int> >::type, int>::value) );
+ BOOST_CHECK( (is_same<value_type_of<std::set<int> >::type, int>::value) );
+
+ BOOST_CHECK( is_std_set<std::set<int> >::value);
+ BOOST_CHECK( !is_std_set<interval_set<int> >::value);
+ BOOST_CHECK((!is_std_set<std::map<int,int> >::value));
+ BOOST_CHECK( is_element_set<std::set<int> >::value);
+ BOOST_CHECK( !is_interval_set<std::set<int> >::value);
+ BOOST_CHECK( !is_interval_set<std::set<int> >::value);
+}
+

Added: sandbox/icl/libs/icl/test/test_type_traits_/vc9_test_type_traits.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_type_traits_/vc9_test_type_traits.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_type_traits"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}"
+ RootNamespace="Test_type_traits"
+ 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="4"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\test_type_traits.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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/icl/libs/icl/test/test_value_maker.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/test_value_maker.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,163 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_VALUE_MAKER_HPP_JOFA_080916
+#define BOOST_ICL_TEST_VALUE_MAKER_HPP_JOFA_080916
+
+#include <boost/icl/type_traits/identity_element.hpp>
+#include <boost/icl/interval_bounds.hpp>
+
+namespace boost{ namespace icl
+{
+
+/*FYI completion like that:
+std::string make(int n)
+{
+ std::string value = identity_element<std::string>::value();
+ int abs_n = n<0 ? -n : n;
+ for(int i=1; i<abs_n; i++)
+ value += i%2==1 ? "hello " : "world ";
+}
+*/
+
+struct mono
+{
+ mono(){};
+ mono& operator ++ (){ return *this; }
+ mono& operator -- (){ return *this; }
+ mono& operator += (const mono&){ return *this; }
+};
+
+bool operator == (const mono&, const mono&){ return true; }
+bool operator < (const mono&, const mono&){ return false; }
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>&
+operator << (std::basic_ostream<CharType, CharTraits>& stream, const mono& object)
+{
+ return stream << "*";
+}
+
+
+
+template <class BicrementableT>
+BicrementableT make(int n)
+{
+ BicrementableT value = identity_element<BicrementableT>::value();
+ if(n>=0)
+ for(int i=0; i<n; i++)
+ ++value;
+ else
+ for(int i=0; i>n; i--)
+ --value;
+
+ return value;
+}
+
+
+template <class Type>
+struct test_value;
+
+template<>
+struct test_value<std::string>
+{
+ static std::string make(int n)
+ {
+ std::string value = identity_element<std::string>::value();
+ int abs_n = n<0 ? -n : n;
+ for(int i=1; i<abs_n; i++)
+ value += (i%2==1 ? "hello " : "world ");
+
+ return value;
+ }
+};
+
+template <class Type>
+struct test_value
+{
+ static Type make(int n)
+ {
+ Type value = identity_element<Type>::value();
+ if(n>=0)
+ for(int i=0; i<n; i++)
+ ++value;
+ else
+ for(int i=0; i>n; i--)
+ --value;
+
+ return value;
+ }
+};
+
+
+template <class ItvMapT>
+struct map_val
+{
+ typedef typename ItvMapT::domain_type domain_type;
+ typedef typename ItvMapT::codomain_type codomain_type;
+ typedef typename ItvMapT::interval_type interval_type;
+ typedef typename ItvMapT::value_type value_type;
+ typedef typename ItvMapT::segment_type segment_type;
+ typedef typename ItvMapT::domain_mapping_type domain_mapping_type;
+ typedef std::pair<domain_type, codomain_type> std_pair_type;
+
+ static interval_type interval_(int lower, int upper, int bounds = 2)
+ {
+ return interval_type(test_value<domain_type>::make(lower),
+ test_value<domain_type>::make(upper), interval_bounds(bounds));
+ }
+
+ static segment_type val_pair(int lower, int upper, int val, int bounds = 2)
+ {
+ return segment_type( interval_(lower, upper, static_cast<bound_type>(bounds)),
+ test_value<codomain_type>::make(val) );
+ }
+
+ 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));
+ }
+
+ 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));
+ }
+};
+
+
+// Very short value denotation for intervals
+// Assumption typename T and IntervalT exists in scope
+//I_I : [a,b]
+#define I_I(low,up) icl::interval<T>::closed (make<T>(low), make<T>(up))
+//I_D : [a,b)
+#define I_D(low,up) icl::interval<T>::right_open(make<T>(low), make<T>(up))
+//C_I : (a,b]
+#define C_I(low,up) icl::interval<T>::left_open (make<T>(low), make<T>(up))
+//C_D : (a,b)
+#define C_D(low,up) icl::interval<T>::open (make<T>(low), make<T>(up))
+
+#define MK_I(ItvT,low,up) ItvT(make<T>(low), make<T>(up))
+
+#define MK_v(key) make<T>(key)
+#define MK_u(key) make<U>(key)
+
+// Very short value denotation for interval value pairs
+// Assumption typename IntervalMapT existes in scope
+#define IIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_closed)
+#define IDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_right_open)
+#define CIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_left_open)
+#define CDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_open)
+#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 icl
+
+#endif
+

Added: sandbox/icl/libs/icl/test/unit_test_unwarned.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/unit_test_unwarned.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+#define BOOST_ICL_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4389) // boost/test/test_tools.hpp(509) : warning C4389: '==' : signed/unsigned mismatch
+#endif
+
+#include <boost/test/unit_test.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif // BOOST_ICL_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+

Added: sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,170 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map", "fastest_interval_map_\vc9_fastest_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_infix", "fastest_interval_map_infix_\vc9_fastest_interval_map_infix.vcproj", "{0FBD7F60-6470-41BB-8F8C-F47E9765C011}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_infix_mixed", "fastest_interval_map_infix_mixed_\vc9_fastest_interval_map_infix_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_mixed2", "fastest_interval_map_mixed2_\vc9_fastest_interval_map_mixed2.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set", "fastest_interval_set_\vc9_fastest_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_total_interval_quantifier", "fastest_total_interval_quantifier_\vc9_fastest_total_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_icl_interval", "fastest_icl_interval_\vc9_fastest_icl_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set_infix", "fastest_interval_set_infix_\vc9_fastest_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D1623E906E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_set_mixed", "fastest_interval_set_mixed_\vc9_fastest_interval_set_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_icl_map", "fastest_icl_map_\vc9_fastest_icl_map.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_partial_interval_quantifier", "fastest_partial_interval_quantifier_\vc9_fastest_partial_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_separate_interval_set", "fastest_separate_interval_set_\vc9_fastest_separate_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_casual", "test_casual_\vc9_test_casual.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_separate_interval_set_infix", "fastest_separate_interval_set_infix_\vc9_fastest_separate_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D2623E911E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_set_interval_set", "fastest_set_interval_set_\vc9_fastest_set_interval_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_set_icl_set", "fastest_set_icl_set_\vc9_fastest_set_icl_set.vcproj", "{33577D13-D562-4E3F-89F2-A8885151D13F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_map", "fastest_split_interval_map_\vc9_fastest_split_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_split_interval_set", "fastest_split_interval_set_\vc9_fastest_split_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_partial_icl_quantifier", "fastest_partial_icl_quantifier_\vc9_fastest_partial_icl_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_total_icl_quantifier", "fastest_total_icl_quantifier_\vc9_fastest_total_icl_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fastest_interval_map_mixed", "fastest_interval_map_mixed_\vc9_fastest_interval_map_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_combinable", "test_combinable_\vc9_test_combinable.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_misc", "test_misc_\vc9_test_misc.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_doc_code", "test_doc_code_\vc9_test_doc_code.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_type_traits", "test_type_traits_\vc9_test_type_traits.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_changing_interval_defaults", "test_changing_interval_defaults_\vc9_test_changing_interval_defalts.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A900D}.Release|Win32.Build.0 = Release|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Debug|Win32.Build.0 = Debug|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Release|Win32.ActiveCfg = Release|Win32
+ {0FBD7F60-6470-41BB-8F8C-F47E9765C011}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A902F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B903F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A905C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A917F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A908C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E906E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A907E}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE309B}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A909F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A910C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E911E}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE3129}.Release|Win32.Build.0 = Release|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Debug|Win32.Build.0 = Debug|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Release|Win32.ActiveCfg = Release|Win32
+ {33577D13-D562-4E3F-89F2-A8885151D13F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A913E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A915C}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D3A909F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D4A917F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A904F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D4A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D6A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/icl/test/vc9_icl_slow_tests.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl/test/vc9_icl_slow_tests.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,152 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_combinable", "test_combinable_\vc9_test_combinable.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map", "test_interval_map_\vc9_test_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_infix", "test_interval_map_infix_\vc9_test_interval_map_infix.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_infix_mixed", "test_interval_map_infix_mixed_\vc9_test_interval_map_infix_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_mixed2", "test_interval_map_mixed2_\vc9_test_interval_map_mixed2.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_map_mixed", "test_interval_map_mixed_\vc9_test_interval_map_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set", "test_interval_set_\vc9_test_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set_infix", "test_interval_set_infix_\vc9_test_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D1623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set_mixed", "test_interval_set_mixed_\vc9_test_interval_set_mixed.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_icl_interval", "test_icl_interval_\vc9_test_icl_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_icl_map", "test_icl_map_\vc9_test_icl_map.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_partial_interval_quantifier", "test_partial_interval_quantifier_\vc9_test_partial_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_separate_interval_set", "test_separate_interval_set_\vc9_test_separate_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_separate_interval_set_infix", "test_separate_interval_set_infix_\vc9_test_separate_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D2623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_interval_set", "test_set_interval_set_\vc9_test_set_interval_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE3529}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_icl_set", "test_set_icl_set_\vc9_test_set_icl_set.vcproj", "{DD9C9854-3882-42B9-BFA1-C6CEBFCE352A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_map", "test_split_interval_map_\vc9_test_split_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_map_infix", "test_split_interval_map_infix_\vc9_test_split_interval_map_infix.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_set", "test_split_interval_set_\vc9_test_split_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_split_interval_set_infix", "test_split_interval_set_infix_\vc9_test_split_interval_set_infix.vcproj", "{A731623C-94BC-4666-A419-35D3623E950E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_total_interval_quantifier", "test_total_interval_quantifier_\vc9_test_total_interval_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_partial_icl_quantifier", "test_partial_icl_quantifier_\vc9_test_partial_icl_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_total_icl_quantifier", "test_total_icl_quantifier_\vc9_test_total_icl_quantifier.vcproj", "{EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA1}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D5A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3B9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D1623E950E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D3A9F9E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Release|Win32.Build.0 = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Debug|Win32.Build.0 = Debug|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Release|Win32.ActiveCfg = Release|Win32
+ {DD9C9854-3882-42B9-BFA1-C6CEBFCE352B}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D2A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D2623E950E}.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
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F9C}.Release|Win32.Build.0 = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Debug|Win32.Build.0 = Debug|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Release|Win32.ActiveCfg = Release|Win32
+ {A731623C-94BC-4666-A419-35D3623E950E}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D2A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4A-FD5B7D5A9F9F}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B4B-FD5B7D5A9F9F}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/icl_xt/example/amount_cube_/amount_cube.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/example/amount_cube_/amount_cube.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,266 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <iostream>
+
+#include <limits>
+#include <boost/icl_xt/statvardesct.hpp>
+#include <boost/icl_xt/var_tuple_order.hpp>
+#include <boost/icl_xt/tuple_computer.hpp>
+
+#include <sstream>
+
+using namespace std;
+using namespace boost::icl;
+
+/** Example amount_cube.cpp \file amount_cube.cpp
+ \brief Demonstrates computations of aggregates using maps of tuples or <i>cubes</i>
+
+ The template class TupelComputerT is a general class for computing aggregations
+ on values that are associated to elements of a cartesian product. Stated more
+ simply TupelComputerT allows to count values associated to tupels.
+
+ Basically a TupelComputer is a map associating a tupel (t1, ..., tn) to a
+ value v:
+ (t1, ..., tn) -> v
+
+ The values v can be amounts like integers, but also sets and more complex
+ classes, provided an operator += for aggregation is defined on them.
+
+ A TupelComputerT can be conceived as an n-dimensional cube.
+ Instances of TupelComputers can be found in many fields. General crosstable
+ prcedures in statistical systems, pivot tables in excel, online analytic
+ processing tools (OLAP-cubes) and functionalities of data warehouse systems
+ mirror an apply the concepts that TupelConputerT tries to offer as a c++
+ template class.
+
+ The most basic example of a TupelComputerT is the one that associates integers.
+ We call it AmountTupelComputer or AmountCube.
+
+ A TupelComputer counts on insert. That is, it applies the += operation on
+ associated values whenever the member function 'insert' is called and an
+ appropriate tupel is in the cube.
+
+ An AmountTupelComputer counts frequencies of tupels if the inserted associated
+ value is always 1.
+
+ This is the most basic instance of a TupelComputerT. It is demonstrated in this
+ sampe file.
+
+ \include amount_cube_/amount_cube.cpp
+*/
+
+/* Consider a hospital administration that want's to count their patients
+ according to the attributes sex, age, and diagnosis ... */
+enum sex { female=0, male=1 };
+enum diagnosis { anorexia=0, stroke=1 };
+
+// These are the components of the tupel (indendent variables) that are to
+// be counted ...
+enum PatientVarsET { sex, age, diagnosis, PatientVarsET_size };
+
+// ... which makes up tupels of 3 elements
+typedef var_tuple<PatientVarsET_size> PatientInfoTD;
+typedef amount_tuple_computer<PatientVarsET_size, int> AmountCubeTD;
+
+// This macro helps the notation a little
+#define TRIPLE(tp,x0,x1,x2) tp[0]=x0; tp[1]=x1; tp[2]=x2
+
+
+void evaluate_by_tupel_insertion(AmountCubeTD& cube)
+{
+ /* So, counting of cases is done just by inserting tupels of attributes with
+ an associated 1. Equal tupel are summed up. So we expect a total of
+ 2 for 17 year old annorectic females. All other tupels are obviously unique. */
+ PatientInfoTD marys_data; TRIPLE(marys_data, female, 17, anorexia); cube.insert(marys_data, 1);
+ PatientInfoTD sallys_data; TRIPLE(sallys_data, female, 17, anorexia); cube.insert(sallys_data, 1);
+ PatientInfoTD peters_data; TRIPLE(peters_data, male, 36, anorexia); cube.insert(peters_data, 1);
+ PatientInfoTD anns_data; TRIPLE(anns_data, female, 34, stroke); cube.insert(anns_data, 1);
+ PatientInfoTD pauls_data; TRIPLE(pauls_data, male, 72, stroke); cube.insert(pauls_data, 1);
+ PatientInfoTD franks_data; TRIPLE(franks_data, male, 82, stroke); cube.insert(franks_data, 1);
+}
+
+/* Shows frequencies of attribute tupels for patients. Sums up frequencies for
+ equal attribute combinations (tupels) */
+void accumulate_identical_tupel()
+{
+ /* Every TupelComputer need an order for their tupel. In the most simple case
+ we take the default order provided by the default constructor */
+ var_tuple_order<PatientInfoTD> defaultOrder;
+ AmountCubeTD amountCube(defaultOrder);
+
+ // Inserting an thus computing frquencies
+ evaluate_by_tupel_insertion(amountCube);
+ // Show result
+ cout << "accumulate_identical_tupel(): (female, 17, annorexia)->2 all other tupels->1" << endl;
+ cout << amountCube.as_string() << endl;
+ cout << "----------------------------------------------------------------------------" << endl;
+}
+
+
+/* We do not want to count each age separately but to evaluate frequencies
+ for groups of ages. So we define: */
+enum AgeGroupsET { young=0, old=1 };
+
+/* Modifying the tupel order we can indeed change the computation. Class
+ GroupByAge shows how a grouping on age can be introduced to the computing
+ of a TupelComputer. */
+class GroupByAge : public group_order<PatientVarsET_size>
+{
+public:
+ GroupByAge() : m_var(age) {}
+
+ /// Strict weak standard ordering for the grouped component.
+ bool operator() (const PatientInfoTD& lhs, const PatientInfoTD& rhs)const
+ { return ageGroup(lhs) < ageGroup(rhs); }
+
+ /// Get number of tupel component which is grouped
+ VarEnumTD getVarIndex()const { return m_var; }
+
+ /// Equivalence introduced by the grouping
+ bool areEquivalent(const PatientInfoTD& lhs, const PatientInfoTD& rhs)const
+ { return ageGroup(lhs) == ageGroup(rhs); }
+
+ /// That is the way we group ages (quite radical)
+ AgeGroupsET ageGroup(const PatientInfoTD& info)const {return info[age] <= 35 ? young : old; }
+
+private:
+ PatientVarsET m_var; // Tupel component which is grouped
+};
+
+
+
+void accumulate_for_grouped_age()
+{
+ // Now we can modify the tupel order
+ var_tuple_order<PatientInfoTD> groupedAgeOrder;
+
+ // Grouping for age is introduced that way
+ GroupByAge ageGrouper;
+ groupedAgeOrder.setGroupOrder(&ageGrouper);
+ AmountCubeTD amountCube(groupedAgeOrder);
+
+ /* The same data collection now yield a different result. As desired countig
+ of ages is now grouped for two rough age groups */
+ evaluate_by_tupel_insertion(amountCube);
+
+ cout << "accumulate_for_grouped_age():" << endl;
+ cout << "(fem,yng,anrx)->2 (fem,yng,strk)->1 (mle,old,anrx)->1 (mle,old,strk)->2" << endl;
+ cout << amountCube.as_string() << endl;
+ cout << "----------------------------------------------------------------------------" << endl;
+}
+
+/* We can compute partial sums by switching components off the tupel.
+ Components to be counted are defined by a PermutationT Object.
+ A PermutationT is a selection that permutes the iteration order as well. */
+void accumulate_for_sex()
+{
+ var_tuple_order<PatientInfoTD> groupedAgeOrder;
+
+ GroupByAge ageGrouper;
+ groupedAgeOrder.setGroupOrder(&ageGrouper);
+ var_permutation<PatientVarsET_size> perm;
+ // Count component 'sex' only
+ perm.add(sex);
+ groupedAgeOrder.setPermutation(perm);
+
+ AmountCubeTD amountCube(groupedAgeOrder);
+
+ evaluate_by_tupel_insertion(amountCube);
+
+ cout << "accumulate_for_sex(): (female,-,-)->3 (male,-,-)->3 " << endl;
+ cout << amountCube.as_string() << endl;
+ cout << "----------------------------------------------------------------------------" << endl;
+}
+
+void accumulate_except_for_sex()
+{
+ var_tuple_order<PatientInfoTD> groupedAgeOrder;
+
+ GroupByAge ageGrouper;
+ groupedAgeOrder.setGroupOrder(&ageGrouper);
+ var_permutation<PatientVarsET_size> perm;
+ // Count component age(grouped) and diagnosis but not sex
+ perm.add(age).add(diagnosis);
+ groupedAgeOrder.setPermutation(perm);
+
+ AmountCubeTD amountCube(groupedAgeOrder);
+
+ evaluate_by_tupel_insertion(amountCube);
+
+ cout << "accumulate_except_for_sex():" << endl;
+ cout << "(-,yng,anrx)->2 (-,yng,strk)->1 (-,old,anrx)->1 (-,old,strk)->2" << endl;
+ cout << amountCube.as_string() << endl;
+ cout << "----------------------------------------------------------------------------" << endl;
+}
+
+void accumulate_the_total()
+{
+ var_tuple_order<PatientInfoTD> groupedAgeOrder;
+
+ GroupByAge ageGrouper;
+ groupedAgeOrder.setGroupOrder(&ageGrouper);
+ var_permutation<PatientVarsET_size> perm;
+ // The empty PermutationT yields the grand total
+ groupedAgeOrder.setPermutation(perm);
+
+ AmountCubeTD amountCube(groupedAgeOrder);
+
+ evaluate_by_tupel_insertion(amountCube);
+
+ cout << "accumulate_the_total():(-,-,-)->6" << endl;
+ cout << amountCube.as_string() << endl;
+ cout << "----------------------------------------------------------------------------" << endl;
+}
+
+
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample amount_cube.cpp <<\n";
+ cout << "-------------------------------------------------------\n";
+ cout << "Note that there is always a representing value for a tupel component\n";
+ cout << "even if the component is grouped or switched off.\n";
+ cout << "-------------------------------------------------------\n";
+ accumulate_identical_tupel();
+ accumulate_for_grouped_age();
+ accumulate_for_sex();
+ accumulate_except_for_sex();
+ accumulate_the_total();
+ return 0;
+}
+
+// Program output
+
+// >>Interval Container Library: Sample amount_cube.cpp <<
+// -------------------------------------------------------
+// Note that there is always a representing value for a tupel component
+// even if the component is grouped or switched off.
+// -------------------------------------------------------
+// accumulate_identical_tupel(): (female, 17, annorexia)->2 all other tupels->1
+// ((0,17,0)->2)((0,34,1)->1)((1,36,0)->1)((1,72,1)->1)((1,82,1)->1)
+// ----------------------------------------------------------------------------
+// accumulate_for_grouped_age():
+// (fem,yng,anrx)->2 (fem,yng,strk)->1 (mle,old,anrx)->1 (mle,old,strk)->2
+// ((0,17,0)->2)((0,34,1)->1)((1,36,0)->1)((1,72,1)->2)
+// ----------------------------------------------------------------------------
+// accumulate_for_sex(): (female,-,-)->3 (male,-,-)->3
+// ((0,17,0)->3)((1,36,0)->3)
+// ----------------------------------------------------------------------------
+// accumulate_except_for_sex():
+// (-,yng,anrx)->2 (-,yng,strk)->1 (-,old,anrx)->1 (-,old,strk)->2
+// ((0,17,0)->2)((0,34,1)->1)((1,36,0)->1)((1,72,1)->2)
+// ----------------------------------------------------------------------------
+// accumulate_the_total():(-,-,-)->6
+// ((0,17,0)->6)
+// ----------------------------------------------------------------------------
+
+

Added: sandbox/icl/libs/icl_xt/example/amount_cube_/vc9_amount_cube.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/example/amount_cube_/vc9_amount_cube.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_amount_cube"
+ ProjectGUID="{5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}"
+ RootNamespace="vc9_amount_cube"
+ 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"
+ 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/$(ProjectName)/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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\amount_cube.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl_xt/example/history_/history.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/example/history_/history.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,247 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <iostream>
+
+// Prior to other includes for interval containers we define ...
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// ... so all interval containers will use right_open_intervals that
+// has static interval borders.
+
+#include <boost/icl/type_traits/to_string.hpp>
+#include "../toytime.h"
+
+/** Example history.cpp \file history.cpp
+\brief Shows how different attributes that change in time are merged into a
+ single history object.
+
+History demonstrates further possibilities of an interval map
+(interval_map or split_interval_map). For a more basic example see party.cpp.
+Here we show the mechanics of a product_history which is an interval_map that
+maps intervals to products of attributes that change over time.
+
+Using product_histories, we can monitor a set of attributes in a history:
+
+Monday 22:00: A person is taken to a hospital with a head injury. So a suspicion
+of cranial fraction is filed.
+
+Monday 22:05: In a first examination at the emergency ward an alcoholic
+intoxication is diagnosed.
+
+Monday 22:15: The person is moved to the radiology to examine the headinjury.
+There he has to wait for 15 minutes in the hall.
+
+Monday 22:30: Using x-ray, cranial fraction can be excluded.
+
+Monday 22:50: The person is moved to ward A for treatment. The head injury is
+finally diagnosed as laceration.
+
+Tuesday 07:00: The person falls into an acute delirium due to deprivation of
+alcohol.
+
+This history of events could be formalized like that:
+\code
+[mon:22:00, mon:22:05) -> { DIAG->{susp.cran.frac.}, WARD->{emergency ward} }
+[mon:22:05, mon:22:15) -> { DIAG->{susp.cran.frac., alc.intox.}, WARD->{emergency ward} }
+[mon:22:15, mon:22:30) -> { DIAG->{susp.cran.frac., alc.intox.} }
+[mon:22:30, mon:22:50) -> { DIAG->{alc.intox.}, WARD->{radiology} }
+[mon:22:50, tue:07:00) -> { DIAG->{laceration, alc.intox.}, WARD->{ward A} }
+[tue:07:00, tue:07:20) -> { DIAG->{laceration, acute delirium}, WARD->{ward A} }
+\endcode
+
+Now suppose the episodes of that history are recorded separately for diagnoses and
+ward. A situation that is often found if data are stored in a well designed database.
+
+\code
+Diagnosis:
+[mon:22:00, mon:22:30) -> susp.cran.frac.
+[mon:22:05, mon:07:00) -> alc.intox.
+[mon:22:50, mon:07:20) -> laceration
+[mon:07:00, mon:07:20) -> acute delirium
+
+Stays:
+[mon:22:00, mon:22:15) -> emergency ward
+(unregistered gap)
+[mon:22:30, mon:22:50) -> radiology
+[mon:22:50, mon:07:20) -> ward A
+\endcode
+
+A product_history allows to compute the history of events by simply adding all
+separate episode data to a history object.
+
+\include history_/history.cpp
+*/
+
+
+
+#include <boost/icl_xt/typed_episode.hpp>
+#include <boost/icl_xt/episode_product.hpp>
+#include <boost/icl_xt/product_history.hpp>
+
+using namespace std;
+using namespace boost::icl;
+
+
+/* To use a product_history object, we need an TypeDomain-class, specifying
+ an enumeration type and a common value type for all episodes of a given
+ problem domain to work on.
+*/
+class HospitalTypeDomain
+{
+public:
+ /* All episode classes for the hospital sample share a common value type ValueBaseTD
+ which is std::string in this toy example. Use any class of your problem domain
+ for real word instances. */
+ typedef std::string ValueBaseTD ;
+
+ // For derived episode classes, we define an enumeration
+ enum domainET { diagnosis, ward };
+ typedef enum domainET DomainET;
+
+ // string representation of the episode types
+ static std::string as_string(DomainET val)
+ {
+ switch(val)
+ {
+ case diagnosis: return std::string("DIAG");
+ case ward: return std::string("WARD");
+ default: return std::string("Unknown");
+ }
+ }
+};
+
+
+/* Base class for all episodes of the sample hospital problem domain.
+ An episode is an object that has an interval and a value. */
+class HospitalEpisodes : public typed_episode<Time, HospitalTypeDomain>
+{
+public:
+ // The domain type of intervals used by HospitalEpisodes is (toy)Time
+ typedef Time ItvDomTD;
+ // Type of the intervals used by HospitalEpisodes
+ typedef right_open_interval<Time> IntervalTD;
+
+public:
+ // Construct an episode from interval and value
+ HospitalEpisodes(const IntervalTD& itv, const std::string& val):
+ m_itv(itv), m_value(val)
+ {}
+
+ // Every episode has an interval
+ virtual IntervalTD interval()const { return m_itv; }
+
+ void setValue(const HospitalTypeDomain::ValueBaseTD& val) { m_value = val; }
+
+ virtual const HospitalTypeDomain::ValueBaseTD* value()const { return &m_value; }
+
+ // Equality of values
+ virtual bool isValueEqual(const ordered_type<HospitalTypeDomain>* x2)const
+ { return m_value==dynamic_cast<const HospitalEpisodes*>(x2)->m_value; }
+
+ // String representation
+ virtual std::string as_string()const { return m_value; }
+
+private:
+ // For sake of simplicity the value of the example episodes is text
+ HospitalTypeDomain::ValueBaseTD m_value;
+ IntervalTD m_itv;
+};
+
+// ----------------------------------------------------------------------------
+// Now specific episode-classes for diagnoses and wards are implemented
+// ----------------------------------------------------------------------------
+
+// Diagnoses: Begin, end and kind of desease
+class DiagnosisEpisode : public HospitalEpisodes
+{
+public:
+ DiagnosisEpisode(Time begin, Time end, const std::string& val)
+ : HospitalEpisodes(right_open_interval<Time>(begin,end),val){}
+
+ HospitalTypeDomain::DomainET type()const { return HospitalTypeDomain::diagnosis; }
+};
+
+// Wards: Begin, end and Number of Ward a patient stayed at
+class WardEpisode : public HospitalEpisodes
+{
+public:
+ WardEpisode(Time begin, Time end, const std::string& val)
+ : HospitalEpisodes(right_open_interval<Time>(begin,end),val){}
+
+ HospitalTypeDomain::DomainET type()const { return HospitalTypeDomain::ward; }
+};
+
+// ----------------------------------------------------------------------------
+/* Having defined hospital episodes, we can build a history class for
+ by instatiation of the product_history template class. */
+class HospitalProductHistory : public product_history<Time, HospitalTypeDomain>
+{
+public:
+ typedef product_history<Time, HospitalTypeDomain> BaseTypeTD;
+ typedef episode_product<Time, HospitalTypeDomain> ValueTypeTD;
+ typedef BaseTypeTD::IntervalTD IntervalTD;
+ typedef BaseTypeTD::DomainTD DomainTD;
+};
+
+// We may call a single entry in that history a hospital event.
+typedef HospitalProductHistory::ValueTypeTD HospitalEventTD;
+
+void medical_file()
+{
+ DiagnosisEpisode susp_cran_frac(Time(monday, 22,00), Time(monday, 22,30), "susp.cran.frac.");
+ DiagnosisEpisode alc_intox (Time(monday, 22,05), Time(tuesday, 7,00), "alc.intox.");
+ DiagnosisEpisode laceration (Time(monday, 22,50), Time(tuesday, 7,20), "laceration");
+ DiagnosisEpisode acute_delirium(Time(tuesday, 7,00), Time(tuesday, 7,20), "acute_delirium");
+
+ WardEpisode emergency_ward(Time(monday, 22,00), Time(monday, 22,15), "emergency_ward");
+ WardEpisode radiology (Time(monday, 22,30), Time(monday, 22,50), "radiology");
+ WardEpisode ward_A (Time(monday, 22,50), Time(tuesday, 7,20), "ward_A");
+
+ HospitalProductHistory history;
+
+ history += &susp_cran_frac;
+ history += &alc_intox;
+ history += &laceration;
+ history += &acute_delirium;
+
+ history += &emergency_ward;
+ history += &radiology;
+ history += &ward_A;
+
+ HospitalProductHistory::iterator it = history.begin();
+ while(it != history.end())
+ {
+ right_open_interval<Time> when = (*it).first;
+ HospitalEventTD what = (*it).second;
+
+ cout << when << ": " << what.as_string() << endl;
+ ++it;
+ }
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Sample history.cpp <<\n";
+ cout << "---------------------------------------------------\n";
+ medical_file();
+ return 0;
+}
+
+// Program output:
+
+// >>Interval Container Library: Sample history.cpp <<
+// ---------------------------------------------------
+// [mon:22:00,mon:22:05): DIAG{susp.cran.frac.}, WARD{emergency_ward}
+// [mon:22:05,mon:22:15): DIAG{alc.intox. susp.cran.frac.}, WARD{emergency_ward}
+// [mon:22:15,mon:22:30): DIAG{alc.intox. susp.cran.frac.}
+// [mon:22:30,mon:22:50): DIAG{alc.intox.}, WARD{radiology}
+// [mon:22:50,tue:07:00): DIAG{laceration alc.intox.}, WARD{ward_A}
+// [tue:07:00,tue:07:20): DIAG{acute_delirium laceration}, WARD{ward_A}

Added: sandbox/icl/libs/icl_xt/example/history_/vc9_history.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/example/history_/vc9_history.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_history"
+ ProjectGUID="{DD506ECC-2DE5-4C26-B810-B85A61BAA7EC}"
+ RootNamespace="vc9_history"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\history.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl_xt/example/toytime.h
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/example/toytime.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,73 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+ 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)
++-----------------------------------------------------------------------------*/
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4996) // This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
+#endif
+
+namespace boost{namespace icl
+{
+
+/** Time is a toy-class to demonstrate a class that conforms the requirements of
+ a template parameter for class IntervalT.
+
+ In real world applications you may want to use the integer representation of a
+ time variable. That way intervals and their containers are working most efficiently.
+*/
+
+enum {sunday=0, monday, tuesday, wednesday, thursday, friday, saturday};
+static const char* daynames[] = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"};
+
+class Time
+{
+public:
+ Time(): m_time(0) {}
+ Time(int hours, int minutes): m_time(60*hours+minutes) {}
+ Time(int day, int hours, int minutes): m_time((24*60)*day+60*hours+minutes) {}
+ int getDay()const { return m_time/(24*60); }
+ int getHours()const { return (m_time%(24*60))/60; }
+ int getMinutes()const { return (m_time%(24*60))%60; }
+ int asInt()const { return m_time; }
+ std::string getDayString()const { return daynames[getDay()]; }
+
+ std::string as_string()const
+ {
+ const int MAX_TIMESTING_LEN = 256;
+ char repr[MAX_TIMESTING_LEN];
+ sprintf(repr, "%3s:%02d:%02d", getDayString().c_str(), getHours(), getMinutes());
+ return std::string(repr);
+ }
+
+ Time& operator ++ () { m_time++; return *this; }
+ Time& operator -- () { m_time--; return *this; }
+
+private:
+ int m_time;
+};
+
+
+bool operator < (const Time& x1, const Time& x2) { return x1.asInt() < x2.asInt(); }
+bool operator == (const Time& x1, const Time& x2) { return x1.asInt() == x2.asInt(); }
+bool operator <= (const Time& x1, const Time& x2) { return x1.asInt() <= x2.asInt(); }
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits> &stream, Time const& time)
+{
+ return stream << time.as_string();
+}
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+}} // namespace icl boost
+

Added: sandbox/icl/libs/icl_xt/test/auto_itv_test_/auto_itv_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/auto_itv_test_/auto_itv_test.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,163 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2007-2009: Joachim Faulhaber
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+auto_itv_test.cpp provides automated tests:
+A geneator generates instances of interval container. For each instance
+properties are checked, e. g. symmetric difference on ItvSets:
+(x + y) - (x * y) == (x - y) + (y - x)
+As you can see, within a law like that a great deal of operations are
+applied and tested.
+
+The test procedures allow for specifying the number of tests to be performed
+and the maximum size of generated interval containers. The error file collects
+information on the erroneous testcases if there are any.
++-----------------------------------------------------------------------------*/
+#include <iostream>
+
+#include <boost/icl/split_interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include "../itvmaptester.h"
+#include "../itvsettester.h"
+
+using namespace std;
+using namespace boost::icl;
+
+// -------------------------------------------------
+void autoPropertyTest_ItvSet_int()
+{
+ try
+ {
+ int nTries=0, maxSamSize=0;
+ char errFile[256];
+
+ cout << "Property test for interval_set<int>: " << endl;
+ cout << "how many ? >> ";
+ cin >> nTries;
+ cout << "max sample ? >> ";
+ cin >> maxSamSize;
+ cout << "errfile ? >> ";
+ cin >> errFile ;
+
+ typedef ItvSetTesterT< interval_set<int> > TesterT;
+ TesterT::domain_generator_type* domain_gentor
+ = new TesterT::domain_generator_type();
+ domain_gentor->setValueRange(0, 100);
+ domain_gentor->setMaxIntervalLength(50);
+
+ TesterT cntTester;
+ cntTester.set_domain_generator(domain_gentor);
+ cntTester.setRangeOfSampleSize(0, maxSamSize);
+
+ cntTester.testInsertionIndependence(nTries);
+ cntTester.testJoinIndependence(nTries);
+ cntTester.testInsertReversibility(nTries, errFile);
+ cntTester.testSymmetricDifference(nTries, errFile);
+
+ cout << ">> auto tests completed\n";
+ }
+ catch (exception e)
+ {
+ cout << "autoPropertyTest_ItvSet_int(): exception caught\n";
+ cout << e.what() << endl;
+ }
+ catch (...)
+ {
+ cout << "autoPropertyTest_ItvSet_int(): unknown exception caught\n";
+ }
+}
+
+// -------------------------------------------------
+void autoPropertyTest_SplitItvMap_double_int()
+{
+ try
+ {
+ int nTries=0, maxSamSize=0;
+ char errFile[256];
+
+ cout << "Property test for split_interval_map<double,int>: " << endl;
+ cout << "how many ? >> ";
+ cin >> nTries;
+ cout << "max sample ? >> ";
+ cin >> maxSamSize;
+ cout << "errfile ? >> ";
+ cin >> errFile ;
+
+
+ typedef ItvMapTesterT< split_interval_map<double,int> > TesterT;
+ TesterT::domain_generator_type* domain_gentor
+ = new TesterT::domain_generator_type();
+ TesterT::codomain_generator_type* codomain_gentor
+ = new TesterT::codomain_generator_type();
+
+
+ domain_gentor->setValueRange(0.0, 1.0);
+ domain_gentor->setMaxIntervalLength(1.0);
+ codomain_gentor->setRange(1,5);
+
+ TesterT cntTester;
+ cntTester.set_domain_generator(domain_gentor);
+ cntTester.set_codomain_generator(codomain_gentor);
+
+ cntTester.setRangeOfSampleSize(0, maxSamSize);
+
+ cntTester.testInsertReversibility2(nTries, errFile);
+ cntTester.testErasureAsIntersectionComputability(nTries, errFile);
+
+ cout << ">> auto tests completed\n";
+ }
+ catch (exception e)
+ {
+ printf("autoPropertyTest_SplitItvMap_double_int(): exception caught\n");
+ printf("%s\n", e.what());
+ }
+ catch (...)
+ {
+ printf("autoPropertyTest_SplitItvMap_double_int(): unknown exception caught\n");
+ }
+}
+
+
+
+int main()
+{
+ // Select a test by (re)moving the comment tokens!
+
+ cout << ">>Interval Container Library: Test auto_itv_test.cpp <<\n";
+ cout << "-------------------------------------------------------\n";
+ // Test programmed properties on a sample of generated interval_set<int>
+ //autoPropertyTest_ItvSet_int();
+ autoPropertyTest_SplitItvMap_double_int();
+
+ // Test programmed properties on a sample of generated split_interval_map<double,int>
+ // autoPropertyTest_SplitItvMap_double_int();
+
+ return 0;
+}
+

Added: sandbox/icl/libs/icl_xt/test/auto_itv_test_/vc9_auto_itv_test.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/auto_itv_test_/vc9_auto_itv_test.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_auto_itv_test"
+ ProjectGUID="{EF64A2C7-DE78-46C2-953F-C4685A5D2A97}"
+ RootNamespace="auto_itv_test"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\auto_itv_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\src\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_base_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\itvmaptester.h"
+ >
+ </File>
+ <File
+ RelativePath="..\itvsettester.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\split_interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\split_interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/icl_xt/test/itvmaptester.h
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/itvmaptester.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,551 @@
+/* ------------------------------------------------------------------
+class ItvMapTesterT
+--------------------------------------------------------------------*/
+#ifndef __ITVMAPTESTER_H_JOFA_990226__
+#define __ITVMAPTESTER_H_JOFA_990226__
+
+#include <boost/icl/associative_element_container.hpp>
+#include <boost/icl_xt/itvgentor.hpp>
+#include <boost/icl_xt/mapgentor.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class ItvMapTV>
+class ItvMapTesterT
+{
+public:
+ typedef typename ItvMapTV::domain_type domain_type;
+ typedef typename ItvMapTV::codomain_type codomain_type;
+ typedef typename ItvMapTV::interval_set_type interval_set_type;
+ typedef ItvGentorT<domain_type> domain_generator_type;
+ typedef NumberGentorT<codomain_type> codomain_generator_type;
+
+ void set_domain_generator(domain_generator_type* gentor)
+ { m_ContainerGentor.setDomainGentor(gentor); }
+
+ void set_codomain_generator(codomain_generator_type* gentor)
+ { m_ContainerGentor.setCodomainGentor(gentor); }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_ContainerGentor.setRangeOfSampleSize(lwb,upb); }
+
+ // The value of a Map is independent of the insertion sequence
+ bool valueIsInsertionIndependent(ItvMapTV& y, ItvMapTV& y_perm);
+ bool testInsertionIndependence(int nTries);
+
+ // The value of a Map is invariant wrt. join-normalization
+ bool valueIsJoinIndependent(ItvMapTV& y, ItvMapTV& y_join);
+ bool testJoinIndependence(int nTries);
+
+ // The value of a Map is invariant wrt. join-normalization after insert-permutation
+ bool valueIsInsertAndJoinIndependent(ItvMapTV& y, ItvMapTV& y_perm, ItvMapTV& y_permJoin);
+ bool testInsertAndJoinIndependence(int nTries);
+
+ //LAW: x + y - join(perm(y)) == x;
+ bool isInsertReversible1
+ (ItvMapTV& x, ItvMapTV& y, ItvMapTV& y_perm, ItvMapTV& y_permJoin,
+ ItvMapTV& x_plus_y, ItvMapTV& x2);
+ bool testInsertReversibility1(int nTries, char* errFile);
+
+ void debugInsertReversibility1(const ItvMapTV& x, const ItvMapTV& y, const ItvMapTV y_perm);
+
+ //LAW: x + join(perm(y)) - y == x;
+ bool isInsertReversible2
+ (ItvMapTV& x, ItvMapTV& y, ItvMapTV& y_perm, ItvMapTV& y_permJoin,
+ ItvMapTV& x_plus_y_pj, ItvMapTV& x2);
+ bool testInsertReversibility2(int nTries, char* errFile);
+
+ void debugInsertReversibility2(const ItvMapTV& x, const ItvMapTV& y, const ItvMapTV y_perm);
+
+ //LAW: x -~ y == x * (dom(x) - y)
+ // operator -~ steht fuer erase
+ // x.erase(y) hat das gleiche Ergebnis wie der Schnitt von x mit x.domain() - y
+ bool hasErasureAsIntersectionComputability(ItvMapTV& x, interval_set_type& y,
+ interval_set_type& xDom_minus_y, ItvMapTV& x_resid, ItvMapTV& x_sect);
+
+ bool testErasureAsIntersectionComputability(int nTries, char* errFile);
+
+private:
+ MapGentorT<ItvMapTV> m_ContainerGentor;
+};
+
+
+// ----------------------------------------------------------------------------
+// LAW: InsertionIndependency<ItvMapTV>
+// LAW: x == perm(x)
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::valueIsInsertionIndependent(ItvMapTV& y, ItvMapTV& y_perm)
+{
+ ItvMapTV x, x_perm;
+ m_ContainerGentor.some(x);
+ m_ContainerGentor.last_permuted(x_perm);
+
+ if(! x.isEqual(x_perm) ) {
+ y = x; y_perm = x_perm;
+ return false;
+ }
+ else return true;
+}
+
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testInsertionIndependence(int nTries)
+{
+ bool correct=true;
+ ItvMapTV y, y_perm;
+ ItvMapTV min_y, min_y_perm;
+
+ for(int i=0; i<nTries; i++)
+ if(!valueIsInsertionIndependent(y, y_perm))
+ {
+ if(true==correct) { min_y = y; min_y_perm = y_perm; correct=false; }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_perm = y_perm;
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertionIndependence violated" << std::endl;
+ }
+
+ return correct;
+}
+
+
+// ----------------------------------------------------------------------------
+// LAW: JoinIndependency<ItvMapTV>
+// LAW: x == join(x)
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::valueIsJoinIndependent(ItvMapTV& y, ItvMapTV& y_join)
+{
+ ItvMapTV x, x_perm, x_join;
+ m_ContainerGentor.some(x);
+ x_join = x;
+ join(x_join);
+
+ if(! x.isEqual(x_join) ) { y = x; y_join = x_join; return false; }
+ else return true;
+}
+
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testJoinIndependence(int nTries)
+{
+ bool correct=true;
+ ItvMapTV y, y_join;
+ ItvMapTV min_y, min_y_join;
+
+ for(int i=0; i<nTries; i++)
+ if(!valueIsJoinIndependent(y, y_join))
+ {
+ if(true==correct) {
+ min_y = y; min_y_join = y_join;
+ correct=false;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_join = y_join;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ }
+
+ if(!correct) {
+ std::cout << "JoinIndependence violated ---------------------------" << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_join:" << min_y_join << std::endl;
+ }
+
+ return correct;
+}
+
+// ----------------------------------------------------------------------------
+// LAW: InsertAndJoinIndependency<IntSetTV>
+// LAW: x == join(perm(x))
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::valueIsInsertAndJoinIndependent(ItvMapTV& y, ItvMapTV& y_perm, ItvMapTV& y_permJoin)
+{
+ ItvMapTV x, x_perm, x_permJoin;
+ m_ContainerGentor.some(x);
+ m_ContainerGentor.last_permuted(x_perm);
+ x_permJoin = x_perm;
+ join(x_permJoin);
+
+ if(! x.isEqual(x_permJoin) ) {
+ y = x; y_perm = x_perm; y_permJoin = x_permJoin;
+ return false;
+ }
+ else return true;
+}
+
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testInsertAndJoinIndependence(int nTries)
+{
+ bool correct=true;
+ ItvMapTV y, y_perm, y_permJoin;
+ ItvMapTV min_y, min_y_perm, min_y_permJoin;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!valueIsInsertAndJoinIndependent(y, y_perm, y_permJoin))
+ {
+ if(true==correct) {
+ min_y = y; min_y_perm = y_perm; min_y_permJoin = y_permJoin;
+ correct=false;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_perm = y_perm; min_y_permJoin = y_permJoin;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertAndJoinIndependence violated ---------------------------" << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pjoin:" << min_y_permJoin << std::endl;
+ }
+
+ return correct;
+}
+
+
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::isInsertReversible1
+(
+ ItvMapTV& x, ItvMapTV& y,
+ ItvMapTV& y_perm, ItvMapTV& y_permJoin,
+ ItvMapTV& x_plus_y, ItvMapTV& x2
+)
+{
+ // x + y - join(perm(y)) == x;
+
+ ItvMapTV xx, yy, yy_perm, yy_permJoin, xx_plus_yy, xx2;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(yy);
+ m_ContainerGentor.last_permuted(yy_perm);
+ yy_permJoin = yy_perm;
+ join(yy_permJoin);
+
+ xx2 = xx;
+ xx2 += yy;
+ xx_plus_yy = xx2;
+ xx2 -= yy_permJoin;
+
+ if(! xx.isEqual(xx2) ) {
+ x = xx; y = yy; y_perm = yy_perm; y_permJoin = yy_permJoin;
+ x_plus_y = xx_plus_yy; x2 = xx2 ;
+ return false;
+ }
+ else return true;
+}
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testInsertReversibility1(int nTries, char* errFile)
+{
+ // x + join(perm(y)) - y == x;
+
+ bool correct=true;
+ ItvMapTV x, y, y_perm, y_permJoin, x_plus_y, x2;
+ ItvMapTV min_x, min_y, min_y_perm, min_y_permJoin, min_x_plus_y, min_x2;
+ int caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!isInsertReversible1(x, y, y_perm, y_permJoin, x_plus_y, x2))
+ {
+ caseSize = interval_count(x) + interval_count(y);
+ if(true==correct) {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y; min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << interval_count(x) << " y.sz=" << interval_count(y)
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y; min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << interval_count(x) << " y.sz=" << interval_count(y)
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertReversibility1: x + y - join(perm(y)) == x =: x2 violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pJnt :" << min_y_permJoin << std::endl;
+ std::cout << "x+y :" << min_x_plus_y << std::endl;
+ std::cout << "x2 :" << min_x2 << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvMapTV>::apply(min_x).c_str());
+ fprintf(fp, "y: %s\n", to_string<ItvMapTV>::apply(min_y).c_str());
+ fprintf(fp, "y_perm: %s\n", to_string<ItvMapTV>::apply(min_y_perm).c_str());
+ fprintf(fp, "y_pJnt: %s\n", to_string<ItvMapTV>::apply(min_y_permJoin).c_str());
+ fprintf(fp, "x+y: %s\n", to_string<ItvMapTV>::apply(min_x_plus_y).c_str());
+ fprintf(fp, "x2: %s\n", to_string<ItvMapTV>::apply(min_x2).c_str());
+
+ min_x.isEqual(min_x2);
+ debugInsertReversibility1(min_x, min_y, min_y_perm);
+ }
+ else
+ {
+ std::cout << "InsertReversibility1("<<nTries<<") OK "
+ << " x + y - join(perm(y)) == x =: x2" << std::endl;
+ }
+
+ return correct;
+}
+
+
+template <class ItvMapTV>
+void ItvMapTesterT<ItvMapTV>::debugInsertReversibility1
+ (const ItvMapTV& x, const ItvMapTV& y, const ItvMapTV y_perm)
+{
+ ItvMapTV x2 = x, y_pj = y_perm;
+ join(y_pj);
+
+ x2 += y_pj;
+ x2 -= y;
+}
+
+
+
+//-----------------------------------------------------------------------------
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::isInsertReversible2
+(
+ ItvMapTV& x, ItvMapTV& y,
+ ItvMapTV& y_perm, ItvMapTV& y_permJoin,
+ ItvMapTV& x_plus_y_pj, ItvMapTV& x2
+)
+{
+ // x + join(perm(y)) - y == x;
+
+ ItvMapTV xx, yy, yy_perm, yy_permJoin, xx_plus_yy_pj, xx2;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(yy);
+ m_ContainerGentor.last_permuted(yy_perm);
+ yy_permJoin = yy_perm;
+ join(yy_permJoin);
+
+ xx2 = xx;
+ xx2 += yy_permJoin;
+ xx_plus_yy_pj = xx2;
+ xx2 -= yy;
+ join(xx2);
+
+ if(! is_element_equal(xx, xx2) ) {
+ x = xx; y = yy; y_perm = yy_perm; y_permJoin = yy_permJoin;
+ x_plus_y_pj = xx_plus_yy_pj; x2 = xx2 ;
+ return false;
+ }
+ else return true;
+}
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testInsertReversibility2(int nTries, char* errFile)
+{
+ // x + join(perm(y)) - y == x;
+
+ bool correct=true;
+ ItvMapTV x, y, y_perm, y_permJoin, x_plus_y_pj, x2;
+ ItvMapTV min_x, min_y, min_y_perm, min_y_permJoin, min_x_plus_y_pj, min_x2;
+ size_t caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++) {
+ if(!isInsertReversible2(x, y, y_perm, y_permJoin, x_plus_y_pj, x2))
+ {
+ caseSize = interval_count(x) + interval_count(y);
+ if(true==correct) {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y_pj = x_plus_y_pj;
+ min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y_pj = x_plus_y_pj; min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertReversibility2: (x + join(perm(y)) - y).join() == x =: x2 violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pJnt :" << min_y_permJoin << std::endl;
+ std::cout << "x+y_pJnt:" << min_x_plus_y_pj << std::endl;
+ std::cout << "x2 :" << min_x2 << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvMapTV>::apply(min_x).c_str());
+ fprintf(fp, "y: %s\n", to_string<ItvMapTV>::apply(min_y).c_str());
+ fprintf(fp, "y_perm: %s\n", to_string<ItvMapTV>::apply(min_y_perm).c_str());
+ fprintf(fp, "y_pJnt: %s\n", to_string<ItvMapTV>::apply(min_y_permJoin).c_str());
+ fprintf(fp, "x+y: %s\n", to_string<ItvMapTV>::apply(min_x_plus_y_pj).c_str());
+ fprintf(fp, "x2: %s\n", to_string<ItvMapTV>::apply(min_x2).c_str());
+
+ debugInsertReversibility2(min_x, min_y, min_y_perm);
+ }
+ else
+ {
+ std::cout << "InsertReversibility2("<<nTries<<") OK "
+ << " x + join(perm(y)) - y == x =: x2" << std::endl;
+ }
+
+ return correct;
+}
+
+
+template <class ItvMapTV>
+void ItvMapTesterT<ItvMapTV>::debugInsertReversibility2(const ItvMapTV& x, const ItvMapTV& y, const ItvMapTV y_perm)
+{
+ ItvMapTV x2 = x, y_pj = y_perm;
+ join(y_pj);
+
+ x2 += y_pj;
+ x2 -= y;
+}
+
+
+
+//LAW: x -~ y == x * (dom(x) - y)
+// operator -~ steht fuer erase
+// x.erase(y) hat das gleiche Ergebnis wie der Schnitt von x mit x.domain() - y
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::hasErasureAsIntersectionComputability(ItvMapTV& x, interval_set_type& y,
+ interval_set_type& xDom_minus_y, ItvMapTV& x_resid, ItvMapTV& x_sect)
+{
+ ItvMapTV xx, erasure, rhs;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(erasure);
+
+ interval_set_type erasureDomain;
+ domain(erasureDomain, erasure);
+
+ ItvMapTV xxResid = xx;
+ xxResid -= erasureDomain;
+
+ interval_set_type xxDomain;
+ domain(xxDomain, xx);
+
+ interval_set_type erasureComplement;
+ erasureComplement = xxDomain;
+ erasureComplement -= erasureDomain;
+
+ ItvMapTV xxSect;
+ add_intersection(xxSect, xx, erasureComplement);
+
+ if(! is_element_equal(xxResid, xxSect) ) {
+ x = xx; y = erasureDomain; xDom_minus_y = erasureComplement;
+ x_resid = xxResid; x_sect = xxSect;
+ return false;
+ }
+ else return true;
+}
+
+
+
+template <class ItvMapTV>
+bool ItvMapTesterT<ItvMapTV>::testErasureAsIntersectionComputability(int nTries, char* errFile)
+{
+ bool correct=true;
+ ItvMapTV x, x_resid, x_section;
+ interval_set_type y, xDom_minus_y;
+
+ ItvMapTV min_x, min_x_resid, min_x_section;
+ interval_set_type min_y, min_xDom_minus_y;
+
+ int caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++) {
+ if(!hasErasureAsIntersectionComputability(x, y, xDom_minus_y, x_resid, x_section))
+ {
+ caseSize = static_cast<int>(interval_count(x) + interval_count(y));
+ if(true==correct) {
+ min_x = x; min_y = y;
+ min_xDom_minus_y = xDom_minus_y;
+ min_x_resid = x_resid; min_x_section = x_section;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y;
+ min_xDom_minus_y = xDom_minus_y;
+ min_x_resid = x_resid; min_x_section = x_section;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "ErasureAsIntersectionComputability: x -~ y == x * (dom(x)-y) violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvMapTV>::apply(min_x).c_str());
+ fprintf(fp, "y: %s\n", to_string<interval_set_type>::apply(min_y).c_str());
+
+ //debugInsertReversibility2(min_x, min_y, min_y_perm);
+ }
+ else
+ {
+ std::cout << "ErasureAsIntersectionComputability("<<nTries<<") OK "
+ << " x -~ y == x * (dom(x)-y)" << std::endl;
+ }
+
+ return correct;
+}
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/libs/icl_xt/test/itvsettester.h
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/itvsettester.h 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,605 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
++------------------------------------------------------------------------------+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
++-----------------------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+class ItvSetTesterT
+--------------------------------------------------------------------*/
+#ifndef __ITVSETTESTER_H_JOFA_990230__
+#define __ITVSETTESTER_H_JOFA_990230__
+
+#include <boost/icl_xt/setgentor.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class ItvSetTV>
+class ItvSetTesterT
+{
+public:
+ typedef typename ItvSetTV::value_type value_type;
+ typedef typename ItvSetTV::domain_type domain_type;
+ typedef ItvGentorT<domain_type> domain_generator_type;
+
+ void set_domain_generator(domain_generator_type* gentor)
+ { m_ContainerGentor.setDomainGentor(gentor); }
+
+ //void setDomainRange(domain_type lwb, domain_type upb, domain_type itvLen)
+ //{ m_DomainGentor.setValueRange(lwb,upb); m_DomainGentor.setMaxIntervalLength(itvLen); }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_ContainerGentor.setRangeOfSampleSize(lwb,upb); }
+
+ //void init() {
+ // m_ContainerGentor.setDomainGentor(&m_DomainGentor);
+ //}
+
+ // The value of a Set is independent of the insertion sequence
+ bool valueIsInsertionIndependent(ItvSetTV& y, ItvSetTV& y_perm);
+ bool testInsertionIndependence(int nTries);
+
+ // The value of a Map is invariant wrt. join-normalization
+ bool valueIsJoinIndependent(ItvSetTV& y, ItvSetTV& y_join);
+ bool testJoinIndependence(int nTries);
+
+ // The value of a Map is invariant wrt. join-normalization after insert-permutation
+ bool valueIsInsertAndJoinIndependent(ItvSetTV& y, ItvSetTV& y_perm, ItvSetTV& y_permJoin);
+ bool testInsertAndJoinIndependence(int nTries);
+
+ // x + y - join(perm(y)) == x - y;
+ bool isInsertReversible
+ (ItvSetTV& x, ItvSetTV& y, ItvSetTV& y_perm, ItvSetTV& y_permJoin,
+ ItvSetTV& x_plus_y, ItvSetTV& lhs, ItvSetTV& rhs);
+ bool testInsertReversibility(int nTries, char* errFile);
+
+ // x + y - join(perm(y)) == x;
+ bool isInsertReversible1
+ (ItvSetTV& x, ItvSetTV& y, ItvSetTV& y_perm, ItvSetTV& y_permJoin,
+ ItvSetTV& x_plus_y, ItvSetTV& x2);
+ bool testInsertReversibility1(int nTries, char* errFile);
+
+ void debugInsertReversibility1(const ItvSetTV& x, const ItvSetTV& y, const ItvSetTV y_perm);
+
+ /*
+ // x + join(perm(y)) - y == x;
+ bool isInsertReversible2
+ (ItvSetTV& x, ItvSetTV& y, ItvSetTV& y_perm, ItvSetTV& y_permJoin,
+ ItvSetTV& x_plus_y_pj, ItvSetTV& x2);
+ bool testInsertReversibility2(int nTries, char* errFile);
+
+ void debugInsertReversibility2(const ItvSetTV& x, const ItvSetTV& y, const ItvSetTV y_perm);
+ */
+
+ bool hasSymmetricDifference
+ ( ItvSetTV& x, ItvSetTV& y,
+ ItvSetTV& x_uni_y, ItvSetTV& x_sec_y,
+ ItvSetTV& x_sub_y, ItvSetTV& y_sub_x );
+
+ bool testSymmetricDifference(int nTries, char* errFile);
+
+
+private:
+ ItvGentorT<domain_type> m_DomainGentor;
+ SetGentorT<ItvSetTV> m_ContainerGentor;
+
+};
+
+
+// ----------------------------------------------------------------------------
+// LAW: InsertionIndependency<ItvSetTV>
+// LAW: x == perm(x)
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::valueIsInsertionIndependent(ItvSetTV& y, ItvSetTV& y_perm)
+{
+ ItvSetTV x, x_perm;
+ m_ContainerGentor.some(x);
+ m_ContainerGentor.last_permuted(x_perm);
+
+ if(!(x == x_perm) ) {
+ y = x; y_perm = x_perm;
+ return false;
+ }
+ else return true;
+}
+
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testInsertionIndependence(int nTries)
+{
+ bool correct=true;
+ ItvSetTV y, y_perm;
+ ItvSetTV min_y, min_y_perm;
+
+ for(int i=0; i<nTries; i++)
+ if(!valueIsInsertionIndependent(y, y_perm))
+ {
+ if(true==correct) { min_y = y; min_y_perm = y_perm; correct=false; }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_perm = y_perm;
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertionIndependence violated" << std::endl;
+ }
+
+ return correct;
+}
+
+
+// ----------------------------------------------------------------------------
+// LAW: JoinIndependency<ItvSetTV>
+// LAW: x == join(x)
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::valueIsJoinIndependent(ItvSetTV& y, ItvSetTV& y_join)
+{
+ ItvSetTV x, x_perm, x_join;
+ m_ContainerGentor.some(x);
+ x_join = x;
+ join(x_join);
+
+ if(!(x == x_join) ) { y = x; y_join = x_join; return false; }
+ else return true;
+}
+
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testJoinIndependence(int nTries)
+{
+ bool correct=true;
+ ItvSetTV y, y_join;
+ ItvSetTV min_y, min_y_join;
+
+ for(int i=0; i<nTries; i++)
+ if(!valueIsJoinIndependent(y, y_join))
+ {
+ if(true==correct) {
+ min_y = y; min_y_join = y_join;
+ correct=false;
+ std::cout << "y.sz=" << static_cast<unsigned int>(interval_count(y)) << " try=" << i << std::endl;
+ }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_join = y_join;
+ std::cout << "y.sz=" << static_cast<unsigned int>(interval_count(y)) << " try=" << i << std::endl;
+ }
+ }
+
+ if(!correct) {
+ std::cout << "JoinIndependence violated ---------------------------" << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_join:" << min_y_join << std::endl;
+ }
+
+ return correct;
+}
+
+// ----------------------------------------------------------------------------
+// LAW: InsertAndJoinIndependency<IntSetTV>
+// LAW: x == join(perm(x))
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::valueIsInsertAndJoinIndependent(ItvSetTV& y, ItvSetTV& y_perm, ItvSetTV& y_permJoin)
+{
+ ItvSetTV x, x_perm, x_permJoin;
+ m_ContainerGentor.some(x);
+ m_ContainerGentor.last_permuted(x_perm);
+ x_permJoin = x_perm;
+ join(x_permJoin);
+
+ if(! x.isEqual(x_permJoin) ) {
+ y = x; y_perm = x_perm; y_permJoin = x_permJoin;
+ return false;
+ }
+ else return true;
+}
+
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testInsertAndJoinIndependence(int nTries)
+{
+ bool correct=true;
+ ItvSetTV y, y_perm, y_permJoin;
+ ItvSetTV min_y, min_y_perm, min_y_permJoin;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!valueIsInsertAndJoinIndependent(y, y_perm, y_permJoin))
+ {
+ if(true==correct) {
+ min_y = y; min_y_perm = y_perm; min_y_permJoin = y_permJoin;
+ correct=false;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ else if( interval_count(y) < interval_count(min_y) ) {
+ min_y = y; min_y_perm = y_perm; min_y_permJoin = y_permJoin;
+ std::cout << "y.sz=" << interval_count(y) << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertAndJoinIndependence violated ---------------------------" << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pjoin:" << min_y_permJoin << std::endl;
+ }
+
+ return correct;
+}
+
+
+
+
+// ----------------------------------------------------------------------------
+// LAW: InsertReversability<ItvSetTV>
+// LAW: x + y - perm(join(y)) = x - y
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::isInsertReversible
+(
+ ItvSetTV& x, ItvSetTV& y,
+ ItvSetTV& y_perm, ItvSetTV& y_permJoin,
+ ItvSetTV& x_plus_y, ItvSetTV& ls, ItvSetTV& rs
+)
+{
+ ItvSetTV xx, yy, yy_perm, yy_permJoin, xx_plus_yy, lhs, rhs;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(yy);
+ m_ContainerGentor.last_permuted(yy_perm);
+ yy_permJoin = yy_perm;
+ join(yy_permJoin);
+
+ lhs = xx;
+ lhs += yy;
+ xx_plus_yy = lhs;
+ lhs -= yy_permJoin; // left hand side
+
+ rhs = xx;
+ rhs -= yy; // right hand side
+
+ if( !(lhs == rhs) ) {
+ x = xx; y = yy; y_perm = yy_perm; y_permJoin = yy_permJoin;
+ x_plus_y = xx_plus_yy; ls = lhs ; rs = rhs;
+ return false;
+ }
+ else return true;
+}
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testInsertReversibility(int nTries, char* errFile)
+{
+ bool correct=true;
+ ItvSetTV x, y, y_perm, y_permJoin, x_plus_y, lhs, rhs;
+ ItvSetTV min_x, min_y, min_y_perm, min_y_permJoin, min_x_plus_y, min_lhs, min_rhs;
+ int caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!isInsertReversible(x, y, y_perm, y_permJoin, x_plus_y, lhs, rhs))
+ {
+ caseSize = static_cast<unsigned int>(interval_count(x) + interval_count(y));
+ if(true==correct) {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y;
+ min_lhs = lhs; min_rhs = rhs;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y;
+ min_lhs = lhs; min_rhs = rhs;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertReversibility: x + y - join(perm(y)) == x - y violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pJnt :" << min_y_permJoin << std::endl;
+ std::cout << "x+y :" << min_x_plus_y << std::endl;
+ std::cout << "lhs :" << min_lhs << std::endl;
+ std::cout << "rhs :" << min_rhs << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ //fopen_s(&fp,errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvSetTV>::apply(min_x).c_str());
+ /*JODO
+ fprintf(fp, "y: %s\n", to_string<ItvSetTV>::apply(min_y).c_str());
+ fprintf(fp, "y_perm: %s\n", to_string<ItvSetTV>::apply(min_y_perm).c_str());
+ fprintf(fp, "y_pJnt: %s\n", to_string<ItvSetTV>::apply(min_y_permJoin).c_str());
+ fprintf(fp, "x+y: %s\n", to_string<ItvSetTV>::apply(min_x_plus_y).c_str());
+ fprintf(fp, "lhs: %s\n", to_string<ItvSetTV>::apply(min_lhs).c_str());
+ fprintf(fp, "rhs: %s\n", to_string<ItvSetTV>::apply(min_rhs).c_str());
+ */
+
+ // min_lhs.isEqual(min_rhs);
+ // debugInsertReversibility1(min_x, min_y, min_y_perm);
+ }
+ else
+ {
+ std::cout << "InsertReversibility("<<nTries<<") OK "
+ << " x + y - join(perm(y)) == x - y" << std::endl;
+ }
+
+ return correct;
+}
+
+
+
+
+// ----------------------------------------------------------------------------
+// Modify testconditions. x + y - perm(join(y)) != x !!
+// only y - perm(join(y)) = {} can be tested
+
+// LAW: InsertReversability<ItvSetTV>
+// LAW: y - perm(join(y)) = {}
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::isInsertReversible1
+(
+ ItvSetTV& x, ItvSetTV& y,
+ ItvSetTV& y_perm, ItvSetTV& y_permJoin,
+ ItvSetTV& x_plus_y, ItvSetTV& x2
+)
+{
+ // x + y - join(perm(y)) == x;
+
+ ItvSetTV xx, yy, yy_perm, yy_permJoin, xx_plus_yy, xx2;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(yy);
+ m_ContainerGentor.last_permuted(yy_perm);
+ yy_permJoin = yy_perm;
+ join(yy_permJoin);
+
+ xx2 = xx;
+ xx2 += yy;
+ xx_plus_yy = xx2;
+ xx2 -= yy_permJoin;
+
+ if(! xx.isEqual(xx2) ) {
+ x = xx; y = yy; y_perm = yy_perm; y_permJoin = yy_permJoin;
+ x_plus_y = xx_plus_yy; x2 = xx2 ;
+ return false;
+ }
+ else return true;
+}
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testInsertReversibility1(int nTries, char* errFile)
+{
+ // x + join(perm(y)) - y == x;
+
+ bool correct=true;
+ ItvSetTV x, y, y_perm, y_permJoin, x_plus_y, x2;
+ ItvSetTV min_x, min_y, min_y_perm, min_y_permJoin, min_x_plus_y, min_x2;
+ int caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!isInsertReversible1(x, y, y_perm, y_permJoin, x_plus_y, x2))
+ {
+ caseSize = interval_count(x) + interval_count(y);
+ if(true==correct) {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y; min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << interval_count(x) << " y.sz=" << interval_count(y)
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y; min_y_perm = y_perm;
+ min_y_permJoin = y_permJoin; min_x_plus_y = x_plus_y; min_x2 = x2;
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << interval_count(x) << " y.sz=" << interval_count(y)
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "InsertReversibility1: x + y - join(perm(y)) == x =: x2 violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+ std::cout << "y_perm :" << min_y_perm << std::endl;
+ std::cout << "y_pJnt :" << min_y_permJoin << std::endl;
+ std::cout << "x+y :" << min_x_plus_y << std::endl;
+ std::cout << "x2 :" << min_x2 << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvSetTV>::apply(min_x).c_str());
+ fprintf(fp, "y: %s\n", to_string<ItvSetTV>::apply(min_y).c_str());
+ fprintf(fp, "y_perm: %s\n", to_string<ItvSetTV>::apply(min_y_perm).c_str());
+ fprintf(fp, "y_pJnt: %s\n", to_string<ItvSetTV>::apply(min_y_permJoin).c_str());
+ fprintf(fp, "x+y: %s\n", to_string<ItvSetTV>::apply(min_x_plus_y).c_str());
+ fprintf(fp, "x2: %s\n", to_string<ItvSetTV>::apply(min_x2).c_str());
+
+ min_x.isEqual(min_x2);
+ debugInsertReversibility1(min_x, min_y, min_y_perm);
+ }
+ else
+ {
+ std::cout << "InsertReversibility1("<<nTries<<") OK "
+ << " x + y - join(perm(y)) == x =: x2" << std::endl;
+ }
+
+ return correct;
+}
+
+
+template <class ItvSetTV>
+void ItvSetTesterT<ItvSetTV>::debugInsertReversibility1
+ (const ItvSetTV& x, const ItvSetTV& y, const ItvSetTV y_perm)
+{
+ ItvSetTV x2 = x, y_pj = y_perm;
+ join(y_pj);
+
+ x2 += y_pj;
+ x2 -= y;
+}
+
+
+
+
+// ------------------------------------------------------------------------------
+// Test symmetric difference:
+
+// LAW: SymmetricDifference<IntSetTV>
+// LAW: (x + y) - (x * y) == (x - y) + (y - x)
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::hasSymmetricDifference
+(
+ ItvSetTV& x, ItvSetTV& y,
+ ItvSetTV& x_uni_y, ItvSetTV& x_sec_y,
+ ItvSetTV& x_sub_y, ItvSetTV& y_sub_x
+)
+{
+ // (x + y) - (x * y) == (x - y) + (y - x)
+
+ ItvSetTV xx, yy, xx_uni_yy, xx_sec_yy, xx_sub_yy, yy_sub_xx, lhs, rhs;
+
+ m_ContainerGentor.some(xx);
+ m_ContainerGentor.some(yy);
+
+ // lefthand side -------------------
+ xx_uni_yy = xx;
+ xx_uni_yy += yy;
+
+ xx_sec_yy = xx;
+ xx_sec_yy &= yy;
+
+ lhs = xx_uni_yy;
+ lhs -= xx_sec_yy;
+
+ // right hand side -----------------
+ xx_sub_yy = xx;
+ xx_sub_yy -= yy;
+
+ yy_sub_xx = yy;
+ yy_sub_xx -= xx;
+
+ rhs = xx_sub_yy;
+ rhs += yy_sub_xx;
+ // ---------------------------------
+
+ if(! (lhs==rhs) ) {
+ x = xx; y = yy; x_uni_y = xx_uni_yy; x_sec_y = xx_sec_yy;
+ x_sub_y = xx_sub_yy; y_sub_x = yy_sub_xx ;
+ return false;
+ }
+ else return true;
+}
+
+
+template <class ItvSetTV>
+bool ItvSetTesterT<ItvSetTV>::testSymmetricDifference(int nTries, char* errFile)
+{
+ // (x + y) - (x * y) == (x - y) + (y - x)
+
+ bool correct=true;
+ ItvSetTV x, y, x_uni_y, x_sec_y, x_sub_y, y_sub_x;
+ ItvSetTV min_x, min_y, min_x_uni_y, min_x_sec_y, min_x_sub_y, min_y_sub_x;
+
+ int caseSize, min_caseSize;
+
+ for(int i=0; i<nTries; i++)
+ {
+ if(!hasSymmetricDifference(x, y, x_uni_y, x_sec_y, x_sub_y, y_sub_x))
+ {
+ // collect results to find the smallest invalid case
+ caseSize = static_cast<unsigned int>(interval_count(x) + interval_count(y));
+ if(true==correct) {
+ min_x = x; min_y = y;
+ /*
+ more results
+ */
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ correct=false;
+ }
+ else if ( caseSize < min_caseSize )
+ {
+ min_x = x; min_y = y;
+ /*
+ more results
+ */
+ min_caseSize = caseSize;
+ std::cout << "x.sz=" << static_cast<unsigned int>(interval_count(x))
+ << " y.sz=" << static_cast<unsigned int>(interval_count(y))
+ << " try=" << i << std::endl;
+ }
+ }
+ }
+
+ if(!correct) {
+ std::cout << "SymmetricDifference: (x + y) - (x * y) == (x - y) + (y - x) violated --------" << std::endl;
+ std::cout << "x :" << min_x << std::endl;
+ std::cout << "y :" << min_y << std::endl;
+
+ FILE* fp;
+ fp = fopen(errFile,"w");
+ //fopen_s(&fp,errFile,"w");
+ fprintf(fp, "x: %s\n", to_string<ItvSetTV>::apply(min_x).c_str());
+ fprintf(fp, "y: %s\n", to_string<ItvSetTV>::apply(min_y).c_str());
+ }
+ else
+ {
+ std::cout << "SymmetricDifference("<<nTries<<") OK "
+ << " (x + y) - (x * y) == (x - y) + (y - x)" << std::endl;
+ }
+
+ return correct;
+}
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/libs/icl_xt/test/meta_functors_/meta_functors.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/meta_functors_/meta_functors.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,264 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <set>
+#include <vector>
+#include <boost/icl/functors.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/placeholders.hpp>
+
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/validate/type/nat.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::mpl::placeholders;
+using namespace boost::icl;
+
+template<class T>struct unary{
+ void speak(){ cout<<"unary"<<endl; }
+};
+
+template<class T, template<class>class U>
+struct unator1{
+ void speak(){U<T> obj; obj.speak();}
+};
+
+template<class T, class U>
+struct unator2{
+ void speak(){
+ mpl::apply<U,T>::type obj;
+ obj.speak();
+ }
+};
+
+//----------------------------------------
+template<class T1, class T2>struct binary{
+ void speak(){ cout<<"binary"<<endl; }
+};
+
+template<class T1, class T2,
+ template<class,class>class U>
+struct binator1{
+ void speak(){U<T1,T2> obj; obj.speak();}
+};
+
+template<class T1, class T2, class U>
+struct binator2{
+ void speak(){
+ mpl::apply2<U,T1,T2>::type obj;
+ obj.speak();
+ }
+};
+
+template<class T1, class Compare = std::less<T1> >
+class PairSet1
+{
+public:
+ typedef std::set
+ <
+ std::pair<T1,T1>,
+ typename mpl::apply<Compare, std::pair<T1,T1> >::type
+ >
+ ImplSetT;
+
+ typedef std::set
+ <
+ T1,
+ typename mpl::apply<Compare, T1>::type
+ >
+ ElemSetT;
+ //
+ PairSet1(): _set()
+ {cout << "PairSet1 constructed" << endl;}
+
+private:
+ ElemSetT _set;
+};
+
+typedef PairSet1<int, std::less<_> > PairSet1_int;
+
+template<class T,
+ template<class,class>class Vec,
+ class A = std::allocator<T> >
+class my_class
+{
+public:
+ typedef Vec<T,A> vec_type;
+ my_class():_vec(1,static_cast<T>(42))
+ { std::cout<<"Aswer: "<<_vec[0]<<endl; }
+private:
+ vec_type _vec;
+};
+
+void template_default_problem()
+{
+ my_class<double, std::vector> myInst;
+}
+
+/*
+template<class T,
+ class C = std::less<T>,
+ class A = std::allocator<T> >
+class interval_set
+{
+public:
+ typedef
+ set<interval<T>,
+ exclusive_less<interval<T> >
+ A::allocator_template<interval<T> >//error
+ > impl_type; // ^^^^ No language support
+
+ typedef set<T,C,A> atomized_type;
+
+ // Return the interval set as a set of elements
+ void atomize(atomized_type& atomized);
+}
+
+template<
+ class T,
+ class C = std::less<T>,
+ template<class>class A = std::allocator
+>
+class my_interval_set
+{
+public:
+ typedef
+ set<interval<T>,
+ exclusive_less<interval<T> >
+ A<interval<T> > //ok now
+ > impl_type;
+
+ typedef
+ set<T,C,
+ A<T> //Same allocator,
+ //different instances
+ > atomized_type;
+
+ // Return the interval set as a set of elements
+ void atomize(atomized_type& atomized);
+}
+*/
+
+class NoPlus
+{
+ //NoPlus(const NoPlus& val):_value(val._value){}
+public:
+ NoPlus():_value(0){}
+ NoPlus(int value):_value(value){}
+
+ bool operator < (const NoPlus& rhs)const
+ { return _value < rhs._value; }
+
+ bool operator == (const NoPlus& rhs)const
+ { return _value == rhs._value; }
+
+ int value()const { return _value; }
+
+ std::string as_string()const
+ { return icl::to_string<int>::apply(_value); }
+
+private:
+ int _value;
+};
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream,
+ const NoPlus& object)
+{
+ return stream << object.value();
+}
+
+void codomain_test()
+{
+ typedef split_interval_map<int,NoPlus> NoplumT;
+ NoplumT noplum;
+ //noplum.insert(mapping_pair<int,NoPlus>(47,NoPlus(11)));
+ //noplum.insert(mapping_pair<int,NoPlus>(42,NoPlus(14)));
+ //noplum.erase(mapping_pair<int,NoPlus>(42,NoPlus(14)));
+
+ noplum.insert(make_pair(interval<int>::right_open(2,6),NoPlus(1)));
+ noplum.insert(make_pair(interval<int>::right_open(4,8),NoPlus(2)));
+
+ cout << noplum << endl;
+}
+
+
+void string_codomain_test()
+{
+ typedef interval_map<int,std::string> ConcaMapT;
+ ConcaMapT cat_map;
+ cat_map += make_pair(interval<int>::right_open(1,5),std::string("Hello"));
+ cat_map += make_pair(interval<int>::right_open(3,7),std::string(" World"));
+
+ cout << "cat_map: " << cat_map << endl;
+}
+
+void quantifier_intersect_test()
+{
+ typedef interval_map<int,int> QuantifierT;
+ QuantifierT sec_map;
+ sec_map += make_pair(interval<int>::right_open(1,5), 1);
+ sec_map &= make_pair(interval<int>::right_open(3,7), 1);
+ //sec_map &= QuantifierT(make_pair(interval<int>::right_open(3,7), 1));
+
+ cout << "sec_map: " << sec_map << endl;
+}
+
+void quantifier_subtract_test()
+{
+ typedef interval_map<int,cnat> QuantifierT;
+ QuantifierT sec_map;
+ sec_map += QuantifierT::value_type(interval<int>::right_open(1,5), 1);
+ sec_map -= make_pair(interval<int>::right_open(3,7), static_cast<cnat>(2));
+ sec_map += make_pair(interval<int>::right_open(3,7), static_cast<cnat>(3));
+ //sec_map *= QuantifierT(make_pair(interval<int>::right_open(3,7), 1));
+
+ QuantifierT sec_map2;
+
+ if(sec_map != sec_map2)
+ cout << "geht doch\n";
+
+
+ cout << "sec_map: " << sec_map << endl;
+}
+
+void misc_test()
+{
+ typedef interval_map<int,int,partial_enricher> MapT;
+ MapT m;
+ m += MapT::value_type(interval<int>::right_open(1,3), 1);
+ cout << m << endl;
+ m -= MapT::value_type(interval<int>::right_open(1,3), 1);
+ cout << m << endl;
+}
+
+int main()
+{
+ cout << ">>Interval Container Library: Test meta_functors <<\n";
+ cout << "-------------------------------------------------------\n";
+
+ /*
+ unator1<int, unary> untor1; untor1.speak();
+ unator2<int, unary<_> > untor2; untor2.speak();
+ binator1<int, int, binary> bintor1; bintor1.speak();
+ binator2<int, int, binary<_1,_2> > bintor2; bintor2.speak();
+
+ PairSet1_int ps1;
+
+ template_default_problem();
+ */
+ //codomain_test();
+ //string_codomain_test();
+ //quantifier_subtract_test();
+ misc_test();
+ return 0;
+}
+

Added: sandbox/icl/libs/icl_xt/test/meta_functors_/vc9_meta_functors.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/icl_xt/test/meta_functors_/vc9_meta_functors.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_meta_functors"
+ ProjectGUID="{EF64A2C7-DE78-46C2-953F-C4685A5D2A98}"
+ RootNamespace="meta_functors"
+ 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"
+ 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="4"
+ 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"
+ 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="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\meta_functors.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\src\itl\interval.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_base_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_base_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\interval_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\itvmaptester.h"
+ >
+ </File>
+ <File
+ RelativePath="..\itvsettester.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\split_interval_map.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\itl\split_interval_set.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,233 @@
+# (C) Copyright 2008-2009: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+project
+ : requirements
+ <toolset>msvc:<warnings>all # == /W4
+ <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+
+ #-------------------------------------------------------------------------
+ # LaBatea generates large obj files for some test programs e.g.
+ # test_map_order: For that we need flag /bigobj
+ #-------------------------------------------------------------------------
+ <toolset>msvc:<cxxflags>/bigobj # Via metaprogramming LaBatea generates bigobjs.
+ ;
+
+obj gentorprofile.obj : ../src/gentor/gentorprofile.cpp ;
+
+# 1.1 Small documented law test
+exe de_morgan
+ :
+ de_morgan_/de_morgan.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 2.19 msvc9 compilation time: 0:38
+exe labat_val_relations
+ :
+ labat_val_relations_/labat_val_relations.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 3.7 msvc9 compilation time: 1:01
+exe labat_set_copy_conformity
+ :
+ labat_set_copy_conformity_/labat_set_copy_conformity.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 4.6 msvc9 compilation time: 1:03
+exe labat_map_copy_conformity
+ :
+ labat_map_copy_conformity_/labat_map_copy_conformity.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 5.5 msvc9 compilation time: 1:05
+exe labat_itv_bitset
+ :
+ labat_itv_bitset_/labat_itv_bitset.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 6.4 msvc9 compilation time: 1:28
+exe labat_icl_set
+ :
+ labat_icl_set_/labat_icl_set.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 7.2 msvc9 compilation time: 1:35
+exe labat_collector
+ :
+ labat_collector_/labat_collector.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 8.19 msvc9 compilation time: 1:42
+exe labat_unsigned_quantifier
+ :
+ labat_unsigned_quantifier_/labat_unsigned_quantifier.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 9.2 msvc9 compilation time: 1:56
+exe labat_bit_collector
+ :
+ labat_bit_collector_/labat_bit_collector.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 10.9
+exe labat_set_order
+ :
+ labat_set_order_/labat_set_order.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 11.7
+exe labat_map_order
+ :
+ labat_map_order_/labat_map_order.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 12.3
+exe labat_icl_morphic
+ :
+ labat_icl_morphic_/labat_icl_morphic.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 13.10 msvc9 compilation time: 2:36
+exe labat_signed_quantifier
+ :
+ labat_signed_quantifier_/labat_signed_quantifier.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 14.12
+exe labat_sorted_assoc_set
+ :
+ labat_sorted_assoc_set_/labat_sorted_assoc_set.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+
+# 15.13
+exe labat_sorted_assoc_set_back
+ :
+ labat_sorted_assoc_set_back_/labat_sorted_assoc_set_back.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 16.14
+exe labat_sorted_assoc_map
+ :
+ labat_sorted_assoc_map_/labat_sorted_assoc_map.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+
+# 17.15
+exe labat_sorted_assoc_map_back
+ :
+ labat_sorted_assoc_map_back_/labat_sorted_assoc_map_back.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+# 18.16
+exe labat_sorted_assoc_bitset
+ :
+ labat_sorted_assoc_bitset_/labat_sorted_assoc_bitset.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+
+# 19.17
+exe labat_sorted_assoc_bitset_back
+ :
+ labat_sorted_assoc_bitset_back_/labat_sorted_assoc_bitset_back.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+

Added: sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,32 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/abelian_monoid_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+int main()
+{
+ abelian_monoid_driver model_tester;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ model_tester.validate();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_boostcon_abelian_monoids"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4733}"
+ RootNamespace="vc9_boostcon_abelian_monoids"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\boostcon_abelian_monoids_\boostcon_abelian_monoids.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\driver\icl_set_driver.hpp"
+ >
+ </File>
+ <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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/boostcon_law_validater_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/boostcon_law_validater_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,15 @@
+# (C) Copyright 2010: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+obj gentorprofile.obj : ../../src/gentor/gentorprofile.cpp ;
+
+exe boostcon_law_validater
+ :
+ boostcon_law_validater.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,46 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <boost/icl/ptime.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl_xt/list.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+using namespace boost::posix_time;
+
+int main()
+{
+ typedef InplaceCommutativity<icl::list<int> > TestLawT;
+ LawValidater<TestLawT> law_validator;
+
+ //-----------------------------------------------------------------------------
+ int test_count = 10000;
+ ptime start, stop;
+
+ GentorProfileSgl::it()->set_std_profile(8,1);
+ law_validator.set_trials_count(test_count);
+
+ cout << "Testing " << TestLawT().typeString() << endl
+ << "trials_count = " << test_count << endl
+ << "Start ...\n";
+ start = ptime(microsec_clock::local_time());
+ law_validator.run();
+ stop = ptime(microsec_clock::local_time());
+ cout << "Stop. Time elapsed: " << stop - start << endl;
+
+ if(law_validator.violation_count() == 0)
+ cout << "Law successfully validated\n";
+
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_boostcon_law_validater"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F473C}"
+ RootNamespace="vc9_boostcon_law_validater"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\boostcon_law_validater_\boostcon_law_validater.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/de_morgan_/de_morgan.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/de_morgan_/de_morgan.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,263 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+
+/** Example de_morgan.cpp \file de_morgan.cpp
+\brief Demonstrates law based testing for De Morgan's law on interval_sets.
+
+Example de_morgan.cpp demonstrates some tests of
+<a href="http://en.wikipedia.org/wiki/De_Morgan%27s_laws">
+De Morgan's law</a> on interval_set.
+This law is selected, because we can show some interesting semantic
+distinctions that reveal themselves in different instantiations of the law.
+
+We do not use De Morgan's laws in it's original form
+\code
+~(b + c) == ~b & ~c ;
+~(b & c) == ~b + ~c ;
+// +: union &: intersection ~: complement
+\endcode
+
+but in an incarnation that uses the set difference or <b>relative complement</b>
+instead of the unary complement operator.
+
+\code
+a - (b + c) == (a - b) & (a - c) ;
+a - (b & c) == (a - b) + (a - c) ;
+// +: union &: intersection -: relative complement
+\endcode
+
+As you can see there are two variants for the law depending on the placement
+of the operators + and &. So we can define the operations +, & and also the
+equality operation == as parameters of the law.
+
+\code
+// Shorthand pseudocode notation for a Law template
+RelativeDeMorgan<S,o,$,=v= >: S a,b,c; a - (b o c) =v= (a - b) $ (a - c) ;
+// o : First operator, $ : Second operator, =v= : An equality relation
+\endcode
+
+In this example, we show how to test De Morgan's law for different kinds
+of interval_sets. Some laws will have violations because they do not hold.
+We will then use the law template with a different equality operation
+to achive a valid form of the law.
+
+\include de_morgan_/de_morgan.cpp
+
+The output of this example program informs about sucessful law validations
+or validation failure. In case of failure the program presents the simplest of
+all the violation that have been detected. So the first validation of
+De Morgan's law is reported here:
+
+\code
+===== validater 1 ====================================
+Validation of DeMorgan<itv_set<int>,&=,+=,==>. Start
+Stop. Time elapsed: 00:00:00.193000
+Law successfully validated
+\endcode
+
+For pragmatic reasons we use abbreviations so
+<tt>DeMorgan<itv_set<int>,&=,+=,==></tt> stands for
+<tt>InplaceDeMorgan<interval_set<int>,&=,+=,==></tt>
+
+For the 1000 test cases no violations of the law were found.
+
+Validater 2 uses the same law and operations on a different
+type \c split_interval_set (abbreviated \c sp_itv_set). Here LaBatea
+found 379 violations in 1000 generated test cases.
+
+\code
+===== validater 2 ====================================
+Validation of DeMorgan<sp_itv_set<int>,&=,+=,==>. Start
+379 violations
+\endcode
+
+The program informs about the type of law and it's
+formula. The tuple of input variables
+<tt>(a,b,c) = ({[0,7)}, {[3,4)}, {})</tt>
+and the output variables. In our case the left hand side
+and the right hand side of the equation.
+<tt>(lhs,rhs) = ({[0,7)}, {[0,3)[3,4)[4,7)})</tt>
+
+\code
+Violation of: DeMorgan<sp_itv_set<int>,&=,+=,==>
+a - (b o c) == (a - b) $ (a - c) 'inplace'
+({[0,7)}, {[3,4)}, {})
+({[0,7)}, {[0,3)[3,4)[4,7)})
+\endcode
+
+This is the minimal report that is always given by LaBatea
+for detected law violations. Next it enters a function
+called <tt>debug_holds</tt> which is the debug version of a
+boolean function \c holds(). Function <tt>debug_holds</tt>
+can be coded in a way that supports the debugging of
+functions called by the law and provides readable output
+for law violations which is done here:
+
+\code
+--- function debug_holds -----------------------------
+ a = {[0,7)}
+ b = {[3,4)}
+ c = {}
+lhs:
+ (b o c) = {}
+a - (b o c) = {[0,7)}
+rhs:
+ a - b = {[0,3)[4,7)}
+ a - c = {[0,7)}
+(a-b)$(a-c) = {[0,3)[3,4)[4,7)}
+------------------------------------------------------
+Stop. Time elapsed: 00:00:00.323000
+\endcode
+
+You can see from the output that the left and the right hand side of the
+laws evaluation show the same elements but these elements are partitioned
+in different segmentations. So the lexicographical equality on segments
+which is computed by \c operator== evaluates to false.
+
+Finally we use the law with the equality relation \c element_equal,
+that checks the equality of elements but abstracts from the segmentation.
+Note that \c element_equal is represented by a single \c '=' in the output.
+
+\code
+===== validater 3 ====================================
+Validation of DeMorgan<sp_itv_set<int>,&=,+=,=>. Start
+Stop. Time elapsed: 00:00:00.205000
+Law successfully validated
+\endcode
+
+*/
+
+#include <iostream>
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+using namespace boost::posix_time;
+
+
+template<class LawT, template<typename>class Generator>
+void test_law(LawValidater<LawT, Generator>& validater)
+{
+ // You can set parameters for the generator that generates test data.
+ // set_std_profile allows to set size parameter that determines the
+ // container size and the ranges of generated values.
+ int data_size = 8;
+ GentorProfileSgl::it()->set_std_profile(data_size);
+
+ // Here we set the number of law instances that we want
+ // to be tested.
+ int test_count = 1000;
+ validater.set_trials_count(test_count);
+
+ ptime start, stop;
+ cout << "Validation of " << LawT().typeString();
+ cout << ". Start\n";
+ start = ptime(microsec_clock::local_time());
+ validater.run();
+ stop = ptime(microsec_clock::local_time());
+ cout << "Stop. Time elapsed: " << stop - start << endl;
+
+ if(validater.violation_count() == 0)
+ cout << "Law successfully validated\n";
+}
+
+//------------------------------------------------------------------------------
+// Test single laws using this
+void test_LawValidater()
+{
+ // Here we instantiate the law InplaceDeMorgan for a test on
+ // interval_set<int>
+ // First operation : inplace_et implements intersection
+ // Second operation : inplace_plus implements union
+ // Equality relation: std_equal implements segmental equality (default)
+
+ LawValidater
+ <InplaceDeMorgan<interval_set<int>, inplace_et, inplace_plus > >
+ validater1;
+ cout << "===== validater 1 ====================================\n";
+ test_law(validater1);
+ // Ok the law was successfully validated.
+
+ // Next we check the same law for split_interval_sets
+ LawValidater
+ <InplaceDeMorgan<split_interval_set<int>, inplace_et, inplace_plus > >
+ validater2;
+ cout << "\n===== validater 2 ====================================\n";
+ test_law(validater2);
+ // The law does not hold for split_interval_sets: There were violations.
+
+ // Checking the smallest of all violations, that is presented by the
+ // validater in the output, we can see that the left and right hand
+ // side of the equation show interval sets of equal elements but with
+ // a different segmentation, a different sequence of intervals.
+
+
+ // Using element equality that abstracts from the segmentation ...
+ LawValidater
+ <InplaceDeMorgan<split_interval_set<int>, inplace_et, inplace_plus,
+ inplace_minus, element_equal> >
+ validater3;
+ cout << "\n===== validater 3 ====================================\n";
+ test_law(validater3);
+ // finally leads to an instantiation of the law that holds for
+ // split_interval_set.
+}
+
+int main()
+{
+ cout << ">> A Law Based Test Atomaton (LaBatea): Sample de_morgan.cpp <<\n";
+ cout << "---------------------------------------------------------------\n";
+ test_LawValidater();
+ return 0;
+}
+
+// Program output:
+/*-------------------------------------------------------------
+>> A Law Based Test Atomaton (LaBatea): Sample de_morgan.cpp <<
+---------------------------------------------------------------
+===== validater 1 ====================================
+Validation of DeMorgan<itv_set<int>,&=,+=,==>. Start
+Stop. Time elapsed: 00:00:00.193000
+Law successfully validated
+
+===== validater 2 ====================================
+Validation of DeMorgan<sp_itv_set<int>,&=,+=,==>. Start
+379 violations
+Violation of: DeMorgan<sp_itv_set<int>,&=,+=,==>
+a - (b o c) == (a - b) $ (a - c) 'inplace'
+({[0,7)}, {[3,4)}, {})
+({[0,7)}, {[0,3)[3,4)[4,7)})
+--- function debug_holds -----------------------------
+ a = {[0,7)}
+ b = {[3,4)}
+ c = {}
+lhs:
+ (b o c) = {}
+a - (b o c) = {[0,7)}
+rhs:
+ a - b = {[0,3)[4,7)}
+ a - c = {[0,7)}
+(a-b)$(a-c) = {[0,3)[3,4)[4,7)}
+------------------------------------------------------
+Stop. Time elapsed: 00:00:00.323000
+
+===== validater 3 ====================================
+Validation of DeMorgan<sp_itv_set<int>,&=,+=,=>. Start
+Stop. Time elapsed: 00:00:00.205000
+Law successfully validated
+-------------------------------------------------------------*/
+

Added: sandbox/icl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_de_morgan"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4740}"
+ RootNamespace="vc9_de_morgan"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\de_morgan_\de_morgan.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_bit_collector_/labat_bit_collector.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_bit_collector_/labat_bit_collector.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/bit_collector_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_bit_collector_driver()
+{
+ bit_collector_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(10,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_bit_collector_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_bit_collector_/vc9_labat_bit_collector.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_bit_collector_/vc9_labat_bit_collector.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_bit_collector"
+ ProjectGUID="{9EF72937-0585-487D-B887-5359BFA569E9}"
+ RootNamespace="vc9_labat_bit_collector"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_bit_collector_\labat_bit_collector.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_collector_/labat_collector.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_collector_/labat_collector.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/collector_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_collector_driver()
+{
+ collector_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(6,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_collector_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_collector_/vc9_labat_collector.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_collector_/vc9_labat_collector.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_collector"
+ ProjectGUID="{9EF72937-0585-487D-B887-5359BFA569E8}"
+ RootNamespace="vc9_labat_collector"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_collector_\labat_collector.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\driver\collector_driver.hpp"
+ >
+ </File>
+ <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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_icl_morphic_/labat_icl_morphic.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_icl_morphic_/labat_icl_morphic.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/icl_morphic_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_icl_morphic_driver()
+{
+ icl_morphic_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_icl_morphic_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_icl_morphic_/vc9_labat_icl_morphic.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_icl_morphic_/vc9_labat_icl_morphic.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_icl_morphic"
+ ProjectGUID="{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}"
+ RootNamespace="vc9_labat_icl_morphic"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_icl_morphic_\labat_icl_morphic.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_icl_set_/labat_icl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_icl_set_/labat_icl_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/icl_set_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_icl_set_driver()
+{
+ icl_set_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_icl_set_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_icl_set_/vc9_labat_icl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_icl_set_/vc9_labat_icl_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_icl_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4723}"
+ RootNamespace="vc9_labat_icl_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_icl_set_\labat_icl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\driver\icl_set_driver.hpp"
+ >
+ </File>
+ <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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_itv_bitset_/labat_itv_bitset.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_itv_bitset_/labat_itv_bitset.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/interval_bitset_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_icl_set_driver()
+{
+ interval_bitset_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(100,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_icl_set_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_itv_bitset_/vc9_labat_itv_bitset.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_itv_bitset_/vc9_labat_itv_bitset.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_itv_bitset"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F472B}"
+ RootNamespace="vc9_labat_itv_bitset"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_itv_bitset_\labat_itv_bitset.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_map_copy_conformity_/labat_map_copy_conformity.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_map_copy_conformity_/labat_map_copy_conformity.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/map_copy_conformity_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_Validater()
+{
+ map_copy_conformity_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(8,1);//JODO
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_Validater();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_map_copy_conformity_/vc9_labat_map_copy_conformity.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_map_copy_conformity_/vc9_labat_map_copy_conformity.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_map_copy_conformity"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F472F}"
+ RootNamespace="vc9_labat_map_copy_conformity"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_map_copy_conformity_\labat_map_copy_conformity.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ClassDiagram1.cd"
+ >
+ </File>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_map_order_/labat_map_order.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_map_order_/labat_map_order.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,48 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/icl/map.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/setgentor.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/driver/map_order_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_itl_order_driver()
+{
+ map_order_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_itl_order_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_map_order_/vc9_labat_map_order.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_map_order_/vc9_labat_map_order.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_map_order"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4727}"
+ RootNamespace="vc9_labat_map_order"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_map_order_\labat_map_order.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_polygon_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,15 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+obj gentorprofile.obj : ../../src/gentor/gentorprofile.cpp ;
+
+exe labat_polygon
+ :
+ labat_polygon.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/validate/example/labat_polygon_/custom_polygon.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/custom_polygon.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,158 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef __custom_polygon_hpp_JOFA_090901__
+#define __custom_polygon_hpp_JOFA_090901__
+
+#include <boost/polygon/polygon.hpp>
+#include "point_gentor.hpp"
+#include "polygon_gentor.hpp"
+
+typedef boost::icl::point<int> CPoint;
+
+namespace boost{ namespace polygon{
+
+ template <>
+ struct geometry_concept<CPoint > { typedef point_concept type; };
+
+ template <>
+ struct point_traits<CPoint > {
+ typedef int coordinate_type;
+
+ static inline coordinate_type get(const CPoint & point,
+ orientation_2d orient) {
+ if(orient == HORIZONTAL)
+ return point.x;
+ return point.y;
+ }
+ };
+
+ template <>
+ struct point_mutable_traits<CPoint > {
+ static inline void set(CPoint & point, orientation_2d orient, int value) {
+ if(orient == HORIZONTAL)
+ point.x = value;
+ else
+ point.y = value;
+ }
+ static inline CPoint construct(int x_value, int y_value) {
+ CPoint retval;
+ retval.x = x_value;
+ retval.y = y_value;
+ return retval;
+ }
+ };
+}}
+
+//the CPolygon example
+typedef boost::icl::list<CPoint > CPolygon;
+
+//we need to specialize our polygon concept mapping in gtl
+namespace boost{ namespace polygon{
+ //first register CPolygon as a polygon_concept type
+ template <>
+ struct geometry_concept<CPolygon>{ typedef polygon_concept type; };
+
+ template <>
+ struct polygon_traits<CPolygon> {
+ typedef int coordinate_type;
+ typedef CPolygon::const_iterator iterator_type;
+ typedef CPoint point_type;
+
+ // Get the begin iterator
+ static inline iterator_type begin_points(const CPolygon& t) {
+ return t.begin();
+ }
+
+ // Get the end iterator
+ static inline iterator_type end_points(const CPolygon& t) {
+ return t.end();
+ }
+
+ // Get the number of sides of the polygon
+ static inline std::size_t size(const CPolygon& t) {
+ return t.size();
+ }
+
+ // Get the winding direction of the polygon
+ static inline winding_direction winding(const CPolygon& t) {
+ return unknown_winding;
+ }
+ };
+
+ template <>
+ struct polygon_mutable_traits<CPolygon> {
+ //expects stl style iterators
+ template <typename iT>
+ static inline CPolygon& set_points(CPolygon& t,
+ iT input_begin, iT input_end) {
+ t.clear();
+ while(input_begin != input_end) {
+ t.push_back(CPoint ());
+ gtl::assign(t.back(), *input_begin);
+ ++input_begin;
+ }
+ return t;
+ }
+
+ };
+}}
+
+//OK, finally we get to declare our own polygon set type
+typedef boost::icl::list<CPolygon> CPolygonSet;
+
+//deque isn't automatically a polygon set in the library
+//because it is a standard container there is a shortcut
+//for mapping it to polygon set concept, but I'll do it
+//the long way that you would use in the general case.
+namespace boost{ namespace polygon{
+ //first we register CPolygonSet as a polygon set
+ template <>
+ struct geometry_concept<CPolygonSet> { typedef polygon_set_concept type; };
+
+ //next we map to the concept through traits
+ template <>
+ struct polygon_set_traits<CPolygonSet> {
+ typedef int coordinate_type;
+ typedef CPolygonSet::const_iterator iterator_type;
+ typedef CPolygonSet operator_arg_type;
+
+ static inline iterator_type begin(const CPolygonSet& polygon_set) {
+ return polygon_set.begin();
+ }
+
+ static inline iterator_type end(const CPolygonSet& polygon_set) {
+ return polygon_set.end();
+ }
+
+ //don't worry about these, just return false from them
+ static inline bool clean(const CPolygonSet& polygon_set) { return false; }
+ static inline bool sorted(const CPolygonSet& polygon_set) { return false; }
+ };
+
+ template <>
+ struct polygon_set_mutable_traits<CPolygonSet> {
+ template <typename input_iterator_type>
+ static inline void set(CPolygonSet& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
+ polygon_set.clear();
+ //this is kind of cheesy. I am copying the unknown input geometry
+ //into my own polygon set and then calling get to populate the
+ //deque
+ polygon_set_data<int> ps;
+ ps.insert(input_begin, input_end);
+ ps.get(polygon_set);
+ //if you had your own odd-ball polygon set you would probably have
+ //to iterate through each polygon at this point and do something
+ //extra
+ }
+ };
+}}
+
+
+#endif

Added: sandbox/icl/libs/validate/example/labat_polygon_/labat_polygon.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/labat_polygon.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,181 @@
+/*-----------------------------------------------------------------------------+
+Copyright 2008 Intel Corporation
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#pragma warning( disable : 4800 ) //'int' : forcing value to bool 'true' or 'false' (performance warning)
+#pragma warning( disable : 4244 ) //'argument' : conversion from 'T1' to 'T2', possible loss of data
+
+#include <boost/polygon/polygon.hpp>
+#include <list>
+#include <time.h>
+#include <cassert>
+#include <deque>
+#include <iostream>
+
+
+#include <boost/icl/ptime.hpp>
+#include "polygon_laws.hpp"
+
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
+
+#include "point_gentor.hpp"
+#include "polygon_gentor.hpp"
+#include "custom_polygon.hpp"
+
+
+namespace gtl = boost::polygon;
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+using namespace boost::posix_time;
+
+using namespace boost::polygon::operators;
+
+//------------------------------------------------------------------------------
+//--- Parts from examplefiles to see if everything is basically right ---
+//------------------------------------------------------------------------------
+
+//once again we make our usage of the library generic
+//and parameterize it on the polygon set type
+template <typename PolygonSet>
+void test_polygon_set() {
+ using namespace gtl;
+ PolygonSet ps;
+ ps += rectangle_data<int>(0, 0, 10, 10);
+ PolygonSet ps2;
+ ps2 += rectangle_data<int>(5, 5, 15, 15);
+ PolygonSet ps3;
+ assign(ps3, ps * ps2);
+ PolygonSet ps4, pps;
+ pps += ps;
+
+ self_assignment_boolean_op<PolygonSet, PolygonSet, 0>(pps, ps);
+
+ ps4 += ps + ps2;
+ assert(area(ps4) == area(ps) + area(ps2) - area(ps3));
+ assert(equivalence((ps + ps2) - (ps * ps2), ps ^ ps2));
+ rectangle_data<int> rect;
+ assert(extents(rect, ps ^ ps2));
+ assert(area(rect) == 225);
+ assert(area(rect ^ (ps ^ ps2)) == area(rect) - area(ps ^ ps2));
+}
+
+
+
+int polygon_test() {
+ long long c1 = clock();
+ for(int i = 0; i < 100; ++i)
+ {
+ if(i%10==0)
+ std::cout << ".";
+ test_polygon_set<CPolygonSet>();
+ }
+ long long c2 = clock();
+ for(int i = 0; i < 100; ++i)
+ {
+ if(i%10==0)
+ std::cout << ".";
+ test_polygon_set<gtl::polygon_set_data<int> >();
+ }
+ long long c3 = clock();
+ long long diff1 = c2 - c1;
+ long long diff2 = c3 - c2;
+ if(diff1 > 0 && diff2)
+ std::cout << "library polygon_set_data is " << float(diff1)/float(diff2) << "X faster than custom polygon set deque of CPolygon" << std::endl;
+ else
+ std::cout << "operation was too fast" << std::endl;
+ return 0;
+}
+
+
+//------------------------------------------------------------------------------
+// This function tests the generator for polygon sets.
+void test_polyset_gen()
+{
+ typedef icl::list<point<int> > PolygonT;
+ typedef icl::list<PolygonT> PolygonSetT;
+
+ point_gentor<int>* pointgen = new point_gentor<int>;
+ pointgen->setRange(interval<int>::right_open(-99, 100));
+
+ PolygonT some_poly;
+ polygon_gentor<PolygonT>* polygen = new polygon_gentor<PolygonT>;
+ polygen->setDomainGentor(pointgen);
+ polygen->setRangeOfSampleSize(interval<int>::right_open(1, 5));
+
+ PolygonSetT some_polyset;
+ polygon_set_gentor<PolygonSetT> polysetgen;
+ polysetgen.setDomainGentor(polygen);
+ polysetgen.setRangeOfSampleSize(interval<int>::right_open(1, 3));
+
+ for(int idx=0; idx<10; idx++)
+ {
+ polysetgen.some(some_polyset);
+ cout << "[";
+ for(PolygonSetT::iterator its_ = some_polyset.begin();
+ its_ != some_polyset.end(); ++its_)
+ {
+ PolygonT& some_poly_ = *its_;
+ cout << "{";
+ for(PolygonT::iterator it_ = some_poly_.begin();
+ it_ != some_poly_.end(); ++it_)
+ cout << "(" << it_->x << "," << it_->y << ")";
+ cout << "}\n";
+ }
+ cout << "]\n";
+ }
+}
+
+
+//------------------------------------------------------------------------------
+// Test single laws using this
+void test_LawValidater()
+{
+
+ //typedef PolygonCommutativity
+ // < CPolygonSet > TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+
+ typedef PolygonSymmetricDifference
+ < CPolygonSet > TestLawT;
+ LawValidater<TestLawT, RandomGentor> test_law;
+
+ //-----------------------------------------------------------------------------
+ // Set the test automatons parameters:
+ // Size of polygon sets is in [0 .. |set| ]
+ // Size of polygon sets is in [0 .. |poly|]
+ // Coordinates in [min .. max)
+ // |set|,|poly|, min, max
+ //GentorProfileSgl::it()->set_polygon_profile(1, 3, 0, 10);
+ //int test_count = 10000;
+ // |set|,|poly|, min, max
+ GentorProfileSgl::it()->set_polygon_profile(2, 9, 0, 100);
+ int test_count = 10000;
+
+ ptime start, stop;
+ test_law.set_trials_count(test_count);
+
+ std::cout << "Start\n";
+ start = ptime(microsec_clock::local_time());
+ test_law.run();
+ stop = ptime(microsec_clock::local_time());
+ std::cout << "Stop. Time elapsed: " << stop - start << endl;
+}
+
+
+
+int main()
+{
+ //test_polyset_gen();
+ //polygon_test();
+ //test_polygon_set<CPolygonSet>();
+ test_LawValidater();
+}
+
+

Added: sandbox/icl/libs/validate/example/labat_polygon_/point_gentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/point_gentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,92 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+/* ------------------------------------------------------------------
+class point_gentor
+--------------------------------------------------------------------*/
+#ifndef __POINT_GENTOR_H_JOFA_000714__
+#define __POINT_GENTOR_H_JOFA_000714__
+
+#include <boost/icl/type_traits/to_string.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/seqgentor.hpp>
+
+namespace boost{namespace icl
+{
+
+//toy point.
+template<class DomainT>
+struct point
+{
+ std::string as_string()const
+ {
+ return std::string(
+ "(" + to_string<DomainT>::apply(x) + "," +
+ to_string<DomainT>::apply(y) + ")"
+ );
+ }
+
+ DomainT x;
+ DomainT y;
+};
+
+template<class DomainT>
+bool operator == (const point<DomainT>& left, const point<DomainT>& right)
+{
+ return left.x == right.x && left.y == right.y;
+}
+
+template<class CharType, class CharTraits, class DomainT>
+std::basic_ostream<CharType, CharTraits>& operator <<
+ (std::basic_ostream<CharType, CharTraits>& stream, const point<DomainT>& object)
+{
+ return stream << object.as_string();
+}
+
+template <class Type>
+struct type_to_string<icl::point<Type> >
+{
+ static std::string apply()
+ { return "point<"+ type_to_string<Type>::apply() +">"; }
+};
+
+template <class DomainT, class PointT = point<DomainT> >
+class point_gentor: public RandomGentorAT<PointT>
+{
+public:
+ virtual void some(PointT& x);
+
+ void setRange(const icl::interval<DomainT>& range)
+ { m_valueRange = range; }
+
+ void setValueRange(DomainT low, DomainT up)
+ { m_valueRange.set(low,up, icl::right_open); }
+
+ void setMaxIntervalLength(DomainT len) { m_maxIntervalLength=len; }
+ void setProbDerivation();
+
+private:
+ NumberGentorT<DomainT> m_DomainTGentor;
+
+ interval<DomainT> m_valueRange;
+ DomainT m_maxIntervalLength;
+};
+
+
+template <class DomainT, class PointT>
+void point_gentor<DomainT, PointT>::some(PointT& value)
+{
+ value.x = m_DomainTGentor(m_valueRange);
+ value.y = m_DomainTGentor(m_valueRange);
+};
+
+}} // namespace icl boost
+
+#endif
+
+

Added: sandbox/icl/libs/validate/example/labat_polygon_/polygon_gentor.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/polygon_gentor.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,223 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2009-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)
++-----------------------------------------------------------------------------*/
+#ifndef __polygon_gentor_H_JOFA_000724__
+#define __polygon_gentor_H_JOFA_000724__
+
+#include <boost/icl/type_traits/interval_type_default.hpp>
+//REV #include <boost/icl/interval.hpp>
+#include <boost/icl_xt/gentorit.hpp>
+#include <boost/icl_xt/list.hpp>
+
+namespace boost{namespace icl
+{
+
+template <class PolygonT>
+class polygon_gentor: public RandomGentorAT<PolygonT>
+{
+public:
+ typedef typename PolygonT::value_type ValueTypeTD;
+ typedef typename PolygonT::value_type DomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+
+ polygon_gentor(): p_domainGentor(NULL) {}
+ ~polygon_gentor() { delete p_domainGentor; }
+
+ virtual void some(PolygonT& x);
+ void last(PolygonT& x)const;
+ void last_permuted(PolygonT& x)const;
+
+ void setDomainGentor(RandomGentorAT<DomainTD>* gentor)
+ {
+ delete p_domainGentor;
+ p_domainGentor = gentor;
+ }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_sampleSizeRange = interval<int>::right_open(lwb,upb); }
+ void setRangeOfSampleSize(const interval<int>& szRange)
+ { BOOST_ASSERT(szRange.is(right_open)); m_sampleSizeRange = szRange; }
+
+ void setUnique(bool truth) { m_unique = truth; }
+
+private:
+ RandomGentorAT<DomainTD>* p_domainGentor;
+ interval<int> m_sampleSizeRange;
+ SampleTypeTD m_sample;
+ int m_sampleSize;
+ bool m_unique;
+};
+
+
+template <class PolygonT>
+void polygon_gentor<PolygonT>::some(PolygonT& x)
+{
+ NumberGentorT<int> intGentor;
+ x.clear();
+ m_sample.clear();
+ m_sampleSize = intGentor(m_sampleSizeRange);
+
+ DomainTD key, first;
+
+ if(m_sampleSize == 0)
+ return;
+
+ p_domainGentor->some(first);
+ x.push_back(first);
+
+ for(int i=1; i<m_sampleSize; i++)
+ {
+ p_domainGentor->some(key);
+
+ if(m_unique)
+ {
+ typename PolygonT::iterator pos_ = std::find(x.begin(), x.end(), key);
+ if(pos_ == x.end())
+ x.push_back(key);
+ }
+ else x.push_back(key);
+
+ m_sample.push_back(key);
+ }
+
+ if(m_sampleSize > 1 && !(*x.rbegin() == first))
+ x.push_back(first);
+}
+
+
+template <class PolygonT>
+void polygon_gentor<PolygonT>::last(PolygonT& x)const
+{
+ x.clear();
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample) x.insert(*it);
+}
+
+template <class PolygonT>
+void polygon_gentor<PolygonT>::last_permuted(PolygonT& x)const
+{
+ x.clear();
+
+ SampleTypeTD perm;
+
+ NumberGentorT<int> intGentor;
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor(2) ) perm.push_back(*it);
+ else perm.push_front(*it);
+ }
+
+ ICL_const_FORALL(typename SampleTypeTD, pit, perm) x.insert(*pit);
+}
+
+
+//------------------------------------------------------------------------------
+
+template <class PolygonSetT>
+class polygon_set_gentor: public RandomGentorAT<PolygonSetT>
+{
+public:
+ typedef typename PolygonSetT::value_type ValueTypeTD;
+ typedef typename PolygonSetT::value_type DomainTD;
+ typedef list<ValueTypeTD> SampleTypeTD;
+
+ polygon_set_gentor(): p_domainGentor(NULL) {}
+ ~polygon_set_gentor() { delete p_domainGentor; }
+
+ virtual void some(PolygonSetT& x);
+ void last(PolygonSetT& x)const;
+ void last_permuted(PolygonSetT& x)const;
+
+ void setDomainGentor(RandomGentorAT<DomainTD>* gentor)
+ {
+ delete p_domainGentor;
+ p_domainGentor = gentor;
+ }
+
+ void setRangeOfSampleSize(int lwb, int upb)
+ { m_sampleSizeRange = interval<int>::right_open(lwb,upb); }
+ void setRangeOfSampleSize(const interval<int>& szRange)
+ { BOOST_ASSERT(szRange.is(right_open)); m_sampleSizeRange = szRange; }
+
+ void setUnique(bool truth) { m_unique = truth; }
+
+private:
+ RandomGentorAT<DomainTD>* p_domainGentor;
+ interval<int> m_sampleSizeRange;
+ SampleTypeTD m_sample;
+ int m_sampleSize;
+ bool m_unique;
+};
+
+
+template <class PolygonSetT>
+void polygon_set_gentor<PolygonSetT>::some(PolygonSetT& x)
+{
+ NumberGentorT<int> intGentor;
+ x.clear();
+ m_sample.clear();
+ m_sampleSize = intGentor(m_sampleSizeRange);
+
+ DomainTD key, first;
+
+ if(m_sampleSize == 0)
+ return;
+
+ p_domainGentor->some(first);
+ x.push_back(first);
+
+ for(int i=1; i<m_sampleSize; i++)
+ {
+ DomainTD key;
+ p_domainGentor->some(key);
+
+ if(m_unique)
+ {
+ typename PolygonSetT::iterator pos_ = std::find(x.begin(), x.end(), key);
+ if(pos_ == x.end())
+ x.push_back(key);
+ }
+ else x.push_back(key);
+
+ m_sample.push_back(key);
+ }
+
+ if(m_sampleSize > 1)
+ x.push_back(first);
+}
+
+
+template <class PolygonSetT>
+void polygon_set_gentor<PolygonSetT>::last(PolygonSetT& x)const
+{
+ x.clear();
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample) x.insert(*it);
+}
+
+template <class PolygonSetT>
+void polygon_set_gentor<PolygonSetT>::last_permuted(PolygonSetT& x)const
+{
+ x.clear();
+
+ SampleTypeTD perm;
+
+ NumberGentorT<int> intGentor;
+ ICL_const_FORALL(typename SampleTypeTD, it, m_sample)
+ {
+ if( 0==intGentor(2) ) perm.push_back(*it);
+ else perm.push_front(*it);
+ }
+
+ ICL_const_FORALL(typename SampleTypeTD, pit, perm) x.insert(*pit);
+}
+
+
+
+}} // namespace boost icl
+
+#endif
+
+

Added: sandbox/icl/libs/validate/example/labat_polygon_/polygon_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/polygon_laws.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,167 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_POLYGON_LAWS_HPP_JOFA_090901
+#define BOOST_ICL_POLYGON_LAWS_HPP_JOFA_090901
+
+#define LAW_BASED_TEST_BOOST_POLYGON
+
+#include <boost/icl/type_traits/value_size.hpp>
+#include <boost/validate/laws/law.hpp>
+#include <boost/polygon/polygon.hpp>
+#include "custom_polygon.hpp"
+
+namespace boost{namespace icl
+{
+
+ template <typename Type>
+ class PolygonCommutativity
+ : public Law<PolygonCommutativity<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ // a o b == b o a computed as
+ //lsum=a; lsum+=b; rsum=b; rsum+=a => lsum==rsum
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, lhs_result)
+
+ public:
+ std::string name()const { return "Polygon Commutativity"; }
+ std::string formula()const { return "a o b == b o a 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool holds()
+ {
+ using namespace boost::polygon;
+ using namespace boost::polygon::operators;
+
+ Type value_a = this->template getInputValue<operand_a>();
+ Type value_b = this->template getInputValue<operand_b>();
+
+ Type left = value_a;
+ boost::polygon::operators::operator+=(left, value_b);
+ Type right = value_b;
+ boost::polygon::operators::operator+=(right, value_a);
+
+ this->template setOutputValue<lhs_result>(left);
+ this->template setOutputValue<rhs_result>(right);
+
+ return equivalence(left, right);
+ }
+
+ bool debug_holds()
+ {
+ // If law violations are found, this function is called
+ // for the smallest violated law instance.
+ // You may replace the call of
+ // holds();
+ // by your own code that is providing additional debugging
+ // information.
+ return holds();
+ }
+
+ };
+
+
+ template <typename Type> //Type can be more than one parameter for mixed laws with different types
+ class PolygonSymmetricDifference
+ : public Law<PolygonSymmetricDifference<Type>,
+ // Input type list Result type list
+ // Types of the variables Tpyes of the righthand and the lefthand side.
+ // in a law Can be more, if you want to see interim results.
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ // (a+b) - (a&b) == (a-b) + (b-a)
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (sum_lhs, sum_rhs)
+
+ public:
+ // These are descriptive informations to create readable output.
+ std::string name()const { return "Polygon Symmetric Difference"; }
+ std::string formula()const { return "(a+b) - (a&b) == (a-b) + (b-a)"; }
+
+ std::string typeString()const
+ {
+ return "SymmetricDifference<"+type_to_string<Type>::apply()+">";
+ }
+
+ public:
+
+ // Define a size measure for the laws input variables. According to
+ // this size the smallest law instances are collected if violations occur.
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+
+ // This function has to be coded to test the validity of a law instance.
+ bool holds()
+ {
+ using namespace boost::polygon;
+ using namespace boost::polygon::operators;
+
+ // There are predifined constants operand_a, _b, ..., lhs_reult, rhs_result in the base class.
+ //std::cout << this->template getInputValue<operand_a>().as_string() << std::endl;
+
+ // --- left hand side ------------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ boost::polygon::operators::operator+=(a_plus_b, this->template getInputValue<operand_b>());
+
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ boost::polygon::operators::operator&=(a_sec_b, this->template getInputValue<operand_b>());
+
+ Type lhs = a_plus_b;
+ boost::polygon::operators::operator-=(lhs, a_sec_b);
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ boost::polygon::operators::operator-=(a_minus_b, this->template getInputValue<operand_b>());
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ boost::polygon::operators::operator-=(b_minus_a, this->template getInputValue<operand_a>());
+
+ Type rhs = a_minus_b;
+ boost::polygon::operators::operator+=(rhs, b_minus_a);
+
+ // Set the output variables of this law instance.
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return equivalence(lhs, rhs);
+ }
+
+ bool debug_holds()
+ {
+ // If law violations are found, this function is called
+ // for the smallest violated law instance.
+ // You may replace the call of
+ // holds();
+ // by your own code that is providing additional debugging
+ // information.
+ return holds();
+ }
+
+ };
+
+}} // namespace icl boost
+
+#endif // BOOST_ICL_POLYGON_LAWS_HPP_JOFA_070411
+

Added: sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_polygon", "vc9_labat_polygon.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472C}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472C}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_polygon_/vc9_labat_polygon.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_polygon"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F472C}"
+ RootNamespace="vc9_labat_polygon"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_polygon_\labat_polygon.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_set_copy_conformity_/labat_set_copy_conformity.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_set_copy_conformity_/labat_set_copy_conformity.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/map_copy_conformity_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_Validater()
+{
+ map_copy_conformity_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(8,1);//JODO
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_Validater();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_set_copy_conformity_/vc9_labat_set_copy_conformity.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_set_copy_conformity_/vc9_labat_set_copy_conformity.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_set_copy_conformity"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F473F}"
+ RootNamespace="vc9_labat_set_copy_conformity"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_set_copy_conformity_\labat_set_copy_conformity.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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\driver\set_copy_conformity_driver.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_set_order_/labat_set_order.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_set_order_/labat_set_order.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,48 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/icl/map.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
+
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl_xt/numbergentor.hpp>
+#include <boost/icl_xt/setgentor.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/validate/driver/set_order_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_itl_order_driver()
+{
+ set_order_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_itl_order_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_set_order_/vc9_labat_set_order.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_set_order_/vc9_labat_set_order.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_set_order"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4728}"
+ RootNamespace="vc9_labat_set_order"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_set_order_\labat_set_order.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_signed_quantifier_/labat_signed_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_signed_quantifier_/labat_signed_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,41 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/signed_quantifier_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_signed_quantifier_driver()
+{
+ signed_quantifier_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->set_range_double(-1.0, 1.0);
+ GentorProfileSgl::it()->report_profile();
+
+ //validater.set_information_level(inform::never);
+ validater.validate();
+};
+
+
+int main()
+{
+ test_signed_quantifier_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_signed_quantifier_/vc9_labat_signed_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_signed_quantifier_/vc9_labat_signed_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_signed_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4721}"
+ RootNamespace="vc9_labat_signed_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_signed_quantifier_\labat_signed_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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\driver\signed_quantifier_driver.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\validater\signed_quantifier_validater.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_single_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_single_/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,15 @@
+# (C) Copyright 2008: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+obj gentorprofile.obj : ../../src/gentor/gentorprofile.cpp ;
+
+exe labat_single
+ :
+ labat_single.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;

Added: sandbox/icl/libs/validate/example/labat_single_/labat_single.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_single_/labat_single.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,118 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/icl/ptime.hpp>
+
+#include <boost/icl/right_open_interval.hpp>
+#include <boost/icl_xt/set.hpp>
+#include <boost/icl/map.hpp>
+#include <boost/icl/detail/interval_morphism.hpp>
+#include <boost/validate/icl/functors.hpp>
+#include <boost/validate/laws/induced_relation.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/pushouts.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/laws/minor_set_laws.hpp>
+#include <boost/validate/laws/function_equality.hpp>
+#include <boost/validate/laws/atomic_equivalence.hpp>
+#include <boost/validate/laws/order.hpp>
+
+//#include <boost/validate/laws/novial_tree.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/std/algorithm/copy.hpp>
+#include <boost/validate/std/algorithm/find.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
+#include <boost/icl/interval_set.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/functors.hpp>
+#include <boost/icl_xt/interval_bitset.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+using namespace boost::posix_time;
+
+
+void test_LawValidater()
+{
+
+ //typedef UnaryAtomicEquivalence2
+ //<
+ // icl::interval_map<int,int>,
+ // //icl::list<int>,
+ // std::pair<int,int>,
+ // icl::std_find
+ //> TestLawT;
+
+ //typedef InducedRelation
+ //<
+ // icl::interval_map<int,int>,
+ // icl::map<int,int>,
+ // segmental::atomizer,
+ // element_equal
+ //>
+ //TestLawT;
+
+ //typedef Antisymmetry<icl::map<int,int>, std::less_equal, std_equal> TestLawT;
+
+ //typedef JointInverseExistence
+ // <interval_map<int,int,partial_enricher>, icl::inplace_plus, icl::inplace_minus> TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+
+ //typedef InplaceCommutativity<icl::set<double> > TestLawT;
+ //LawValidater<TestLawT> test_law;
+
+ //typedef FunctionEquality
+ //<
+ // icl::list<std::pair<right_open_interval<double,std::less>,int> >, //SourceT,
+ // split_interval_map<double,int,partial_absorber>, //TargetT,
+ // base_insertion,
+ // hint_insertion
+ //>
+ //TestLawT;
+
+ //typedef Antisymmetry<icl::map<int,int>, icl::sub_super_set, icl::element_equal> TestLawT;
+ //typedef InplaceAssociativity<icl::interval_map<int,icl::set<int> >, icl::inplace_caret, icl::element_equal> TestLawT;
+
+ typedef InplaceFlip< icl::map<int,int,partial_enricher> > TestLawT;
+ //typedef InplaceFlip< icl::map<int,int> > TestLawT;
+ //typedef InplaceFlip< icl::map<int, icl::set<int> > > TestLawT;
+
+ LawValidater<TestLawT> test_law;
+
+
+ //-----------------------------------------------------------------------------
+ int test_count = 10000;
+ ptime start, stop;
+
+ GentorProfileSgl::it()->set_std_profile(8,1);
+ test_law.set_trials_count(test_count);
+
+ TestLawT law;
+ cout << law.typeString() << endl;
+ std::cout << "Start\n";
+ start = ptime(microsec_clock::local_time());
+ test_law.run();
+ stop = ptime(microsec_clock::local_time());
+ std::cout << "Stop. Time elapsed: " << stop - start << " for " << test_count << " tests\n";
+}
+
+
+
+int main()
+{
+ test_LawValidater();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_single_/vc9_labat_single.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_single_/vc9_labat_single.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_single"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F471C}"
+ RootNamespace="vc9_labat_single"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_single_\labat_single.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/labat_sorted_assoc_bitset.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/labat_sorted_assoc_bitset.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/sorted_associative_bitset_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_bitset_driver()
+{
+ sorted_associative_bitset_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(64,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_sorted_associative_bitset_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/vc9_labat_sorted_assoc_bitset.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_/vc9_labat_sorted_assoc_bitset.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_bitset"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4764}"
+ RootNamespace="vc9_labat_sorted_assoc_bitset"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_sorted_assoc_bitset_\labat_sorted_assoc_bitset.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\validater\sorted_associative_validater.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/labat_sorted_assoc_bitset_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/labat_sorted_assoc_bitset_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,45 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/sorted_associative_bitset_back_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_bitset_back_driver()
+{
+ sorted_associative_bitset_back_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n";
+
+#if(_MSC_VER >= 1400 && defined(_DEBUG) ) // 1500=MSVC-9.0 1400=MSVC-8.0; 1310=MSVC-7.1; 1300=MSVC-7.0;
+ cout << msvc_stl_false_order_checking_for_reverse_iteration_message();
+#else
+ cout <<
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(64,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+#endif
+
+};
+
+
+int main()
+{
+ test_sorted_associative_bitset_back_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/vc9_labat_sorted_assoc_bitset_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_bitset_back_/vc9_labat_sorted_assoc_bitset_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_bitset_back"
+ ProjectGUID="{AFBDE020-1287-4EE8-A2DB-43F6157FD660}"
+ RootNamespace="vc9_labat_sorted_assoc_bitset_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\labat_sorted_assoc_bitset_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/labat_sorted_assoc_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/labat_sorted_assoc_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/sorted_associative_map_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_map_driver()
+{
+ sorted_associative_map_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_sorted_associative_map_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/vc9_labat_sorted_assoc_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_map_/vc9_labat_sorted_assoc_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_map"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4762}"
+ RootNamespace="vc9_labat_sorted_assoc_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_sorted_assoc_map_\labat_sorted_assoc_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\sorted_associative_map_validater.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/labat_sorted_assoc_map_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/labat_sorted_assoc_map_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,46 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/sorted_associative_map_back_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_map_back_driver()
+{
+ sorted_associative_map_back_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n";
+
+#if(_MSC_VER >= 1400 && defined(_DEBUG) ) // 1500=MSVC-9.0 1400=MSVC-8.0; 1310=MSVC-7.1; 1300=MSVC-7.0;
+ cout << msvc_stl_false_order_checking_for_reverse_iteration_message();
+#else
+ cout <<
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+#endif
+
+};
+
+
+int main()
+{
+ test_sorted_associative_map_back_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/vc9_labat_sorted_assoc_map_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_map_back_/vc9_labat_sorted_assoc_map_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_map_back"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4772}"
+ RootNamespace="vc9_labat_sorted_assoc_map_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_sorted_assoc_map_back_\labat_sorted_assoc_map_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/labat_sorted_assoc_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/labat_sorted_assoc_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/sorted_associative_set_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_set_driver()
+{
+ sorted_associative_set_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_sorted_associative_set_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/vc9_labat_sorted_assoc_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_set_/vc9_labat_sorted_assoc_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4763}"
+ RootNamespace="vc9_labat_sorted_assoc_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_sorted_assoc_set_\labat_sorted_assoc_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/labat_sorted_assoc_set_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/labat_sorted_assoc_set_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/sorted_associative_set_back_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_sorted_associative_set_back_driver()
+{
+ sorted_associative_set_back_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n";
+
+#if(_MSC_VER >= 1400 && defined(_DEBUG) ) // 1500=MSVC-9.0 1400=MSVC-8.0; 1310=MSVC-7.1; 1300=MSVC-7.0;
+ //JODO cout << msvc_stl_false_order_checking_for_reverse_iteration_message();
+ cout <<
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(64,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+#else
+ cout <<
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(64,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+#endif
+
+};
+
+
+int main()
+{
+ test_sorted_associative_set_back_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/vc9_labat_sorted_assoc_set_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_sorted_assoc_set_back_/vc9_labat_sorted_assoc_set_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_sorted_assoc_set_back"
+ ProjectGUID="{AFBDE020-1287-4EE8-A2DB-43F6157FD670}"
+ RootNamespace="vc9_labat_sorted_assoc_set_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\labat_sorted_assoc_set_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/labat_unsigned_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/labat_unsigned_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/unsigned_quantifier_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::icl;
+
+void test_unsigned_quantifier_driver()
+{
+ unsigned_quantifier_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_unsigned_quantifier_driver();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/vc9_labat_unsigned_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_unsigned_quantifier_/vc9_labat_unsigned_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_unsigned_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4720}"
+ RootNamespace="vc9_labat_unsigned_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_unsigned_quantifier_\labat_unsigned_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ 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\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\driver\unsigned_quantifier_driver.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\unsigned_quantifier_validater.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/labat_val_relations_/labat_val_relations.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_val_relations_/labat_val_relations.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/icl_relations_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::icl;
+
+void test_Validater()
+{
+ icl_relations_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ GentorProfileSgl::it()->report_profile();
+ //validater.terminate_at_law_count(33, 2);
+ validater.validate();
+};
+
+
+int main()
+{
+ test_Validater();
+ return 0;
+}

Added: sandbox/icl/libs/validate/example/labat_val_relations_/vc9_labat_val_relations.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/labat_val_relations_/vc9_labat_val_relations.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_val_relations"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
+ RootNamespace="vc9_labat_val_relations"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Header Files"
+ 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="Resource Files"
+ 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
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_val_relations_\labat_val_relations.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/example/vc9_icl_validate_examples.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/example/vc9_icl_validate_examples.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,146 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_icl_set", "labat_icl_set_\vc9_labat_icl_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4723}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itv_bitset", "labat_itv_bitset_\vc9_labat_itv_bitset.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_unsigned_quantifier", "labat_unsigned_quantifier_\vc9_labat_unsigned_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4720}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_bit_collector", "labat_bit_collector_\vc9_labat_bit_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_single", "labat_single_\vc9_labat_single.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_map", "labat_sorted_assoc_map_\vc9_labat_sorted_assoc_map.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4762}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_set", "labat_sorted_assoc_set_\vc9_labat_sorted_assoc_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4763}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_bitset", "labat_sorted_assoc_bitset_\vc9_labat_sorted_assoc_bitset.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4764}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_bitset_back", "labat_sorted_assoc_bitset_back_\vc9_labat_sorted_assoc_bitset_back.vcproj", "{AFBDE020-1287-4EE8-A2DB-43F6157FD660}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_set_back", "labat_sorted_assoc_set_back_\vc9_labat_sorted_assoc_set_back.vcproj", "{AFBDE020-1287-4EE8-A2DB-43F6157FD670}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_assoc_map_back", "labat_sorted_assoc_map_back_\vc9_labat_sorted_assoc_map_back.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4772}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_icl_morphic", "labat_icl_morphic_\vc9_labat_icl_morphic.vcproj", "{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_de_morgan", "de_morgan_\vc9_de_morgan.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4740}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_relations", "labat_val_relations_\vc9_labat_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_map_order", "labat_map_order_\vc9_labat_map_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4727}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_signed_quantifier", "labat_signed_quantifier_\vc9_labat_signed_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4721}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_set_copy_conformity", "labat_set_copy_conformity_\vc9_labat_set_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F473F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_map_copy_conformity", "labat_map_copy_conformity_\vc9_labat_map_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_set_order", "labat_set_order_\vc9_labat_set_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4728}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_collector", "labat_collector_\vc9_labat_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boostcon_law_validater", "boostcon_law_validater_\vc9_boostcon_law_validater.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F473C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boostcon_abelian_monoids", "boostcon_abelian_monoids_\vc9_boostcon_abelian_monoids.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4733}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472B}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E9}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4762}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4762}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4762}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4762}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4763}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4763}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4763}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4763}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4764}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4764}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4764}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4764}.Release|Win32.Build.0 = Release|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD660}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD660}.Debug|Win32.Build.0 = Debug|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD660}.Release|Win32.ActiveCfg = Release|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD660}.Release|Win32.Build.0 = Release|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD670}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD670}.Debug|Win32.Build.0 = Debug|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD670}.Release|Win32.ActiveCfg = Release|Win32
+ {AFBDE020-1287-4EE8-A2DB-43F6157FD670}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4772}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4772}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4772}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4772}.Release|Win32.Build.0 = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {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
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4740}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4740}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4740}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4740}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4727}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4728}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/validate/src/gentor/gentorprofile.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/src/gentor/gentorprofile.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,155 @@
+/*-----------------------------------------------------------------------------+
+Interval Container Library
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#include <boost/validate/gentor/gentorprofile.hpp>
+
+using namespace boost::icl;
+
+GentorProfileSgl* GentorProfileSgl::s_instance = NULL;
+
+GentorProfileSgl* GentorProfileSgl::it()
+{
+ if(s_instance==NULL) {
+ s_instance = new GentorProfileSgl;
+ }
+ return s_instance;
+}
+
+GentorProfileSgl::GentorProfileSgl(){}
+
+
+void GentorProfile::set_defaults()
+{
+ set_debug_slowdown(8.45);
+ set_trials_count_release(100);
+#ifdef _DEBUG
+ set_debug_defaults();
+#else
+ set_release_defaults();
+#endif
+}
+
+
+int GentorProfile::adjusted_trials_count()const
+{
+#ifdef _DEBUG
+ return static_cast<int>(floor(0.5+(_trials_count_release / _debug_slowdown)));
+#else
+ return _trials_count_release;
+#endif
+}
+
+
+void GentorProfile::set_debug_defaults()
+{
+ set_range_int(-5, 5);
+ set_range_nat(0, 16);
+ set_range_double(0.0, 1.0);
+ set_range_ContainerSize(0,4);
+
+ set_range_interval_int(-5, 5);
+ set_range_interval_double(-5.0, 5.0);
+ set_maxIntervalLength(5);
+
+ set_range_codomain_ContainerSize(0,4);
+
+ set_repeat_count(1);
+ set_trials_count(adjusted_trials_count());
+ set_laws_per_cycle(100);
+}
+
+void GentorProfile::set_release_defaults()
+{
+ set_range_int(-5, 5);
+ set_range_nat(0, 16);
+ set_range_double(0.0, 1.0);
+ set_range_ContainerSize(0,20);
+
+ set_range_interval_int(-20, 20);
+ set_range_interval_double(-20.0, 20.0);
+ set_maxIntervalLength(10);
+
+ set_range_codomain_ContainerSize(0,20);
+
+ set_repeat_count(1);
+ set_trials_count(trials_count_release());
+ set_laws_per_cycle(100);
+}
+
+
+void GentorProfile::set_std_profile(int unit, int factor)
+{
+ int value = unit*factor;
+ _unit = unit;
+ _scaling = factor;
+ set_defaults();
+
+ // Codomain values
+ set_range_int(-5, 5);
+ set_range_nat(0, 16);
+ set_range_double(0.0, 1.0);
+ set_range_codomain_ContainerSize(0,4);
+
+ // Parameter that influence speed
+ set_range_ContainerSize(0, value);
+ set_range_interval_int(-value, value);
+ set_range_interval_double(-value, value);
+ set_maxIntervalLength(value);
+
+ // Parameter to influence frequencies of output update.
+ set_repeat_count(1);
+ set_trials_count(adjusted_trials_count());
+ set_laws_per_cycle(std::max(1, 100/factor));
+}
+
+void GentorProfile::set_polygon_profile(int max_polygon_set_size, int max_polygon_size, int min_coord, int max_coord)
+{
+ int factor = 1;
+ int unit = max_polygon_set_size+1;
+ int value = unit*factor;
+ _unit = unit;
+ _scaling = factor;
+ set_defaults();
+
+ // Codomain values
+ set_range_int(min_coord, max_coord);
+ set_range_nat(0, 16);
+ set_range_double(0.0, 1.0);
+ set_range_codomain_ContainerSize(0, max_polygon_size+1);
+
+ // Parameter that influence speed
+ set_range_ContainerSize(0, value);
+ set_range_interval_int(-value, value);
+ set_range_interval_double(-value, value);
+ set_maxIntervalLength(value);
+
+ // Parameter to influence frequencies of output update.
+ set_repeat_count(1);
+ set_trials_count(adjusted_trials_count());
+ set_laws_per_cycle(std::max(1, 100/factor));
+}
+
+
+GentorProfile::GentorProfile()
+{
+ set_std_profile(4, 1);
+}
+
+void GentorProfile::report_profile()
+{
+ printf("(cycl=%d trls=%d rep=%d unit=%d scale=%d)\n",
+ laws_per_cycle(), trials_count(), repeat_count(),
+ unit(), scaling()
+ );
+}
+
+// -------------------------------------
+// (Algebra, Law, Type) -> (testsCount)
+// (set, ipAddCommut, icl::set) -> 150
+

Added: sandbox/icl/libs/validate/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/Jamfile.v2 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,86 @@
+# (C) Copyright 2008-2009: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+# bring in rules for testing
+import testing ;
+import feature ;
+
+project
+ : requirements
+ <toolset>msvc:<warnings>all # == /W4
+ <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+
+ #-------------------------------------------------------------------------
+ # LaBatea generates large obj files for some test programs e.g.
+ # test_map_order: For that we need flag /bigobj
+ #-------------------------------------------------------------------------
+ <toolset>msvc:<cxxflags>/bigobj # Via metaprogramming LaBatea generates bigobjs.
+
+ <library>/boost/test//boost_unit_test_framework
+ <library>/boost/date_time//boost_date_time
+ <link>static
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
+
+test-suite "validate_itl"
+ :
+ # 1.18 msvc9 compilation time: 0:38
+ [ run test_val_relations_/test_val_relations.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 2.9 msvc9 compilation time: 1:01
+ #[ run test_set_copy_conformity_/test_set_copy_conformity.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 3.6 msvc9 compilation time: 1:03
+ #[ run test_map_copy_conformity_/test_map_copy_conformity.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 4.3 msvc9 compilation time: 1:05
+ [ run test_interval_bitset_/test_interval_bitset.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 5.5 msvc9 compilation time: 1:28
+ [ run test_icl_set_/test_icl_set.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 6.2 msvc9 compilation time: 1:35
+ [ run test_collector_/test_collector.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 7.1 msvc9 compilation time:
+ [ run test_bit_collector_/test_bit_collector.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 8.17 msvc9 compilation time: 1:42
+ [ run test_unsigned_quantifier_/test_unsigned_quantifier.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 9.9 msvc9 compilation time:
+ [ run test_set_order_/test_set_order.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 10.7 msvc9 compilation time:
+ [ run test_map_order_/test_map_order.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 11.4 msvc9 compilation time:
+ [ run test_icl_morphic_/test_icl_morphic.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 12.10 msvc9 compilation time: 2:36
+ # [ run test_signed_quantifier_/test_signed_quantifier.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 13.15 msvc9 compilation time:
+ [ run test_sorted_assoc_set_/test_sorted_assoc_set.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 14.16 msvc9 compilation time:
+ [ run test_sorted_assoc_set_back_/test_sorted_assoc_set_back.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 15.11 msvc9 compilation time:
+ [ run test_sorted_assoc_bitset_/test_sorted_assoc_bitset.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 16.12 msvc9 compilation time:
+ [ run test_sorted_assoc_bitset_back_/test_sorted_assoc_bitset_back.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 17.13 msvc9 compilation time:
+ [ run test_sorted_assoc_map_/test_sorted_assoc_map.cpp ../src/gentor/gentorprofile.cpp ]
+
+ # 18.14 msvc9 compilation time:
+ [ run test_sorted_assoc_map_back_/test_sorted_assoc_map_back.cpp ../src/gentor/gentorprofile.cpp ]
+
+ ;

Added: sandbox/icl/libs/validate/test/test_bit_collector_/test_bit_collector.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_bit_collector_/test_bit_collector.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_bit_collector unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/bit_collector_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_bit_collector)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ bit_collector_driver validater;
+ GentorProfileSgl::it()->set_std_profile(12,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(72, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_bit_collector_/vc9_test_bit_collector.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_bit_collector_/vc9_test_bit_collector.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_bit_collector"
+ ProjectGUID="{9EF72937-0585-487D-B887-5359BFA569EB}"
+ RootNamespace="vc9_test_bit_collector"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_bit_collector_\test_bit_collector.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_collector_/test_collector.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_collector_/test_collector.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_collector unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/collector_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_collector)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ collector_driver validater;
+ GentorProfileSgl::it()->set_std_profile(6,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(72, 2);
+ //validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_collector_/vc9_test_collector.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_collector_/vc9_test_collector.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_collector"
+ ProjectGUID="{9EF72937-0585-487D-B887-5359BFA569EA}"
+ RootNamespace="vc9_test_collector"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_collector_\test_collector.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_icl_morphic_/test_icl_morphic.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_icl_morphic_/test_icl_morphic.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_itl_morphic unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/icl_morphic_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_itl_morphic)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ icl_morphic_driver validater;
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(143, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_icl_morphic_/vc9_test_icl_morphic.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_icl_morphic_/vc9_test_icl_morphic.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_icl_morphic"
+ ProjectGUID="{612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}"
+ RootNamespace="vc9_test_icl_morphic"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_icl_morphic_\test_icl_morphic.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_icl_set_/test_icl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_icl_set_/test_icl_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_itl_set unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/icl_set_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_itl_set)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ icl_set_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(96, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_icl_set_/vc9_test_icl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_icl_set_/vc9_test_icl_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_icl_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4724}"
+ RootNamespace="vc9_test_icl_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_icl_set_\test_icl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_interval_bitset_/test_interval_bitset.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_interval_bitset_/test_interval_bitset.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl__interval_bitset unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/interval_bitset_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_interval_bitset)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ interval_bitset_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(42, 2);
+ //validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_interval_bitset_/vc9_test_interval_bitmap.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_interval_bitset_/vc9_test_interval_bitmap.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_interval_bitset"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4760}"
+ RootNamespace="vc9_test_interval_bitset"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_interval_bitset_\test_interval_bitset.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_map_copy_conformity_/test_map_copy_conformity.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_map_copy_conformity_/test_map_copy_conformity.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_map_copy_conformity unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/map_copy_conformity_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_map_copy_conformity)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ map_copy_conformity_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(48, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_map_copy_conformity_/vc9_test_map_copy_conformity.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_map_copy_conformity_/vc9_test_map_copy_conformity.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_map_copy_conformity"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F476F}"
+ RootNamespace="vc9_test_map_copy_conformity"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_map_copy_conformity_\test_map_copy_conformity.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_map_order_/test_map_order.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_map_order_/test_map_order.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_map_order unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/map_order_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_map_order)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ map_order_driver validater;
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(108, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_map_order_/vc9_test_map_order.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_map_order_/vc9_test_map_order.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_map_order"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4729}"
+ RootNamespace="vc9_test_map_order"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_map_order_\test_map_order.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_set_copy_conformity_/test_set_copy_conformity.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_set_copy_conformity_/test_set_copy_conformity.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_set_copy_conformity unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/set_copy_conformity_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_set_copy_conformity)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ set_copy_conformity_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(16, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_set_copy_conformity_/vc9_test_set_copy_conformity.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_set_copy_conformity_/vc9_test_set_copy_conformity.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_set_copy_conformity"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F475F}"
+ RootNamespace="vc9_test_set_copy_conformity"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_set_copy_conformity_\test_set_copy_conformity.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_set_order_/test_set_order.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_set_order_/test_set_order.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_set_order unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/set_order_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_set_order)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ set_order_driver validater;
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(72, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_set_order_/vc9_test_set_order.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_set_order_/vc9_test_set_order.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_set_order"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F472A}"
+ RootNamespace="vc9_test_set_order"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_set_order_\test_set_order.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_signed_quantifier_/test_signed_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_signed_quantifier_/test_signed_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_signed_quantifier unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/signed_quantifier_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_signed_quantifier)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ signed_quantifier_driver validater;
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(111, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_signed_quantifier_/vc9_test_signed_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_signed_quantifier_/vc9_test_signed_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_signed_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4726}"
+ RootNamespace="vc9_test_signed_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_signed_quantifier_\test_signed_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/test_sorted_assoc_bitset.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/test_sorted_assoc_bitset.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_bitset unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_bitset_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_bitset)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_bitset_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(52, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/vc9_test_sorted_assoc_bitset.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_/vc9_test_sorted_assoc_bitset.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_bitset"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4780}"
+ RootNamespace="vc9_test_sorted_assoc_bitset"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_bitset_\test_sorted_assoc_bitset.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/test_sorted_assoc_bitset_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/test_sorted_assoc_bitset_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_bitset_back unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_bitset_back_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_bitset_back)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_bitset_back_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(52, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/vc9_test_sorted_assoc_bitset_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/vc9_test_sorted_assoc_bitset_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_bitset_back"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4790}"
+ RootNamespace="vc9_test_sorted_assoc_bitset_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_bitset_back_\test_sorted_assoc_bitset_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_map_/test_sorted_assoc_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_map_/test_sorted_assoc_map.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_map unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_map_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_map)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_map_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(104, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_map_/vc9_test_sorted_assoc_map.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_map_/vc9_test_sorted_assoc_map.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_map"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4782}"
+ RootNamespace="vc9_test_sorted_assoc_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_map_\test_sorted_assoc_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/test_sorted_assoc_map_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/test_sorted_assoc_map_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_map_back unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_map_back_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_map_back)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_map_back_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(104, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/vc9_test_sorted_assoc_map_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_map_back_/vc9_test_sorted_assoc_map_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_map_back"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4792}"
+ RootNamespace="vc9_test_sorted_assoc_map_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_map_back_\test_sorted_assoc_map_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_set_/test_sorted_assoc_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_set_/test_sorted_assoc_set.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_set unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_set_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_set)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_set_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(39, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_set_/vc9_test_sorted_assoc_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_set_/vc9_test_sorted_assoc_set.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4781}"
+ RootNamespace="vc9_test_sorted_assoc_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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_set_\test_sorted_assoc_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/test_sorted_assoc_set_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/test_sorted_assoc_set_back.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_sorted_associative_set_back unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/sorted_associative_set_back_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_sorted_associative_set_back)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ sorted_associative_set_back_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(39, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/vc9_test_sorted_assoc_set_back.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_sorted_assoc_set_back_/vc9_test_sorted_assoc_set_back.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_sorted_assoc_set_back"
+ ProjectGUID="{45113635-6B51-4AC7-BA0B-7908B37A6DE2}"
+ RootNamespace="vc9_test_sorted_assoc_set_back"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_sorted_assoc_set_back_\test_sorted_assoc_set_back.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_unsigned_quantifier_/test_unsigned_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_unsigned_quantifier_/test_unsigned_quantifier.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_unsigned_quantifier unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/unsigned_quantifier_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_unsigned_quantifier)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ unsigned_quantifier_driver validater;
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(84, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_unsigned_quantifier_/vc9_test_unsigned_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_unsigned_quantifier_/vc9_test_unsigned_quantifier.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_unsigned_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4725}"
+ RootNamespace="vc9_test_unsigned_quantifier"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_unsigned_quantifier_\test_unsigned_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/test_val_relations_/test_val_relations.cpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_val_relations_/test_val_relations.cpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-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)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE validate::itl_itl_val_relations unit test
+#include <string>
+#include <iostream>
+#include "../unit_test_unwarned.hpp"
+#include <boost/validate/driver/icl_relations_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+BOOST_AUTO_TEST_CASE(test_validate_itl_val_relations)
+{
+#ifdef _DEBUG
+ cout << "Run validate/tests in release mode only.\n";
+#else
+ icl_relations_driver validater;
+ GentorProfileSgl::it()->set_std_profile(20,1);
+ //GentorProfileSgl::it()->report_profile();
+ validater.terminate_at_law_count(33, 2);
+ validater.set_information_level(inform::never);
+
+ BOOST_CHECK_EQUAL(validater.validate(), true);
+#endif
+}
+

Added: sandbox/icl/libs/validate/test/test_val_relations_/vc9_test_val_relations.vcproj
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/test_val_relations_/vc9_test_val_relations.vcproj 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_test_val_relations"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F474F}"
+ RootNamespace="vc9_test_val_relations"
+ 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"
+ AdditionalOptions="/bigobj"
+ 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"
+ 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"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="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>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_val_relations_\test_val_relations.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ 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>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/icl/libs/validate/test/unit_test_unwarned.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/unit_test_unwarned.hpp 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,26 @@
+/*-----------------------------------------------------------------------------+
+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)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_VALIDATE_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+#define BOOST_VALIDATE_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4389) // boost/test/test_tools.hpp(509) : warning C4389: '==' : signed/unsigned mismatch
+#endif
+
+#include <boost/test/unit_test.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif // BOOST_VALIDATE_TEST_UNIT_TEST_UNWARNED_HPP_JOFA_091204
+

Added: sandbox/icl/libs/validate/test/vc9_test.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/vc9_test.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,80 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_val_relations", "test_val_relations_\vc9_test_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F474F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_copy_conformity", "test_set_copy_conformity_\vc9_test_set_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F475F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_map_copy_conformity", "test_map_copy_conformity_\vc9_test_map_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F476F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_set", "test_itl_set_\vc9_test_itl_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4724}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_unsigned_quantifier", "test_unsigned_quantifier_\vc9_test_unsigned_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4725}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_bit_collector", "test_bit_collector_\vc9_test_bit_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569EB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_signed_quantifier", "test_signed_quantifier_\vc9_test_signed_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4726}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_morphic", "test_itl_morphic_\vc9_test_itl_morphic.vcproj", "{612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_collector", "test_collector_\vc9_test_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569EA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_order", "test_set_order_\vc9_test_set_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_map_order", "test_map_order_\vc9_test_map_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4729}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Release|Win32.Build.0 = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Debug|Win32.Build.0 = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Release|Win32.ActiveCfg = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/icl/libs/validate/test/vc9_validate_tests.sln
==============================================================================
--- (empty file)
+++ sandbox/icl/libs/validate/test/vc9_validate_tests.sln 2010-10-29 12:06:06 EDT (Fri, 29 Oct 2010)
@@ -0,0 +1,122 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_val_relations", "test_val_relations_\vc9_test_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F474F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_copy_conformity", "test_set_copy_conformity_\vc9_test_set_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F475F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_map_copy_conformity", "test_map_copy_conformity_\vc9_test_map_copy_conformity.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F476F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_set", "test_itl_set_\vc9_test_itl_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4724}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_unsigned_quantifier", "test_unsigned_quantifier_\vc9_test_unsigned_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4725}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_bit_collector", "test_bit_collector_\vc9_test_bit_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569EB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_signed_quantifier", "test_signed_quantifier_\vc9_test_signed_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4726}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_morphic", "test_itl_morphic_\vc9_test_itl_morphic.vcproj", "{612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_collector", "test_collector_\vc9_test_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569EA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_set_order", "test_set_order_\vc9_test_set_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F472A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_map_order", "test_map_order_\vc9_test_map_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4729}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_bitset", "test_interval_bitset_\vc9_test_interval_bitmap.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4760}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_bitset", "test_sorted_assoc_bitset_\vc9_test_sorted_assoc_bitset.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4780}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_map", "test_sorted_assoc_map_\vc9_test_sorted_assoc_map.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4782}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_set", "test_sorted_assoc_set_\vc9_test_sorted_assoc_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4781}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_bitset_back", "test_sorted_assoc_bitset_back_\vc9_test_sorted_assoc_bitset_back.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4790}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_map_back", "test_sorted_assoc_map_back_\vc9_test_sorted_assoc_map_back.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4792}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_sorted_assoc_set_back", "test_sorted_assoc_set_back_\vc9_test_sorted_assoc_set_back.vcproj", "{45113635-6B51-4AC7-BA0B-7908B37A6DE2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F474F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F475F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F476F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4724}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4725}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EB}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4726}.Release|Win32.Build.0 = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Debug|Win32.Build.0 = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Release|Win32.ActiveCfg = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6F}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569EA}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F472A}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4729}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4760}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4760}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4760}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4760}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4780}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4780}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4780}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4780}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4782}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4782}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4782}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4782}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4781}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4781}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4781}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4781}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4790}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4790}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4790}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4790}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4792}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4792}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4792}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4792}.Release|Win32.Build.0 = Release|Win32
+ {45113635-6B51-4AC7-BA0B-7908B37A6DE2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {45113635-6B51-4AC7-BA0B-7908B37A6DE2}.Debug|Win32.Build.0 = Debug|Win32
+ {45113635-6B51-4AC7-BA0B-7908B37A6DE2}.Release|Win32.ActiveCfg = Release|Win32
+ {45113635-6B51-4AC7-BA0B-7908B37A6DE2}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal


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