#include <Range.h>
Collaboration diagram for Range:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>
Sanket Malde <sanket@stanford.edu>
Oded Wurman <owurman@stanford.edu>
Definition at line 32 of file Range.h.
Public Member Functions | |
bool | excludes (double value) const |
Returns true if the argument value is outside the range. | |
double | fraction (double value) const |
Returns the fraction of the range that value represents. | |
double | high () const |
Returns the maximum of the range object. | |
bool | includes (double value) const |
Returns true if the argument value is inside the range. | |
double | length () const |
Returns the length of the range object. | |
double | low () const |
Returns the minimum of the range object. | |
int | numberOfBins (double width) const |
Returns the number of bins of width width required to fill the range. | |
double | pos () const |
Returns the first positive element in range. | |
Range (const std::vector< double > &array) | |
A constructor taking its range from the range of data in the vector array. | |
Range (double x, double y, double p=DBL_MAX) | |
A constructor that sets the range to {x, y}, with a pos argument of p if it is supplied, otherwise DBL_MAX. | |
Range () | |
The following constructors sets the range to {0.0, 0.0} but sets m_empty to true. | |
void | setEmpty (bool yes=true) |
Sets the range to empty. | |
void | setHigh (double x) |
Sets the maximum of the range object. | |
void | setIntersect (const Range &range) |
Forms the intersect with the range in the argument. | |
void | setLength (double val, bool high_hold=false) |
Sets the length of the range. | |
void | setLow (double x) |
Sets the minimum of the range object. | |
void | setPos (double x) |
Sets the first positive element in range. | |
template<class Iterator> | |
void | setRange (Iterator first, Iterator end) |
Sets the range from the data sequence. | |
void | setRange (double low, double high, double pos) |
Changes the current Range. | |
void | setUnion (const Range &range) |
Forms the union with the range range. | |
Private Attributes | |
bool | m_empty |
A flag indicating that the range is empty. | |
double | m_max |
The maximum in the range. | |
double | m_min |
The minimum in the range. | |
double | m_pos |
The minimum positive value in the range, for log scale. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Range &) |
Displays the state of the Range object. |
|
The following constructors sets the range to {0.0, 0.0} but sets m_empty to true.
|
|
A constructor that sets the range to {x, y}, with a pos argument of p if it is supplied, otherwise DBL_MAX.
|
|
A constructor taking its range from the range of data in the vector array.
Definition at line 78 of file Range.cxx. References setRange(). |
|
Returns
Returns Definition at line 159 of file Range.cxx. References m_max. Referenced by ContourPointRep::createContours(), ContourPointRep::drawContourTicks(), NTupleProjector::inRange(), MapMatrixProjector::inRange(), and Map1Projector::inRange(). |
|
Returns the fraction of the range that value represents.
|
|
|
Returns
Returns Definition at line 152 of file Range.cxx. Referenced by TupleCut::acceptRow(), SymbolPointRep::drawProjectedValue(), ColorSymbolPointRep::drawProjectedValues(), NTupleProjector::getAverage(), and DyHist1DProjector::getAverage(). |
|
|
|
Returns the number of bins of width
Definition at line 205 of file Range.cxx. Referenced by BinnerAxisLinear::getNob(). |
|
|
Sets the range to empty.
Definition at line 171 of file Range.cxx. References m_empty. Referenced by AxisModelBase::setUnionRange(). |
|
Sets the maximum of the range object.
Definition at line 106 of file Range.cxx. Referenced by FitsController::checkForImage(), ProjectorBase::preferredRange(), AxisWidget::processHighSliderMoved(), BinnerAxisLog::setBinWidth(), BinnerAxisLog::setRange(), LogTransform::validate(), Lambert::validate(), and HammerAito::validate(). |
|
Forms the intersect with the range in the argument.
Definition at line 194 of file Range.cxx. References m_max, m_min, m_pos, std::max(), and std::min(). Referenced by AxisModelBase::setIntersectRange(). |
|
Sets the length of the range. The boolean high_hold determines which end is held fixed and which one is modified. Definition at line 141 of file Range.cxx. Referenced by FitsController::checkForImage(), BinnerAxisLinear::setBinWidth(), and BinnerAxisLinear::setRange(). |
|
Sets the minimum of the range object.
Definition at line 93 of file Range.cxx. Referenced by FitsController::checkForImage(), ProjectorBase::preferredRange(), Hist2DProjImp::preferredRange(), Hist1DProjImp::preferredRange(), AxisWidget::processLowSliderMoved(), BinnerAxisLog::setRange(), LogTransform::validate(), Lambert::validate(), and HammerAito::validate(). |
|
Sets the first positive element in range.
Definition at line 119 of file Range.cxx. References m_max, m_min, and m_pos. Referenced by CompositePlotter::autoScaleZ(), and AxisModelBase::setRangePos(). |
|
Sets the range from the data sequence.
Definition at line 168 of file Range.h. References m_max, m_min, m_pos, std::max(), and std::min(). |
|
Changes the current Range.
Definition at line 126 of file Range.cxx. References m_max, m_min, and m_pos. Referenced by MapMatrixProjector::dataRangeOn(), LineProjector::dataRangeOn(), NTuple::fillRange(), FitsNTuple::fillRange(), DataSource::fillRange(), AxisWidget::processHighSliderMoved(), AxisWidget::processLowSliderMoved(), AxisWidget::processTextBoxReturnPressed(), Range(), Inspector::setDragOn(), and AxisModelBase::setRange(). |
|
Forms the union with the range range. The resulting range of the object extends from the lower range of the two objects to the upper range of the two. If the range was empty (
Definition at line 176 of file Range.cxx. References m_empty, m_max, m_min, m_pos, std::max(), and std::min(). Referenced by AxisModelBase::setUnionRange(). |
|
Displays the state of the Range object.
|
|
A flag indicating that the range is empty. An empty range is one that has not yet been set to a value. Definition at line 51 of file Range.h. Referenced by Range(), setEmpty(), and setUnion(). |
|
The maximum in the range.
Definition at line 42 of file Range.h. Referenced by excludes(), fraction(), high(), includes(), length(), numberOfBins(), operator<<(), Range(), setHigh(), setIntersect(), setLength(), setLow(), setPos(), setRange(), and setUnion(). |
|
The minimum in the range.
Definition at line 38 of file Range.h. Referenced by fraction(), includes(), length(), low(), numberOfBins(), operator<<(), Range(), setHigh(), setIntersect(), setLength(), setLow(), setPos(), setRange(), and setUnion(). |
|
The minimum positive value in the range, for log scale.
Definition at line 46 of file Range.h. Referenced by operator<<(), pos(), Range(), setIntersect(), setPos(), setRange(), and setUnion(). |