CMS 3D CMS Logo

ArrayRange.h
Go to the documentation of this file.
1 #ifndef NPSTAT_ARRAYRANGE_HH_
2 #define NPSTAT_ARRAYRANGE_HH_
3 
16 
17 namespace npstat {
21  struct ArrayRange : public BoxND<unsigned> {
22  inline ArrayRange() {}
23 
25  inline explicit ArrayRange(unsigned dim) : BoxND<unsigned>(dim) {}
26 
28  inline ArrayRange(unsigned dim, const Interval<unsigned>& r1) : BoxND<unsigned>(dim, r1) {}
29 
31 
36  inline explicit ArrayRange(const ArrayShape& shape) : BoxND<unsigned>(shape) {}
37  ArrayRange(const unsigned* shape, unsigned shapeLen);
39 
44  ArrayShape shape() const;
45 
47 
48  bool isCompatible(const ArrayShape& shape) const;
49  bool isCompatible(const unsigned* shape, unsigned shapeLen) const;
51 
53  unsigned long rangeSize() const;
54 
56  bool operator<(const ArrayRange&) const;
57 
64 
69  void lowerLimits(unsigned* limits, unsigned limitsLen) const;
70 
72  void upperLimits(unsigned* limits, unsigned limitsLen) const;
73 
75  void rangeLength(unsigned* range, unsigned rangeLen) const;
76  };
77 } // namespace npstat
78 
79 #endif // NPSTAT_ARRAYRANGE_HH_
npstat::ArrayRange::lowerLimits
void lowerLimits(unsigned *limits, unsigned limitsLen) const
Definition: ArrayRange.cc:86
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
npstat::ArrayRange::shape
ArrayShape shape() const
Definition: ArrayRange.cc:78
npstat::ArrayRange::stripOuterLayer
ArrayRange & stripOuterLayer()
Definition: ArrayRange.cc:56
npstat::ArrayRange::ArrayRange
ArrayRange(unsigned dim)
Definition: ArrayRange.h:25
npstat::ArrayRange
Definition: ArrayRange.h:21
npstat::ArrayRange::ArrayRange
ArrayRange(const ArrayShape &shape)
Definition: ArrayRange.h:36
npstat::ArrayRange::isCompatible
bool isCompatible(const ArrayShape &shape) const
Definition: ArrayRange.cc:14
npstat::ArrayRange::rangeSize
unsigned long rangeSize() const
Definition: ArrayRange.cc:67
npstat::ArrayShape
std::vector< unsigned > ArrayShape
Definition: ArrayShape.h:21
npstat
Definition: AbsArrayProjector.h:14
npstat::ArrayRange::ArrayRange
ArrayRange(unsigned dim, const Interval< unsigned > &r1)
Definition: ArrayRange.h:28
ArrayShape.h
Utilities for defining shapes of multidimensional arrays.
npstat::Interval
Definition: Interval.h:25
npstat::ArrayRange::upperLimits
void upperLimits(unsigned *limits, unsigned limitsLen) const
Definition: ArrayRange.cc:100
npstat::BoxND
Definition: BoxND.h:24
npstat::ArrayRange::rangeLength
void rangeLength(unsigned *range, unsigned rangeLen) const
Definition: ArrayRange.cc:114
TH2PolyOfflineMaps.limits
limits
Definition: TH2PolyOfflineMaps.py:45
npstat::ArrayRange::operator<
bool operator<(const ArrayRange &) const
Definition: ArrayRange.cc:34
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
npstat::BoxND< unsigned >::dim
unsigned long dim() const
Definition: BoxND.h:54
npstat::ArrayRange::ArrayRange
ArrayRange()
Definition: ArrayRange.h:22
BoxND.h
Template to represent rectangles, boxes, and hyperboxes.