ARTS  2.0.49
matpackV.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2008
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 
38 class Iterator5D {
39 public:
40  // Constructors:
41  // Functions for Iterator5D
42  // ------------------------
43 
45  Iterator5D() : msv(), mstride(0) { /* Nothing to do here. */ }
46 
49  { /* Nothing to do here. */ }
50 
52  Iterator5D(const Tensor4View& x, Index stride) : msv(x), mstride(stride)
53  { /* Nothing to do here. */ }
54 
55  // Operators:
57  Iterator5D& operator++() { msv.mdata += mstride; return *this; }
58 
60  bool operator!=(const Iterator5D& other) const
61  { if ( msv.mdata +
62  msv.mbr.mstart +
63  msv.mpr.mstart +
64  msv.mrr.mstart +
65  msv.mcr.mstart
66  !=
67  other.msv.mdata +
68  other.msv.mbr.mstart +
69  other.msv.mpr.mstart +
70  other.msv.mrr.mstart +
71  other.msv.mcr.mstart )
72  return true;
73  else
74  return false;
75  }
76 
79  Tensor4View* operator->() { return &msv; }
80 
82  Tensor4View& operator*() { return msv; }
83 
84 private:
89 };
90 
93 public:
94  // Constructors:
96  ConstIterator5D() : msv(), mstride(0) { /* Nothing to do here. */ }
97 
100  { /* Nothing to do here. */ }
101 
104  : msv(x), mstride(stride)
105  { /* Nothing to do here. */ }
106 
107  // Operators:
109  ConstIterator5D& operator++() { msv.mdata += mstride; return *this; }
110 
112  bool operator!=(const ConstIterator5D& other) const
113  { if ( msv.mdata +
114  msv.mbr.mstart +
115  msv.mpr.mstart +
116  msv.mrr.mstart +
117  msv.mcr.mstart
118  !=
119  other.msv.mdata +
120  other.msv.mbr.mstart +
121  other.msv.mpr.mstart +
122  other.msv.mrr.mstart +
123  other.msv.mcr.mstart )
124  return true;
125  else
126  return false;
127  }
128 
131  const ConstTensor4View* operator->() const { return &msv; }
132 
134  const ConstTensor4View& operator*() const { return msv; }
135 
136 private:
141 };
142 
143 
144 // Declare class Tensor5:
145 class Tensor5;
146 
147 
161 public:
162  // Member functions:
163  Index nshelves() const;
164  Index nbooks() const;
165  Index npages() const;
166  Index nrows() const;
167  Index ncols() const;
168 
169  // Const index operators:
170  ConstTensor5View operator()( const Range& s, const Range& b, const Range& p, const Range& r, const Range& c ) const;
171 
172  ConstTensor4View operator()( const Range& s, const Range& b, const Range& p, const Range& r, Index c ) const;
173  ConstTensor4View operator()( const Range& s, const Range& b, const Range& p, Index r, const Range& c ) const;
174  ConstTensor4View operator()( const Range& s, const Range& b, Index p, const Range& r, const Range& c ) const;
175  ConstTensor4View operator()( const Range& s, Index b, const Range& p, const Range& r, const Range& c ) const;
176  ConstTensor4View operator()( Index s, const Range& b, const Range& p, const Range& r, const Range& c ) const;
177 
178  ConstTensor3View operator()( const Range& s, const Range& b, const Range& p, Index r, Index c ) const;
179  ConstTensor3View operator()( const Range& s, const Range& b, Index p, const Range& r, Index c ) const;
180  ConstTensor3View operator()( const Range& s, const Range& b, Index p, Index r, const Range& c ) const;
181  ConstTensor3View operator()( const Range& s, Index b, const Range& p, Index r, const Range& c ) const;
182  ConstTensor3View operator()( const Range& s, Index b, const Range& p, const Range& r, Index c ) const;
183  ConstTensor3View operator()( const Range& s, Index b, Index p, const Range& r, const Range& c ) const;
184  ConstTensor3View operator()( Index s, const Range& b, Index p, const Range& r, const Range& c ) const;
185  ConstTensor3View operator()( Index s, const Range& b, const Range& p, Index r, const Range& c ) const;
186  ConstTensor3View operator()( Index s, const Range& b, const Range& p, const Range& r, Index c ) const;
187  ConstTensor3View operator()( Index s, Index b, const Range& p, const Range& r, const Range& c ) const;
188 
189  ConstMatrixView operator()( const Range& s, const Range& b, Index p, Index r, Index c ) const;
190  ConstMatrixView operator()( const Range& s, Index b, const Range& p, Index r, Index c ) const;
191  ConstMatrixView operator()( const Range& s, Index b, Index p, const Range& r, Index c ) const;
192  ConstMatrixView operator()( const Range& s, Index b, Index p, Index r, const Range& c ) const;
193  ConstMatrixView operator()( Index s, const Range& b, Index p, Index r, const Range& c ) const;
194  ConstMatrixView operator()( Index s, const Range& b, Index p, const Range& r, Index c ) const;
195  ConstMatrixView operator()( Index s, const Range& b, const Range& p, Index r, Index c ) const;
196  ConstMatrixView operator()( Index s, Index b, const Range& p, const Range& r, Index c ) const;
197  ConstMatrixView operator()( Index s, Index b, const Range& p, Index r, const Range& c ) const;
198  ConstMatrixView operator()( Index s, Index b, Index p, const Range& r, const Range& c ) const;
199 
200  ConstVectorView operator()( const Range& s, Index b, Index p, Index r, Index c ) const;
201  ConstVectorView operator()( Index s, const Range& b, Index p, Index r, Index c ) const;
202  ConstVectorView operator()( Index s, Index b, const Range& p, Index r, Index c ) const;
203  ConstVectorView operator()( Index s, Index b, Index p, const Range& r, Index c ) const;
204  ConstVectorView operator()( Index s, Index b, Index p, Index r, const Range& c ) const;
205 
208  { // Check if indices are valid:
209  assert( 0 <= s );
210  assert( 0 <= b );
211  assert( 0 <= p );
212  assert( 0 <= r );
213  assert( 0 <= c );
214  assert( s < msr.mextent );
215  assert( b < mbr.mextent );
216  assert( p < mpr.mextent );
217  assert( r < mrr.mextent );
218  assert( c < mcr.mextent );
219 
220  return *( mdata +
221  msr.mstart + s * msr.mstride +
222  mbr.mstart + b * mbr.mstride +
223  mpr.mstart + p * mpr.mstride +
224  mrr.mstart + r * mrr.mstride +
225  mcr.mstart + c * mcr.mstride );
226  }
227 
228  // Functions returning iterators:
229  ConstIterator5D begin() const;
230  ConstIterator5D end() const;
231 
233  virtual ~ConstTensor5View() {}
234 
235  // Friends:
236  friend class Tensor5View;
237  friend class ConstIterator6D;
238  friend class ConstTensor6View;
239  friend class ConstTensor7View;
240 
241  // Special constructor to make a Tensor5 view of a Tensor4.
243 
244 protected:
245  // Constructors:
248  const Range& s, const Range& b, const Range& p, const Range& r, const Range& c);
250  const Range& ps, const Range& pb, const Range& pp, const Range& pr, const Range& pc,
251  const Range& ns, const Range& nb, const Range& np, const Range& nr, const Range& nc);
252 
253  // Data members:
254  // -------------
267 };
268 
279 public:
280 
281  // Const index operators:
282  ConstTensor5View operator()( const Range& s, const Range& b, const Range& p, const Range& r, const Range& c ) const;
283 
284  ConstTensor4View operator()( const Range& s, const Range& b, const Range& p, const Range& r, Index c ) const;
285  ConstTensor4View operator()( const Range& s, const Range& b, const Range& p, Index r, const Range& c ) const;
286  ConstTensor4View operator()( const Range& s, const Range& b, Index p, const Range& r, const Range& c ) const;
287  ConstTensor4View operator()( const Range& s, Index b, const Range& p, const Range& r, const Range& c ) const;
288  ConstTensor4View operator()( Index s, const Range& b, const Range& p, const Range& r, const Range& c ) const;
289 
290  ConstTensor3View operator()( const Range& s, const Range& b, const Range& p, Index r, Index c ) const;
291  ConstTensor3View operator()( const Range& s, const Range& b, Index p, const Range& r, Index c ) const;
292  ConstTensor3View operator()( const Range& s, const Range& b, Index p, Index r, const Range& c ) const;
293  ConstTensor3View operator()( const Range& s, Index b, const Range& p, Index r, const Range& c ) const;
294  ConstTensor3View operator()( const Range& s, Index b, const Range& p, const Range& r, Index c ) const;
295  ConstTensor3View operator()( const Range& s, Index b, Index p, const Range& r, const Range& c ) const;
296  ConstTensor3View operator()( Index s, const Range& b, Index p, const Range& r, const Range& c ) const;
297  ConstTensor3View operator()( Index s, const Range& b, const Range& p, Index r, const Range& c ) const;
298  ConstTensor3View operator()( Index s, const Range& b, const Range& p, const Range& r, Index c ) const;
299  ConstTensor3View operator()( Index s, Index b, const Range& p, const Range& r, const Range& c ) const;
300 
301  ConstMatrixView operator()( const Range& s, const Range& b, Index p, Index r, Index c ) const;
302  ConstMatrixView operator()( const Range& s, Index b, const Range& p, Index r, Index c ) const;
303  ConstMatrixView operator()( const Range& s, Index b, Index p, const Range& r, Index c ) const;
304  ConstMatrixView operator()( const Range& s, Index b, Index p, Index r, const Range& c ) const;
305  ConstMatrixView operator()( Index s, const Range& b, Index p, Index r, const Range& c ) const;
306  ConstMatrixView operator()( Index s, const Range& b, Index p, const Range& r, Index c ) const;
307  ConstMatrixView operator()( Index s, const Range& b, const Range& p, Index r, Index c ) const;
308  ConstMatrixView operator()( Index s, Index b, const Range& p, const Range& r, Index c ) const;
309  ConstMatrixView operator()( Index s, Index b, const Range& p, Index r, const Range& c ) const;
310  ConstMatrixView operator()( Index s, Index b, Index p, const Range& r, const Range& c ) const;
311 
312  ConstVectorView operator()( const Range& s, Index b, Index p, Index r, Index c ) const;
313  ConstVectorView operator()( Index s, const Range& b, Index p, Index r, Index c ) const;
314  ConstVectorView operator()( Index s, Index b, const Range& p, Index r, Index c ) const;
315  ConstVectorView operator()( Index s, Index b, Index p, const Range& r, Index c ) const;
316  ConstVectorView operator()( Index s, Index b, Index p, Index r, const Range& c ) const;
317 
321  { return ConstTensor5View::operator()(s,b,p,r,c); }
322 
323  // Non-const index operators:
324 
325  Tensor5View operator()( const Range& s, const Range& b, const Range& p, const Range& r, const Range& c );
326 
327  Tensor4View operator()( const Range& s, const Range& b, const Range& p, const Range& r, Index c );
328  Tensor4View operator()( const Range& s, const Range& b, const Range& p, Index r, const Range& c );
329  Tensor4View operator()( const Range& s, const Range& b, Index p, const Range& r, const Range& c );
330  Tensor4View operator()( const Range& s, Index b, const Range& p, const Range& r, const Range& c );
331  Tensor4View operator()( Index s, const Range& b, const Range& p, const Range& r, const Range& c );
332 
333  Tensor3View operator()( const Range& s, const Range& b, const Range& p, Index r, Index c );
334  Tensor3View operator()( const Range& s, const Range& b, Index p, const Range& r, Index c );
335  Tensor3View operator()( const Range& s, const Range& b, Index p, Index r, const Range& c );
336  Tensor3View operator()( const Range& s, Index b, const Range& p, Index r, const Range& c );
337  Tensor3View operator()( const Range& s, Index b, const Range& p, const Range& r, Index c );
338  Tensor3View operator()( const Range& s, Index b, Index p, const Range& r, const Range& c );
339  Tensor3View operator()( Index s, const Range& b, Index p, const Range& r, const Range& c );
340  Tensor3View operator()( Index s, const Range& b, const Range& p, Index r, const Range& c );
341  Tensor3View operator()( Index s, const Range& b, const Range& p, const Range& r, Index c );
342  Tensor3View operator()( Index s, Index b, const Range& p, const Range& r, const Range& c );
343 
344  MatrixView operator()( const Range& s, const Range& b, Index p, Index r, Index c );
345  MatrixView operator()( const Range& s, Index b, const Range& p, Index r, Index c );
346  MatrixView operator()( const Range& s, Index b, Index p, const Range& r, Index c );
347  MatrixView operator()( const Range& s, Index b, Index p, Index r, const Range& c );
348  MatrixView operator()( Index s, const Range& b, Index p, Index r, const Range& c );
349  MatrixView operator()( Index s, const Range& b, Index p, const Range& r, Index c );
350  MatrixView operator()( Index s, const Range& b, const Range& p, Index r, Index c );
351  MatrixView operator()( Index s, Index b, const Range& p, const Range& r, Index c );
352  MatrixView operator()( Index s, Index b, const Range& p, Index r, const Range& c );
353  MatrixView operator()( Index s, Index b, Index p, const Range& r, const Range& c );
354 
355  VectorView operator()( const Range& s, Index b, Index p, Index r, Index c );
356  VectorView operator()( Index s, const Range& b, Index p, Index r, Index c );
357  VectorView operator()( Index s, Index b, const Range& p, Index r, Index c );
358  VectorView operator()( Index s, Index b, Index p, const Range& r, Index c );
359  VectorView operator()( Index s, Index b, Index p, Index r, const Range& c );
360 
363  { // Check if indices are valid:
364  assert( 0 <= s );
365  assert( 0 <= b );
366  assert( 0 <= p );
367  assert( 0 <= r );
368  assert( 0 <= c );
369  assert( s < msr.mextent );
370  assert( b < mbr.mextent );
371  assert( p < mpr.mextent );
372  assert( r < mrr.mextent );
373  assert( c < mcr.mextent );
374 
375  return *( mdata +
376  msr.mstart + s * msr.mstride +
377  mbr.mstart + b * mbr.mstride +
378  mpr.mstart + p * mpr.mstride +
379  mrr.mstart + r * mrr.mstride +
380  mcr.mstart + c * mcr.mstride );
381  }
382 
383  // Conversion to a plain C-array
384  const Numeric *get_c_array() const;
385  Numeric *get_c_array();
386 
387  // Functions returning const iterators:
388  ConstIterator5D begin() const;
389  ConstIterator5D end() const;
390  // Functions returning iterators:
391  Iterator5D begin();
392  Iterator5D end();
393 
394  // Assignment operators:
396  Tensor5View& operator=(const Tensor5View& v);
397  Tensor5View& operator=(const Tensor5& v);
399 
400  // Other operators:
405 
410 
412  virtual ~Tensor5View() {}
413 
414  // Friends:
415  // friend class VectorView;
416  // friend ConstTensor5View transpose(ConstTensor5View m);
417  // friend Tensor5View transpose(Tensor5View m);
418  friend class Iterator6D;
419  friend class Tensor6View;
420  friend class Tensor7View;
421 
422  // Special constructor to make a Tensor5 view of a Tensor4.
423  Tensor5View(const Tensor4View& a);
424 
425 protected:
426  // Constructors:
427  Tensor5View();
428  Tensor5View(Numeric *data,
429  const Range& s, const Range& b, const Range& p, const Range& r, const Range& c);
430  Tensor5View(Numeric *data,
431  const Range& ps, const Range& pb, const Range& pp, const Range& pr, const Range& pc,
432  const Range& ns, const Range& nb, const Range& np, const Range& nr, const Range& nc);
433 };
434 
443 class Tensor5 : public Tensor5View {
444 public:
445  // Constructors:
446  Tensor5();
447  Tensor5(Index s, Index b, Index p, Index r, Index c);
448  Tensor5(Index s, Index b, Index p, Index r, Index c, Numeric fill);
449  Tensor5(const ConstTensor5View& v);
450  Tensor5(const Tensor5& v);
451 
452  // Assignment operators:
453  Tensor5& operator=(const Tensor5& x);
455 
456  // Resize function:
457  void resize(Index s, Index b, Index p, Index r, Index c);
458 
459  // Destructor:
460  virtual ~Tensor5();
461 };
462 
463 
464 // Function declarations:
465 // ----------------------
466 
467 void copy(ConstIterator5D origin,
468  const ConstIterator5D& end,
469  Iterator5D target);
470 
471 void copy(Numeric x,
472  Iterator5D target,
473  const Iterator5D& end);
474 
475 void transform( Tensor5View y,
476  double (&my_func)(double),
477  ConstTensor5View x );
478 
479 Numeric max(const ConstTensor5View& x);
480 
481 Numeric min(const ConstTensor5View& x);
482 
483 ostream& operator<<(ostream& os, const ConstTensor5View& v);
484 
486 // Helper function for debugging
487 #ifndef NDEBUG
488 
490  Index r, Index c);
491 
492 #endif
493 
495 #endif // matpackV_h
Tensor7View
The Tensor7View class.
Definition: matpackVII.h:779
Iterator5D::operator!=
bool operator!=(const Iterator5D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackV.h:60
ConstIterator5D::operator!=
bool operator!=(const ConstIterator5D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackV.h:112
ConstTensor5View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackV.cc:38
ConstTensor4View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackIV.h:227
MatrixView
The MatrixView class.
Definition: matpackI.h:668
Tensor5View::operator+=
Tensor5View & operator+=(Numeric x)
Addition of scalar.
Definition: matpackV.cc:2116
Iterator5D::Iterator5D
Iterator5D(const Tensor4View &x, Index stride)
Explicit constructor.
Definition: matpackV.h:52
Tensor5::Tensor5
Tensor5()
Default constructor.
Definition: matpackV.cc:2317
Tensor5View::operator-=
Tensor5View & operator-=(Numeric x)
Subtraction of scalar.
Definition: matpackV.cc:2127
operator<<
ostream & operator<<(ostream &os, const ConstTensor5View &v)
Output operator.
Definition: matpackV.cc:885
Iterator5D::operator*
Tensor4View & operator*()
Dereferencing.
Definition: matpackV.h:82
ConstTensor5View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackV.cc:56
ConstTensor5View::~ConstTensor5View
virtual ~ConstTensor5View()
Destructor.
Definition: matpackV.h:233
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:169
ConstTensor5View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackV.h:258
ConstTensor5View::operator()
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:64
debug_tensor5view_get_elem
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:2585
Tensor5::operator=
Tensor5 & operator=(const Tensor5 &x)
Assignment operator from another tensor.
Definition: matpackV.cc:2410
ConstTensor4View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackIV.h:225
Iterator5D::operator->
Tensor4View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Definition: matpackV.h:79
ConstTensor4View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackIV.h:231
Iterator5D::Iterator5D
Iterator5D()
Default constructor.
Definition: matpackV.h:45
Range::mstart
Index mstart
The start index.
Definition: matpackI.h:204
ConstTensor5View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackV.h:256
transform
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:2499
Iterator5D
Implementation of Tensors of Rank 5.
Definition: matpackV.h:38
ConstIterator5D::ConstIterator5D
ConstIterator5D(const ConstTensor4View &x, Index stride)
Explicit constructor.
Definition: matpackV.h:103
ConstIterator5D::mstride
Index mstride
Stride.
Definition: matpackV.h:140
max
Numeric max(const ConstTensor5View &x)
Max function, tensor version.
Definition: matpackV.cc:2522
ConstIterator5D::operator++
ConstIterator5D & operator++()
Prefix increment operator.
Definition: matpackV.h:109
ConstTensor5View::npages
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:44
matpackIV.h
copy
void copy(ConstIterator5D origin, const ConstIterator5D &end, Iterator5D target)
Copy data between begin and end to target.
Definition: matpackV.cc:2287
ConstTensor5View::begin
ConstIterator5D begin() const
Return const iterator to first shelf.
Definition: matpackV.cc:789
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:149
ConstTensor5View::operator()
Numeric operator()(Index s, Index b, Index p, Index r, Index c) const
Plain const index operator.
Definition: matpackV.h:207
Tensor3View
The Tensor3View class.
Definition: matpackIII.h:234
Tensor5View::operator()
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:912
Tensor5View::operator()
Numeric operator()(Index s, Index b, Index p, Index r, Index c) const
Plain const index operator.
Definition: matpackV.h:320
Tensor5View::operator/=
Tensor5View & operator/=(Numeric x)
Division by scalar.
Definition: matpackV.cc:2105
Tensor5View::operator()
Numeric & operator()(Index s, Index b, Index p, Index r, Index c)
Plain const index operator.
Definition: matpackV.h:362
Tensor5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackV.cc:2435
ConstIterator6D
Const version of Iterator6D.
Definition: matpackVI.h:94
ConstIterator5D::operator*
const ConstTensor4View & operator*() const
Dereferencing.
Definition: matpackV.h:134
Tensor5View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackV.cc:775
Tensor5::~Tensor5
virtual ~Tensor5()
Destructor for Tensor5.
Definition: matpackV.cc:2476
ConstTensor5View::mrr
Range mrr
The row range of mdata that is actually used.
Definition: matpackV.h:262
VectorView
The VectorView class.
Definition: matpackI.h:373
Tensor5View::begin
ConstIterator5D begin() const
Return const iterator to first shelf.
Definition: matpackV.cc:2003
ns
#define ns
Definition: continua.cc:14564
ConstIterator5D::ConstIterator5D
ConstIterator5D(const ConstIterator5D &o)
Copy constructor.
Definition: matpackV.h:99
ConstTensor6View
A constant view of a Tensor6.
Definition: matpackVI.h:167
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Tensor5View
The Tensor5View class.
Definition: matpackV.h:278
Tensor5View::end
ConstIterator5D end() const
Return const iterator behind last shelf.
Definition: matpackV.cc:2009
ConstTensor5View::ConstTensor5View
ConstTensor5View()
Default constructor.
Definition: matpackV.cc:823
ConstTensor5View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackV.h:264
Tensor5View::~Tensor5View
virtual ~Tensor5View()
Destructor.
Definition: matpackV.h:412
min
Numeric min(const ConstTensor5View &x)
Min function, tensor version.
Definition: matpackV.cc:2544
Iterator6D
The outermost iterator class for rank 6 tensors.
Definition: matpackVI.h:38
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:591
Tensor5
The Tensor5 class.
Definition: matpackV.h:443
Tensor5View::Tensor5View
Tensor5View()
Default constructor.
Definition: matpackV.cc:2227
Iterator5D::operator++
Iterator5D & operator++()
Prefix increment operator.
Definition: matpackV.h:57
Range
The range class.
Definition: matpackI.h:148
Range::mextent
Index mextent
The number of elements.
Definition: matpackI.h:207
ConstIterator5D::operator->
const ConstTensor4View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Definition: matpackV.h:131
ConstTensor5View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:50
Tensor5View::operator=
Tensor5View & operator=(const ConstTensor5View &v)
Assignment operator.
Definition: matpackV.cc:2035
ConstTensor5View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackV.h:260
ConstIterator5D::msv
ConstTensor4View msv
Current position.
Definition: matpackV.h:138
ConstTensor5View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackV.cc:32
Iterator5D::Iterator5D
Iterator5D(const Iterator5D &o)
Copy constructor.
Definition: matpackV.h:48
ConstTensor4View::mrr
Range mrr
The row range of mdata that is actually used.
Definition: matpackIV.h:229
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:147
Tensor4View
The Tensor4View class.
Definition: matpackIV.h:245
ConstTensor5View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackV.h:266
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
ConstIterator5D
Const version of Iterator5D.
Definition: matpackV.h:92
Iterator5D::msv
Tensor4View msv
Current position.
Definition: matpackV.h:86
Range::mstride
Index mstride
The stride.
Definition: matpackI.h:209
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
ConstTensor5View::end
ConstIterator5D end() const
Return const iterator behind last shelf.
Definition: matpackV.cc:797
ConstIterator5D::ConstIterator5D
ConstIterator5D()
Default constructor.
Definition: matpackV.h:96
Iterator5D::mstride
Index mstride
Stride.
Definition: matpackV.h:88
ConstTensor4View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackIV.h:233
Tensor5View::operator*=
Tensor5View & operator*=(Numeric x)
Multiplication by scalar.
Definition: matpackV.cc:2094
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:160
Tensor6View
The Tensor6View class.
Definition: matpackVI.h:450