11 for (
unsigned i=0;
i<imax; ++
i)
18 const unsigned imax = ishape.size();
19 return isCompatible(imax ? &ishape[0] : (
unsigned*)
nullptr, imax);
23 const unsigned imax)
const 25 if (this->
size() != imax)
30 for (
unsigned i=0;
i<imax; ++
i)
31 if ((*
this)[
i].length() == 0
U)
33 for (
unsigned i=0;
i<imax; ++
i)
34 if ((*
this)[
i].
max() > ishape[
i])
42 const unsigned mysize = this->
size();
43 const unsigned othersize = r.size();
44 if (mysize < othersize)
46 if (mysize > othersize)
48 for (
unsigned i=0;
i<mysize; ++
i)
52 if (left.
min() < right.
min())
54 if (left.
min() > right.
min())
56 if (left.
max() < right.
max())
58 if (left.
max() > right.
max())
66 const unsigned mysize = this->
size();
67 for (
unsigned i=0;
i<mysize; ++
i)
69 (*this)[
i].setMin((*
this)[
i].
min() + 1
U);
70 const unsigned uplim = (*this)[
i].max();
72 (*this)[
i].setMax(uplim - 1
U);
79 unsigned long result = 0UL;
80 const unsigned imax = this->
size();
84 for (
unsigned i=0;
i<imax; ++
i)
85 result *= (*
this)[
i].length();
92 const unsigned imax = this->
size();
94 for (
unsigned i=0;
i<imax; ++
i)
95 oshape[
i] = (*
this)[
i].length();
100 const unsigned limitsLen)
const 102 const unsigned imax = this->
size();
104 "In npstat::ArrayRange::lowerLimits: " 105 "insufficient size of the output buffer");
110 for (
unsigned i=0;
i<imax; ++
i)
111 limits[
i] = data[
i].
min();
116 const unsigned limitsLen)
const 118 const unsigned imax = this->
size();
120 "In npstat::ArrayRange::upperLimits: " 121 "insufficient size of the output buffer");
126 for (
unsigned i=0;
i<imax; ++
i)
127 limits[
i] = data[
i].
max();
132 const unsigned limitsLen)
const 134 const unsigned imax = this->
size();
136 "In npstat::ArrayRange::rangeLength: " 137 "insufficient size of the output buffer");
142 for (
unsigned i=0;
i<imax; ++
i)
143 limits[
i] = data[
i].length();
void upperLimits(unsigned *limits, unsigned limitsLen) const
const Numeric max() const
std::vector< unsigned > ArrayShape
Multidimensional range of array indices.
unsigned long rangeSize() const
Exceptions for the npstat namespace.
bool isCompatible(const ArrayShape &shape) const
void rangeLength(unsigned *range, unsigned rangeLen) const
void lowerLimits(unsigned *limits, unsigned limitsLen) const
char data[epos_bytes_allocation]
ArrayRange & stripOuterLayer()
const Numeric min() const
bool operator<(const ArrayRange &) const