#include <ArrayRange.h>
Public Member Functions | |
ArrayRange () | |
ArrayRange (unsigned dim) | |
ArrayRange (unsigned dim, const Interval< unsigned > &r1) | |
void | lowerLimits (unsigned *limits, unsigned limitsLen) const |
bool | operator< (const ArrayRange &) const |
void | rangeLength (unsigned *range, unsigned rangeLen) const |
unsigned long | rangeSize () const |
ArrayShape | shape () const |
ArrayRange & | stripOuterLayer () |
void | upperLimits (unsigned *limits, unsigned limitsLen) const |
ArrayRange (const ArrayShape &shape) | |
ArrayRange (const unsigned *shape, unsigned shapeLen) | |
bool | isCompatible (const ArrayShape &shape) const |
bool | isCompatible (const unsigned *shape, unsigned shapeLen) const |
Public Member Functions inherited from npstat::BoxND< unsigned > | |
BoxND () | |
BoxND (const unsigned long dim) | |
BoxND (const unsigned long dim, const Interval< unsigned > &v) | |
BoxND (const std::vector< Num2 > &limits) | |
BoxND (const BoxND< Num2 > &r) | |
BoxND & | copyFrom (const BoxND< Num2 > &r) |
unsigned long | dim () const |
BoxND & | expand (double r) |
void | getMidpoint (unsigned *coord, unsigned long coordLen) const |
BoxND & | moveToOrigin () |
double | overlapFraction (const BoxND &r) const |
unsigned | overlapVolume (const BoxND &r) const |
unsigned | volume () const |
bool | isInsideLower (const Num2 *coord, unsigned long coordLen) const |
bool | isInsideUpper (const Num2 *coord, unsigned long coordLen) const |
bool | isInsideWithBounds (const Num2 *coord, unsigned long coordLen) const |
bool | isInside (const Num2 *coord, unsigned long coordLen) const |
BoxND & | operator*= (double r) |
BoxND & | operator/= (double r) |
BoxND & | operator*= (const std::vector< double > &scales) |
BoxND & | operator/= (const std::vector< double > &scales) |
BoxND & | expand (const std::vector< double > &scales) |
BoxND & | expand (const double *scales, unsigned long lenScales) |
BoxND & | operator+= (const std::vector< Num2 > &shifts) |
BoxND & | operator-= (const std::vector< Num2 > &shifts) |
BoxND & | shift (const Num2 *shifts, unsigned long lenShifts) |
gs::ClassId | classId () const |
bool | write (std::ostream &of) const |
Additional Inherited Members | |
Static Public Member Functions inherited from npstat::BoxND< unsigned > | |
static BoxND | allSpace (unsigned long ndim) |
static const char * | classname () |
static void | restore (const gs::ClassId &id, std::istream &in, BoxND *box) |
static BoxND | sizeTwoBox (unsigned long ndim) |
static BoxND | unitBox (unsigned long ndim) |
static unsigned | version () |
Utility class for use in certain array iterations
Definition at line 21 of file ArrayRange.h.
|
inline |
Definition at line 23 of file ArrayRange.h.
|
inlineexplicit |
|
inline |
|
inlineexplicit |
Constructor which creates a range out of a shape which is used to represent the upper limit. The lower limit in each dimension is set to 0.
Definition at line 38 of file ArrayRange.h.
npstat::ArrayRange::ArrayRange | ( | const unsigned * | shape, |
unsigned | shapeLen | ||
) |
bool npstat::ArrayRange::isCompatible | ( | const ArrayShape & | shape | ) | const |
Check for compatibility with a shape
Definition at line 16 of file ArrayRange.cc.
Referenced by npstat::ArrayND< Numeric, StackLen, StackDim >::ArrayND().
bool npstat::ArrayRange::isCompatible | ( | const unsigned * | shape, |
unsigned | shapeLen | ||
) | const |
Definition at line 22 of file ArrayRange.cc.
References assert(), i, bookConverter::max, and findQualityFiles::size.
void npstat::ArrayRange::lowerLimits | ( | unsigned * | limits, |
unsigned | limitsLen | ||
) | const |
Get the lower range limits into an array. The length of the limit array should be at least equal to the dimensionality.
Definition at line 99 of file ArrayRange.cc.
References assert(), AlCaHLTBitMon_QueryRunRegistry::data, i, min(), and findQualityFiles::size.
Referenced by npstat::ArrayND< Numeric, StackLen, StackDim >::ArrayND().
bool npstat::ArrayRange::operator< | ( | const ArrayRange & | r | ) | const |
Operator for use with maps
Definition at line 40 of file ArrayRange.cc.
References i, npstat::Interval< Numeric >::max(), npstat::Interval< Numeric >::min(), and findQualityFiles::size.
void npstat::ArrayRange::rangeLength | ( | unsigned * | range, |
unsigned | rangeLen | ||
) | const |
Get the range into an array
Definition at line 131 of file ArrayRange.cc.
References assert(), AlCaHLTBitMon_QueryRunRegistry::data, i, and findQualityFiles::size.
Referenced by npstat::ArrayND< Numeric, StackLen, StackDim >::ArrayND().
unsigned long npstat::ArrayRange::rangeSize | ( | ) | const |
How many elements will be iterated over?
Definition at line 77 of file ArrayRange.cc.
References i, query::result, and findQualityFiles::size.
Referenced by npstat::ArrayND< Numeric, StackLen, StackDim >::ArrayND().
ArrayShape npstat::ArrayRange::shape | ( | void | ) | const |
The shape which corresponds to this range (i.e., max - min in all dimensions)
Definition at line 90 of file ArrayRange.cc.
References i, and findQualityFiles::size.
ArrayRange & npstat::ArrayRange::stripOuterLayer | ( | ) |
This method changes the range of this object so that for each dimension the minimum becomes larger by 1 and the maximum smaller by 1.
Definition at line 64 of file ArrayRange.cc.
References i, min(), and findQualityFiles::size.
void npstat::ArrayRange::upperLimits | ( | unsigned * | limits, |
unsigned | limitsLen | ||
) | const |
Get the upper range limits into an array
Definition at line 115 of file ArrayRange.cc.
References assert(), AlCaHLTBitMon_QueryRunRegistry::data, i, bookConverter::max, and findQualityFiles::size.