52 if (index >= arr.
nelem()) {
54 os <<
"The index " << index <<
" is outside the range of the array.";
55 throw runtime_error(os.
str());
70 if (index >= aoaoi.
nelem()) {
72 os <<
"The index " << index <<
" is outside the range of the Array.";
73 throw runtime_error(os.
str());
76 aoi.resize(aoaoi[index].
nelem());
89 if (index >= v.
nelem()) {
91 os <<
"The index " << index <<
" is outside the range of the Vector.";
92 throw runtime_error(os.
str());
107 if (index >= t3.
npages()) {
109 os <<
"The index " << index <<
" is outside the page range of the Tensor3.";
110 throw runtime_error(os.
str());
125 if (index >= t4.
nbooks()) {
127 os <<
"The index " << index <<
" is outside the book range of the Tensor4.";
128 throw runtime_error(os.
str());
146 os <<
"The index " << index <<
"is outside the shelf range of the Tensor5.";
147 throw runtime_error(os.
str());
167 if (index >= aagf.
nelem()) {
169 os <<
"The index " << index
170 <<
" is outside the range of the ArrayOfArrayOfGriddedField3.";
171 throw runtime_error(os.
str());
174 agf.resize(aagf[index].
nelem());
191 if (index >= agf4.
nelem()) {
193 os <<
"The index " << index
194 <<
" is outside the range of The ArrayOfGriddedField4.";
195 throw runtime_error(os.
str());
212 if (index > aoqi.
nelem() or index < 0)
throw std::runtime_error(
"Bad index");
Index npages() const
Returns the number of pages.
INDEX Index
The type to use for all integer numbers and indices.
Index nrows() const
Returns the number of rows.
Index nelem() const
Number of elements.
Index npages() const
Returns the number of pages.
Index nbooks() const
Returns the number of books.
Index nrows() const
Returns the number of rows.
Index nelem() const
Returns the number of elements.
This file contains the definition of Array.
Index nshelves() const
Returns the number of shelves.
_CS_string_type str() const
The declarations of all the exception classes.
Class to identify and match lines by their quantum numbers.
NUMERIC Numeric
The type to use for all floating point numbers.
void resize(Index p, Index r, Index c)
Resize function.
Index npages() const
Returns the number of pages.
This can be used to make arrays out of anything.
Index nelem(const Lines &l)
Number of lines.
Index nbooks() const
Returns the number of books.
Implementation of gridded fields.
Index ncols() const
Returns the number of columns.
Index ncols() const
Returns the number of columns.
void resize(Index b, Index p, Index r, Index c)
Resize function.