ARTS
2.4.0(git:4fb77825)
|
This file contains the definition of Array. More...
#include <cassert>
#include <climits>
#include <iomanip>
#include <iostream>
#include <array>
#include <vector>
#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... | |
class | CmpArrayOfNumeric |
Helper comparison class to sort an array or vector based on an ArrayOfNumeric. 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... | |
template<class base > | |
Index | TotalNumberOfElements (const Array< Array< base > > &aa) |
Determine total number of elements in an ArrayOfArray. More... | |
template<class base > | |
Index | FlattenedIndex (const Array< Array< base > > &aa, Index outer, Index inner=0) |
Determine the index of an element in a flattened version of the array. More... | |
template<typename T , typename ... Ts> | |
constexpr std::array< T, 1+sizeof...(Ts)> | stdarrayify (const T &first, const Ts &... the_rest) |
Make a std::array of a list of variables (must be 1-long at least) More... | |
typedef Array<ArrayOfIndex> ArrayOfArrayOfIndex |
typedef Array<ArrayOfMatrix> ArrayOfArrayOfMatrix |
typedef Array<ArrayOfTensor3> ArrayOfArrayOfTensor3 |
typedef Array<ArrayOfTensor4> ArrayOfArrayOfTensor4 |
typedef Array<ArrayOfTensor5> ArrayOfArrayOfTensor5 |
typedef Array<ArrayOfTensor6> ArrayOfArrayOfTensor6 |
typedef Array<ArrayOfTensor7> ArrayOfArrayOfTensor7 |
typedef Array<ArrayOfVector> ArrayOfArrayOfVector |
typedef Array<Index> ArrayOfIndex |
typedef Array<Matrix> ArrayOfMatrix |
typedef Array<Numeric> ArrayOfNumeric |
typedef Array<Sparse> ArrayOfSparse |
typedef Array<Vector> ArrayOfVector |
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.
pos | Array with positions of w in the array. |
x | The array to search. |
w | The value to look for. |
Definition at line 314 of file array.h.
References w(), and ARTS::Var::x().
Referenced by chk_contains().
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.
x | The array to search. |
w | The value to look for. |
Definition at line 292 of file array.h.
References w(), and ARTS::Var::x().
Referenced by get_pointers_for_analytical_jacobians(), particle_bulkprop_fieldPerturb(), particle_bulkprop_fieldPerturbAtmGrids(), pnd_fieldCalcFromParticleBulkProps(), SpeciesTag::SpeciesTag(), SurfaceFastem(), SurfaceTessem(), and xml_read_from_stream().
Index FlattenedIndex | ( | const Array< Array< base > > & | aa, |
Index | outer, | ||
Index | inner = 0 |
||
) |
Determine the index of an element in a flattened version of the array.
Definition at line 354 of file array.h.
References N, and Absorption::nelem().
Referenced by ScatSpeciesMerge().
|
inline |
|
inline |
|
inline |
|
constexpr |
Make a std::array of a list of variables (must be 1-long at least)
Definition at line 374 of file array.h.
Referenced by Absorption::Lines::validIndexForCutoff(), Absorption::Lines::validIndexForLineShapeType(), Absorption::Lines::validIndexForMirroring(), Absorption::Lines::validIndexForNormalization(), Absorption::Lines::validIndexForPopulation(), SpeciesTag::validIndexForType(), EnergyLevelMap::validIndexForType(), QuantumIdentifier::validIndexForType(), and MCAntenna::validType().
Determine total number of elements in an ArrayOfArray.
Definition at line 343 of file array.h.
Referenced by cloudbox_checkedCalc(), DoitScatteringDataPrepare(), get_stepwise_scattersky_source(), iyActiveSingleScat(), iyActiveSingleScat2(), opt_prop_NScatElems(), opt_prop_ScatSpecBulk(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_prop_sptFromScat_data(), particle_massesFromMetaData(), particle_massesFromMetaDataSingleCategory(), pha_mat_NScatElems(), pha_mat_ScatSpecBulk(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), pnd_fieldZero(), propmat_clearskyAddParticles(), Sample_los(), ScatElementsSelect(), and ybatchMetProfiles().