Go to the documentation of this file.
54 if (haystack.
nelem() <= needleind[i])
57 os <<
"The input vector only has " << haystack.
nelem()
58 <<
" elements. But one of the needle indexes is "
59 << needleind[i] <<
"." << endl;
60 os <<
"The indexes must be between 0 and " << haystack.
nelem() - 1;
61 throw runtime_error (os.str());
64 dummy[i] = haystack[needleind[i]];
86 if (haystack.
nelem() <= needleind[i])
89 os <<
"The input vector only has " << haystack.
nelem()
90 <<
" elements. But one of the needle indexes is "
91 << needleind[i] <<
"." << endl;
92 os <<
"The indexes must be between 0 and " << haystack.
nelem() - 1;
93 throw runtime_error (os.str());
96 dummy[i] = haystack[needleind[i]];
118 if (haystack.
nrows() <= needleind[i])
121 os <<
"The input matrix only has " << haystack.
nrows()
122 <<
" rows. But one of the needle indexes is "
123 << needleind[i] <<
"." << endl;
124 os <<
"The indexes must be between 0 and " << haystack.
nrows() - 1;
125 throw runtime_error (os.str());
128 dummy(i,
joker) = haystack(needleind[i],
joker);
152 if (haystack.
nrows() <= needleind[i])
155 os <<
"The input matrix only has " << haystack.
nrows()
156 <<
" rows. But one of the needle indexes is "
157 << needleind[i] <<
"." << endl;
158 os <<
"The indexes must be between 0 and " << haystack.
nrows() - 1;
159 throw runtime_error (os.str());
169 Numeric value = haystack(needleind[i],j);
171 dummy.
rw(i,j) = value;
176 if (dummy.
nnz()==haystack.
nnz())
179 out3 <<
" Number of nonzero elements has stayed the same.\n";
183 out3 <<
" Number of nonzero elements reduced from "
184 << haystack.
nnz() <<
" to " << dummy.
nnz() <<
".\n";
Index ncols() const
Returns the number of columns.
Index nrows() const
Returns the number of rows.
This can be used to make arrays out of anything.
Declarations for agendas.
Declarations having to do with the four output streams.
Index nnz() const
Returns the number of nonzero elements.
Index ncols() const
Returns the number of columns.
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
This file contains the declaration and partly the implementation of the workspace class.
Index nrows() const
Returns the number of rows.
Numeric & rw(Index r, Index c)
Read and write index operator.
Header file for sparse matrices.
INDEX Index
The type to use for all integer numbers and indices.
void Select(Array< T > &needles, const Array< T > &haystack, const ArrayOfIndex &needleind, const Verbosity &)
Index nelem() const
Number of elements.
This file contains the definition of String, the ARTS string class.