9 #ifndef _Q_INTERVAL_SET_HH_
10 #define _Q_INTERVAL_SET_HH_
41 bool Contains(
const double value)
const;
80 void Dump(std::ostream &o)
const;
#define Q_BEGIN_NAMESPACE
double min(const Diana::QVector &v)
Collection of disjoint intervals of real numbers.
void RemoveIntervalsShorterThan(const double minimumLength)
Remove intervals shorter than minimumLength.
const std::list< QInterval > & GetIntervals() const
Get the list storing the intervals.
std::list< QInterval > fIntervals
Intervals in the set.
double Length() const
Get total length of all intervals in the set.
virtual ~QIntervalSet()
Destructor.
void CloseGapsSmallerThan(const double smallestAllowedGap)
Close gaps smaller than smallestAllowedGap.
void Dump(std::ostream &o) const
Dump the intervals to a stream.
void SetLowerBound(const double lowerBound)
Set lower bound on the contents of the set.
QIntervalSet()
Default constructor.
QMatrix GetMatrix()
Get matrix containing the intervals.
double fUpperBound
Upper bound on the contents of the set.
double GetMax() const
Get maximum of all intervals in the set.
size_t Size() const
Get number of intervals in the set.
void Insert(const double min, const double max)
Add interval to the set.
bool Contains(const double value) const
Return whether the interval set contains a value.
double GetMin() const
Get minimum of all intervals in the set.
void SetUpperBound(const double upperBound)
Set upper bound on the contents of the set.
bool Consolidate()
Consolidate overlapped intervals.
bool fIsLowerBoundSet
Whether or not a lower bound is set.
bool fIsUpperBoundSet
Whether or not an upper bound is set.
double fLowerBound
Lower bound on the contents of the set.
QObjectDef(QIntervalSet, 1)
Interval of real numbers.
Interface for matrices in Diana analysis.
base class for objects handled by QEvent and QGlobalDataManager.