11 template<
class T>
class TRange :
public std::pair<T,T> {
17 : std::pair<
T,
T> (aMin,aMax) { }
19 TRange(
const std::pair<T,T> & apair )
20 : std::pair<
T,
T> (apair) { }
31 bool empty()
const {
return (this->second < this->
first); }
35 if (value < this->
first || this->
second < value)
return false;
54 if( this->
empty())
return r;
55 else if( r.
empty())
return *
this;
66 return out <<
"("<<r.
min()<<
","<<r.
max()<<
")";
bool inside(const T &value) const
check if object is inside region
TRange< T > sum(const TRange< T > &r) const
sum of overlaping regions. the overlapping should be checked before.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
const T & min() const
lower edge of range
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const T & max() const
upper edge of range
bool empty() const
true for empty region. note that region [x,x] is not empty
TRange(const std::pair< T, T > &apair)
TRange(const T &aMin, const T &aMax)