QIntervalSet Class Reference

List of all members.


Detailed Description

Collection of disjoint intervals of real numbers.

Author:
Adam Bryant (adam_bryant@berkeley.edu)

Public Member Functions

 QIntervalSet ()
 Default constructor.
 QIntervalSet (const double min, const double max)
 Constructor.
virtual ~QIntervalSet ()
 Destructor.
void CloseGapsSmallerThan (const double smallestAllowedGap)
 Close gaps smaller than smallestAllowedGap.
bool Consolidate ()
 Consolidate overlapped intervals.
bool Contains (const double value) const
 Return whether the interval set contains a value.
const std::list< QInterval > & GetIntervals () const
 Get the list storing the intervals.
QMatrix GetMatrix ()
 Get matrix containing the intervals.
double GetMax () const
 Get maximum of all intervals in the set.
double GetMin () const
 Get minimum of all intervals in the set.
void Insert (const double min, const double max)
 Add interval to the set.
void Insert (QInterval interval)
 Add QInterval to the set.
double Length () const
 Get total length of all intervals in the set.
void RemoveIntervalsShorterThan (const double minimumLength)
 Remove intervals shorter than minimumLength.
void SetLowerBound (const double lowerBound)
 Set lower bound on the contents of the set.
void SetUpperBound (const double upperBound)
 Set upper bound on the contents of the set.
size_t Size () const
 Get number of intervals in the set.

Protected Attributes

std::list< QIntervalfIntervals
 Intervals in the set.
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.
double fUpperBound
 Upper bound on the contents of the set.

Member Function Documentation

bool QIntervalSet::Consolidate (  ) 

Consolidate overlapped intervals.

Returns:
true if overlapped intervals found

References fIntervals.

Referenced by Insert().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:07 2010 for CUORE Software by  doxygen 1.5.6