ARTS  2.2.66
Array< base > Class Template Reference

This can be used to make arrays out of anything. More...

#include <array.h>

Inheritance diagram for Array< base >:
Collaboration diagram for Array< base >:

Public Member Functions

 Array ()
 
 Array (Index n)
 
 Array (Index n, const base &fillvalue)
 Constructor filling with constant value. More...
 
 Array (const Array< base > &A)
 
Arrayoperator= (base x)
 Assignment from base type (fill entire Array with this value). More...
 
Arrayoperator= (const Array< base > &A)
 Assignment from another Array. More...
 
Index nelem () const
 Number of elements. More...
 
const base & operator[] (Index n) const
 Constant index operator. More...
 
base & operator[] (Index n)
 Non-constant index operator. More...
 

Detailed Description

template<class base>
class Array< base >

This can be used to make arrays out of anything.

A simple #define does not do for this, since I have to implement member functions like nelem, in order to be consistent with Vector.

Because constructors are not inherited, I have to re-define all costructors. In addition to the constructors here, explicit constructors are provided by the derived class MakeArray.

Definition at line 40 of file array.h.

Constructor & Destructor Documentation

◆ Array() [1/4]

template<class base>
Array< base >::Array ( )
inline

Definition at line 110 of file array.h.

Referenced by Array< XMLAttribute >::Array().

◆ Array() [2/4]

template<class base>
Array< base >::Array ( Index  n)
inlineexplicit

Definition at line 111 of file array.h.

◆ Array() [3/4]

template<class base>
Array< base >::Array ( Index  n,
const base &  fillvalue 
)
inline

Constructor filling with constant value.

Definition at line 133 of file array.h.

◆ Array() [4/4]

template<class base>
Array< base >::Array ( const Array< base > &  A)
inline

Definition at line 113 of file array.h.

Member Function Documentation

◆ nelem()

template<class base >
Index Array< base >::nelem ( ) const
inline

Number of elements.

Definition at line 176 of file array.h.

