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"

Include dependency graph for array.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.
typedef Array< ArrayOfIndexArrayOfArrayOfIndex
typedef Array< NumericArrayOfNumeric
 An array of Numeric.
typedef Array< VectorArrayOfVector
 An array of vectors.
typedef Array< MatrixArrayOfMatrix
 An array of matrices.
typedef Array< ArrayOfMatrixArrayOfArrayOfMatrix
typedef Array< Tensor3ArrayOfTensor3
 An array of Tensor3.
typedef Array< ArrayOfTensor3ArrayOfArrayOfTensor3
typedef Array< Tensor4ArrayOfTensor4
 An array of Tensor4.
typedef Array< Tensor5ArrayOfTensor5
 An array of Tensor5.
typedef Array< Tensor6ArrayOfTensor6
 An array of Tensor6.
typedef Array< ArrayOfTensor6ArrayOfArrayOfTensor6
typedef Array< Tensor7ArrayOfTensor7
 An array of Tensor7.

Functions

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


Detailed Description

This file contains the definition of Array.

Author:
Stefan Buehler
Date:
2001-09-05

Definition in file array.h.


Typedef Documentation

Definition at line 45 of file array.h.

Definition at line 65 of file array.h.

Definition at line 70 of file array.h.

Definition at line 81 of file array.h.

An array of Index.

Definition at line 40 of file array.h.

An array of matrices.

Definition at line 63 of file array.h.

An array of Numeric.

Definition at line 48 of file array.h.

An array of Tensor3.

Definition at line 68 of file array.h.

An array of Tensor4.

Definition at line 73 of file array.h.

An array of Tensor5.

Definition at line 76 of file array.h.

An array of Tensor6.

Definition at line 79 of file array.h.

An array of Tensor7.

Definition at line 84 of file array.h.

An array of vectors.

Definition at line 57 of file array.h.


Function Documentation

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

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:
pos Array with positions of w in the array.
Parameters:
x The array to search.
w The value to look for.
Author:
Stefan Buehler
Date:
2002-11-28

Definition at line 298 of file array.h.

References Array< base >::nelem().

Referenced by chk_contains().

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

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:
x The array to search.
w The value to look for.
Author:
Stefan Buehler
Date:
2002-11-28

Definition at line 273 of file array.h.

References Array< base >::nelem().

Referenced by SpeciesTag::SpeciesTag().

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

Max function.

Definition at line 221 of file array.h.

References max.

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

Min function.

Definition at line 240 of file array.h.

References min.

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

Output operator.

Definition at line 200 of file array.h.


Generated on Mon Mar 23 14:06:30 2009 for ARTS by  doxygen 1.5.6