ARTS  2.0.49
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< IndexArrayOfIndex
 An array of Index. More...
 
typedef Array< ArrayOfIndexArrayOfArrayOfIndex
 
typedef Array< NumericArrayOfNumeric
 An array of Numeric. More...
 
typedef Array< VectorArrayOfVector
 An array of vectors. More...
 
typedef Array< MatrixArrayOfMatrix
 An array of matrices. More...
 
typedef Array< ArrayOfMatrixArrayOfArrayOfMatrix
 
typedef Array< SparseArrayOfSparse
 An array of sparse matrices. More...
 
typedef Array< Tensor3ArrayOfTensor3
 An array of Tensor3. More...
 
typedef Array< ArrayOfTensor3ArrayOfArrayOfTensor3
 
typedef Array< Tensor4ArrayOfTensor4
 An array of Tensor4. More...
 
typedef Array< Tensor5ArrayOfTensor5
 An array of Tensor5. More...
 
typedef Array< Tensor6ArrayOfTensor6
 An array of Tensor6. More...
 
typedef Array< ArrayOfTensor6ArrayOfArrayOfTensor6
 
typedef Array< Tensor7ArrayOfTensor7
 An array of Tensor7. More...
 

Functions

template<class base >
ostream & operator<< (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 66 of file array.h.

◆ ArrayOfArrayOfTensor3

Definition at line 74 of file array.h.

◆ ArrayOfArrayOfTensor6

Definition at line 85 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 64 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 69 of file array.h.

◆ ArrayOfTensor3

An array of Tensor3.

Definition at line 72 of file array.h.

◆ ArrayOfTensor4

An array of Tensor4.

Definition at line 77 of file array.h.

◆ ArrayOfTensor5

An array of Tensor5.

Definition at line 80 of file array.h.

◆ ArrayOfTensor6

An array of Tensor6.

Definition at line 83 of file array.h.

◆ ArrayOfTensor7

An array of Tensor7.

Definition at line 88 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 302 of file array.h.

References Array< base >::nelem().

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 277 of file array.h.

References Array< base >::nelem().

Referenced by SpeciesTag::SpeciesTag().

◆ max()

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

Max function.

Definition at line 225 of file array.h.

◆ min()

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

Min function.

Definition at line 244 of file array.h.

◆ operator<<()

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

Output operator.

Definition at line 204 of file array.h.