Referenced by abs_cia_dataReadFromCIA(), abs_cia_dataReadFromXML(), abs_coefCalcFromXsec(), abs_lines_per_speciesAddMirrorLines(), abs_lines_per_speciesCompact(), abs_lines_per_speciesCreateFromLines(), abs_lines_per_speciesReadFromCatalogues(), abs_lines_per_speciesSetEmpty(), abs_linesArtscat4FromArtscat3(), abs_lineshape_per_tgDefine(), abs_linesReadFromArtsObsolete(), abs_linesReadFromHitran(), abs_linesReadFromHitranPre2004(), abs_linesReadFromJpl(), abs_linesReadFromMytran2(), abs_linesReadFromSplitArtscat(), abs_lookupCalc(), abs_lookupSetup(), abs_lookupSetupBatch(), abs_lookupSetupWide(), abs_lookupTestAccMC(), abs_lookupTestAccuracy(), abs_speciesAdd(), abs_speciesAdd2(), abs_speciesDefineAllInScenario(), abs_speciesSet(), abs_xsec_agenda_checkedCalc(), abs_xsec_per_speciesAddCIA(), abs_xsec_per_speciesAddConts(), abs_xsec_per_speciesAddLines(), abs_xsec_per_speciesInit(), GasAbsLookup::Adapt(), add_extrap(), Workspace::add_wsv(), SourceText::AdvanceChar(), SourceText::AdvanceLine(), AgendaAppend(), AgRecord::AgRecord(), antenna1d_matrix(), Append(), CIARecord::AppendDataset(), SourceText::AppendFile(), apply_iy_unit(), apply_iy_unit2(), Array< XMLAttribute >::Array(), array_species_tag_from_string(), ArrayOfIndexExtractFromArrayOfArrayOfIndex(), ArrayOfIndexLinSpace(), ArrayOfLineMixingRecordReadAscii(), ArrayOfStringSet(), atm_fields_compactExpand(), atm_fields_compactFromMatrix(), atmfields_checkedCalc(), AtmFieldsCalc(), AtmFieldsFromCompact(), AtmFieldsRefinePgrid(), AtmRawRead(), batch_atm_fields_compactAddConstant(), batch_atm_fields_compactAddSpecies(), batch_atm_fields_compactFromArrayOfMatrix(), calc_gamma_and_deltaf_artscat4(), Agenda::check(), check_abs_species(), check_agenda_data(), checkIsotopologueRatios(), chk_contains(), chk_part_species(), chk_pnd_field_raw_only_in_cloudbox(), chk_pnd_raw_data(), chk_scattering_data(), chk_size(), choose_abs_nls(), choose_abs_nls_pert(), choose_abs_t_pert(), cia_get_index(), CIAInfo(), cloud_atm_vars_by_gp(), cloud_fieldsCalc(), cloud_RT_no_background(), cloudbox_checkedCalc(), Compare(), CIARecord::Dataset(), CIARecord::DatasetCount(), define_md_map(), define_wsv_group_map(), Workspace::define_wsv_map(), diy_from_path_to_rgrids(), doit_i_fieldUpdate1D(), doit_i_fieldUpdateSeq1D(), doit_i_fieldUpdateSeq3D(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), DoitInit(), DoitScatteringDataPrepare(), DoitWriteIterationFields(), emission_rtstep(), Agenda::execute(), expand_md_data_raw_to_md_data(), Extract(), GasAbsLookup::Extract(), CIARecord::Extract(), ExtractFromMetaSinglePartSpecies(), f_gridFromSensorAMSU(), f_gridFromSensorAMSUgeneric(), f_gridFromSensorHIRS(), factorials(), FieldFromGriddedField(), SourceText::File(), find_all(), find_broad_spec_locations(), find_effective_channel_boundaries(), find_file(), find_first(), find_matching_lines(), find_new_grid_in_old_grid(), find_next_species_tg(), find_nonlinear_continua(), find_xml_file(), findZ11max(), fos(), CIARecord::FrequencyGrid(), get_array_groups_as_string(), get_dirname(), GriddedField::get_grid_size(), get_parameters(), get_ppath_abs(), get_species_name(), get_tag_group_index_for_tag_group(), get_tag_group_name(), gp4length1grid(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), gridpos_upperend_check(), SourceText::Init(), Workspace::initialize(), interp(), interp_atmfield_by_itw(), interp_atmfield_gp2itw(), interp_atmsurface_by_itw(), interp_atmsurface_gp2itw(), interp_cloud_coeff1D(), interpweights(), is_anyptype30(), is_increasing(), Agenda::is_input(), is_inside_cloudbox(), Agenda::is_output(), is_size(), is_unique(), is_valid_keyword_group(), is_zeeman(), iy_auxFillParticleVariables(), iy_interp_cloudbox_field(), iy_transmitterMultiplePol(), iy_transmitterSinglePol(), iyApplyUnit(), iyb_calc(), iyb_calc_za_loop_body(), iyCloudRadar(), iyEmissionStandard(), iyLoopFrequencies(), iyMC(), iyRadioLink(), iyReplaceFromAux(), iyTransmissionStandard(), jacobianAddAbsSpecies(), jacobianAddFreqShift(), jacobianAddFreqStretch(), jacobianAddPointingZa(), jacobianAddPolyfit(), jacobianAddSinefit(), jacobianAddTemperature(), jacobianAddWind(), jacobianCalcAbsSpeciesPerturbations(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianCalcPolyfit(), jacobianCalcSinefit(), jacobianCalcTemperaturePerturbations(), jacobianClose(), last(), SourceText::Line(), line_mixing_dataInit(), line_mixing_dataMatch(), main(), MdRecord::MdRecord(), SpeciesTag::Name(), LineRecord::Naux(), nca_def_ArrayOfIndex(), nca_get_data_ArrayOfArrayOfSpeciesTag(), nca_put_var_ArrayOfIndex(), nca_read_from_file(), nca_write_to_file(), Agenda::nelem(), Workspace::nelem(), open_input_file(), operator<<(), MRecord::operator=(), VectorView::operator=(), Vector::operator=(), operator>>(), Array< XMLAttribute >::operator[](), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_propCalc(), option_input(), option_methods(), option_workspacevariables(), ArtsParser::parse_agenda(), ArtsParser::parse_generic_input(), ArtsParser::parse_generic_output(), ArtsParser::parse_matrix(), ArtsParser::parse_method_args(), ArtsParser::parse_numvector(), ArtsParser::parse_numvector_from_string(), parse_part_size(), ArtsParser::parse_stringarray_from_string(), particle_massesFromMetaDataAndPart_species(), particle_massesFromMetaDataSingleCategory(), ParticleSpeciesSet(), ParticleType2abs_speciesAdd(), ParticleTypeAdd(), ParticleTypeAddAll(), perturbation_field_1d(), perturbation_field_2d(), perturbation_field_3d(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_matExtractManually(), phase_functionCalc(), pmomCalc(), pnd_fieldCalc(), pnd_fieldSetup(), powers(), ppath_calc(), ppath_end_1d(), ppath_end_2d(), ppath_step_refr_1d(), ppath_step_refr_2d(), ppath_step_refr_3d(), Agenda::print(), Print(), MRecord::print(), MdRecord::PrintTemplate(), propmat_clearsky_agenda_checkedCalc(), propmat_clearskyAddFaraday(), propmat_clearskyAddFromAbsCoefPerSpecies(), propmat_clearskyAddOnTheFly(), propmat_clearskyAddParticles(), propmat_clearskyAddZeeman(), propmat_clearskyInit(), SourceText::reachedEot(), LineRecord::ReadFromArtscat3Stream(), LineRecord::ReadFromArtscat4Stream(), LineRecord::ReadFromHitran2001Stream(), LineRecord::ReadFromHitran2004Stream(), LineRecord::ReadFromJplStream(), LineRecord::ReadFromMytran2Stream(), SpeciesAuxData::ReadFromStream(), Reduce(), refr_index_airFreeElectrons(), refr_index_airMWgeneral(), refr_index_airThayer(), Sample_los(), scat_data_array_monoCalc(), scat_data_arrayCheck(), scat_data_arrayFromMeta(), ScatteringMergeParticles1D(), ScatteringParticlesSelect(), ScatteringParticleTypeAndMetaRead(), Select(), sensor_aux_vectors(), sensor_checkedCalc(), sensor_responseAntenna(), sensor_responseBackend(), sensor_responseBeamSwitching(), sensor_responseFillFgrid(), sensor_responseFrequencySwitching(), sensor_responseGenericAMSU(), sensor_responseMixer(), sensor_responseMultiMixerBackend(), sensor_responsePolarisation(), sensor_responseStokesRotation(), sensor_responseWMRF(), Agenda::set_outputs_to_push_and_dup(), SpeciesTag::SpeciesTag(), spectrometer_matrix(), MdRecord::subst_any_with_group(), MdRecord::subst_any_with_specific_group(), ArtsParser::tasklist_insert_set_delete(), CIARecord::TemperatureGrid(), test12(), test45(), testVector(), VectorInsertGridPoints(), WMRFSelectChannels(), write_method_header(), write_method_header_documentation(), xml_read_from_stream(), xml_write_to_stream(), xsec_species(), xsec_species_line_mixing_2nd_order(), xsec_species_line_mixing_wrapper_with_zeeman(), ybatchCalc(), ybatchMetProfiles(), ybatchMetProfilesClear(), yCalc(), yCalcAppend(), yCloudRadar(), and za_gridOpt().

◆ operator=() [1/2]

template<class base>
Array< base > & Array< base >::operator= ( base  x)
inline

Assignment from base type (fill entire Array with this value).

Definition at line 143 of file array.h.

Referenced by Array< XMLAttribute >::Array().

◆ operator=() [2/2]

template<class base>
Array< base > & Array< base >::operator= ( const Array< base > &  A)
inline

Assignment from another Array.

This will adjust the size of the array automatically, so that structures containing arrays can be correctly copied without having an explicit assignment operator.

This is a deviation from the old ARTS paradigm that sizes must match exactly before copying!

Parameters
AThe other array to copy to this one.
Returns
The freshly copied array (normally not used).
Author
Stefan Buehler
Date
2002-12-19

Definition at line 166 of file array.h.

◆ operator[]() [1/2]

template<class base >
const base & Array< base >::operator[] ( Index  n) const
inline

Constant index operator.

We redifine this here so that we can have range checking by assert.

Definition at line 186 of file array.h.

Referenced by Array< XMLAttribute >::Array().

◆ operator[]() [2/2]

template<class base >
base & Array< base >::operator[] ( Index  n)
inline

Non-constant index operator.

We redefine this here so that we can have range checking by assert.

Definition at line 196 of file array.h.


The documentation for this class was generated from the following file: