ARTS  2.0.49
Array< base > Class Template Reference

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

#include <array.h>

Inheritance diagram for Array< base >:
MakeArray< 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 102 of file array.h.

Constructor & Destructor Documentation

◆ Array() [1/4]

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

Definition at line 106 of file array.h.

◆ Array() [2/4]

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

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

◆ Array() [4/4]

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

Definition at line 109 of file array.h.

Member Function Documentation

◆ nelem()

template<class base >
Index Array< base >::nelem
inline

Number of elements.

Definition at line 172 of file array.h.

Referenced by abs_coefCalcFromXsec(), abs_coefCalcSaveMemory(), abs_lines_per_speciesAddMirrorLines(), abs_lines_per_speciesCompact(), abs_lines_per_speciesCreateFromLines(), abs_lines_per_speciesReadFromCatalogues(), abs_lines_per_speciesSetEmpty(), abs_lineshape_per_tgDefine(), abs_linesReadFromArts(), abs_linesReadFromArtsObsolete(), abs_linesReadFromHitran(), abs_linesReadFromHitran2004(), abs_linesReadFromJpl(), abs_linesReadFromMytran2(), abs_linesReadFromSplitArtscat(), abs_lookupSetup(), abs_lookupSetupBatch(), abs_lookupSetupWide(), abs_scalar_gasExtractFromLookup(), abs_scalar_gasFromAbsCoef(), abs_speciesAdd(), abs_speciesAdd2(), abs_speciesDefineAllInScenario(), abs_xsec_per_speciesAddConts(), abs_xsec_per_speciesAddLines(), abs_xsec_per_speciesInit(), GasAbsLookup::Adapt(), add_extrap(), Workspace::add_wsv(), SourceText::AdvanceChar(), SourceText::AdvanceLine(), AgRecord::AgRecord(), antenna1d_matrix(), Append(), SourceText::AppendFile(), apply_y_unit(), apply_y_unit2(), array_species_tag_from_string(), ArrayOfIndexExtractFromArrayOfArrayOfIndex(), ArrayOfStringSet(), atm_fields_compactAddSpecies(), atm_fields_compactExpand(), atm_fields_compactFromMatrix(), atm_fields_compactFromMatrixChevalAll(), AtmFieldsCalc(), AtmFieldsRefinePgrid(), AtmRawRead(), basics_checkedCalc(), batch_atm_fields_compactAddConstant(), batch_atm_fields_compactAddSpecies(), batch_atm_fields_compactFromArrayOfMatrix(), batch_atm_fields_compactFromArrayOfMatrixChevalAll(), Agenda::check(), check_agenda_data(), chk_contains(), 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(), cloud_atm_vars_by_gp(), cloud_fieldsCalc(), cloud_RT_no_background(), cloudbox_checkedCalc(), cloudboxSetAutomatically(), define_md_map(), define_wsv_group_map(), Workspace::define_wsv_map(), doit_i_fieldUpdate1D(), doit_i_fieldUpdateSeq1D(), doit_i_fieldUpdateSeq3D(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), DoitInit(), DoitScatteringDataPrepare(), DoitWriteIterationFields(), Agenda::execute(), expand_md_data_raw_to_md_data(), GasAbsLookup::Extract(), Extract(), f_gridFromSensorAMSU(), f_gridFromSensorHIRS(), SourceText::File(), find_all(), find_effective_channel_boundaries(), find_file(), find_first(), find_new_grid_in_old_grid(), find_next_species_tg(), find_nonlinear_continua(), findZ11max(), from_raytracingarrays_to_ppath_vectors_1d_and_2d(), from_raytracingarrays_to_ppath_vectors_3d(), get_array_groups_as_string(), GriddedField::get_grid_size(), get_parameters(), get_species_name(), get_tag_group_index_for_tag_group(), get_tag_group_name(), get_tagindex_for_Strings(), 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(), interp_cloudfield_gp2itw(), interpweights(), is_anyptype30(), is_increasing(), Agenda::is_input(), Agenda::is_output(), is_size(), is_unique(), is_valid_keyword_group(), IsotopeRecord::IsotopeRecord(), iy_interp_cloudbox_field(), iyb_calc(), iyBeerLambertStandardClearsky(), iyEmissionStandardClearsky(), jacobianAddAbsSpecies(), jacobianAddFreqShiftAndStretch(), jacobianAddPointingZa(), jacobianAddPolyfit(), jacobianAddTemperature(), jacobianCalcAbsSpeciesPerturbations(), jacobianCalcFreqShiftAndStretchInterp(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianCalcPolyfit(), jacobianCalcTemperaturePerturbations(), jacobianClose(), last(), SourceText::Line(), linesElowToJoule(), main(), MdRecord::MdRecord(), SpeciesTag::Name(), LineRecord::Naux(), Agenda::nelem(), operator<<(), VectorView::operator=(), Vector::operator=(), MRecord::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_numvector(), ArtsParser::parse_numvector_from_string(), parse_part_size(), ArtsParser::parse_stringarray_from_string(), ParticleSpeciesSet(), 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(), ppath_calc(), ppath_start_stepping(), Print(), Agenda::print(), MRecord::print(), MdRecord::PrintTemplate(), SourceText::reachedEot(), LineRecord::ReadFromHitran2004Stream(), LineRecord::ReadFromHitranStream(), LineRecord::ReadFromMytran2Stream(), refr_indexThayer(), Sample_los(), scat_data_monoCalc(), scat_data_rawCheck(), ScatteringParticlesSelect(), ScatteringParticleTypeAndMetaRead(), Select(), sensor_aux_vectors(), sensor_responseAntenna(), sensor_responseBackend(), sensor_responseBeamSwitching(), sensor_responseFillFgrid(), sensor_responseFrequencySwitching(), sensor_responseFromArrayData(), sensor_responseMixer(), sensor_responseMultiMixerBackend(), sensor_responsePolarisation(), sensor_responseWMRF(), Agenda::set_outputs_to_push_and_dup(), SpeciesRecord::SpeciesRecord(), SpeciesSet(), SpeciesTag::SpeciesTag(), spectrometer_matrix(), MdRecord::subst_any_with_group(), MdRecord::subst_any_with_specific_group(), ArtsParser::tasklist_insert_set_delete(), test07(), test12(), VectorInsertGridPoints(), WMRFSelectChannels(), write_method_header(), write_method_header_documentation(), xml_write_to_stream(), xsec_species(), ybatchMetProfiles(), ybatchMetProfilesClear(), yCalc(), yCalc2(), 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 139 of file array.h.

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

References copy().

◆ operator[]() [1/2]

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

Non-constant index operator.

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

Definition at line 192 of file array.h.

◆ operator[]() [2/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 182 of file array.h.


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