1 #ifndef MHO_Interval_HH__
2 #define MHO_Interval_HH__
51 void SetBounds(
const std::pair< XIntegerType, XIntegerType >& lower_upper)
110 XIntegerType result[2];
111 int numIntersections;
112 numIntersections = MHO_MathUtilities::FindIntersection< XIntegerType >(
114 if(numIntersections != 0)
147 XIntegerType result[2];
148 int numIntersections;
149 numIntersections = MHO_MathUtilities::FindIntersection< XIntegerType >(
151 if(numIntersections != 0)
157 interval.SetInterval(low, up);
172 XIntegerType result[2];
173 int numIntersections;
174 numIntersections = MHO_MathUtilities::FindIntersection< XIntegerType >(
176 if(numIntersections != 0)
178 interval.SetInterval(result[0], result[1]);
Class MHO_Interval.
Definition: MHO_Interval.hh:24
bool Intersects(const XIntegerType &idx) const
Checks if closed interval intersects with another interval.
Definition: MHO_Interval.hh:128
void SetBounds(XIntegerType lower_bound, XIntegerType upper_bound)
Setter for bounds.
Definition: MHO_Interval.hh:43
MHO_Interval(const MHO_Interval ©)
Definition: MHO_Interval.hh:33
XIntegerType fUpperBound
Definition: MHO_Interval.hh:225
MHO_Interval Intersection(const MHO_Interval &other) const
Checks if this interval intersects with another and returns true if it does.
Definition: MHO_Interval.hh:169
bool fValid
Definition: MHO_Interval.hh:223
void SetLowerBound(XIntegerType low)
Setter for lower bound.
Definition: MHO_Interval.hh:71
MHO_Interval(XIntegerType lower_bound, XIntegerType upper_bound)
Definition: MHO_Interval.hh:28
MHO_Interval Union(const MHO_Interval &other) const
Calculates and returns the union interval of this interval and another.
Definition: MHO_Interval.hh:144
XIntegerType GetUpperBound() const
Getter for upper bound.
Definition: MHO_Interval.hh:92
std::pair< XIntegerType, XIntegerType > GetInterval() const
Getter for interval bounds.
Definition: MHO_Interval.hh:61
XIntegerType GetLowerBound() const
Getter for lower bound.
Definition: MHO_Interval.hh:85
MHO_Interval & operator=(const MHO_Interval &rhs)
Definition: MHO_Interval.hh:183
virtual ~MHO_Interval()
Definition: MHO_Interval.hh:35
MHO_Interval()
Definition: MHO_Interval.hh:26
void SetUpperBound(XIntegerType up)
Setter for upper bound.
Definition: MHO_Interval.hh:78
XIntegerType GetLength() const
Getter for length.
Definition: MHO_Interval.hh:99
XIntegerType fLowerBound
Definition: MHO_Interval.hh:224
void SetBounds(const std::pair< XIntegerType, XIntegerType > &lower_upper)
Setter for bounds.
Definition: MHO_Interval.hh:51
void SetIntervalImpl(XIntegerType low, XIntegerType up)
Setter for interval impl.
Definition: MHO_Interval.hh:201
bool Intersects(const MHO_Interval &other) const
Checks if this interval intersects with another.
Definition: MHO_Interval.hh:108
#define min(a, b)
Definition: max555.c:9
#define max(a, b)
Definition: max555.c:10
Definition: MHO_ChannelLabeler.hh:17