ARTS  2.0.49
describe.cc
Go to the documentation of this file.
1 /* Copyright (C) 2003-2008 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 
33 
37 {
38  ostringstream os;
39  os << "Tensor7 ["
40  << x.nlibraries() << ","
41  << x.nvitrines() << ","
42  << x.nshelves() << ","
43  << x.nbooks() << ","
44  << x.npages() << ","
45  << x.nrows() << ","
46  << x.ncols() << "]";
47  return os.str();
48 }
49 
51 
55 {
56  ostringstream os;
57  os << "Tensor6 ["
58  << x.nvitrines() << ","
59  << x.nshelves() << ","
60  << x.nbooks() << ","
61  << x.npages() << ","
62  << x.nrows() << ","
63  << x.ncols() << "]";
64  return os.str();
65 }
66 
68 
72 {
73  ostringstream os;
74  os << "Tensor5 ["
75  << x.nshelves() << ","
76  << x.nbooks() << ","
77  << x.npages() << ","
78  << x.nrows() << ","
79  << x.ncols() << "]";
80  return os.str();
81 }
82 
84 
88 {
89  ostringstream os;
90  os << "Tensor4 ["
91  << x.nbooks() << ","
92  << x.npages() << ","
93  << x.nrows() << ","
94  << x.ncols() << "]";
95  return os.str();
96 }
97 
99 
103 {
104  ostringstream os;
105  os << "Tensor3 ["
106  << x.npages() << ","
107  << x.nrows() << ","
108  << x.ncols() << "]";
109  return os.str();
110 }
111 
113 
117 {
118  ostringstream os;
119  os << "Matrix ["
120  << x.nrows() << ","
121  << x.ncols() << "]";
122  return os.str();
123 }
124 
126 
130 {
131  ostringstream os;
132  os << "Vector ["
133  << x.nelem() << "]";
134  return os.str();
135 }
136 
138 
141 string describe( const Numeric& x )
142 {
143  ostringstream os;
144  os << "Scalar (" << x << ")";
145  return os.str();
146 }
ConstTensor7View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVII.cc:43
ConstTensor6View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVI.cc:37
ConstTensor5View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackV.cc:38
ConstTensor5View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackV.cc:56
ConstTensor6View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVI.cc:49
ConstTensor7View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVII.cc:67
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:169
describe.h
Header file for describe.cc.
ConstTensor6View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVI.cc:55
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:796
ConstTensor5View::npages
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:44
ConstTensor3View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIII.h:151
ConstTensor7View::nlibraries
Index nlibraries() const
Returns the number of libraries.
Definition: matpackVII.cc:31
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:149
ConstTensor6View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVI.cc:31
describe
string describe(ConstTensor7View x)
Describe Tensor7.
Definition: describe.cc:36
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:802
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:175
ConstTensor7View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVII.cc:37
ConstTensor4View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIV.cc:78
ConstTensor7View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVII.cc:55
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
ConstTensor4View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIV.cc:66
ConstTensor4View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackIV.cc:60
ConstTensor3View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIII.h:154
ConstTensor6View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVI.cc:43
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:591
ConstTensor4View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIV.cc:72
ConstTensor7View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVII.cc:49
ConstTensor5View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:50
ConstTensor5View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackV.cc:32
ConstTensor3View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIII.h:157
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:147
ConstTensor7View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVII.cc:61
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
ConstTensor6View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVI.cc:61
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:160