![]() |
Diana Software
|
Collection of disjoint intervals of real numbers. More...
Public Member Functions | |
| QIntervalSet () | |
| Default constructor. More... | |
| QIntervalSet (const double min, const double max) | |
| Constructor. More... | |
| void | Clear () |
| Clear() More... | |
| virtual | ~QIntervalSet () |
| Destructor. More... | |
| void | CloseGapsSmallerThan (const double smallestAllowedGap) |
| Close gaps smaller than smallestAllowedGap. More... | |
| bool | Consolidate () |
| Consolidate overlapped intervals. More... | |
| bool | Contains (const double value) const |
| Return whether the interval set contains a value. More... | |
| const std::list< QInterval > & | GetIntervals () const |
| Get the list storing the intervals. More... | |
| QMatrix | GetMatrix () |
| Get matrix containing the intervals. More... | |
| double | GetMax () const |
| Get maximum of all intervals in the set. More... | |
| double | GetMin () const |
| Get minimum of all intervals in the set. More... | |
| void | Insert (const double min, const double max) |
| Add interval to the set. More... | |
| void | Insert (QInterval interval) |
| Add QInterval to the set. More... | |
| double | Length () const |
| Get total length of all intervals in the set. More... | |
| void | RemoveIntervalsShorterThan (const double minimumLength) |
| Remove intervals shorter than minimumLength. More... | |
| void | SetLowerBound (const double lowerBound) |
| Set lower bound on the contents of the set. More... | |
| void | SetUpperBound (const double upperBound) |
| Set upper bound on the contents of the set. More... | |
| size_t | Size () const |
| Get number of intervals in the set. More... | |
| void | Dump (std::ostream &o) const |
| Dump the intervals to a stream. More... | |
Public Member Functions inherited from QObject | |
| QObject () | |
| default constructor More... | |
| virtual | ~QObject () |
| destructor More... | |
| QObject & | operator= (const QObject &rhs) |
| operator= More... | |
| void | Validate () |
| make object valid More... | |
| void | InValidate () |
| make object non valid More... | |
| bool | IsValid () const |
| check wheter object is valid More... | |
| void | SetWrite (bool write=true) |
| write or not this object More... | |
| bool | GetWrite () const |
| check wheter write or not this object More... | |
| bool | IsRequired () const |
| check wheter this object is required by some module More... | |
| void | SetIsRequired (bool required=true) |
| set that this object is required More... | |
| bool | IsJustAdded () const |
| check wheter this object has been just added by some module More... | |
| void | SetIsJustAdded (bool added=true) |
| set that this object has been just added More... | |
| void | Reset () |
| set object to non valid and calls Clear() More... | |
| virtual bool | Fill (QObject *evData) const =0 |
| calls operator= of inheriting classes. Validity flag and bits are not copied. This function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp. If evData type mismatches returns false, true otherwise. More... | |
| void | FullyFill (QObject *evData) const |
| calls Fill(QObject*) if this QObject IsValid(). Copies Validity flag and bits More... | |
| virtual QObject * | Duplicate () const =0 |
| create object of same type, this function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp More... | |
| virtual void | Print () const |
| print content on screen More... | |
| virtual QError | WriteOnStream (std::ostream &o) const |
| print content to stream (intended for storage in text files) More... | |
| virtual QError | ReadFromStream (std::istream &o) |
| fill content from stream (intended for storage in text files) More... | |
| void | CopyBits (QObject *obj) const |
| copy validity and temporary bits to another QObject More... | |
| virtual void | Draw (Option_t *option="") |
Protected Member Functions | |
| QObjectDef (QIntervalSet, 1) | |
Protected Attributes | |
| std::list< QInterval > | fIntervals |
| Intervals in the set. More... | |
| bool | fIsLowerBoundSet |
| Whether or not a lower bound is set. More... | |
| bool | fIsUpperBoundSet |
| Whether or not an upper bound is set. More... | |
| double | fLowerBound |
| Lower bound on the contents of the set. More... | |
| double | fUpperBound |
| Upper bound on the contents of the set. More... | |
Additional Inherited Members | |
Public Types inherited from QObject | |
| enum | { kIsValid = BIT(15) , kWrite = BIT(0) , kIsRequired = BIT(1) , kIsJustAdded = BIT(2) } |
| TObject bits. More... | |
Static Public Member Functions inherited from QObject | |
| static QObject * | New (const char *object) |
Collection of disjoint intervals of real numbers.
Definition at line 19 of file QIntervalSet.hh.
| Q_BEGIN_NAMESPACE QIntervalSet::QIntervalSet | ( | ) |
Default constructor.
Definition at line 10 of file QIntervalSet.cc.
| QIntervalSet::QIntervalSet | ( | const double | min, |
| const double | max | ||
| ) |
|
inlinevirtual |
Destructor.
Definition at line 31 of file QIntervalSet.hh.
|
virtual |
Implements QObject.
Definition at line 22 of file QIntervalSet.cc.
References fIntervals, fIsLowerBoundSet, fIsUpperBoundSet, fLowerBound, fUpperBound, and Q_DOUBLE_DEFAULT.
| void QIntervalSet::CloseGapsSmallerThan | ( | const double | smallestAllowedGap | ) |
Close gaps smaller than smallestAllowedGap.
Definition at line 31 of file QIntervalSet.cc.
References fIntervals, fIsLowerBoundSet, fIsUpperBoundSet, fLowerBound, fUpperBound, and Size().
| bool QIntervalSet::Consolidate | ( | ) |
Consolidate overlapped intervals.
Definition at line 69 of file QIntervalSet.cc.
References fIntervals, and max.
Referenced by Insert().
| bool QIntervalSet::Contains | ( | const double | value | ) | const |
Return whether the interval set contains a value.
Definition at line 98 of file QIntervalSet.cc.
References fIntervals.
|
virtual |
Dump the intervals to a stream.
Reimplemented from QObject.
Definition at line 294 of file QIntervalSet.cc.
References fIntervals, fIsLowerBoundSet, fIsUpperBoundSet, fLowerBound, and fUpperBound.
|
inline |
Get the list storing the intervals.
Definition at line 44 of file QIntervalSet.hh.
References fIntervals.
| QMatrix QIntervalSet::GetMatrix | ( | ) |
Get matrix containing the intervals.
Definition at line 112 of file QIntervalSet.cc.
References fIntervals, and Size().
|
inline |
Get maximum of all intervals in the set.
Definition at line 50 of file QIntervalSet.hh.
References fIntervals.
Referenced by Insert(), and SetUpperBound().
|
inline |
Get minimum of all intervals in the set.
Definition at line 54 of file QIntervalSet.hh.
References fIntervals.
Referenced by Insert(), and SetLowerBound().
|
inline |
| void QIntervalSet::Insert | ( | QInterval | interval | ) |
Add QInterval to the set.
Definition at line 126 of file QIntervalSet.cc.
References Consolidate(), fIntervals, fIsLowerBoundSet, fIsUpperBoundSet, fLowerBound, fUpperBound, QInterval::GetMax(), GetMax(), QInterval::GetMin(), GetMin(), max, min(), QInterval::SetMax(), and QInterval::SetMin().
| double QIntervalSet::Length | ( | ) | const |
Get total length of all intervals in the set.
Definition at line 238 of file QIntervalSet.cc.
References fIntervals.
|
protected |
| void QIntervalSet::RemoveIntervalsShorterThan | ( | const double | minimumLength | ) |
Remove intervals shorter than minimumLength.
Definition at line 249 of file QIntervalSet.cc.
References fIntervals.
| void QIntervalSet::SetLowerBound | ( | const double | lowerBound | ) |
Set lower bound on the contents of the set.
Definition at line 262 of file QIntervalSet.cc.
References fIntervals, fIsLowerBoundSet, fLowerBound, and GetMin().
| void QIntervalSet::SetUpperBound | ( | const double | upperBound | ) |
Set upper bound on the contents of the set.
Definition at line 278 of file QIntervalSet.cc.
References fIntervals, fIsUpperBoundSet, fUpperBound, and GetMax().
|
inline |
Get number of intervals in the set.
Definition at line 77 of file QIntervalSet.hh.
References fIntervals.
Referenced by CloseGapsSmallerThan(), and GetMatrix().
|
protected |
Intervals in the set.
Definition at line 84 of file QIntervalSet.hh.
Referenced by Clear(), CloseGapsSmallerThan(), Consolidate(), Contains(), Dump(), GetIntervals(), GetMatrix(), GetMax(), GetMin(), Insert(), Length(), QIntervalSet(), RemoveIntervalsShorterThan(), SetLowerBound(), SetUpperBound(), and Size().
|
protected |
Whether or not a lower bound is set.
Definition at line 87 of file QIntervalSet.hh.
Referenced by Clear(), CloseGapsSmallerThan(), Dump(), Insert(), and SetLowerBound().
|
protected |
Whether or not an upper bound is set.
Definition at line 90 of file QIntervalSet.hh.
Referenced by Clear(), CloseGapsSmallerThan(), Dump(), Insert(), and SetUpperBound().
|
protected |
Lower bound on the contents of the set.
Definition at line 93 of file QIntervalSet.hh.
Referenced by Clear(), CloseGapsSmallerThan(), Dump(), Insert(), and SetLowerBound().
|
protected |
Upper bound on the contents of the set.
Definition at line 96 of file QIntervalSet.hh.
Referenced by Clear(), CloseGapsSmallerThan(), Dump(), Insert(), and SetUpperBound().