#include <ArrayRange.h>
Public Member Functions | |
ArrayRange () | |
ArrayRange (const ArrayShape &shape) | |
ArrayRange (const unsigned *shape, unsigned shapeLen) | |
ArrayRange (unsigned dim) | |
ArrayRange (unsigned dim, const Interval< unsigned > &r1) | |
bool | isCompatible (const ArrayShape &shape) const |
bool | isCompatible (const unsigned *shape, unsigned shapeLen) const |
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 |
Public Member Functions inherited from npstat::BoxND< unsigned > | |
BoxND () | |
BoxND (const BoxND< Num2 > &r) | |
BoxND (const std::vector< Num2 > &limits) | |
BoxND (const unsigned long dim) | |
BoxND (const unsigned long dim, const Interval< unsigned > &v) | |
gs::ClassId | classId () const |
BoxND & | copyFrom (const BoxND< Num2 > &r) |
BoxND< unsigned > & | copyFrom (const BoxND< Num2 > &r) |
unsigned long | dim () const |
BoxND & | expand (const double *scales, unsigned long lenScales) |
BoxND & | expand (const std::vector< double > &scales) |
BoxND & | expand (double r) |
void | getMidpoint (unsigned *coord, unsigned long coordLen) const |
bool | isInside (const Num2 *coord, unsigned long coordLen) 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 |
BoxND & | moveToOrigin () |
BoxND & | operator*= (const std::vector< double > &scales) |
BoxND & | operator*= (double r) |
BoxND & | operator+= (const std::vector< Num2 > &shifts) |
BoxND< unsigned > & | operator+= (const std::vector< Num2 > &shifts) |
BoxND & | operator-= (const std::vector< Num2 > &shifts) |
BoxND< unsigned > & | operator-= (const std::vector< Num2 > &shifts) |
BoxND & | operator/= (const std::vector< double > &scales) |
BoxND & | operator/= (double r) |
double | overlapFraction (const BoxND &r) const |
unsigned | overlapVolume (const BoxND &r) const |
BoxND< unsigned > & | shift (const Num2 *shifts, const unsigned long shiftsLen) |
BoxND & | shift (const Num2 *shifts, unsigned long lenShifts) |
unsigned | volume () 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 22 of file ArrayRange.h.
|
inlineexplicit |
|
inline |
The given interval is repeated for every dimension
Definition at line 28 of file ArrayRange.h.
|
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 36 of file ArrayRange.h.
npstat::ArrayRange::ArrayRange | ( | const unsigned * | shape, |
unsigned | shapeLen | ||
) |
bool npstat::ArrayRange::isCompatible | ( | const ArrayShape & | shape | ) | const |
bool npstat::ArrayRange::isCompatible | ( | const unsigned * | shape, |
unsigned | shapeLen | ||
) | const |
Definition at line 19 of file ArrayRange.cc.
References cms::cuda::assert(), mps_fire::i, SiStripPI::max, findQualityFiles::size, and mitigatedMETSequence_cff::U.
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 86 of file ArrayRange.cc.
References cms::cuda::assert(), data, mps_fire::i, TH2PolyOfflineMaps::limits, min(), and findQualityFiles::size.
bool npstat::ArrayRange::operator< | ( | const ArrayRange & | r | ) | const |
Operator for use with maps
Definition at line 34 of file ArrayRange.cc.
References mps_fire::i, npstat::Interval< Numeric >::max(), npstat::Interval< Numeric >::min(), alignCSCRings::r, and findQualityFiles::size.
void npstat::ArrayRange::rangeLength | ( | unsigned * | range, |
unsigned | rangeLen | ||
) | const |
Get the range into an array
Definition at line 114 of file ArrayRange.cc.
References cms::cuda::assert(), data, mps_fire::i, TH2PolyOfflineMaps::limits, and findQualityFiles::size.
unsigned long npstat::ArrayRange::rangeSize | ( | ) | const |
How many elements will be iterated over?
Definition at line 67 of file ArrayRange.cc.
References mps_fire::i, mps_fire::result, and findQualityFiles::size.
ArrayShape npstat::ArrayRange::shape | ( | void | ) | const |
The shape which corresponds to this range (i.e., max - min in all dimensions)
Definition at line 78 of file ArrayRange.cc.
References mps_fire::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 56 of file ArrayRange.cc.
References mps_fire::i, min(), findQualityFiles::size, and mitigatedMETSequence_cff::U.
void npstat::ArrayRange::upperLimits | ( | unsigned * | limits, |
unsigned | limitsLen | ||
) | const |
Get the upper range limits into an array
Definition at line 100 of file ArrayRange.cc.
References cms::cuda::assert(), data, mps_fire::i, TH2PolyOfflineMaps::limits, SiStripPI::max, and findQualityFiles::size.