/usr/include/boost/icl
NameSizeModeActions
concept/-0755rm
detail/-0755rm
predicates/-0755rm
type_traits/-0755rm
associative_element_container.hpp8620644editdlrm
associative_interval_container.hpp9970644editdlrm
closed_interval.hpp42520644editdlrm
continuous_interval.hpp71480644editdlrm
discrete_interval.hpp69910644editdlrm
dynamic_interval_traits.hpp13060644editdlrm
functors.hpp164890644editdlrm
gregorian.hpp42250644editdlrm
impl_config.hpp31190644editdlrm
interval.hpp59830644editdlrm
interval_base_map.hpp566990644editdlrm
interval_base_set.hpp225010644editdlrm
interval_bounds.hpp28930644editdlrm
interval_combining_style.hpp9450644editdlrm
interval_map.hpp118720644editdlrm
interval_set.hpp81240644editdlrm
interval_traits.hpp19000644editdlrm
iterator.hpp37420644editdlrm
left_open_interval.hpp45050644editdlrm
map.hpp262820644editdlrm
open_interval.hpp44420644editdlrm
ptime.hpp43170644editdlrm
rational.hpp22190644editdlrm
right_open_interval.hpp44220644editdlrm
separate_interval_set.hpp79280644editdlrm
set.hpp8730644editdlrm
split_interval_map.hpp105930644editdlrm
split_interval_set.hpp86160644editdlrm
Edit: /usr/include/boost/icl/interval.hpp (5983B)
/*-----------------------------------------------------------------------------+ Copyright (c) 2010-2010: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-----------------------------------------------------------------------------*/ #ifndef BOOST_ICL_INTERVAL_HPP_JOFA_101014 #define BOOST_ICL_INTERVAL_HPP_JOFA_101014 #include namespace boost{ namespace icl { template struct static_interval; template struct interval { typedef typename interval_type_default::type interval_type; typedef interval_type type; #ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS static inline interval_type open(const DomainT& low, const DomainT& up) { return static_interval < interval_type // if the domain_type is discrete ... , is_discrete::domain_type>::value , interval_bounds::static_open // 'pretended' bounds will be transformed to , interval_bound_type::value // the represented bounds > ::construct(low, up); } static inline interval_type left_open(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete::domain_type>::value , interval_bounds::static_left_open , interval_bound_type::value > ::construct(low, up); } static inline interval_type right_open(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete::domain_type>::value , interval_bounds::static_right_open , interval_bound_type::value > ::construct(low, up); } static inline interval_type closed(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete::domain_type>::value , interval_bounds::static_closed , interval_bound_type::value > ::construct(low, up); } static inline interval_type construct(const DomainT& low, const DomainT& up) { return icl::construct(low, up); } #else // ICL_USE_DYNAMIC_INTERVAL_BORDER_DEFAULTS static inline interval_type right_open(const DomainT& low, const DomainT& up) { return icl::construct(low, up, interval_bounds::right_open()); } static inline interval_type left_open(const DomainT& low, const DomainT& up) { return icl::construct(low, up, interval_bounds::left_open()); } static inline interval_type open(const DomainT& low, const DomainT& up) { return icl::construct(low, up, interval_bounds::open()); } static inline interval_type closed(const DomainT& low, const DomainT& up) { return icl::construct(low, up, interval_bounds::closed()); } static inline interval_type construct(const DomainT& low, const DomainT& up) { return icl::construct(low, up); } #endif }; template struct static_interval {// is_discrete> typedef typename interval_traits::domain_type domain_type; static inline IntervalT construct(const domain_type& low, const domain_type& up) { return icl::construct( shift_lower(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), low) , shift_upper(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), up ) ); } }; template struct static_interval {// !is_discrete> typedef typename interval_traits::domain_type domain_type; static inline IntervalT construct(const domain_type& low, const domain_type& up) { BOOST_STATIC_ASSERT((is_discrete::value || PretendedBounds==RepresentedBounds)); // For domain_types that are not discrete, e.g. interval // one of the following must hold: If you call // interval::right_open(x,y) then interval::type must be static_right_open // interval::left_open(x,y) then interval::type must be static_left_open // interval::open(x,y) then interval::type must be static_open // interval::closed(x,y) then interval::type must be static_closed // Conversion between 'PretendedBounds' and 'RepresentedBounds' is only possible // for discrete domain_types. return icl::construct(low, up); } }; }} // namespace boost icl #endif // BOOST_ICL_INTERVAL_HPP_JOFA_101014