ARTS  2.2.66
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 
34 
36 
40 {
41  ostringstream os;
42  os << "Tensor7 ["
43  << x.nlibraries() << ","
44  << x.nvitrines() << ","
45  << x.nshelves() << ","
46  << x.nbooks() << ","
47  << x.npages() << ","
48  << x.nrows() << ","
49  << x.ncols() << "]";
50  return os.str();
51 }
52 
54 
58 {
59  ostringstream os;
60  os << "Tensor6 ["
61  << x.nvitrines() << ","
62  << x.nshelves() << ","
63  << x.nbooks() << ","
64  << x.npages() << ","
65  << x.nrows() << ","
66  << x.ncols() << "]";
67  return os.str();
68 }
69 
71 
75 {
76  ostringstream os;
77  os << "Tensor5 ["
78  << x.nshelves() << ","
79  << x.nbooks() << ","
80  << x.npages() << ","
81  << x.nrows() << ","
82  << x.ncols() << "]";
83  return os.str();
84 }
85 
87 
91 {
92  ostringstream os;
93  os << "Tensor4 ["
94  << x.nbooks() << ","
95  << x.npages() << ","
96  << x.nrows() << ","
97  << x.ncols() << "]";
98  return os.str();
99 }
100 
102 
106 {
107  ostringstream os;
108  os << "Tensor3 ["
109  << x.npages() << ","
110  << x.nrows() << ","
111  << x.ncols() << "]";
112  return os.str();
113 }
114 
116 
120 {
121  ostringstream os;
122  os << "Matrix ["
123  << x.nrows() << ","
124  << x.ncols() << "]";
125  return os.str();
126 }
127 
129 
133 {
134  ostringstream os;
135  os << "Vector ["
136  << x.nelem() << "]";
137  return os.str();
138 }
139 
141 
145 {
146  ostringstream os;
147  os << "Scalar (" << x << ")";
148  return os.str();
149 }
ConstTensor7View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVII.cc:44
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
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
ConstTensor7View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVII.cc:68
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:162
describe.h
Header file for describe.cc.
ConstTensor6View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVI.cc:56
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:832
ConstTensor5View::npages
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:47
ConstTensor3View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIII.h:143
ConstTensor7View::nlibraries
Index nlibraries() const
Returns the number of libraries.
Definition: matpackVII.cc:32
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:141
ConstTensor6View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVI.cc:32
describe
String describe(ConstTensor7View x)
Describe Tensor7.
Definition: describe.cc:39
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:838
my_basic_string< char >
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:180
ConstTensor7View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVII.cc:38
ConstTensor4View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIV.cc:81
ConstTensor7View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVII.cc:56
ConstTensor6View
A constant view of a Tensor6.
Definition: matpackVI.h:159
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
ConstTensor4View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIV.cc:69
ConstTensor4View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackIV.cc:63
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
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:596
ConstTensor4View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIV.cc:75
ConstTensor7View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVII.cc:50
ConstTensor5View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:53
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
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:139
ConstTensor7View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVII.cc:62
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
ConstTensor6View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVI.cc:62
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:152