/
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_bounds.hpp
(2893B)
/*-----------------------------------------------------------------------------+ Copyright (c) 2010-2010: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-----------------------------------------------------------------------------*/ #ifndef BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330 #define BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330 #include <boost/utility/enable_if.hpp> #include <boost/icl/detail/design_config.hpp> namespace boost{namespace icl { typedef unsigned char bound_type; class interval_bounds { public: BOOST_STATIC_CONSTANT(bound_type, static_open = 0); BOOST_STATIC_CONSTANT(bound_type, static_left_open = 1); BOOST_STATIC_CONSTANT(bound_type, static_right_open = 2); BOOST_STATIC_CONSTANT(bound_type, static_closed = 3); BOOST_STATIC_CONSTANT(bound_type, dynamic = 4); BOOST_STATIC_CONSTANT(bound_type, undefined = 5); BOOST_STATIC_CONSTANT(bound_type, _open = 0); BOOST_STATIC_CONSTANT(bound_type, _left_open = 1); BOOST_STATIC_CONSTANT(bound_type, _right_open = 2); BOOST_STATIC_CONSTANT(bound_type, _closed = 3); BOOST_STATIC_CONSTANT(bound_type, _right = 1); BOOST_STATIC_CONSTANT(bound_type, _left = 2); BOOST_STATIC_CONSTANT(bound_type, _all = 3); public: interval_bounds():_bits(){} explicit interval_bounds(bound_type bounds): _bits(bounds){} interval_bounds all ()const { return interval_bounds(_bits & _all ); } interval_bounds left ()const { return interval_bounds(_bits & _left ); } interval_bounds right()const { return interval_bounds(_bits & _right); } interval_bounds reverse_left ()const { return interval_bounds((bound_type(~_bits)>>1) & _right); } interval_bounds reverse_right()const { return interval_bounds((bound_type(~_bits)<<1) & _left ); } bound_type bits()const{ return _bits; } static interval_bounds open() { return interval_bounds(_open); } static interval_bounds left_open() { return interval_bounds(_left_open); } static interval_bounds right_open(){ return interval_bounds(_right_open);} static interval_bounds closed() { return interval_bounds(_closed); } public: bound_type _bits; }; template<class DomainT> class bounded_value { public: typedef DomainT domain_type; typedef bounded_value<DomainT> type; public: bounded_value(const domain_type& value, interval_bounds bound) : _value(value), _bound(bound) {} domain_type value()const { return _value; } interval_bounds bound()const { return _bound; } private: domain_type _value; interval_bounds _bound; }; }} // namespace icl boost #endif
Save
cmd:
run