ARTS  2.2.66
gridded_fields.h
Go to the documentation of this file.
1 /* Copyright (C) 2008-2012 Oliver Lemke <olemke@core-dump.info>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA.
17 */
18 
33 #ifndef gridded_fields_h
34 #define gridded_fields_h
35 
36 #include <stdexcept>
37 #include "matpackVI.h"
38 #include "array.h"
39 #include "mystring.h"
40 
42 enum GridType {
45 };
46 
48 
49 #define CHECK_ERROR_BOILERPLATE \
50  "size mismatch between grids and data.\n" \
51  "Note that a grid is allowed to be empty, but in the\n" \
52  "data that dimension must have exactly one element.\n"
53 
55 class GriddedField {
56 private:
63 
64 protected:
66 
70  GriddedField() : dim(0),
71  mname(),
72  mgridtypes(),
73  mgridnames(),
74  mstringgrids(),
76  { /* Nothing to do here */ }
77 
79 
88  GriddedField(const Index d, const String& s) : dim(d),
89  mname(s),
91  mgridnames(d),
92  mstringgrids(d),
93  mnumericgrids(d)
94  { /* Nothing to do here */ }
95 
96 
97 public:
99 
100  Index get_dim() const { return dim; }
101 
102  void copy_grids(const GriddedField& gf);
103 
105 
111  const String& get_grid_name(Index i) const { return mgridnames[i]; }
112 
114 
121  {
122  Index ret = 0;
123  assert(i < dim);
124  switch (mgridtypes[i])
125  {
126  case GRID_TYPE_NUMERIC:
127  ret = mnumericgrids[i].nelem(); break;
128  case GRID_TYPE_STRING: ret = mstringgrids[i].nelem(); break;
129  }
130 
131  return ret;
132  }
133 
135 
141  GridType get_grid_type(Index i) const { return mgridtypes[i]; }
142 
144 
146 
147  const ArrayOfString& get_string_grid(Index i) const;
148 
150 
152 
153  const String& get_name() const { return mname; }
154 
155  void set_grid(Index i, const Vector& g);
156 
157  void set_grid(Index i, const ArrayOfString& g);
158 
160 
166  void set_grid_name(Index i, const String& s)
167  {
168  assert(i < dim);
169  mgridnames[i] = s;
170  }
171 
173 
174  void set_name(const String& s) { mname = s; }
175 
177 
184  virtual bool checksize() const = 0;
185 
187 
190  virtual void checksize_strict() const = 0;
191 
193  virtual ~GriddedField() {}
194 
195  friend std::ostream& operator<<(std::ostream& os, const GriddedField& gf);
196 };
197 
198 
199 class GriddedField1 : public GriddedField {
200 public:
204 
205  GriddedField1(const String& s) : GriddedField(1, s) {}
206 
207  virtual bool checksize() const
208  {
209  return (!get_grid_size(0) && data.nelem() == 1)
210  || data.nelem() == get_grid_size(0);
211  }
212 
213  virtual void checksize_strict() const
214  {
215  if (!checksize())
216  {
217  std::ostringstream os;
218  os << "GriddedField1 ";
219  if (get_name().length()) os << "(" << get_name() << ") ";
221  os << "Grid";
222  if (get_grid_name(0).nelem()) os << " (" << get_grid_name(0) << ")";
223  os << " = " << get_grid_size(0) << "\n";
224  os << "Data";
225  os << " = " << data.nelem();
226  throw std::runtime_error(os.str());
227  }
228  }
229 
231 
232  void resize(const GriddedField1& gf)
233  {
234  data.resize(gf.get_grid_size(0));
235  }
236 
238 
239  void resize(Index n)
240  {
241  data.resize(n);
242  }
243 
244  friend std::ostream& operator<<(std::ostream& os, const GriddedField1& gf);
245 
247 };
248 
249 
250 class GriddedField2 : public GriddedField {
251 public:
255 
256  GriddedField2(const String& s) : GriddedField(2, s) {}
257 
258  virtual bool checksize() const
259  {
260  return ((!get_grid_size(1) && data.ncols() == 1)
261  || data.ncols() == get_grid_size(1))
262  && ((!get_grid_size(0) && data.nrows() == 1)
263  || data.nrows() == get_grid_size(0));
264  }
265 
266  virtual void checksize_strict() const
267  {
268  if (!checksize())
269  {
270  std::ostringstream os;
271  os << "GriddedField2 ";
272  if (get_name().length()) os << "(" << get_name() << ") ";
274  for (Index i = 0; i < 2; i++)
275  {
276  os << "Grid " << i;
277  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
278  os << " = " << get_grid_size(i) << "\n";
279  }
280  os << "Data";
281  os << " = " << data.nrows() << ", " << data.ncols();
282  throw std::runtime_error(os.str());
283  }
284  }
285 
287 
288  void resize(const GriddedField2& gf)
289  {
290  data.resize(gf.get_grid_size(0),
291  gf.get_grid_size(1));
292  }
293 
295 
296  void resize(Index r, Index c)
297  {
298  data.resize(r, c);
299  }
300 
301  friend std::ostream& operator<<(std::ostream& os, const GriddedField2& gf);
302 
304 };
305 
306 
307 class GriddedField3 : public GriddedField {
308 public:
312 
313  GriddedField3(const String& s) : GriddedField(3, s) {}
314 
316  {
317  data = n;
318 
319  return *this;
320  }
321 
322  virtual bool checksize() const
323  {
324  return ((!get_grid_size(2) && data.ncols() == 1)
325  || data.ncols() == get_grid_size(2))
326  && ((!get_grid_size(1) && data.nrows() == 1)
327  || data.nrows() == get_grid_size(1))
328  && ((!get_grid_size(0) && data.npages() == 1)
329  || data.npages() == get_grid_size(0));
330  }
331 
332  virtual void checksize_strict() const
333  {
334  if (!checksize())
335  {
336  std::ostringstream os;
337  os << "GriddedField3 ";
338  if (get_name().length()) os << "(" << get_name() << ") ";
340  for (Index i = 0; i < 3; i++)
341  {
342  os << "Grid " << i;
343  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
344  os << " = " << get_grid_size(i) << "\n";
345  }
346  os << "Data";
347  os << " = " << data.npages() << ", " << data.nrows() << ", " << data.ncols();
348  throw std::runtime_error(os.str());
349  }
350  }
351 
353 
354  void resize(const GriddedField3& gf)
355  {
356  data.resize(gf.get_grid_size(0),
357  gf.get_grid_size(1),
358  gf.get_grid_size(2));
359  }
360 
362 
363  void resize(Index p, Index r, Index c)
364  {
365  data.resize(p, r, c);
366  }
367 
368  friend std::ostream& operator<<(std::ostream& os, const GriddedField3& gf);
369 
371 };
372 
373 
374 class GriddedField4 : public GriddedField {
375 public:
379 
380  GriddedField4(const String& s) : GriddedField(4, s) {}
381 
382  virtual bool checksize() const
383  {
384  return ((!get_grid_size(3) && data.ncols() == 1)
385  || data.ncols() == get_grid_size(3))
386  && ((!get_grid_size(2) && data.nrows() == 1)
387  || data.nrows() == get_grid_size(2))
388  && ((!get_grid_size(1) && data.npages() == 1)
389  || data.npages() == get_grid_size(1))
390  && ((!get_grid_size(0) && data.nbooks() == 1)
391  || data.nbooks() == get_grid_size(0));
392  }
393 
394  virtual void checksize_strict() const
395  {
396  if (!checksize())
397  {
398  std::ostringstream os;
399  os << "GriddedField4 ";
400  if (get_name().length()) os << "(" << get_name() << ") ";
402  for (Index i = 0; i < 4; i++)
403  {
404  os << "Grid " << i;
405  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
406  os << " = " << get_grid_size(i) << "\n";
407  }
408  os << "Data";
409  os << " = " << data.nbooks() << ", " << data.npages() << ", ";
410  os << data.nrows() << ", " << data.ncols();
411  throw std::runtime_error(os.str());
412  }
413  }
414 
416 
417  void resize(const GriddedField4& gf)
418  {
419  data.resize(gf.get_grid_size(0),
420  gf.get_grid_size(1),
421  gf.get_grid_size(2),
422  gf.get_grid_size(3));
423  }
424 
426 
427  void resize(Index b, Index p, Index r, Index c)
428  {
429  data.resize(b, p, r, c);
430  }
431 
432  friend std::ostream& operator<<(std::ostream& os, const GriddedField4& gf);
433 
435 };
436 
437 
438 class GriddedField5 : public GriddedField {
439 public:
443 
444  GriddedField5(const String& s) : GriddedField(5, s) {}
445 
446  virtual bool checksize() const
447  {
448  return ((!get_grid_size(4) && data.ncols() == 1)
449  || data.ncols() == get_grid_size(4))
450  && ((!get_grid_size(3) && data.nrows() == 1)
451  || data.nrows() == get_grid_size(3))
452  && ((!get_grid_size(2) && data.npages() == 1)
453  || data.npages() == get_grid_size(2))
454  && ((!get_grid_size(1) && data.nbooks() == 1)
455  || data.nbooks() == get_grid_size(1))
456  && ((!get_grid_size(0) && data.nshelves() == 1)
457  || data.nshelves() == get_grid_size(0));
458  }
459 
460  virtual void checksize_strict() const
461  {
462  if (!checksize())
463  {
464  std::ostringstream os;
465  os << "GriddedField5 ";
466  if (get_name().length()) os << "(" << get_name() << ") ";
468  for (Index i = 0; i < 5; i++)
469  {
470  os << "Grid " << i;
471  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
472  os << " = " << get_grid_size(i) << "\n";
473  }
474  os << "Data";
475  os << " = " << data.nshelves() << ", " << data.nbooks() << ", ";
476  os << data.npages() << ", " << data.nrows() << ", " << data.ncols();
477  throw std::runtime_error(os.str());
478  }
479  }
480 
482 
483  void resize(const GriddedField5& gf)
484  {
485  data.resize(gf.get_grid_size(0),
486  gf.get_grid_size(1),
487  gf.get_grid_size(2),
488  gf.get_grid_size(3),
489  gf.get_grid_size(4));
490  }
491 
493 
494  void resize(Index s, Index b, Index p, Index r, Index c)
495  {
496  data.resize(s, b, p, r, c);
497  }
498 
499  friend std::ostream& operator<<(std::ostream& os, const GriddedField5& gf);
500 
502 };
503 
504 
505 class GriddedField6 : public GriddedField {
506 public:
510 
511  GriddedField6(const String& s) : GriddedField(6, s) {}
512 
513  virtual bool checksize() const
514  {
515  return ((!get_grid_size(5) && data.ncols() == 1)
516  || data.ncols() == get_grid_size(5))
517  && ((!get_grid_size(4) && data.nrows() == 1)
518  || data.nrows() == get_grid_size(4))
519  && ((!get_grid_size(3) && data.npages() == 1)
520  || data.npages() == get_grid_size(3))
521  && ((!get_grid_size(2) && data.nbooks() == 1)
522  || data.nbooks() == get_grid_size(2))
523  && ((!get_grid_size(1) && data.nshelves() == 1)
524  || data.nshelves() == get_grid_size(1))
525  && ((!get_grid_size(0) && data.nvitrines() == 1)
526  || data.nvitrines() == get_grid_size(0));
527  }
528 
529  virtual void checksize_strict() const
530  {
531  if (!checksize())
532  {
533  std::ostringstream os;
534  os << "GriddedField6 ";
535  if (get_name().length()) os << "(" << get_name() << ") ";
537  for (Index i = 0; i < 5; i++)
538  {
539  os << "Grid " << i;
540  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
541  os << " = " << get_grid_size(i) << "\n";
542  }
543  os << "Data";
544  os << " = " << data.nvitrines() << data.nshelves() << ", " << data.nbooks() << ", ";
545  os << data.npages() << ", " << data.nrows() << ", " << data.ncols();
546  throw std::runtime_error(os.str());
547  }
548  }
549 
551 
552  void resize(const GriddedField6& gf)
553  {
554  data.resize(gf.get_grid_size(0),
555  gf.get_grid_size(1),
556  gf.get_grid_size(2),
557  gf.get_grid_size(3),
558  gf.get_grid_size(4),
559  gf.get_grid_size(5));
560  }
561 
563 
564  void resize(Index v, Index s, Index b, Index p, Index r, Index c)
565  {
566  data.resize(v, s, b, p, r, c);
567  }
568 
569  friend std::ostream& operator<<(std::ostream& os, const GriddedField6& gf);
570 
572 };
573 
574 
575 
576 /********** Output operators **********/
577 
578 std::ostream& operator<<(std::ostream& os, const GriddedField& gf);
579 std::ostream& operator<<(std::ostream& os, const GriddedField1& gf);
580 std::ostream& operator<<(std::ostream& os, const GriddedField2& gf);
581 std::ostream& operator<<(std::ostream& os, const GriddedField3& gf);
582 std::ostream& operator<<(std::ostream& os, const GriddedField4& gf);
583 std::ostream& operator<<(std::ostream& os, const GriddedField5& gf);
584 std::ostream& operator<<(std::ostream& os, const GriddedField6& gf);
585 
586 /************ Array types *************/
587 
595 
596 #undef CHECK_ERROR_BOILERPLATE
597 
598 #endif
599 
GriddedField2
Definition: gridded_fields.h:250
Matrix
The Matrix class.
Definition: matpackI.h:788
GriddedField5::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:446
GriddedField::get_string_grid
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
Definition: gridded_fields.cc:159
GriddedField::checksize_strict
virtual void checksize_strict() const =0
Strict consistency check.
GriddedField::mname
String mname
Definition: gridded_fields.h:58
GriddedField::set_grid_name
void set_grid_name(Index i, const String &s)
Set grid name.
Definition: gridded_fields.h:166
Tensor4::resize
void resize(Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackIV.cc:1403
GriddedField6::resize
void resize(const GriddedField6 &gf)
Make this GriddedField6 the same size as the given one.
Definition: gridded_fields.h:552
GriddedField1::resize
void resize(Index n)
Resize the data vector.
Definition: gridded_fields.h:239
ConstTensor6View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVI.cc:38
ConstTensor5View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackV.cc:41
GriddedField4::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:394
GriddedField5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:494
Tensor6::resize
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVI.cc:2879
ArrayOfGriddedField3
Array< GriddedField3 > ArrayOfGriddedField3
Definition: gridded_fields.h:590
GriddedField4::resize
void resize(Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:427
GriddedField
Definition: gridded_fields.h:55
Tensor3
The Tensor3 class.
Definition: matpackIII.h:348
GriddedField::mgridtypes
Array< GridType > mgridtypes
Definition: gridded_fields.h:59
GriddedField3::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:332
ConstTensor5View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackV.cc:59
ConstTensor6View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVI.cc:50
GriddedField6
Definition: gridded_fields.h:505
GriddedField2::GriddedField2
GriddedField2()
Construct an empty GriddedField2.
Definition: gridded_fields.h:253
ArrayOfGridType
Array< GridType > ArrayOfGridType
Definition: gridded_fields.h:47
ConstTensor6View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVI.cc:56
GRID_TYPE_NUMERIC
@ GRID_TYPE_NUMERIC
Definition: gridded_fields.h:43
GriddedField3::operator=
GriddedField3 & operator=(Numeric n)
Definition: gridded_fields.h:315
Vector::resize
void resize(Index n)
Resize function.
Definition: matpackI.cc:798
GriddedField::get_dim
Index get_dim() const
Get the dimension of this gridded field.
Definition: gridded_fields.h:100
ArrayOfArrayOfGriddedField1
Array< Array< GriddedField1 > > ArrayOfArrayOfGriddedField1
Definition: gridded_fields.h:592
GriddedField::checksize
virtual bool checksize() const =0
Consistency check.
GriddedField1::data
Vector data
Definition: gridded_fields.h:246
GriddedField::GriddedField
GriddedField(const Index d, const String &s)
Construct a GriddedField.
Definition: gridded_fields.h:88
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:832
GriddedField::mnumericgrids
ArrayOfVector mnumericgrids
Definition: gridded_fields.h:62
GriddedField::get_numeric_grid
ConstVectorView get_numeric_grid(Index i) const
Get a numeric grid.
Definition: gridded_fields.cc:93
GriddedField5::data
Tensor5 data
Definition: gridded_fields.h:501
GriddedField2::data
Matrix data
Definition: gridded_fields.h:303
GriddedField4::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:382
Tensor4
The Tensor4 class.
Definition: matpackIV.h:383
array.h
This file contains the definition of Array.
GriddedField2::resize
void resize(Index r, Index c)
Resize the data matrix.
Definition: gridded_fields.h:296
GriddedField3::GriddedField3
GriddedField3(const String &s)
Construct an empty GriddedField3 with the given name.
Definition: gridded_fields.h:313
Tensor3::resize
void resize(Index p, Index r, Index c)
Resize function.
Definition: matpackIII.cc:862
ConstTensor5View::npages
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:47
GriddedField3
Definition: gridded_fields.h:307
GriddedField5::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField5 &gf)
ConstTensor3View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIII.h:143
GriddedField::dim
Index dim
Definition: gridded_fields.h:57
GriddedField6::GriddedField6
GriddedField6(const String &s)
Construct an empty GriddedField6 with the given name.
Definition: gridded_fields.h:511
GriddedField::get_grid_size
Index get_grid_size(Index i) const
Get the size of a grid.
Definition: gridded_fields.h:120
GriddedField2::GriddedField2
GriddedField2(const String &s)
Construct an empty GriddedField2 with the given name.
Definition: gridded_fields.h:256
GriddedField::get_grid_type
GridType get_grid_type(Index i) const
Get grid type.
Definition: gridded_fields.h:141
Array< GridType >
GriddedField::mstringgrids
Array< ArrayOfString > mstringgrids
Definition: gridded_fields.h:61
GriddedField3::resize
void resize(Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:363
GriddedField3::data
Tensor3 data
Definition: gridded_fields.h:370
GriddedField6::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:529
ConstTensor6View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVI.cc:32
GriddedField::GriddedField
GriddedField()
Construct an empty GriddedField.
Definition: gridded_fields.h:70
Tensor5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackV.cc:2430
GriddedField::mgridnames
ArrayOfString mgridnames
Definition: gridded_fields.h:60
GriddedField1::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:213
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:838
my_basic_string< char >
GriddedField5::GriddedField5
GriddedField5(const String &s)
Construct an empty GriddedField5 with the given name.
Definition: gridded_fields.h:444
ArrayOfGriddedField4
Array< GriddedField4 > ArrayOfGriddedField4
Definition: gridded_fields.h:591
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:180
GriddedField5::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:460
CHECK_ERROR_BOILERPLATE
#define CHECK_ERROR_BOILERPLATE
Definition: gridded_fields.h:49
GriddedField2::checksize_strict
virtual void checksize_strict() const
Strict consistency check.
Definition: gridded_fields.h:266
VectorView
The VectorView class.
Definition: matpackI.h:372
GridType
GridType
Definition: gridded_fields.h:42
GriddedField3::GriddedField3
GriddedField3()
Construct an empty GriddedField3.
Definition: gridded_fields.h:310
ConstTensor4View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIV.cc:81
operator<<
std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
Output operator for GriddedField.
Definition: gridded_fields.cc:257
GRID_TYPE_STRING
@ GRID_TYPE_STRING
Definition: gridded_fields.h:44
GriddedField1::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField1 &gf)
GriddedField4::GriddedField4
GriddedField4(const String &s)
Construct an empty GriddedField4 with the given name.
Definition: gridded_fields.h:380
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
GriddedField1::GriddedField1
GriddedField1(const String &s)
Construct an empty GriddedField1 with the given name.
Definition: gridded_fields.h:205
ConstTensor4View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIV.cc:69
GriddedField4
Definition: gridded_fields.h:374
GriddedField::copy_grids
void copy_grids(const GriddedField &gf)
Copy grids.
Definition: gridded_fields.cc:61
GriddedField::set_name
void set_name(const String &s)
Set name of this gridded field.
Definition: gridded_fields.h:174
ConstTensor4View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackIV.cc:63
GriddedField::get_name
const String & get_name() const
Get the name of this gridded field.
Definition: gridded_fields.h:153
GriddedField3::resize
void resize(const GriddedField3 &gf)
Make this GriddedField3 the same size as the given one.
Definition: gridded_fields.h:354
GriddedField2::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField2 &gf)
GriddedField4::resize
void resize(const GriddedField4 &gf)
Make this GriddedField4 the same size as the given one.
Definition: gridded_fields.h:417
GriddedField6::GriddedField6
GriddedField6()
Construct an empty GriddedField6.
Definition: gridded_fields.h:508
ArrayOfArrayOfGriddedField2
Array< Array< GriddedField2 > > ArrayOfArrayOfGriddedField2
Definition: gridded_fields.h:593
Matrix::resize
void resize(Index r, Index c)
Resize function.
Definition: matpackI.cc:1580
ConstTensor3View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIII.h:146
ConstTensor6View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVI.cc:44
Tensor5
The Tensor5 class.
Definition: matpackV.h:451
ConstTensor4View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIV.cc:75
GriddedField6::data
Tensor6 data
Definition: gridded_fields.h:571
GriddedField2::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:258
GriddedField::set_grid
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Definition: gridded_fields.cc:225
ConstTensor5View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:53
GriddedField6::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField6 &gf)
GriddedField3::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:322
GriddedField1::GriddedField1
GriddedField1()
Construct an empty GriddedField1.
Definition: gridded_fields.h:202
GriddedField3::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField3 &gf)
ConstTensor5View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackV.cc:35
ConstTensor3View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIII.h:149
GriddedField4::GriddedField4
GriddedField4()
Construct an empty GriddedField4.
Definition: gridded_fields.h:377
ArrayOfGriddedField1
Array< GriddedField1 > ArrayOfGriddedField1
Definition: gridded_fields.h:588
GriddedField1
Definition: gridded_fields.h:199
GriddedField::~GriddedField
virtual ~GriddedField()
GriddedField virtual destructor.
Definition: gridded_fields.h:193
GriddedField::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
GriddedField4::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField4 &gf)
GriddedField1::resize
void resize(const GriddedField1 &gf)
Make this GriddedField1 the same size as the given one.
Definition: gridded_fields.h:232
ArrayOfArrayOfGriddedField3
Array< Array< GriddedField3 > > ArrayOfArrayOfGriddedField3
Definition: gridded_fields.h:594
ArrayOfGriddedField2
Array< GriddedField2 > ArrayOfGriddedField2
Definition: gridded_fields.h:589
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
GriddedField::get_grid_name
const String & get_grid_name(Index i) const
Get grid name.
Definition: gridded_fields.h:111
GriddedField5::GriddedField5
GriddedField5()
Construct an empty GriddedField5.
Definition: gridded_fields.h:441
GriddedField1::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:207
Tensor6
The Tensor6 class.
Definition: matpackVI.h:950
GriddedField4::data
Tensor4 data
Definition: gridded_fields.h:434
GriddedField5::resize
void resize(const GriddedField5 &gf)
Make this GriddedField5 the same size as the given one.
Definition: gridded_fields.h:483
Vector
The Vector class.
Definition: matpackI.h:556
GriddedField6::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:513
GriddedField6::resize
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:564
GriddedField5
Definition: gridded_fields.h:438
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:176
ConstTensor6View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVI.cc:62
matpackVI.h
mystring.h
This file contains the definition of String, the ARTS string class.
GriddedField2::resize
void resize(const GriddedField2 &gf)
Make this GriddedField2 the same size as the given one.
Definition: gridded_fields.h:288