ARTS  2.2.66
array.h File Reference

This file contains the definition of Array. More...

#include <vector>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <climits>
#include "matpack.h"

Go to the source code of this file.

Classes

class  Array< base >
 This can be used to make arrays out of anything. More...
 

Typedefs

typedef Array< Index > ArrayOfIndex
 An array of Index. More...
 
typedef Array< ArrayOfIndex > ArrayOfArrayOfIndex
 
typedef Array< Numeric > ArrayOfNumeric
 An array of Numeric. More...
 
typedef Array< Vector > ArrayOfVector
 An array of vectors. More...
 
typedef Array< ArrayOfVector > ArrayOfArrayOfVector
 
typedef Array< Matrix > ArrayOfMatrix
 An array of matrices. More...
 
typedef Array< ArrayOfMatrix > ArrayOfArrayOfMatrix
 
typedef Array< Sparse > ArrayOfSparse
 An array of sparse matrices. More...
 
typedef Array< Tensor3 > ArrayOfTensor3
 An array of Tensor3. More...
 
typedef Array< ArrayOfTensor3 > ArrayOfArrayOfTensor3
 
typedef Array< Tensor4 > ArrayOfTensor4
 An array of Tensor4. More...
 
typedef Array< ArrayOfTensor4 > ArrayOfArrayOfTensor4
 
typedef Array< Tensor5 > ArrayOfTensor5
 An array of Tensor5. More...
 
typedef Array< Tensor6 > ArrayOfTensor6
 An array of Tensor6. More...
 
typedef Array< ArrayOfTensor6 > ArrayOfArrayOfTensor6
 
typedef Array< Tensor7 > ArrayOfTensor7
 An array of Tensor7. More...
 

Functions

template<class base >
std::ostream & operator<< (std::ostream &os, const Array< base > &v)
 Output operator. More...
 
template<class base >
base max (const Array< base > &x)
 Max function. More...
 
template<class base >
base min (const Array< base > &x)
 Min function. More...
 
template<class base >
Index find_first (const Array< base > &x, const base &w)
 Find first occurance. More...
 
template<class base >
void find_all (ArrayOfIndex &pos, const Array< base > &x, const base &w)
 Find all occurances. More...
 

Detailed Description

This file contains the definition of Array.

Author
Stefan Buehler
Date
2001-09-05

Definition in file array.h.

Typedef Documentation

◆ ArrayOfArrayOfIndex

Definition at line 45 of file array.h.

◆ ArrayOfArrayOfMatrix

Definition at line 68 of file array.h.

◆ ArrayOfArrayOfTensor3

Definition at line 76 of file array.h.

◆ ArrayOfArrayOfTensor4

Definition at line 81 of file array.h.

◆ ArrayOfArrayOfTensor6

Definition at line 89 of file array.h.

◆ ArrayOfArrayOfVector

Definition at line 63 of file array.h.

◆ ArrayOfIndex

An array of Index.

Definition at line 43 of file array.h.

◆ ArrayOfMatrix

An array of matrices.

Definition at line 66 of file array.h.

◆ ArrayOfNumeric

An array of Numeric.

Definition at line 48 of file array.h.

◆ ArrayOfSparse

An array of sparse matrices.

Definition at line 71 of file array.h.

◆ ArrayOfTensor3

An array of Tensor3.

Definition at line 74 of file array.h.

◆ ArrayOfTensor4

An array of Tensor4.

Definition at line 79 of file array.h.

◆ ArrayOfTensor5

An array of Tensor5.

Definition at line 84 of file array.h.

◆ ArrayOfTensor6

An array of Tensor6.

Definition at line 87 of file array.h.

◆ ArrayOfTensor7

An array of Tensor7.

Definition at line 92 of file array.h.

◆ ArrayOfVector

An array of vectors.

Definition at line 61 of file array.h.

Function Documentation

◆ find_all()

template<class base >
void find_all ( ArrayOfIndex &  pos,
const Array< base > &  x,
const base &  w 
)

Find all occurances.

This calculates an array of indices of all occurances of w in array x.

An empty output array means that no occurance was found.

Return values
posArray with positions of w in the array.
Parameters
xThe array to search.
wThe value to look for.
Author
Stefan Buehler
Date
2002-11-28

Definition at line 306 of file array.h.

References Array< base >::nelem(), and w().

Referenced by chk_contains().

◆ find_first()

template<class base >
Index find_first ( const Array< base > &  x,
const base &  w 
)

Find first occurance.

This returns the index of the first occurance of w in array x.

A return value of -1 indicates that no matching element was found.

Returns
The index of the thing we looked for.
Parameters
xThe array to search.
wThe value to look for.
Author
Stefan Buehler
Date
2002-11-28

Definition at line 281 of file array.h.

References Array< base >::nelem(), and w().

Referenced by fos(), iyEmissionStandard(), iyRadioLink(), iyTransmissionStandard(), SpeciesTag::SpeciesTag(), and xml_read_from_stream().

◆ max()

template<class base >
base max ( const Array< base > &  x)
inline

Max function.

Definition at line 229 of file array.h.

◆ min()

template<class base >
base min ( const Array< base > &  x)
inline

Min function.

Definition at line 248 of file array.h.

◆ operator<<()

template<class base >
std::ostream& operator<< ( std::ostream &  os,
const Array< base > &  v 
)
inline

Output operator.

Definition at line 208 of file array.h.