|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58503 - in sandbox/itl: boost/itl boost/itl/detail boost/itl_xt boost/validate/gentor boost/validate/laws boost/validate/validater libs/itl/doc libs/itl/doxy_doc libs/itl/doxy_doc/doxygen_input libs/itl/doxy_doc/doxygen_input/pages libs/itl/doxy_doc/doxygen_output libs/itl/example libs/itl/example/interval_ libs/itl/example/party_ libs/itl/test libs/itl/test/fastest_itl_map_ libs/itl/test/fastest_set_interval_set_ libs/itl/test/fastest_set_itl_set_ libs/itl/test/test_itl_map_ libs/itl/test/test_set_interval_set_ libs/itl/test/test_set_itl_set_ libs/itl_xt/example libs/itl_xt/example/amount_cube_ libs/itl_xt/example/history_ libs/validate/example libs/validate/example/de_morgan_ libs/validate/example/labat_single_
From: afojgo_at_[hidden]
Date: 2009-12-22 17:05:42
Author: jofaber
Date: 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
New Revision: 58503
URL: http://svn.boost.org/trac/boost/changeset/58503
Log:
Added and improved documentation. Added a documented example for law based test: de_morgan.cpp.
Added a directory doxy_doc that contains doxygen input for the non core parts of the itl_plus that
is not covered by the quickbook documentation.
Added:
sandbox/itl/boost/itl/detail/interval_morphism.hpp (contents, props changed)
sandbox/itl/libs/itl/doxy_doc/
sandbox/itl/libs/itl/doxy_doc/doxygen_input/
sandbox/itl/libs/itl/doxy_doc/doxygen_input/pages/
sandbox/itl/libs/itl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp (contents, props changed)
sandbox/itl/libs/itl/doxy_doc/doxygen_output/
sandbox/itl/libs/validate/example/de_morgan_/
sandbox/itl/libs/validate/example/de_morgan_/de_morgan.cpp (contents, props changed)
sandbox/itl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj (contents, props changed)
Removed:
sandbox/itl/boost/itl/interval_morphism.hpp
Text files modified:
sandbox/itl/boost/itl/interval.hpp | 2
sandbox/itl/boost/itl/interval_base_map.hpp | 18 +++++---
sandbox/itl/boost/itl/interval_base_set.hpp | 18 +++++---
sandbox/itl/boost/itl/interval_map.hpp | 3 +
sandbox/itl/boost/itl/interval_set.hpp | 2
sandbox/itl/boost/itl/iterator.hpp | 4 +-
sandbox/itl/boost/itl/map.hpp | 2
sandbox/itl/boost/itl/separate_interval_set.hpp | 2
sandbox/itl/boost/itl/set.hpp | 2
sandbox/itl/boost/itl/split_interval_map.hpp | 3 +
sandbox/itl/boost/itl/split_interval_set.hpp | 3 +
sandbox/itl/boost/itl_xt/interval_bitset.hpp | 22 +++++++++--
sandbox/itl/boost/itl_xt/product_history.hpp | 77 +++++++++++----------------------------
sandbox/itl/boost/itl_xt/tuple_computer.hpp | 38 +------------------
sandbox/itl/boost/validate/gentor/gentorprofile.hpp | 4 +-
sandbox/itl/boost/validate/laws/atomic_equivalence.hpp | 8 ++--
sandbox/itl/boost/validate/laws/element_order.hpp | 26 ++++++------
sandbox/itl/boost/validate/laws/set_laws.hpp | 36 +++++++++++-------
sandbox/itl/boost/validate/laws/subset_order.hpp | 26 ++++++------
sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp | 30 +++++++-------
sandbox/itl/boost/validate/validater/itl_induced_relations.hpp | 8 ++--
sandbox/itl/boost/validate/validater/law_validater.hpp | 8 +---
sandbox/itl/libs/itl/doc/concepts.qbk | 15 +++++--
sandbox/itl/libs/itl/doc/functions_equivs_orderings.qbk | 4 +-
sandbox/itl/libs/itl/doc/implementation.qbk | 6 ++
sandbox/itl/libs/itl/doc/introduction.qbk | 15 ++++---
sandbox/itl/libs/itl/doc/semantics.qbk | 3 +
sandbox/itl/libs/itl/example/interval_/interval.cpp | 2
sandbox/itl/libs/itl/example/party_/party.cpp | 2
sandbox/itl/libs/itl/example/toytime.hpp | 4 +-
sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp | 2
sandbox/itl/libs/itl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp | 2
sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp | 2
sandbox/itl/libs/itl/test/test_itl_map.hpp | 10 ++--
sandbox/itl/libs/itl/test/test_itl_map_/test_itl_map.cpp | 2
sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp | 48 ++++++++++++------------
sandbox/itl/libs/itl/test/test_set_interval_set_/test_set_interval_set.cpp | 2
sandbox/itl/libs/itl/test/test_set_itl_set.hpp | 30 +++++++-------
sandbox/itl/libs/itl/test/test_set_itl_set_/test_set_itl_set.cpp | 2
sandbox/itl/libs/itl_xt/example/amount_cube_/amount_cube.cpp | 42 ++++++++++----------
sandbox/itl/libs/itl_xt/example/history_/history.cpp | 6 +--
sandbox/itl/libs/itl_xt/example/toytime.h | 9 ++++
sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp | 73 -------------------------------------
sandbox/itl/libs/validate/example/vc9_validate_examples.sln | 12 ++++++
44 files changed, 281 insertions(+), 354 deletions(-)
Added: sandbox/itl/boost/itl/detail/interval_morphism.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/detail/interval_morphism.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -0,0 +1,99 @@
+/*-----------------------------------------------------------------------------+
+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_ITL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+#define BOOST_ITL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+
+#include <boost/itl/detail/notate.hpp>
+namespace boost{namespace itl
+{
+ namespace segmental
+ {
+ template <typename ElementContainerT, typename IntervalContainerT>
+ void atomize(ElementContainerT& result, const IntervalContainerT& src)
+ {
+ ITL_const_FORALL(typename IntervalContainerT, itv_, src)
+ {
+ const typename IntervalContainerT::key_type& itv = IntervalContainerT::key_value(itv_);
+ typename IntervalContainerT::codomain_type coval = IntervalContainerT::codomain_value(itv_);
+
+ for(typename IntervalContainerT::domain_type element = itv.first(); element <= itv.last(); ++element)
+ {
+ result.insert(ElementContainerT::make_element(element, coval));
+ }
+ }
+ }
+
+ template <typename IntervalContainerT, typename ElementContainerT>
+ void cluster(IntervalContainerT& result, const ElementContainerT& src)
+ {
+ ITL_const_FORALL(typename ElementContainerT, element_, src)
+ {
+ const typename ElementContainerT::key_type& key = ElementContainerT::key_value(element_);
+ const typename ElementContainerT::data_type& data = ElementContainerT::data_value(element_);
+
+ result += IntervalContainerT::make_domain_element(key, data);
+ }
+ }
+
+ 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)
+ {
+ split.join();
+ ITL_FORALL(typename SplitType, split_, split)
+ joint.insert(*split_);
+ }
+ };
+
+ template <typename AbsorberType, typename EnricherType>
+ struct neutron_absorber
+ {
+ void operator()(AbsorberType& absorber, EnricherType& enricher)
+ {
+ enricher.absorb_neutrons();
+ ITL_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::neutron_absorber>::apply() { return "a0"; }
+}} // namespace boost itl
+
+#endif // BOOST_ITL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315
+
+
+
Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -49,7 +49,7 @@
typedef unsigned char bound_type;
-/** A class template for intervals */
+/** \brief A class template for intervals */
template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
class interval
{
Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -47,7 +47,7 @@
-/** Implements a map as a map of intervals (base class) */
+/** \brief Implements a map as a map of intervals (base class) */
template
<
class SubType,
@@ -150,6 +150,15 @@
/// 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
@@ -167,11 +176,6 @@
typedef boost::itl::element_iterator<reverse_iterator> element_reverse_iterator;
/// element const reverse iterator: Depreciated, see documentation.
typedef boost::itl::element_iterator<const_reverse_iterator> element_const_reverse_iterator;
-
- typedef typename ImplMapT::pointer pointer;
- typedef typename ImplMapT::const_pointer const_pointer;
- typedef typename ImplMapT::reference reference;
- typedef typename ImplMapT::const_reference const_reference;
public:
enum { is_itl_container = true };
@@ -1287,7 +1291,7 @@
>
void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::uniform_bounds(itl::bound_type bounded)
{
- // I can do this only, because I am shure that the contents and the
+ // I can do this only, because I am sure that the contents and the
// ordering < on interval is invariant wrt. this transformation on bounds
FOR_IMPLMAP(it_) const_cast<interval_type&>(it_->first).as(bounded);
}
Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -23,7 +23,7 @@
namespace boost{namespace itl
{
-/** Implements a set as a set of intervals (base class) */
+/** \brief Implements a set as a set of intervals (base class) */
template
<
typename SubType,
@@ -108,6 +108,15 @@
/// 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
@@ -126,11 +135,6 @@
/// element const reverse iterator: Depreciated, see documentation.
typedef boost::itl::element_iterator<const_reverse_iterator> element_const_reverse_iterator;
- typedef typename ImplSetT::pointer pointer;
- typedef typename ImplSetT::const_pointer const_pointer;
- typedef typename ImplSetT::reference reference;
- typedef typename ImplSetT::const_reference const_reference;
-
enum { fineness = 4 };
public:
@@ -701,7 +705,7 @@
class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>::uniform_bounds(itl::bound_type bounded)
{
- // I can do this only, because I am shure that the contents and the
+ // I can do this only, because I am sure that the contents and the
// ordering < on interval is invariant wrt. this transformation on bounds
FOR_IMPL(it_) const_cast<interval_type&>(*it_).as(bounded);
}
Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -26,7 +26,8 @@
template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
class split_interval_map;
-/** implements a map as a map of intervals - on insertion overlapping intervals are split and associated values are combined.*/
+/** \brief implements a map as a map of intervals - on insertion
+ overlapping intervals are split and associated values are combined.*/
template
<
typename DomainT,
Deleted: sandbox/itl/boost/itl/interval_morphism.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_morphism.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
+++ (empty file)
@@ -1,99 +0,0 @@
-/*-----------------------------------------------------------------------------+
-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_ITL_INTERVAL_MORPHISM_HPP_JOFA_080315
-#define BOOST_ITL_INTERVAL_MORPHISM_HPP_JOFA_080315
-
-#include <boost/itl/detail/notate.hpp>
-namespace boost{namespace itl
-{
- namespace Interval
- {
- template <typename ElementContainerT, typename IntervalContainerT>
- void atomize(ElementContainerT& result, const IntervalContainerT& src)
- {
- ITL_const_FORALL(typename IntervalContainerT, itv_, src)
- {
- const typename IntervalContainerT::key_type& itv = IntervalContainerT::key_value(itv_);
- typename IntervalContainerT::codomain_type coval = IntervalContainerT::codomain_value(itv_);
-
- for(typename IntervalContainerT::domain_type element = itv.first(); element <= itv.last(); ++element)
- {
- result.insert(ElementContainerT::make_element(element, coval));
- }
- }
- }
-
- template <typename IntervalContainerT, typename ElementContainerT>
- void cluster(IntervalContainerT& result, const ElementContainerT& src)
- {
- ITL_const_FORALL(typename ElementContainerT, element_, src)
- {
- const typename ElementContainerT::key_type& key = ElementContainerT::key_value(element_);
- const typename ElementContainerT::data_type& data = ElementContainerT::data_value(element_);
-
- result += IntervalContainerT::make_domain_element(key, data);
- }
- }
-
- template <typename AtomizedType, typename ClusteredType>
- struct Atomize
- {
- void operator()(AtomizedType& atomized, const ClusteredType& clustered)
- {
- Interval::atomize(atomized, clustered);
- }
- };
-
- template <typename ClusteredType, typename AtomizedType>
- struct Cluster
- {
- void operator()(ClusteredType& clustered, const AtomizedType& atomized)
- {
- Interval::cluster(clustered, atomized);
- }
- };
-
- template <typename JointType, typename SplitType>
- struct Join
- {
- void operator()(JointType& joint, SplitType& split)
- {
- split.join();
- ITL_FORALL(typename SplitType, split_, split)
- joint.insert(*split_);
- }
- };
-
- template <typename AbsorberType, typename EnricherType>
- struct AbsorbNeutrons
- {
- void operator()(AbsorberType& absorber, EnricherType& enricher)
- {
- enricher.absorb_neutrons();
- ITL_FORALL(typename EnricherType, enricher_, enricher)
- absorber.insert(*enricher_);
- }
- };
-
- } // namespace Interval
-
-
- template<>
- inline std::string binary_template_to_string<Interval::Atomize>::apply() { return "@"; }
- template<>
- inline std::string binary_template_to_string<Interval::Cluster>::apply() { return "&"; }
- template<>
- inline std::string binary_template_to_string<Interval::Join>::apply() { return "j"; }
- template<>
- inline std::string binary_template_to_string<Interval::AbsorbNeutrons>::apply() { return "a0"; }
-}} // namespace boost itl
-
-#endif
-
-
-
Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -16,7 +16,7 @@
namespace boost{namespace itl
{
-/** Implements a set as a set of intervals - merging adjoining intervals */
+/** \brief Implements a set as a set of intervals - merging adjoining intervals */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl/iterator.hpp
==============================================================================
--- sandbox/itl/boost/itl/iterator.hpp (original)
+++ sandbox/itl/boost/itl/iterator.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -14,7 +14,7 @@
namespace boost{namespace itl
{
-/** Performes an addition using a container's memberfunction add, when operator= is called. */
+/** \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>
{
@@ -55,7 +55,7 @@
return add_iterator<ContainerT>(cont, typename ContainerT::iterator(iter_));
}
-/** Performes an insertion using a container's memberfunction add, when operator= is called. */
+/** \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>
{
Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -70,7 +70,7 @@
inline std::string type_to_string<total_enricher>::apply() { return "e^0"; }
-/** adds addition, subtraction and intersection to std::maps */
+/** \brief Addable, subractable and intersectable maps */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl/separate_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/separate_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/separate_interval_set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -15,7 +15,7 @@
namespace boost{namespace itl
{
-/** Implements a set as a set of intervals - leaving adjoining intervals separate */
+/** \brief Implements a set as a set of intervals - leaving adjoining intervals separate */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -32,7 +32,7 @@
namespace boost{namespace itl
{
-/** adds addition, subtraction and intersection to std::set */
+/** \brief Addable, subractable and intersectable sets. */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -22,7 +22,8 @@
#pragma warning(disable:4127) // conditional expression is constant
#endif
-/** implements a map as a map of intervals - on insertion overlapping intervals are split and associated values are combined. */
+/** \brief implements a map as a map of intervals - on insertion
+ overlapping intervals are split and associated values are combined. */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl/split_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -15,7 +15,8 @@
namespace boost{namespace itl
{
-/** implements a set as a set of intervals - on insertion overlapping intervals are split */
+/** \brief implements a set as a set of intervals - on insertion
+ overlapping intervals are split */
template
<
typename DomainT,
Modified: sandbox/itl/boost/itl_xt/interval_bitset.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/interval_bitset.hpp (original)
+++ sandbox/itl/boost/itl_xt/interval_bitset.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -17,13 +17,27 @@
#include <boost/itl_xt/bits.hpp> // a bitset implementation
#include <boost/itl_xt/detail/bit_element_iterator.hpp>
-#include <boost/itl/interval_morphism.hpp> //JODO Separate aspects and concerns
+#include <boost/itl/detail/interval_morphism.hpp> //JODO Separate aspects and concerns
namespace boost{namespace itl
{
+/** \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 itl::interval_set or itl::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 itl::interval_map in the project section
+ of the boost book documentation here:
+ http://www.herold-faulhaber.de/boost_itl/doc/libs/itl/doc/html/boost_itl/projects.html
+*/
template
<
typename DomainT = unsigned long,
@@ -431,10 +445,10 @@
}
};
-namespace Interval
+namespace segmental
{
template <typename DomainT, typename BitSetT>
- struct Atomize<itl::set<DomainT>, interval_bitset<DomainT, BitSetT> >
+ struct atomizer<itl::set<DomainT>, interval_bitset<DomainT, BitSetT> >
{
void operator()( itl::set<DomainT>& atomized,
const interval_bitset<DomainT, BitSetT>& clustered)
@@ -446,7 +460,7 @@
}
};
-} // namespace Interval
+} // namespace segmental
}} // namespace itl boost
Modified: sandbox/itl/boost/itl_xt/product_history.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/product_history.hpp (original)
+++ sandbox/itl/boost/itl_xt/product_history.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -1,79 +1,48 @@
/*-----------------------------------------------------------------------------+
+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.
+ Distributed 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/itl/split_interval_map.hpp>
+#include <boost/itl/interval_map.hpp>
namespace boost{namespace itl
{
-/// composes many episodes of different types into a single history of episode_product s
+/// Adds episodes of different types into a single history of episode_products
/**
- <b>Eine Klasse zur Verarbeitung von Episoden unterschiedlichen Typs in einer gemeinsamen Historie</b>
-
- Template-Parameter <b>ItvDomTV</b>: Domain-Typ der History, also Typ der
- Elemente des Definitionsbereichs (Schlüssel), die die History enthalten kann
- (z.B. Tage, Sekunden, Monate, int u.ä.).
+ A class to merge episodes of different types into a common history object.
- Template-Parameter <b>TypeDomTV</b>: TypeDomTV ist der Definitionsbereich (Domain)
- der Typen von Episoden, die in der Produkt-Historie verwendet werden können.
-
- TypeDomTV kapselt im wesentlichen einen Aufzählungstyp, der die Typen
- von Episoden definiert, die möglich sind (Z.B. Aufenthalte, Kostenübernahmen und
- Bettenbelegungen).
-
- product_history wird ohne weiere Umschweife direkt aus einem \ref split_interval_map
- abgeleitet.
-
- Die Werte dieser Historie sind eine (Auf)sammlung oder Produkt von Episoden
- verschiedenen Typs \ref episode_product. Die Historie solcher
- Episodensammlungen teilt sich immer dort auf, wo irgend ein Unterschied
- in den Episoden eintritt.
-
- Mit anderen Worten die ProduktHistorie enthält zusammenhängende Intervalle,
- wo die Anzahl und Werte gesammelter Episonden konstant sind.
-
- Dies ist ein universelles Werkzeug, um Mengen asynchroner Historien
- zusammenzufassen und die feinste Darstellung als eine Historie zu
- erhalten, die alle 'Zustandsänderungen' ihrer Teilhistorien repräsentiert.
+ Template parameter ItvDomTV contains the domain_type of the history. This
+ will be an integer or a time type in most cases.
- { H<T1>, .. , H<Ti> } -> H<{T1, .. , Ti}>
+ 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 split_interval_map<ItvDomTV, episode_product<ItvDomTV,TypeDomTV> >
+class product_history : public interval_map<ItvDomTV, episode_product<ItvDomTV,TypeDomTV> >
{
public:
typedef episode_product<ItvDomTV,TypeDomTV> EpisodeProductTD;
- typedef split_interval_map<ItvDomTV, EpisodeProductTD> BaseTypeTD;
+ 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;
Modified: sandbox/itl/boost/itl_xt/tuple_computer.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/tuple_computer.hpp (original)
+++ sandbox/itl/boost/itl_xt/tuple_computer.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -1,31 +1,10 @@
/*-----------------------------------------------------------------------------+
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.
+ Distributed 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__
@@ -68,15 +47,6 @@
- // Alternative Names
- // TupelCubeT
- // TupicCubeT
- // TupyCubeT
- // HyperCubeT
- // TupAss TupelAssociativeComputer
- // A Tupel based Value Accumulator TuBaVator
- // A Value associating Tupel Accumulator AVaTAr
-
/// 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
@@ -130,8 +100,6 @@
/// Construct from order
tuple_computer_base(const key_compare& ord): m_map(ord) {}
- // Virtual constructor
- //JODO? virtual tuple_computer_base* cons()const=0;
/// Virtual destructor
virtual ~tuple_computer_base(){};
Modified: sandbox/itl/boost/validate/gentor/gentorprofile.hpp
==============================================================================
--- sandbox/itl/boost/validate/gentor/gentorprofile.hpp (original)
+++ sandbox/itl/boost/validate/gentor/gentorprofile.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -25,7 +25,7 @@
void set_debug_defaults();
void set_release_defaults();
- void set_std_profile(int unit, int factor);
+ 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)
@@ -135,7 +135,7 @@
void report_profile() { return m_profile.report_profile(); }
- void set_std_profile(int unit, int factor) { return m_profile.set_std_profile(unit, factor); }
+ 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); }
Modified: sandbox/itl/boost/validate/laws/atomic_equivalence.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/atomic_equivalence.hpp (original)
+++ sandbox/itl/boost/validate/laws/atomic_equivalence.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -14,7 +14,7 @@
#include <boost/itl/type_traits/value_size.hpp>
#include <boost/itl/functors.hpp>
#include <boost/itl/predicates.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/laws/law.hpp>
namespace boost{namespace itl
@@ -39,7 +39,7 @@
typename TargetsT,
template<class,class,template<class>class>class Algorithm,
template<class>class TargetIterator = std::insert_iterator,
- template<class,class>class Atomizer = itl::Interval::Atomize,
+ template<class,class>class Atomizer = itl::segmental::atomizer,
template<class>class Equality = itl::std_equal >
class UnaryAtomicEquivalence :
public Law<UnaryAtomicEquivalence<SegmentsT, TargetsT,
@@ -124,7 +124,7 @@
template <typename SegmentsT,
typename TargetsT,
template<class,class>class Algorithm,
- template<class,class>class Atomizer = itl::Interval::Atomize,
+ template<class,class>class Atomizer = itl::segmental::atomizer,
template<class>class Equality = itl::std_equal >
class UnaryAtomicEquivalence2 :
public Law<UnaryAtomicEquivalence2<SegmentsT, TargetsT,
@@ -213,7 +213,7 @@
typename TargetsT,
template<class,class,template<class>class>class Algorithm,
template<class>class TargetIterator = std::insert_iterator,
- template<class,class>class Atomizer = itl::Interval::Atomize,
+ template<class,class>class Atomizer = itl::segmental::atomizer,
template<class>class Equality = itl::std_equal >
class BinaryAtomicEquivalence :
public Law<BinaryAtomicEquivalence<SegmentsT, TargetsT,
Modified: sandbox/itl/boost/validate/laws/element_order.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/element_order.hpp (original)
+++ sandbox/itl/boost/validate/laws/element_order.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -11,7 +11,7 @@
#define BOOST_ITL_ELEMENT_ORDER_HPP_JOFA_090202
#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/laws/law.hpp>
namespace boost{namespace itl
@@ -44,8 +44,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_equal(a, b);
bool rhs = (a_atomic == b_atomic);
@@ -62,8 +62,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_equal(a, b);
bool rhs = (a_atomic == b_atomic);
@@ -108,8 +108,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_less(a, b);
bool rhs = a_atomic < b_atomic;
@@ -126,8 +126,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_less(a, b);
bool rhs = a_atomic < b_atomic;
@@ -174,8 +174,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_greater(a, b);
bool rhs = a_atomic > b_atomic;
@@ -192,8 +192,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_element_greater(a, b);
bool rhs = a_atomic > b_atomic;
Modified: sandbox/itl/boost/validate/laws/set_laws.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/set_laws.hpp (original)
+++ sandbox/itl/boost/validate/laws/set_laws.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -126,15 +126,15 @@
: public Law<InplaceDeMorgan<Type,Operator1,Operator2,Subtraction,Equality>,
LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
{
- /** a - (b + c) == (a - b) & (a - c)
+ /** a - (b o c) == (a - b) $ (a - c)
a - (b(1)c) == (a - b)(2)(a - c)
- computed using inplace operators +=, += and &=
+ 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 + c) == (a - b) & (a - c) 'inplace'"; }
+ std::string formula()const { return "a - (b o c) == (a - b) $ (a - c) 'inplace'"; }
std::string typeString()const
{
@@ -148,12 +148,12 @@
bool holds()
{
- // a - (b + c) == (a - b) & (a - c)
+ // 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 + c)
+ // lhs := a - (b o c)
Type lhs = this->template getInputValue<operand_a>();
Subtraction<Type>()(lhs, b_plus_c);
@@ -164,7 +164,7 @@
Type a_minus_c = this->template getInputValue<operand_a>();
Subtraction<Type>()(a_minus_c, this->template getInputValue<operand_c>());
- // rhs := (a - b) & (a - c)
+ // rhs := (a - b) $ (a - c)
Type rhs = a_minus_b;
Operator2<Type>()(rhs, a_minus_c);
@@ -176,33 +176,41 @@
bool debug_holds()
{
- // a - (b + c) == (a - b) & (a - c)
+ // 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 << "a = " << val_a << std::endl;
- std::cout << "b = " << val_b << std::endl;
- std::cout << "c = " << val_c << std::endl;
+
+ 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);
- // lhs := a - (b + 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 << "a-b = " << a_minus_b << std::endl;
+ 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;
+ std::cout << " a - c = " << a_minus_c << std::endl;
- // rhs := (a - b) & (a - c)
+ // 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);
Modified: sandbox/itl/boost/validate/laws/subset_order.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/subset_order.hpp (original)
+++ sandbox/itl/boost/validate/laws/subset_order.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -11,7 +11,7 @@
#define BOOST_ITL_SUBSET_ORDERING_HPP_JOFA_090202
#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/laws/law.hpp>
namespace boost{namespace itl
@@ -44,8 +44,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_inclusion_equal(a, b);
bool rhs = (a_atomic == b_atomic);
@@ -62,8 +62,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_inclusion_equal(a, b);
bool rhs = (a_atomic == b_atomic);
@@ -108,8 +108,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = is_contained_in(a, b);
bool rhs = a_atomic.contained_in(b_atomic);
@@ -126,8 +126,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
cout << "a: " << a << endl;
cout << "b: " << b << endl;
@@ -176,8 +176,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = contains(a, b);
bool rhs = a_atomic.contains(b_atomic);
@@ -194,8 +194,8 @@
Type b = this->template getInputValue<operand_b>();
typename Type::atomized_type a_atomic;
typename Type::atomized_type b_atomic;
- Interval::atomize(a_atomic, a);
- Interval::atomize(b_atomic, b);
+ segmental::atomize(a_atomic, a);
+ segmental::atomize(b_atomic, b);
bool lhs = contains(a, b);
bool rhs = a_atomic.contains(b_atomic);
Modified: sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -14,7 +14,7 @@
#include <boost/itl/type_traits/is_continuous.hpp>
#include <boost/itl/type_traits/has_inverse.hpp>
#include <boost/itl/functors.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/laws/set_laws.hpp>
#include <boost/validate/laws/order.hpp>
#include <boost/validate/laws/pushouts.hpp>
@@ -76,21 +76,21 @@
{
switch(_lawChoice.some())
{
- case atomize_plus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_plus>, RandomGentor>();
- case atomize_minus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_minus>, RandomGentor>();
- case atomize_et: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>, RandomGentor>();
- case atomize_caret: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_caret>, RandomGentor>();
- case cluster_plus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_plus>, RandomGentor>();
- case cluster_minus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_minus>, RandomGentor>();
- case cluster_et: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>, RandomGentor>();
- case cluster_caret: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_caret>, RandomGentor>();
- case atomize_insert: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_insert>,RandomGentor>();
- case atomize_erase: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_erase>, RandomGentor>();
- case cluster_insert: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_insert>,RandomGentor>();
- case cluster_erase: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_erase>, RandomGentor>();
- case join_plus: return new LawValidater<BinaryPushout<Type, typename Type::joint_type, Interval::Join, inplace_plus>, RandomGentor>();
+ 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, Interval::AbsorbNeutrons, inplace_plus>, RandomGentor>();
+ //case absorb_plus: return new LawValidater<BinaryPushout<Type, typename Type::partial_absorber_type, segmental::neutron_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;
}
Modified: sandbox/itl/boost/validate/validater/itl_induced_relations.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/itl_induced_relations.hpp (original)
+++ sandbox/itl/boost/validate/validater/itl_induced_relations.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -10,7 +10,7 @@
#pragma once
#include <boost/itl/functors.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/laws/induced_relation.hpp>
#include <boost/validate/validater/law_validater.hpp>
#include <boost/validate/validater/algebra_validater.hpp>
@@ -50,9 +50,9 @@
{
switch(_lawChoice.some())
{
- case atomize_subset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, sub_super_set>, RandomGentor>();
- case atomize_superset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, super_sub_set>, RandomGentor>();
- case atomize_element_equal: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, element_equal>, RandomGentor>();
+ 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;
}
}
Modified: sandbox/itl/boost/validate/validater/law_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/law_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/law_validater.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -96,6 +96,8 @@
void reportViolations()const;
void reportSuccess()const;
+ int violation_count()const { return _lawViolations.size(); }
+
private:
typedef LawViolations<LawT> LawViolationsT;
@@ -147,12 +149,6 @@
start = posix_time::ptime(posix_time::microsec_clock::local_time());
// In order to measure small time intervals, evaluation must be repeated.
- //std::cout << idx << " "; //CL..
- //if(idx==0)
- //{
- // int dbg_ = 1;
- //}
-
for(int repeat=0; repeat<_repeat_count; repeat++)
law_is_violated = !_law.holds();
Modified: sandbox/itl/libs/itl/doc/concepts.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/concepts.qbk (original)
+++ sandbox/itl/libs/itl/doc/concepts.qbk 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -69,7 +69,7 @@
[[][sequence of elements is irrelevant][sequence of elements is relevant]]
[[][iterator independent][iterator dependent]]
[[Informs about][membership of elements][sequence of intervals (segmentation)]]
-[[Equality][equality of elements][lexicographical equality]]
+[[Equality][equality of elements][equality of segments]]
[[Practical][interval_sets(maps) can be used as sets(maps)
of elements(element value pairs) ]
[Segmentation information is available.
@@ -113,9 +113,8 @@
]
Equality on `Sets` is not implemented as `operator ==`, because `operator ==`
-is used for the stronger lexicographical equality, that takes the
-sequence of elements into account. The sequence of elements belongs to
-the __iterative__ aspect.
+is used for the stronger lexicographical equality on segments, that takes the
+segmentation of elements into account.
Being models of concept `Set`, __itl_set__ and all __itv_bsets__
implement these
@@ -133,6 +132,12 @@
difference. __Itv_sets__ can be defined as the ['*completion*] of intervals
for the union and difference operations.
+When we claim that addition or subtraction can not be defined
+on intervals, we are not considering things like e.g.
+interval arithmetics, where these operations can be defined,
+but with a different semantics.
+
+
[h5 A Map Concept]
On the __conceptual__ aspect __itl_map__ and all __itv_bmaps__ are models of a
@@ -298,7 +303,7 @@
Therefore itl functors,
that serve as `Combiner` parameters of itl Maps
implement a static function `neutron()` to make
-shure that the correct `neutron()` is used
+sure that the correct `neutron()` is used
in the implementation
of ['aggregate on overlap].
``
Modified: sandbox/itl/libs/itl/doc/functions_equivs_orderings.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/functions_equivs_orderings.qbk (original)
+++ sandbox/itl/libs/itl/doc/functions_equivs_orderings.qbk 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -14,14 +14,14 @@
[table
[[['*Equivalences and Orderings*]][interval][__ch_itv_sets__][__ch_itv_maps__][itl::set][itl::map]]
-[[['Lexicographical Ordering]] [ ] [ ] [ ] [ ] [ ] ]
+[[['Segment Ordering]] [ ] [ ] [ ] [ ] [ ] ]
[[`bool operator == (const T&, const T&)`] [1] [1] [1] [1] [1] ]
[[`bool operator != (const T&, const T&)`] [1] [1] [1] [1] [1] ]
[[`bool operator < (const T&, const T&)`] [1] [1] [1] [1] [1] ]
[[`bool operator > (const T&, const T&)`] [1] [1] [1] [1] [1] ]
[[`bool operator <= (const T&, const T&)`] [1] [1] [1] [1] [1] ]
[[`bool operator >= (const T&, const T&)`] [1] [1] [1] [1] [1] ]
-[[['Sequential Element Ordering]] [ ] [ ] [ ] [ ] [ ] ]
+[[['Element Ordering]] [ ] [ ] [ ] [ ] [ ] ]
[[`bool is_element_equal(const T&, const P&)`] [ ] [__S] [__M] [1] [1] ]
[[`bool is_element_less(const T&, const P&)`] [ ] [__S] [__M] [1] [1] ]
[[`bool is_element_greater(const T&, const P&)`][ ] [__S] [__M] [1] [1] ]
Modified: sandbox/itl/libs/itl/doc/implementation.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/implementation.qbk (original)
+++ sandbox/itl/libs/itl/doc/implementation.qbk 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -65,7 +65,11 @@
n = y.iterative_size();
m = x.iterative_size();
``
-for containers `y` and `x`.
+for containers `y` and `x`.
+Note that ``iterative_size`` refers to the primary entities,
+that we can iterate over. For interval containers these
+are intervals or segments. ``Itervative_size`` never refers
+to element iteration for interval containers.
[endsect][/ Iterative size]
Modified: sandbox/itl/libs/itl/doc/introduction.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/introduction.qbk (original)
+++ sandbox/itl/libs/itl/doc/introduction.qbk 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -21,6 +21,10 @@
formal review.
]
+["A bug crawls across the boost docs on my laptop screen.
+Let him be! We need all the readers we can get.] --
+Freely adapted from [@http://en.wikipedia.org/wiki/Jack_Kornfield Jack Kornfield]
+
Intervals are almost ubiquitous in software development. Yet they are
very easily coded into user defined classes by a pair of numbers
so they are only /implicitly/ used most of the time. The meaning of
@@ -158,13 +162,10 @@
In addition to interval containers the *itl* provides element containers
__itl_set__ and __itl_map__.
-* An __itl_set__ is behavioral equal to __itv_bsets__
- except for iteration, that is to say behavioral equal on
- the __bi_conceptual__ aspect.
-
-* An __itl_map__ is behavioral equal to __itv_bmaps__
- except for iteration, that is to say behavioral equal on
- the __bi_conceptual__ aspect. Specifically a __itl_map__
+* An __itl_set__ is behavioral equal to __itv_bsets__ on the __bi_conceptual__ aspect.
+
+* An __itl_map__ is behavioral equal to __itv_bmaps__ on the __bi_conceptual__ aspect.
+ Specifically a __itl_map__
implements ['*aggregate on overlap*], which is
named ['*aggregate on collision*] for an element container.
Modified: sandbox/itl/libs/itl/doc/semantics.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/semantics.qbk (original)
+++ sandbox/itl/libs/itl/doc/semantics.qbk 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -8,6 +8,9 @@
[section Semantics]
+["Beauty is the ultimate defense against complexity] -- [/David Gelernter]
+[@http://en.wikipedia.org/wiki/David_Gelernter David Gelernter]
+
In the *itl* we follow the notion, that the semantics of a ['*concept*] or
['*abstract data type*] can be expressed by ['*laws*]. We formulate
laws over interval containers that can be evaluated for a given
Added: sandbox/itl/libs/itl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/doxy_doc/doxygen_input/pages/doxygen_mainpage.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -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_ITL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+#define BOOST_ITL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+
+/**
+\mainpage Interval Template Library
+
+\section header_sec Interval Template 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>Interval Template 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/itl/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/itl/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/itl/doc/html/boost_itl/projects.html#boost_itl.projects.large_bitset">
+project section</a>
+of the boost book documentation.
+
+<li>itl::add_iterator, and itl::insert_iterator
+
+To copy or tranform data from std::containers of intervals or segments into
+interval containers you can use an itl::insert_iterator or an itl::add_iterator.
+See examples
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/itl/doc/html/boost_itl/examples/std_copy.html">
+std_copy</a> and
+<a href="http://www.herold-faulhaber.de/boost_itl/doc/libs/itl/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/itl/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/itl/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_ITL_DOXYGEN_MAINPAGE_HPP_JOFA_091216
+
+
Modified: sandbox/itl/libs/itl/example/interval_/interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/interval_/interval.cpp (original)
+++ sandbox/itl/libs/itl/example/interval_/interval.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -15,7 +15,7 @@
This program gives a very short samlpe of different interval instances.
- \include example/interval_/interval.cpp
+ \include interval_/interval.cpp
*/
//[example_interval
#include <iostream>
Modified: sandbox/itl/libs/itl/example/party_/party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/party_/party.cpp (original)
+++ sandbox/itl/libs/itl/example/party_/party.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -50,7 +50,7 @@
The accumulative behavior accumulates associated values on every overlap of
an insertion for the associated values.
- \include party/party.cpp
+ \include party_/party.cpp
*/
// Type itl::set<string> collects the names of party guests. Therefore it needs to
Modified: sandbox/itl/libs/itl/example/toytime.hpp
==============================================================================
--- sandbox/itl/libs/itl/example/toytime.hpp (original)
+++ sandbox/itl/libs/itl/example/toytime.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -8,7 +8,7 @@
http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------------------------------------*/
-#ifdef BOOST_MSVC
+#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
@@ -66,7 +66,7 @@
return stream << value.as_string();
}
-#ifdef BOOST_MSVC
+#ifdef _MSC_VER
#pragma warning(pop)
#endif
Modified: sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -18,7 +18,7 @@
#include <boost/itl/map.hpp>
#include <boost/itl/interval_map.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_set_interval_set_/fastest_set_interval_set.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -19,7 +19,7 @@
#include <boost/itl/interval_set.hpp>
#include <boost/itl/separate_interval_set.hpp>
#include <boost/itl/split_interval_set.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -19,7 +19,7 @@
#include <boost/itl/interval_set.hpp>
#include <boost/itl/separate_interval_set.hpp>
#include <boost/itl/split_interval_set.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl/test/test_itl_map.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_map.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -28,7 +28,7 @@
itv_map_a.add(IDv(2,4,1)).add(IIv(6,7,3));
MapT map_a;
- Interval::atomize(map_a, itv_map_a);
+ segmental::atomize(map_a, itv_map_a);
typename MapT::const_iterator found = map_a.find(MK_v(6));
@@ -69,10 +69,10 @@
itv_map_b.set(IIv(6,7,2));
MapT map_sub_a, map_a, map_a2, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
- Interval::atomize(map_sub_a, itv_map_sub_a);
+ 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 );
Modified: sandbox/itl/libs/itl/test/test_itl_map_/test_itl_map.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_map_/test_itl_map.cpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_map_/test_itl_map.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -18,7 +18,7 @@
#include <boost/itl/map.hpp>
#include <boost/itl/interval_map.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp (original)
+++ sandbox/itl/libs/itl/test/test_quantifier_itl_map.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -33,9 +33,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -66,9 +66,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -102,9 +102,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -135,9 +135,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -171,9 +171,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -206,9 +206,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -245,9 +245,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
@@ -280,9 +280,9 @@
itv_map_c.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
MapT map_a, map_b, map_c;
- Interval::atomize(map_a, itv_map_a);
- Interval::atomize(map_b, itv_map_b);
- Interval::atomize(map_c, itv_map_c);
+ 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);
Modified: sandbox/itl/libs/itl/test/test_set_interval_set_/test_set_interval_set.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_set_interval_set_/test_set_interval_set.cpp (original)
+++ sandbox/itl/libs/itl/test/test_set_interval_set_/test_set_interval_set.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -19,7 +19,7 @@
#include <boost/itl/interval_set.hpp>
#include <boost/itl/separate_interval_set.hpp>
#include <boost/itl/split_interval_set.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl/test/test_set_itl_set.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_set_itl_set.hpp (original)
+++ sandbox/itl/libs/itl/test/test_set_itl_set.hpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -30,9 +30,9 @@
itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
SetT set_a, set_b, set_c;
- Interval::atomize(set_a, itv_set_a);
- Interval::atomize(set_b, itv_set_b);
- Interval::atomize(set_c, itv_set_c);
+ 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);
@@ -60,9 +60,9 @@
itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
SetT set_a, set_b, set_c;
- Interval::atomize(set_a, itv_set_a);
- Interval::atomize(set_b, itv_set_b);
- Interval::atomize(set_c, itv_set_c);
+ 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);
@@ -93,9 +93,9 @@
itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
SetT set_a, set_b, set_c;
- Interval::atomize(set_a, itv_set_a);
- Interval::atomize(set_b, itv_set_b);
- Interval::atomize(set_c, itv_set_c);
+ 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);
@@ -122,9 +122,9 @@
itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
SetT set_a, set_b, set_c;
- Interval::atomize(set_a, itv_set_a);
- Interval::atomize(set_b, itv_set_b);
- Interval::atomize(set_c, itv_set_c);
+ 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);
@@ -155,9 +155,9 @@
itv_set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
SetT set_a, set_b, set_c;
- Interval::atomize(set_a, itv_set_a);
- Interval::atomize(set_b, itv_set_b);
- Interval::atomize(set_c, itv_set_c);
+ 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);
Modified: sandbox/itl/libs/itl/test/test_set_itl_set_/test_set_itl_set.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_set_itl_set_/test_set_itl_set.cpp (original)
+++ sandbox/itl/libs/itl/test/test_set_itl_set_/test_set_itl_set.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -19,7 +19,7 @@
#include <boost/itl/interval_set.hpp>
#include <boost/itl/separate_interval_set.hpp>
#include <boost/itl/split_interval_set.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
using namespace std;
using namespace boost;
Modified: sandbox/itl/libs/itl_xt/example/amount_cube_/amount_cube.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/example/amount_cube_/amount_cube.cpp (original)
+++ sandbox/itl/libs/itl_xt/example/amount_cube_/amount_cube.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -31,7 +31,7 @@
value v:
(t1, ..., tn) -> v
- The values v can be amounts like integers, but also sets, an more complex
+ 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.
@@ -54,13 +54,13 @@
This is the most basic instance of a TupelComputerT. It is demonstrated in this
sampe file.
- \include amount_cube/amount_cube.cpp
+ \include amount_cube_/amount_cube.cpp
*/
-/* Consider a hospital administration that want's to count their patients
+/* 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 };
+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 ...
@@ -71,27 +71,27 @@
typedef amount_tuple_computer<PatientVarsET_size, int> AmountCubeTD;
// This macro helps the notation a little
-#define TRIPEL(tp,x0,x1,x2) tp[0]=x0; tp[1]=x1; tp[2]=x2
+#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
+ /* 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; TRIPEL(marys_data, female, 17, anorexia); cube.insert(marys_data, 1);
- PatientInfoTD sallys_data; TRIPEL(sallys_data, female, 17, anorexia); cube.insert(sallys_data, 1);
- PatientInfoTD peters_data; TRIPEL(peters_data, male, 36, anorexia); cube.insert(peters_data, 1);
- PatientInfoTD anns_data; TRIPEL(anns_data, female, 34, stroke); cube.insert(anns_data, 1);
- PatientInfoTD pauls_data; TRIPEL(pauls_data, male, 72, stroke); cube.insert(pauls_data, 1);
- PatientInfoTD franks_data; TRIPEL(franks_data, male, 82, stroke); cube.insert(franks_data, 1);
+ 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
+/* 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
+ /* 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);
@@ -105,11 +105,11 @@
}
-/* We do not want to count each age separately but to evaluate frequencies
+/* 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
+/* 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>
@@ -139,15 +139,15 @@
void accumulate_for_grouped_age()
{
- // Now we can modify the tupel order
+ // Now we can modify the tupel order
var_tuple_order<PatientInfoTD> groupedAgeOrder;
- // Grouping for age is introduced that way
+ // 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
+ /* 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);
@@ -157,7 +157,7 @@
cout << "----------------------------------------------------------------------------" << endl;
}
-/* We can compute partial sums by switching components off the tupel.
+/* 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()
Modified: sandbox/itl/libs/itl_xt/example/history_/history.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/example/history_/history.cpp (original)
+++ sandbox/itl/libs/itl_xt/example/history_/history.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -11,15 +11,13 @@
#include <stdio.h>
#include <iostream>
#include <boost/itl/type_traits/to_string.hpp>
-#include <boost/itl/split_interval_map.hpp>
#include "../toytime.h"
/** Example history.cpp \file history.cpp
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 split_interval_map that
+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:
@@ -71,7 +69,7 @@
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 history_/history.cpp
*/
Modified: sandbox/itl/libs/itl_xt/example/toytime.h
==============================================================================
--- sandbox/itl/libs/itl_xt/example/toytime.h (original)
+++ sandbox/itl/libs/itl_xt/example/toytime.h 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -8,6 +8,11 @@
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 itl
{
@@ -60,5 +65,9 @@
return stream << time.as_string();
}
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
}} // namespace itl boost
Added: sandbox/itl/libs/validate/example/de_morgan_/de_morgan.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/de_morgan_/de_morgan.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -0,0 +1,260 @@
+/*-----------------------------------------------------------------------------+
+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
+
+Example de_morgan.cpp demonstrates some test 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 semantical
+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/itl/interval_set.hpp>
+#include <boost/itl/split_interval_map.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+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 >,
+ RandomGentor> 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 >,
+ RandomGentor> 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>,
+ RandomGentor> 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/itl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/de_morgan_/vc9_de_morgan.vcproj 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -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"
+ 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="Quelldateien"
+ 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="..\de_morgan_\de_morgan.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ 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>
Modified: sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -14,7 +14,7 @@
#include <boost/itl/set.hpp>
#include <boost/itl/map.hpp>
-#include <boost/itl/interval_morphism.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
#include <boost/validate/itl/functors.hpp>
#include <boost/validate/laws/induced_relation.hpp>
#include <boost/validate/laws/symmetric_difference.hpp>
@@ -45,77 +45,6 @@
void test_LawValidater()
{
- //typedef BinaryPushout<itl::split_interval_map<int,int,partial_enricher>, itl::map<int,int,partial_enricher>, Interval::Atomize, inplace_caret>
- // TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef BinaryPushout<itl::map<int,double>, itl::split_interval_map<int,double>, Interval::Cluster, inplace_et>
- // Map_Cluster_Intersect_DiagramT;
- //LawValidater<Map_Cluster_Intersect_DiagramT, RandomGentor> map_cluster_star_pushout;
- //map_cluster_star_pushout.setTrialsCount(1000);
- //map_cluster_star_pushout.run();
-
- //typedef InplaceFlip
- // <itl::interval_map<int, int, partial_enricher > > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef InplaceSymmetricDifference
- // <itl::interval_map<int, int, partial_enricher > > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef InplaceNaturalInversion
- // <itl::interval_map<int, int, partial_enricher>, inplace_plus, protonic_equal> TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef InplaceAssociativity
- // <itl::split_interval_map<int, int, partial_enricher> > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef InducedRelation
- // <itl::interval_map<int, int, partial_enricher>,
- // typename itl::interval_map<int, int, partial_enricher>::atomized_type,
- // Interval::Atomize, protonic_equal> TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef Balance<itl::tree<int> > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef InplaceDeMorgan
- //<itl::split_interval_map<int, itl::bits16, partial_enricher,
- // std::less, inplace_bit_add, inplace_bit_and>,
- //inplace_bit_add, inplace_bit_and> TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef IntersectsDefined
- // <itl::interval_map<int, int, total_absorber> > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef Interinclusion
- // <interval_map<int,int>, interval_set<int> > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef Interinclusion
- // <interval_map<int, itl::set<int> >, interval_map<int, itl::set<int> > > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef AddendInclusion
- // <interval_set<int>, itl::interval<int> > TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
-
- //typedef FunctionEquality
- //<
- // itl::list<std::pair<int,int> >,
- // itl::map<int,int,partial_absorber>,
- // base_insertion,
- // hint_insertion
- //> TestLawT;
-
- //typedef UnaryAtomicEquivalence
- //<
- // itl::interval_bitset<int,itl::bits16>,
- // itl::list<int>,
- // itl::std_reverse_copy_forward
- //> TestLawT;
typedef UnaryAtomicEquivalence2
<
Modified: sandbox/itl/libs/validate/example/vc9_validate_examples.sln
==============================================================================
--- sandbox/itl/libs/validate/example/vc9_validate_examples.sln (original)
+++ sandbox/itl/libs/validate/example/vc9_validate_examples.sln 2009-12-22 17:05:37 EST (Tue, 22 Dec 2009)
@@ -23,6 +23,10 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_sorted_associative_map_back", "labat_sorted_associative_map_back_\vc9_labat_sorted_associative_map_back.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4772}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_morphic", "labat_itl_morphic_\vc9_labat_itl_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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -73,6 +77,14 @@
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
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