|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include <boost/numeric/interval/compare/explicit.hpp>
28 m_precision(
range.m_precision )
34 if (
this != &
range ) {
100 if ( r1.isActive() != r2.isActive() ) {
104 if (
false == r1.isActive() &&
105 false == r2.isActive() ) {
108 const double precision =
std::min( r1.precision(), r2.precision() );
110 return ( ( std::fabs(r1.lower() - r2.lower()) <= precision ) &&
111 ( std::fabs(r1.upper() - r2.upper()) <= precision ) );
121 if ( r1.isActive() != r2.isActive() ) {
123 if ( r2.isActive() ) {
132 if (
false == r1.isActive() &&
133 false == r2.isActive() ) {
137 return ( r1.upper() < r2.lower() );
147 if ( r1.isActive() != r2.isActive() ) {
149 if ( r2.isActive() ) {
158 if (
false == r1.isActive() &&
159 false == r2.isActive() ) {
163 return ( r1.lower() > r2.upper() );
double MINUS_INF() const
Define -infinity according to specific implementation.
FilterRange()
Default constructor: it sets the minimum value to -infinity and the maximum value to +infinity.
bool isInRange(const double point) const
return Return true if the point is in range : min <= point <= max
bool operator==(const FilterRange &r1, const FilterRange &r2)
boost::numeric::interval< double > interval_t
std::optional< interval_t > m_range
The boost interval wrapped by a boost optional.
bool operator<=(const FilterRange &r1, const FilterRange &r2)
FilterRange implements the range (ie: [min, max]) the filters will use to take their filtering decisi...
void include(const double xMin, const double xMax)
Add [xMin, xMax] interval to existing set of valid ranges.
double m_precision
Setup the wanted double precision.
double PLUS_INF() const
Define +infinity according to specific implementation.
bool operator!=(const FilterRange &r1, const FilterRange &r2)
void includeAll()
Set full range (from MINUS_INF to PLUS_INF ).
bool operator<(const FilterRange &r1, const FilterRange &r2)
bool operator>(const FilterRange &r1, const FilterRange &r2)
void setRange(const double lower, const double upper)
Non-const methods:
bool operator>=(const FilterRange &r1, const FilterRange &r2)
void addRange(double xMin, double xMax)
add a new range [xmin,xmax] deleting previous ranges full contained
FilterRange & operator=(const FilterRange &obj)
Assignment operator:
double lower() const
Return the minimum value of the range.
double upper() const
Return the maximum value of the range.