43 mdata,
mvr,
msr,
mbr,
mpr,
mrr,
mcr,
v, s,
b, p, r,
c);
56 mdata +
OFFSET(
c),
mvr,
msr,
mbr,
mpr,
mrr,
v, s,
b, p, r);
68 mdata +
OFFSET(r),
mvr,
msr,
mbr,
mpr,
mcr,
v, s,
b, p,
c);
80 mdata +
OFFSET(p),
mvr,
msr,
mbr,
mrr,
mcr,
v, s,
b, r,
c);
92 mdata +
OFFSET(
b),
mvr,
msr,
mpr,
mrr,
mcr,
v, s, p, r,
c);
104 mdata +
OFFSET(s),
mvr,
mbr,
mpr,
mrr,
mcr,
v,
b, p, r,
c);
116 mdata +
OFFSET(
v),
msr,
mbr,
mpr,
mrr,
mcr, s,
b, p, r,
c);
870 a.msr.mextent *
a.mbr.mextent *
a.mpr.mextent *
a.mrr.mextent *
892 : mvr(
v), msr(s), mbr(
b), mpr(p), mrr(r), mcr(
c), mdata(data) {
934 if (ip != end_page) {
939 for (; ip != end_page; ++ip) {
960 return Tensor6View(
mdata,
mvr,
msr,
mbr,
mpr,
mrr,
mcr,
v, s,
b, p, r,
c);
972 return Tensor5View(
mdata +
OFFSET(
c),
mvr,
msr,
mbr,
mpr,
mrr,
v, s,
b, p, r);
983 return Tensor5View(
mdata +
OFFSET(r),
mvr,
msr,
mbr,
mpr,
mcr,
v, s,
b, p,
c);
994 return Tensor5View(
mdata +
OFFSET(p),
mvr,
msr,
mbr,
mrr,
mcr,
v, s,
b, r,
c);
1005 return Tensor5View(
mdata +
OFFSET(
b),
mvr,
msr,
mpr,
mrr,
mcr,
v, s, p, r,
c);
1016 return Tensor5View(
mdata +
OFFSET(s),
mvr,
mbr,
mpr,
mrr,
mcr,
v,
b, p, r,
c);
1027 return Tensor5View(
mdata +
OFFSET(
v),
msr,
mbr,
mpr,
mrr,
mcr, s,
b, p, r,
c);
1878 for (; p != ep; ++p, ++xp) {
1895 for (; p != ep; ++p, ++xp) {
1912 for (; p != ep; ++p, ++xp) {
1929 for (; p != ep; ++p, ++xp) {
1940 a.msr.mextent *
a.mbr.mextent *
a.mpr.mextent *
1941 a.mrr.mextent *
a.mcr.mextent),
1999 :
ConstTensor6View(data, pv, ps, pb, pp, pr, pc, nv, ns, nb, np, nr, nc) {
2010 for (; origin != end; ++origin, ++target) {
2019 for (; target != end; ++target) {
2054 std::fill_n(
mdata,
v * s *
b * p * r *
c, fill);
2061 new
Numeric[m.nvitrines() * m.nshelves() * m.nbooks() * m.npages() *
2062 m.nrows() * m.ncols()],
2065 m.nshelves() * m.nbooks() * m.npages() * m.nrows() * m.ncols()),
2067 0, m.nshelves(), m.nbooks() * m.npages() * m.nrows() * m.ncols()),
2068 Range(0, m.nbooks(), m.npages() * m.nrows() * m.ncols()),
2069 Range(0, m.npages(), m.nrows() * m.ncols()),
2070 Range(0, m.nrows(), m.ncols()),
2071 Range(0, m.ncols())) {
2079 new
Numeric[m.nvitrines() * m.nshelves() * m.nbooks() * m.npages() *
2080 m.nrows() * m.ncols()],
2083 m.nshelves() * m.nbooks() * m.npages() * m.nrows() * m.ncols()),
2085 0, m.nshelves(), m.nbooks() * m.npages() * m.nrows() * m.ncols()),
2086 Range(0, m.nbooks(), m.npages() * m.nrows() * m.ncols()),
2087 Range(0, m.npages(), m.nrows() * m.ncols()),
2088 Range(0, m.nrows(), m.ncols()),
2089 Range(0, m.ncols())) {
2152 x.mvr =
Range(0, 0);
2153 x.msr =
Range(0, 0);
2154 x.mbr =
Range(0, 0);
2155 x.mpr =
Range(0, 0);
2156 x.mrr =
Range(0, 0);
2157 x.mcr =
Range(0, 0);
2218 swap(t1.mvr, t2.mvr);
2219 swap(t1.msr, t2.msr);
2220 swap(t1.mbr, t2.mbr);
2221 swap(t1.mpr, t2.mpr);
2222 swap(t1.mrr, t2.mrr);
2223 swap(t1.mcr, t2.mcr);
2224 swap(t1.mdata, t2.mdata);
2262 for (; xi != xe; ++xi, ++yi) {
2278 for (; xi != xe; ++xi) {
2282 if (maxi > themax) themax = maxi;
2297 for (; xi != xe; ++xi) {
2301 if (mini < themin) themin = mini;
2330 return tv(
v, s,
b, p, r,
c);
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
Const version of Iterator6D.
A constant view of a Matrix.
A constant view of a Tensor3.
A constant view of a Tensor4.
A constant view of a Tensor5.
ConstIterator5D end() const
Return const iterator behind last shelf.
ConstIterator5D begin() const
Return const iterator to first shelf.
A constant view of a Tensor6.
ConstIterator6D begin() const
Return const iterator to first sub-tensor.
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Range mvr
The vitrine range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
Range mbr
The book range of mdata that is actually used.
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mrr
The row range of mdata that is actually used.
Index size() const noexcept
Index nbooks() const noexcept
Index nvitrines() const noexcept
ConstTensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Index ncols() const noexcept
Index npages() const noexcept
Index nshelves() const noexcept
Range mpr
The page range of mdata that is actually used.
Index nrows() const noexcept
Range msr
The shelf range of mdata that is actually used.
ConstTensor6View()=default
A constant view of a Vector.
The outermost iterator class for rank 6 tensors.
Index mstart
The start index.
Index mextent
The number of elements.
Iterator5D end()
Return iterator behind last shelf.
Iterator5D begin()
Return iterator to first shelf.
Tensor6View & operator-=(Numeric x)
Subtraction of scalar.
Tensor6View & operator/=(Numeric x)
Division by scalar.
Iterator6D end()
Return iterator behind last sub-tensor.
Iterator6D begin()
Return iterator to first sub-tensor.
Tensor6View & operator=(const ConstTensor6View &v)
Assignment operator.
Tensor6View & operator+=(Numeric x)
Addition of scalar.
const Numeric * get_c_array() const ARTS_NOEXCEPT
Conversion to plain C-array.
Tensor6View & operator*=(Numeric x)
Multiplication by scalar.
Tensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
Tensor6 & operator=(const matpack::tensor6_like_not_tensor6 auto &init)
Set from a tensor type.
~Tensor6() noexcept override
Destructor for Tensor6.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
#define ARTS_ASSERT(condition,...)
The declarations of all the exception classes.
void copy(ConstIterator6D origin, const ConstIterator6D &end, Iterator6D target)
Copy data between begin and end to target.
std::ostream & operator<<(std::ostream &os, const ConstTensor6View &v)
Output operator.
void transform(Tensor6View y, double(&my_func)(double), ConstTensor6View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Numeric debug_tensor6view_get_elem(Tensor6View &tv, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
void swap(Tensor6 &t1, Tensor6 &t2) noexcept
Swaps two objects.
void copy(ConstIterator6D origin, const ConstIterator6D &end, Iterator6D target)
Copy data between begin and end to target.
#define CHECK(x)
Implementation of Tensors of Rank 6.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.