ARTS  2.4.0(git:4fb77825)
describe.cc
Go to the documentation of this file.
1 /* Copyright (C) 2003-2012 Stefan Buehler <sbuehler@ltu.se>
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 
30 #include "describe.h"
31 
32 using std::ostringstream;
33 
35 
39  ostringstream os;
40  os << "Tensor7 [" << x.nlibraries() << "," << x.nvitrines() << ","
41  << x.nshelves() << "," << x.nbooks() << "," << x.npages() << ","
42  << x.nrows() << "," << x.ncols() << "]";
43  return os.str();
44 }
45 
47 
51  ostringstream os;
52  os << "Tensor6 [" << x.nvitrines() << "," << x.nshelves() << "," << x.nbooks()
53  << "," << x.npages() << "," << x.nrows() << "," << x.ncols() << "]";
54  return os.str();
55 }
56 
58 
62  ostringstream os;
63  os << "Tensor5 [" << x.nshelves() << "," << x.nbooks() << "," << x.npages()
64  << "," << x.nrows() << "," << x.ncols() << "]";
65  return os.str();
66 }
67 
69 
73  ostringstream os;
74  os << "Tensor4 [" << x.nbooks() << "," << x.npages() << "," << x.nrows()
75  << "," << x.ncols() << "]";
76  return os.str();
77 }
78 
80 
84  ostringstream os;
85  os << "Tensor3 [" << x.npages() << "," << x.nrows() << "," << x.ncols()
86  << "]";
87  return os.str();
88 }
89 
91 
95  ostringstream os;
96  os << "Matrix [" << x.nrows() << "," << x.ncols() << "]";
97  return os.str();
98 }
99 
101 
105  ostringstream os;
106  os << "Vector [" << x.nelem() << "]";
107  return os.str();
108 }
109 
111 
115  ostringstream os;
116  os << "Scalar (" << x << ")";
117  return os.str();
118 }
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:147
describe.h
Header file for describe.cc.
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:133
describe
String describe(ConstTensor7View x)
Describe Tensor7.
Definition: describe.cc:38
my_basic_string< char >
ConstTensor6View
A constant view of a Tensor6.
Definition: matpackVI.h:149
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:982
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:132
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:143