106 class Array :
public std::vector<base>
137 fill(this->begin(),this->end(),fillvalue);
145 fill(this->begin(),this->end(),x);
169 this->resize(A.size());
170 copy( A.begin(), A.end(), this->begin() );
178 size_t s = this->size();
180 return static_cast<long>(s);
190 return std::vector<base>::operator[](n);
200 return std::vector<base>::operator[](n);
208 inline std::ostream& operator<<(std::ostream& os, const Array<base>& v)
215 os << std::setw(3) << *i;
219 for ( ; i!=end; ++i )
221 os <<
" " << std::setw(3) << *i;
237 for ( ; xi!=xe ; ++xi )
256 for ( ; xi!=xe ; ++xi )
280 template <
class base>
305 template <
class base>
INDEX Index
The type to use for all integer numbers and indices.
Index find_first(const Array< base > &x, const base &w)
Find first occurance.
Array(const Array< base > &A)
Array< ArrayOfMatrix > ArrayOfArrayOfMatrix
Array< Numeric > ArrayOfNumeric
An array of Numeric.
base min(const Array< base > &x)
Min function.
Index nelem() const
Number of elements.
void copy(ConstIterator1D origin, const ConstIterator1D &end, Iterator1D target)
Copy data between begin and end to target.
cmplx FADDEEVA() w(cmplx z, double relerr)
Array< Vector > ArrayOfVector
An array of vectors.
Array< Index > ArrayOfIndex
An array of Index.
const base & operator[](Index n) const
Constant index operator.
Array< ArrayOfTensor6 > ArrayOfArrayOfTensor6
Array< Sparse > ArrayOfSparse
An array of sparse matrices.
Array< Tensor4 > ArrayOfTensor4
An array of Tensor4.
Array< Matrix > ArrayOfMatrix
An array of matrices.
Array & operator=(base x)
Assignment from base type (fill entire Array with this value).
This can be used to make arrays out of anything.
Array< ArrayOfVector > ArrayOfArrayOfVector
Array< ArrayOfIndex > ArrayOfArrayOfIndex
base max(const Array< base > &x)
Max function.
Array< Tensor7 > ArrayOfTensor7
An array of Tensor7.
Array< Tensor3 > ArrayOfTensor3
An array of Tensor3.
Array< Tensor6 > ArrayOfTensor6
An array of Tensor6.
Array< ArrayOfTensor4 > ArrayOfArrayOfTensor4
void find_all(ArrayOfIndex &pos, const Array< base > &x, const base &w)
Find all occurances.
Array< Tensor5 > ArrayOfTensor5
An array of Tensor5.
Array< ArrayOfTensor3 > ArrayOfArrayOfTensor3