/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_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 #include 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 bounded_value { public: typedef DomainT domain_type; typedef bounded_value 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