52 if (index >= arr.
nelem()) {
54 os <<
"The index " << index <<
" is outside the range of the array.";
55 throw runtime_error(os.str());
69 if (index >= arr.
nelem()) {
71 os <<
"The index " << index <<
" is outside the range of the array.";
72 throw runtime_error(os.str());
87 if (index >= aoaoi.
nelem()) {
89 os <<
"The index " << index <<
" is outside the range of the Array.";
90 throw runtime_error(os.str());
93 aoi.resize(aoaoi[index].nelem());
106 if (index >=
v.nelem()) {
108 os <<
"The index " << index <<
" is outside the range of the Vector.";
109 throw runtime_error(os.str());
124 if (index >= t3.
npages()) {
126 os <<
"The index " << index <<
" is outside the page range of the Tensor3.";
127 throw runtime_error(os.str());
142 if (index >= t4.
nbooks()) {
144 os <<
"The index " << index <<
" is outside the book range of the Tensor4.";
145 throw runtime_error(os.str());
163 os <<
"The index " << index <<
"is outside the shelf range of the Tensor5.";
164 throw runtime_error(os.str());
184 if (index >= aagf.
nelem()) {
186 os <<
"The index " << index
187 <<
" is outside the range of the ArrayOfArrayOfGriddedField3.";
188 throw runtime_error(os.str());
191 agf.resize(aagf[index].nelem());
208 if (index >= agf4.
nelem()) {
210 os <<
"The index " << index
211 <<
" is outside the range of The ArrayOfGriddedField4.";
212 throw runtime_error(os.str());
229 if (index > aoqi.
nelem() or index < 0)
throw std::runtime_error(
"Bad index");
This file contains the definition of Array.
This can be used to make arrays out of anything.
Index nelem() const ARTS_NOEXCEPT
Index npages() const
Returns the number of pages.
Index ncols() const noexcept
Index nrows() const noexcept
Index nbooks() const noexcept
Index npages() const noexcept
Index nrows() const noexcept
Index ncols() const noexcept
Index npages() const noexcept
Index nbooks() const noexcept
Index nshelves() const noexcept
void resize(Index p, Index r, Index c)
Resize function.
void resize(Index b, Index p, Index r, Index c)
Resize function.
The declarations of all the exception classes.
Implementation of gridded fields.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
A logical struct for global quantum numbers with species identifiers.