ARTS 2.5.11 (git: 6827797f)
|
This file contains the definition of Array. More...
#include <array>
#include <climits>
#include <iomanip>
#include <iostream>
#include <vector>
#include "matpack_concepts.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... | |
Typedefs | |
using | ArrayOfIndex = Array< Index > |
An array of Index. | |
using | ArrayOfArrayOfIndex = Array< ArrayOfIndex > |
using | ArrayOfNumeric = Array< Numeric > |
An array of Numeric. | |
Functions | |
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. | |
template<class base > | |
Index | TotalNumberOfElements (const Array< Array< base > > &aa) |
Determine total number of elements in an ArrayOfArray. | |
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. | |
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) | |
template<typename T > | |
std::string | stringify (const Array< T > &list, const char *const sep=" ", const char *const beg="") |
using ArrayOfArrayOfIndex = Array<ArrayOfIndex> |
using ArrayOfIndex = Array<Index> |
using ArrayOfNumeric = Array<Numeric> |
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 195 of file array.h.
References Array< base >::nelem(), and w.
Referenced by chk_contains().
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.
x | The array to search. |
w | The value to look for. |
Definition at line 173 of file array.h.
References Array< base >::nelem(), and w.
Referenced by get_pointers_for_scat_species(), iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), particle_bulkprop_fieldPerturb(), particle_bulkprop_fieldPerturbAtmGrids(), pnd_fieldCalcFromParticleBulkProps(), SurfaceBlackbody(), SurfaceFastem(), SurfaceFlatScalarReflectivity(), SurfaceTessem(), and x2artsAtmAndSurf().
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 235 of file array.h.
References ARTS_ASSERT.
Referenced by ScatSpeciesMerge().
|
inline |
Max function.
Definition at line 128 of file array.h.
References max().
Referenced by abs_linesCompact(), AtmFieldsExpand1D(), atmgeom_checkedCalc(), check_retrieval_grids(), chk_atm_field(), chk_interpolation_grids(), chk_interpolation_grids_loose_no_data_check(), cloudbox_checkedCalc(), cloudboxSetAutomatically(), cloudboxSetFullAtm(), complex_n_ice_matzler06(), complex_n_water_liebe93(), complex_refr_indexIceMatzler06(), defocusing_general(), defocusing_general_sub(), diameter_maxFromDiameter_volume_equ(), diy_from_pos_to_rgrids(), do_gridcell_2d_byltest(), do_gridcell_3d_byltest(), expand_md_data_raw_to_md_data(), FastemStandAlone(), find_cloudlimits(), find_new_grid_in_old_grid(), geompath_from_r1_to_r2(), get_disortsurf_props(), get_ppath_cloudvars(), integration_bin_by_vecmult(), InterpSurfaceFieldToPosition(), iyApplyUnit(), iySurfaceLambertian(), iySurfaceLambertianDirect(), jacobianAddSurfaceQuantity(), max(), MCGeneral(), MCRadar(), nlte_fieldForSingleSpeciesNonOverlappingLines(), NumericFromVector(), opt_prop_Bulk(), opt_prop_ScatSpecBulk(), particle_bulkpropRadarOnionPeeling(), pha_mat_Bulk(), pha_mat_ScatSpecBulk(), plevel_crossing_2d(), pnd_fieldCalcFromParticleBulkProps(), pndFromPsd(), polynomial_basis_func(), ppath_init_structure(), r_crossing_3d(), RandomNumberGenerator< Generator >::seed(), sensor_checkedCalc(), sensor_responseMixerBackendPrecalcWeights(), specular_losCalc(), specular_losCalcNoTopography(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), surfaceTessem(), wigner_limits(), WMRFSelectChannels(), yApplyUnit(), yCalcAppend(), and yRadar().
|
inline |
Min function.
Definition at line 144 of file array.h.
References min().
Referenced by abs_linesCompact(), any_negative(), atmfields_checkedCalc(), atmgeom_checkedCalc(), bin_quadweights(), chk_interpolation_grids(), chk_interpolation_grids_loose_no_data_check(), cloudbox_checkedCalc(), cloudboxSetAutomatically(), complex_n_ice_matzler06(), complex_n_water_liebe93(), complex_refr_indexIceMatzler06(), complex_refr_indexWaterLiebe93(), Zeeman::end(), get_disortsurf_props(), get_gas_scattering_properties(), get_ppath_cloudvars(), integration_bin_by_vecmult(), integration_func_by_vecmult(), InterpSurfaceFieldToPosition(), iyb_calc(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), iyRadarSingleScat(), iySurfaceLambertian(), iySurfaceLambertianDirect(), iyTransmissionStandard(), line_circle_intersect(), line_sphere_intersect(), MCGeneral(), mcPathTraceGeneral(), MCRadar(), min(), NumericFromVector(), particle_bulkpropRadarOnionPeeling(), plevel_crossing_2d(), pnd_fieldCalcFromParticleBulkProps(), polynomial_basis_func(), psd_cloudice_MH97(), r_crossing_3d(), RandomNumberGenerator< Generator >::seed(), sensor_checkedCalc(), sensor_responseMixerBackendPrecalcWeights(), ssd_tinterp_parameters(), Zeeman::start(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), surfaceTessem(), wigner_limits(), WMRFSelectChannels(), yRadar(), and z_surfaceFromFileAndGrid().
|
constexpr |
Make a std::array of a list of variables (must be 1-long at least)
Definition at line 255 of file array.h.
Referenced by lm_hitran_2017::qt_co2(), and lm_hitran_2017::read().
std::string stringify | ( | const Array< T > & | list, |
const char *const | sep = " " , |
||
const char *const | beg = "" |
||
) |
Determine total number of elements in an ArrayOfArray.
Definition at line 224 of file array.h.
Referenced by cloudbox_checkedCalc(), DoitScatteringDataPrepare(), get_stepwise_scattersky_source(), iyRadarSingleScat(), 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().