/
usr
/
include
/
boost
/
icl
/
/usr/include/boost/icl
mkdir
upload
Name
Size
Mode
Actions
concept/
-
0755
rm
detail/
-
0755
rm
predicates/
-
0755
rm
type_traits/
-
0755
rm
associative_element_container.hpp
862
0644
edit
dl
rm
associative_interval_container.hpp
997
0644
edit
dl
rm
closed_interval.hpp
4252
0644
edit
dl
rm
continuous_interval.hpp
7148
0644
edit
dl
rm
discrete_interval.hpp
6991
0644
edit
dl
rm
dynamic_interval_traits.hpp
1306
0644
edit
dl
rm
functors.hpp
16489
0644
edit
dl
rm
gregorian.hpp
4225
0644
edit
dl
rm
impl_config.hpp
3119
0644
edit
dl
rm
interval.hpp
5983
0644
edit
dl
rm
interval_base_map.hpp
56699
0644
edit
dl
rm
interval_base_set.hpp
22501
0644
edit
dl
rm
interval_bounds.hpp
2893
0644
edit
dl
rm
interval_combining_style.hpp
945
0644
edit
dl
rm
interval_map.hpp
11872
0644
edit
dl
rm
interval_set.hpp
8124
0644
edit
dl
rm
interval_traits.hpp
1900
0644
edit
dl
rm
iterator.hpp
3742
0644
edit
dl
rm
left_open_interval.hpp
4505
0644
edit
dl
rm
map.hpp
26282
0644
edit
dl
rm
open_interval.hpp
4442
0644
edit
dl
rm
ptime.hpp
4317
0644
edit
dl
rm
rational.hpp
2219
0644
edit
dl
rm
right_open_interval.hpp
4422
0644
edit
dl
rm
separate_interval_set.hpp
7928
0644
edit
dl
rm
set.hpp
873
0644
edit
dl
rm
split_interval_map.hpp
10593
0644
edit
dl
rm
split_interval_set.hpp
8616
0644
edit
dl
rm
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 <boost/icl/type_traits/interval_type_default.hpp> namespace boost{ namespace icl { template <class IntervalT, bool IsDiscrete, bound_type PretendedBounds, bound_type RepresentedBounds> struct static_interval; template <class DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT)> struct interval { typedef typename interval_type_default<DomainT,Compare>::type interval_type; typedef interval_type type; #ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS static inline interval_type open(const DomainT& low, const DomainT& up) { return static_interval < interval_type // if the domain_type is discrete ... , is_discrete<typename interval_traits<interval_type>::domain_type>::value , interval_bounds::static_open // 'pretended' bounds will be transformed to , interval_bound_type<interval_type>::value // the represented bounds > ::construct(low, up); } static inline interval_type left_open(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete<typename interval_traits<interval_type>::domain_type>::value , interval_bounds::static_left_open , interval_bound_type<interval_type>::value > ::construct(low, up); } static inline interval_type right_open(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete<typename interval_traits<interval_type>::domain_type>::value , interval_bounds::static_right_open , interval_bound_type<interval_type>::value > ::construct(low, up); } static inline interval_type closed(const DomainT& low, const DomainT& up) { return static_interval < interval_type , is_discrete<typename interval_traits<interval_type>::domain_type>::value , interval_bounds::static_closed , interval_bound_type<interval_type>::value > ::construct(low, up); } static inline interval_type construct(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up); } #else // ICL_USE_DYNAMIC_INTERVAL_BORDER_DEFAULTS static inline interval_type right_open(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up, interval_bounds::right_open()); } static inline interval_type left_open(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up, interval_bounds::left_open()); } static inline interval_type open(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up, interval_bounds::open()); } static inline interval_type closed(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up, interval_bounds::closed()); } static inline interval_type construct(const DomainT& low, const DomainT& up) { return icl::construct<interval_type>(low, up); } #endif }; template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds> struct static_interval<IntervalT, true, PretendedBounds, RepresentedBounds> {// is_discrete<domain_type<IntervalT>> typedef typename interval_traits<IntervalT>::domain_type domain_type; static inline IntervalT construct(const domain_type& low, const domain_type& up) { return icl::construct<IntervalT>( shift_lower(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), low) , shift_upper(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), up ) ); } }; template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds> struct static_interval<IntervalT, false, PretendedBounds, RepresentedBounds> {// !is_discrete<domain_type<IntervalT>> typedef typename interval_traits<IntervalT>::domain_type domain_type; static inline IntervalT construct(const domain_type& low, const domain_type& up) { BOOST_STATIC_ASSERT((is_discrete<domain_type>::value || PretendedBounds==RepresentedBounds)); // For domain_types that are not discrete, e.g. interval<float> // one of the following must hold: If you call // interval<T>::right_open(x,y) then interval<T>::type must be static_right_open // interval<T>::left_open(x,y) then interval<T>::type must be static_left_open // interval<T>::open(x,y) then interval<T>::type must be static_open // interval<T>::closed(x,y) then interval<T>::type must be static_closed // Conversion between 'PretendedBounds' and 'RepresentedBounds' is only possible // for discrete domain_types. return icl::construct<IntervalT>(low, up); } }; }} // namespace boost icl #endif // BOOST_ICL_INTERVAL_HPP_JOFA_101014
Save
cmd:
run