9 for (
unsigned i = 0;
i < imax; ++
i)
15 const unsigned imax = ishape.size();
16 return isCompatible(imax ? &ishape[0] : (
unsigned*)
nullptr, imax);
20 if (this->
size() != imax)
24 for (
unsigned i = 0;
i < imax; ++
i)
25 if ((*
this)[
i].length() == 0
U)
27 for (
unsigned i = 0;
i < imax; ++
i)
28 if ((*
this)[
i].
max() > ishape[
i])
35 const unsigned mysize = this->
size();
36 const unsigned othersize = r.size();
37 if (mysize < othersize)
39 if (mysize > othersize)
41 for (
unsigned i = 0;
i < mysize; ++
i) {
44 if (left.
min() < right.
min())
46 if (left.
min() > right.
min())
48 if (left.
max() < right.
max())
50 if (left.
max() > right.
max())
57 const unsigned mysize = this->
size();
58 for (
unsigned i = 0;
i < mysize; ++
i) {
59 (*this)[
i].setMin((*
this)[
i].
min() + 1
U);
60 const unsigned uplim = (*this)[
i].max();
62 (*this)[
i].setMax(uplim - 1
U);
68 unsigned long result = 0UL;
69 const unsigned imax = this->
size();
72 for (
unsigned i = 0;
i < imax; ++
i)
73 result *= (*
this)[
i].length();
79 const unsigned imax = this->
size();
81 for (
unsigned i = 0;
i < imax; ++
i)
82 oshape[
i] = (*
this)[
i].length();
87 const unsigned imax = this->
size();
90 "In npstat::ArrayRange::lowerLimits: " 91 "insufficient size of the output buffer");
95 for (
unsigned i = 0;
i < imax; ++
i)
96 limits[
i] = data[
i].
min();
101 const unsigned imax = this->
size();
102 if (limitsLen < imax)
104 "In npstat::ArrayRange::upperLimits: " 105 "insufficient size of the output buffer");
109 for (
unsigned i = 0;
i < imax; ++
i)
110 limits[
i] = data[
i].
max();
115 const unsigned imax = this->
size();
116 if (limitsLen < imax)
118 "In npstat::ArrayRange::rangeLength: " 119 "insufficient size of the output buffer");
123 for (
unsigned i = 0;
i < imax; ++
i)
124 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