ARTS 2.5.0 (git: 9ee3ac6c)
matpackV.h
Go to the documentation of this file.
1/* Copyright (C) 2002-2012
2 Stefan Buehler <sbuehler@ltu.se>
3 Wolfram-Andre Haas <wolhaas@hermes.fho-emden.de>
4
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 USA. */
19
31#ifndef matpackV_h
32#define matpackV_h
33
34#include "matpackIV.h"
35
39 public:
40 // Constructors:
41 // Functions for Iterator5D
42 // ------------------------
43
45 Iterator5D() = default;
46
48 Iterator5D(const Tensor4View& x, Index stride)
49 : msv(x), mstride(stride) { /* Nothing to do here. */
50 }
51
52 // Operators:
55 msv.mdata += mstride;
56 return *this;
57 }
58
60 bool operator!=(const Iterator5D& other) const {
62 msv.mcr.mstart !=
63 other.msv.mdata + other.msv.mbr.mstart + other.msv.mpr.mstart +
64 other.msv.mrr.mstart + other.msv.mcr.mstart)
65 return true;
66 else
67 return false;
68 }
69
72 Tensor4View* operator->() { return &msv; }
73
75 Tensor4View& operator*() { return msv; }
76
77 private:
82};
83
86 public:
87 // Constructors:
89 ConstIterator5D() = default;
90
93 : msv(x), mstride(stride) { /* Nothing to do here. */
94 }
95
96 // Operators:
99 msv.mdata += mstride;
100 return *this;
101 }
102
104 bool operator!=(const ConstIterator5D& other) const {
106 msv.mcr.mstart !=
107 other.msv.mdata + other.msv.mbr.mstart + other.msv.mpr.mstart +
108 other.msv.mrr.mstart + other.msv.mcr.mstart)
109 return true;
110 else
111 return false;
112 }
113
116 const ConstTensor4View* operator->() const { return &msv; }
117
119 const ConstTensor4View& operator*() const { return msv; }
120
121 private:
126};
127
128// Declare class Tensor5:
129class Tensor5;
130
144 public:
145 constexpr ConstTensor5View(const ConstTensor5View&) = default;
146 constexpr ConstTensor5View(ConstTensor5View&&) = default;
149
150 // Member functions:
151 bool empty() const;
152 Index nshelves() const;
153 Index nbooks() const;
154 Index npages() const;
155 Index nrows() const;
156 Index ncols() const;
157
158 // Const index operators:
160 const Range& b,
161 const Range& p,
162 const Range& r,
163 const Range& c) const;
164
166 const Range& b,
167 const Range& p,
168 const Range& r,
169 Index c) const;
171 const Range& b,
172 const Range& p,
173 Index r,
174 const Range& c) const;
176 const Range& b,
177 Index p,
178 const Range& r,
179 const Range& c) const;
181 Index b,
182 const Range& p,
183 const Range& r,
184 const Range& c) const;
186 const Range& b,
187 const Range& p,
188 const Range& r,
189 const Range& c) const;
190
192 const Range& s, const Range& b, const Range& p, Index r, Index c) const;
194 const Range& s, const Range& b, Index p, const Range& r, Index c) const;
196 const Range& s, const Range& b, Index p, Index r, const Range& c) const;
198 const Range& s, Index b, const Range& p, Index r, const Range& c) const;
200 const Range& s, Index b, const Range& p, const Range& r, Index c) const;
202 const Range& s, Index b, Index p, const Range& r, const Range& c) const;
204 Index s, const Range& b, Index p, const Range& r, const Range& c) const;
206 Index s, const Range& b, const Range& p, Index r, const Range& c) const;
208 Index s, const Range& b, const Range& p, const Range& r, Index c) const;
210 Index s, Index b, const Range& p, const Range& r, const Range& c) const;
211
213 const Range& s, const Range& b, Index p, Index r, Index c) const;
215 const Range& s, Index b, const Range& p, Index r, Index c) const;
217 const Range& s, Index b, Index p, const Range& r, Index c) const;
219 const Range& s, Index b, Index p, Index r, const Range& c) const;
221 Index s, const Range& b, Index p, Index r, const Range& c) const;
223 Index s, const Range& b, Index p, const Range& r, Index c) const;
225 Index s, const Range& b, const Range& p, Index r, Index c) const;
227 Index s, Index b, const Range& p, const Range& r, Index c) const;
229 Index s, Index b, const Range& p, Index r, const Range& c) const;
231 Index s, Index b, Index p, const Range& r, const Range& c) const;
232
234 const Range& s, Index b, Index p, Index r, Index c) const;
236 Index s, const Range& b, Index p, Index r, Index c) const;
238 Index s, Index b, const Range& p, Index r, Index c) const;
240 Index s, Index b, Index p, const Range& r, Index c) const;
242 Index s, Index b, Index p, Index r, const Range& c) const;
243
246 Index b,
247 Index p,
248 Index r,
249 Index c) const { // Check if indices are valid:
250 ARTS_ASSERT(0 <= s);
251 ARTS_ASSERT(0 <= b);
252 ARTS_ASSERT(0 <= p);
253 ARTS_ASSERT(0 <= r);
254 ARTS_ASSERT(0 <= c);
260
261 return get(s, b, p, r, c);
262 }
263
265 Numeric get(Index s, Index b, Index p, Index r, Index c) const {
266 return *(mdata + msr.mstart + s * msr.mstride + mbr.mstart +
267 b * mbr.mstride + mpr.mstart + p * mpr.mstride + mrr.mstart +
268 r * mrr.mstride + mcr.mstart + c * mcr.mstride);
269 }
270
271 // Functions returning iterators:
272 ConstIterator5D begin() const;
273 ConstIterator5D end() const;
274
276 virtual ~ConstTensor5View() = default;
277
278 // Friends:
279 friend class Tensor5View;
280 friend class ConstIterator6D;
281 friend class ConstTensor6View;
282 friend class ConstTensor7View;
283
284 // Special constructor to make a Tensor5 view of a Tensor4.
286
287 protected:
288 // Constructors:
289 ConstTensor5View() = default;
291 const Range& s,
292 const Range& b,
293 const Range& p,
294 const Range& r,
295 const Range& c);
297 const Range& ps,
298 const Range& pb,
299 const Range& pp,
300 const Range& pr,
301 const Range& pc,
302 const Range& ns,
303 const Range& nb,
304 const Range& np,
305 const Range& nr,
306 const Range& nc);
307
308 // Data members:
309 // -------------
311 Range msr{0, 0, 1};
313 Range mbr{0, 0, 1};
315 Range mpr{0, 0, 1};
317 Range mrr{0, 0, 1};
319 Range mcr{0, 0, 1};
321 Numeric* mdata{nullptr};
322};
323
334 public:
335 // Make const methods visible from base class
338 using ConstTensor5View::operator();
340
341 constexpr Tensor5View(const Tensor5View&) = default;
342
343 // Non-const index operators:
344
346 const Range& b,
347 const Range& p,
348 const Range& r,
349 const Range& c);
350
352 const Range& s, const Range& b, const Range& p, const Range& r, Index c);
354 const Range& s, const Range& b, const Range& p, Index r, const Range& c);
356 const Range& s, const Range& b, Index p, const Range& r, const Range& c);
358 const Range& s, Index b, const Range& p, const Range& r, const Range& c);
360 Index s, const Range& b, const Range& p, const Range& r, const Range& c);
361
363 const Range& s, const Range& b, const Range& p, Index r, Index c);
365 const Range& s, const Range& b, Index p, const Range& r, Index c);
367 const Range& s, const Range& b, Index p, Index r, const Range& c);
369 const Range& s, Index b, const Range& p, Index r, const Range& c);
371 const Range& s, Index b, const Range& p, const Range& r, Index c);
373 const Range& s, Index b, Index p, const Range& r, const Range& c);
375 Index s, const Range& b, Index p, const Range& r, const Range& c);
377 Index s, const Range& b, const Range& p, Index r, const Range& c);
379 Index s, const Range& b, const Range& p, const Range& r, Index c);
381 Index s, Index b, const Range& p, const Range& r, const Range& c);
382
384 const Range& s, const Range& b, Index p, Index r, Index c);
386 const Range& s, Index b, const Range& p, Index r, Index c);
388 const Range& s, Index b, Index p, const Range& r, Index c);
390 const Range& s, Index b, Index p, Index r, const Range& c);
392 Index s, const Range& b, Index p, Index r, const Range& c);
394 Index s, const Range& b, Index p, const Range& r, Index c);
396 Index s, const Range& b, const Range& p, Index r, Index c);
398 Index s, Index b, const Range& p, const Range& r, Index c);
400 Index s, Index b, const Range& p, Index r, const Range& c);
402 Index s, Index b, Index p, const Range& r, const Range& c);
403
404 VectorView operator()(const Range& s, Index b, Index p, Index r, Index c);
405 VectorView operator()(Index s, const Range& b, Index p, Index r, Index c);
406 VectorView operator()(Index s, Index b, const Range& p, Index r, Index c);
407 VectorView operator()(Index s, Index b, Index p, const Range& r, Index c);
408 VectorView operator()(Index s, Index b, Index p, Index r, const Range& c);
409
412 Index b,
413 Index p,
414 Index r,
415 Index c) { // Check if indices are valid:
416 ARTS_ASSERT(0 <= s);
417 ARTS_ASSERT(0 <= b);
418 ARTS_ASSERT(0 <= p);
419 ARTS_ASSERT(0 <= r);
420 ARTS_ASSERT(0 <= c);
426
427 return get(s, b, p, r, c);
428 }
429
432 return *(mdata + msr.mstart + s * msr.mstride + mbr.mstart +
433 b * mbr.mstride + mpr.mstart + p * mpr.mstride + mrr.mstart +
434 r * mrr.mstride + mcr.mstart + c * mcr.mstride);
435 }
436
437 // Conversion to a plain C-array
438 const Numeric* get_c_array() const ARTS_NOEXCEPT;
440
441 // Functions returning iterators:
443 Iterator5D end();
444
445 // Assignment operators:
446 Tensor5View& operator=(const ConstTensor5View& v);
447 Tensor5View& operator=(const Tensor5View& v);
448 Tensor5View& operator=(const Tensor5& v);
449 Tensor5View& operator=(Numeric x);
450
451 // Other operators:
452 Tensor5View& operator*=(Numeric x);
453 Tensor5View& operator/=(Numeric x);
454 Tensor5View& operator+=(Numeric x);
455 Tensor5View& operator-=(Numeric x);
456
457 Tensor5View& operator*=(const ConstTensor5View& x);
458 Tensor5View& operator/=(const ConstTensor5View& x);
459 Tensor5View& operator+=(const ConstTensor5View& x);
460 Tensor5View& operator-=(const ConstTensor5View& x);
461
463 virtual ~Tensor5View() = default;
464
465 // Friends:
466 // friend class VectorView;
467 // friend ConstTensor5View transpose(ConstTensor5View m);
468 // friend Tensor5View transpose(Tensor5View m);
469 friend class Iterator6D;
470 friend class Tensor6View;
471 friend class Tensor7View;
472
473 // Special constructor to make a Tensor5 view of a Tensor4.
474 Tensor5View(const Tensor4View& a);
475
476 protected:
477 // Constructors:
478 Tensor5View() = default;
480 const Range& s,
481 const Range& b,
482 const Range& p,
483 const Range& r,
484 const Range& c);
486 const Range& ps,
487 const Range& pb,
488 const Range& pp,
489 const Range& pr,
490 const Range& pc,
491 const Range& ns,
492 const Range& nb,
493 const Range& np,
494 const Range& nr,
495 const Range& nc);
496};
497
506class Tensor5 : public Tensor5View {
507 public:
508 // Constructors:
509 Tensor5() = default;
510 Tensor5(Index s, Index b, Index p, Index r, Index c);
511 Tensor5(Index s, Index b, Index p, Index r, Index c, Numeric fill);
512 Tensor5(const ConstTensor5View& v);
513 Tensor5(const Tensor5& v);
514 Tensor5(Tensor5&& v) noexcept : Tensor5View(std::forward<Tensor5View>(v)) {
515 v.mdata = nullptr;
516 }
517
530 Tensor5(Numeric* d, const Range& r0, const Range& r1, const Range& r2, const Range& r3, const Range& r4) ARTS_NOEXCEPT
531 : Tensor5View(d, r0, r1, r2, r3, r4) {
532 ARTS_ASSERT (not (r0.get_extent() < 0), "Must have size");
533 ARTS_ASSERT (not (r1.get_extent() < 0), "Must have size");
534 ARTS_ASSERT (not (r2.get_extent() < 0), "Must have size");
535 ARTS_ASSERT (not (r3.get_extent() < 0), "Must have size");
536 ARTS_ASSERT (not (r4.get_extent() < 0), "Must have size");
537 }
538
539 // Assignment operators:
540 Tensor5& operator=(const Tensor5& x);
541 Tensor5& operator=(Tensor5&& x) noexcept;
543
544 // Resize function:
545 void resize(Index s, Index b, Index p, Index r, Index c);
546
547 // Swap function:
548 friend void swap(Tensor5& t1, Tensor5& t2);
549
550 // Destructor:
551 virtual ~Tensor5();
552
553 // Total size
554 Index size() const noexcept {return nshelves() * nbooks() * npages() * nrows() * ncols();}
555
557 template <std::size_t dim0>
559 static_assert(dim0 < 5, "Bad Dimension, Out-of-Bounds");
560
561 Range r0(0, dim0 == 0 ? nshelves() : dim0 == 1 ? nbooks() : dim0 == 2 ? npages() : dim0 == 3 ? nrows() : ncols());
562
563 Vector out(mdata, r0);
564 ARTS_ASSERT (size() == out.size(), "Can only reduce size on same size input");
565 mdata = nullptr;
566 return out;
567 }
568
570 template <std::size_t dim0, std::size_t dim1>
572 static_assert(dim1 < 5, "Bad Dimension, Out-of-Bounds");
573 static_assert(dim0 < dim1, "Bad Dimensions, dim1 must be larger than dim0");
574
575 const Range r1(0, dim1 == 1 ? nbooks() : dim1 == 2 ? npages() : dim1 == 3 ? nrows() : ncols());
576 const Range r0(0, dim0 == 0 ? nshelves() : dim0 == 1 ? nbooks() : dim0 == 2 ? npages() : nrows(), r1.get_extent());
577
578 Matrix out(mdata, r0, r1);
579 ARTS_ASSERT (size() == out.size(), "Can only reduce size on same size input");
580 mdata = nullptr;
581 return out;
582 }
583
585 template <std::size_t dim0, std::size_t dim1, std::size_t dim2>
587 static_assert(dim2 < 5, "Bad Dimension, Out-of-Bounds");
588 static_assert(dim0 < dim1, "Bad Dimensions, dim1 must be larger than dim0");
589 static_assert(dim1 < dim2, "Bad Dimensions, dim2 must be larger than dim1");
590
591 const Range r2(0, dim2 == 2 ? npages() : dim2 == 3 ? nrows() : ncols());
592 const Range r1(0, dim1 == 1 ? nbooks() : dim1 == 2 ? npages() : nrows(), r2.get_extent());
593 const Range r0(0, dim0 == 0 ? nshelves() : dim0 == 1 ? nbooks() : npages(), r1.get_extent() * r2.get_extent());
594
595 Tensor3 out(mdata, r0, r1, r2);
596 ARTS_ASSERT (size() == out.size(), "Can only reduce size on same size input");
597 mdata = nullptr;
598 return out;
599 }
600
602 template <std::size_t dim0, std::size_t dim1, std::size_t dim2, std::size_t dim3>
604 static_assert(dim3 < 5, "Bad Dimension, Out-of-Bounds");
605 static_assert(dim0 < dim1, "Bad Dimensions, dim1 must be larger than dim0");
606 static_assert(dim1 < dim2, "Bad Dimensions, dim2 must be larger than dim1");
607 static_assert(dim2 < dim3, "Bad Dimensions, dim3 must be larger than dim2");
608
609 const Range r3(0, dim3 == 3 ? nrows() : ncols());
610 const Range r2(0, dim2 == 2 ? npages() : nrows(), r3.get_extent());
611 const Range r1(0, dim1 == 1 ? nbooks() : npages(), r2.get_extent() * r3.get_extent());
612 const Range r0(0, dim0 == 0 ? nshelves() : nbooks(), r1.get_extent() * r2.get_extent() * r3.get_extent());
613
614 Tensor4 out(mdata, r0, r1, r2, r3);
615 ARTS_ASSERT (size() == out.size(), "Can only reduce size on same size input");
616 mdata = nullptr;
617 return out;
618 }
619};
620
621// Function declarations:
622// ----------------------
623
624void copy(ConstIterator5D origin,
625 const ConstIterator5D& end,
626 Iterator5D target);
627
628void copy(Numeric x, Iterator5D target, const Iterator5D& end);
629
630void transform(Tensor5View y, double (&my_func)(double), ConstTensor5View x);
631
633
635
636std::ostream& operator<<(std::ostream& os, const ConstTensor5View& v);
637
639// Helper function for debugging
640#ifndef NDEBUG
641
643 Tensor5View& tv, Index s, Index b, Index p, Index r, Index c);
644
645#endif
647
648#endif // matpackV_h
void * data
Const version of Iterator5D.
Definition: matpackV.h:85
bool operator!=(const ConstIterator5D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackV.h:104
ConstIterator5D & operator++()
Prefix increment operator.
Definition: matpackV.h:98
Index mstride
Stride.
Definition: matpackV.h:125
ConstIterator5D(const ConstTensor4View &x, Index stride)
Explicit constructor.
Definition: matpackV.h:92
const ConstTensor4View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Definition: matpackV.h:116
const ConstTensor4View & operator*() const
Dereferencing.
Definition: matpackV.h:119
ConstTensor4View msv
Current position.
Definition: matpackV.h:123
ConstIterator5D()=default
Default constructor.
Const version of Iterator6D.
Definition: matpackVI.h:87
A constant view of a Matrix.
Definition: matpackI.h:1014
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Tensor4.
Definition: matpackIV.h:133
Range mrr
The row range of mdata that is actually used.
Definition: matpackIV.h:268
Range mbr
The book range of mdata that is actually used.
Definition: matpackIV.h:264
Range mcr
The column range of mdata that is actually used.
Definition: matpackIV.h:270
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackIV.h:272
Range mpr
The page range of mdata that is actually used.
Definition: matpackIV.h:266
A constant view of a Tensor5.
Definition: matpackV.h:143
virtual ~ConstTensor5View()=default
Destructor.
Index ncols() const
Returns the number of columns.
Definition: matpackV.cc:56
Index nshelves() const
Returns the number of shelves.
Definition: matpackV.cc:44
constexpr ConstTensor5View(ConstTensor5View &&)=default
Numeric get(Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Definition: matpackV.h:265
ConstTensor5View operator()(const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Definition: matpackV.cc:61
Range mpr
The page range of mdata that is actually used.
Definition: matpackV.h:315
Range mcr
The column range of mdata that is actually used.
Definition: matpackV.h:319
constexpr ConstTensor5View(const ConstTensor5View &)=default
ConstTensor5View()=default
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackV.h:321
ConstTensor5View & operator=(ConstTensor5View &&)=default
ConstIterator5D end() const
Return const iterator behind last shelf.
Definition: matpackV.cc:694
ConstTensor5View & operator=(const ConstTensor5View &)=default
Range mbr
The book range of mdata that is actually used.
Definition: matpackV.h:313
Range msr
The shelf range of mdata that is actually used.
Definition: matpackV.h:311
Numeric operator()(Index s, Index b, Index p, Index r, Index c) const
Plain const index operator.
Definition: matpackV.h:245
Range mrr
The row range of mdata that is actually used.
Definition: matpackV.h:317
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:50
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:53
bool empty() const
Check if variable is empty.
Definition: matpackV.cc:38
ConstIterator5D begin() const
Return const iterator to first shelf.
Definition: matpackV.cc:688
Index nbooks() const
Returns the number of books.
Definition: matpackV.cc:47
A constant view of a Tensor6.
Definition: matpackVI.h:149
A constant view of a Tensor7.
Definition: matpackVII.h:147
A constant view of a Vector.
Definition: matpackI.h:489
Index size() const ARTS_NOEXCEPT
Definition: matpackI.cc:50
Implementation of Tensors of Rank 5.
Definition: matpackV.h:38
Tensor4View & operator*()
Dereferencing.
Definition: matpackV.h:75
Iterator5D()=default
Default constructor.
bool operator!=(const Iterator5D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackV.h:60
Tensor4View msv
Current position.
Definition: matpackV.h:79
Tensor4View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Definition: matpackV.h:72
Index mstride
Stride.
Definition: matpackV.h:81
Iterator5D & operator++()
Prefix increment operator.
Definition: matpackV.h:54
Iterator5D(const Tensor4View &x, Index stride)
Explicit constructor.
Definition: matpackV.h:48
The outermost iterator class for rank 6 tensors.
Definition: matpackVI.h:40
The MatrixView class.
Definition: matpackI.h:1125
The Matrix class.
Definition: matpackI.h:1225
Index size() const noexcept
Definition: matpackI.h:1268
The range class.
Definition: matpackI.h:165
Index mstart
The start index.
Definition: matpackI.h:351
Index mstride
The stride.
Definition: matpackI.h:360
constexpr Index get_extent() const ARTS_NOEXCEPT
Returns the extent of the range.
Definition: matpackI.h:334
Index mextent
The number of elements.
Definition: matpackI.h:358
The Tensor3View class.
Definition: matpackIII.h:239
The Tensor3 class.
Definition: matpackIII.h:339
Index size() const noexcept
Definition: matpackIII.h:383
The Tensor4View class.
Definition: matpackIV.h:284
The Tensor4 class.
Definition: matpackIV.h:421
Index size() const noexcept
Definition: matpackIV.h:467
The Tensor5View class.
Definition: matpackV.h:333
Numeric & get(Index s, Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Definition: matpackV.h:431
const Numeric * get_c_array() const ARTS_NOEXCEPT
Conversion to plain C-array.
Definition: matpackV.cc:674
Iterator5D end()
Return iterator behind last shelf.
Definition: matpackV.cc:1360
Numeric & operator()(Index s, Index b, Index p, Index r, Index c)
Plain const index operator.
Definition: matpackV.h:411
Tensor5View operator()(const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
Index operator for subrange.
Definition: matpackV.cc:780
Iterator5D begin()
Return iterator to first shelf.
Definition: matpackV.cc:1354
Tensor5View()=default
Tensor5View & operator=(const ConstTensor5View &v)
Assignment operator.
Definition: matpackV.cc:1371
constexpr Tensor5View(const Tensor5View &)=default
The Tensor5 class.
Definition: matpackV.h:506
Matrix reduce_rank() &&ARTS_NOEXCEPT
Definition: matpackV.h:571
Index size() const noexcept
Definition: matpackV.h:554
Tensor5()=default
Tensor5(Numeric *d, const Range &r0, const Range &r1, const Range &r2, const Range &r3, const Range &r4) ARTS_NOEXCEPT
Definition: matpackV.h:530
Tensor5(Tensor5 &&v) noexcept
Definition: matpackV.h:514
Tensor4 reduce_rank() &&ARTS_NOEXCEPT
Definition: matpackV.h:603
Vector reduce_rank() &&ARTS_NOEXCEPT
Definition: matpackV.h:558
Tensor3 reduce_rank() &&ARTS_NOEXCEPT
Definition: matpackV.h:586
The Tensor6View class.
Definition: matpackVI.h:621
The Tensor7View class.
Definition: matpackVII.h:1286
The VectorView class.
Definition: matpackI.h:626
The Vector class.
Definition: matpackI.h:876
#define ARTS_NOEXCEPT
Definition: debug.h:80
#define ARTS_ASSERT(condition,...)
Definition: debug.h:83
#define ns
Numeric max(const ConstTensor5View &x)
Max function, tensor version.
Definition: matpackV.cc:1827
void copy(ConstIterator5D origin, const ConstIterator5D &end, Iterator5D target)
Copy data between begin and end to target.
Definition: matpackV.cc:1591
void transform(Tensor5View y, double(&my_func)(double), ConstTensor5View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Definition: matpackV.cc:1808
Numeric debug_tensor5view_get_elem(Tensor5View &tv, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Definition: matpackV.cc:1884
Numeric min(const ConstTensor5View &x)
Min function, tensor version.
Definition: matpackV.cc:1846
std::ostream & operator<<(std::ostream &os, const ConstTensor5View &v)
Output operator.
Definition: matpackV.cc:756
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
constexpr Numeric r0
The reference radius in IGRF13.
Definition: igrf13.cc:203
#define d
#define v
#define a
#define c
#define b