Array< base > Class Template Reference

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

#include <array.h>

Inheritance diagram for Array< base >:

Inheritance graph
[legend]
Collaboration diagram for Array< base >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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


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


Constructor & Destructor Documentation

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

Definition at line 102 of file array.h.

template<class base>
Array< base >::Array ( Index  n  )  [inline, explicit]

Definition at line 103 of file array.h.

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

Constructor filling with constant value.

Definition at line 125 of file array.h.

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

Definition at line 105 of file array.h.


Member Function Documentation

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

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

Definition at line 135 of file array.h.

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:
A The 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 158 of file array.h.

References copy().

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

Number of elements.

Definition at line 168 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_lineshapeDefine(), abs_linesReadFromArts(), abs_linesReadFromArtsObsolete(), abs_linesReadFromHitran(), abs_linesReadFromHitran2004(), abs_linesReadFromJpl(), abs_linesReadFromMytran2(), abs_lookupCreate(), abs_lookupSetup(), abs_lookupSetupBatch(), abs_lookupSetupWide(), abs_lookupTestAccuracy(), abs_scalar_gasFromAbsCoef(), abs_speciesAdd(), abs_speciesAdd2(), abs_speciesDefineAllInScenario(), abs_xsec_per_speciesAddConts(), abs_xsec_per_speciesAddLines(), abs_xsec_per_speciesInit(), GasAbsLookup::Adapt(), Workspace::add_wsv(), SourceText::AdvanceChar(), SourceText::AdvanceLine(), AgendaAppend(), AgRecord::AgRecord(), antenna1d_matrix(), Append(), SourceText::AppendFile(), array_species_tag_from_string(), ArrayOfIndexExtractFromArrayOfArrayOfIndex(), ArrayOfMatrixInsert(), ArrayOfStringSet(), atm_fields_compactAddConstant(), atm_fields_compactFromMatrix(), AtmFieldsCalc(), AtmFieldsRefinePgrid(), AtmRawRead(), batch_atm_fields_compactFromArrayOfMatrix(), Agenda::check(), check_agenda_data(), chk_cloudbox(), chk_contains(), chk_pnd_raw_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_ppathCalc(), define_agenda_map(), define_md_map(), define_md_raw_map(), define_species_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(), Extract(), GasAbsLookup::Extract(), f_gridFromSensorAMSU(), f_gridFromSensorHIRS(), SourceText::File(), find_all(), find_file(), find_first(), find_new_grid_in_old_grid(), find_next_species_tg(), find_nonlinear_continua(), findZ11max(), fix_gridpos_at_boundary(), from_raytracingarrays_to_ppath_vectors_1d_and_2d(), from_raytracingarrays_to_ppath_vectors_3d(), get_array_groups_as_string(), GField::get_grid_size(), get_radiative_background(), get_tag_group_index_for_tag_group(), get_tag_group_name(), get_tagindex_for_Strings(), include_trans_in_diy_dq(), 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(), Agenda::is_output(), is_size(), is_unique(), is_valid_keyword_group(), IsotopeRecord::IsotopeRecord(), iy_calc(), iy_interp_cloudbox_field(), jacobian_from_path_to_rgrids(), jacobianAddAbsSpecies(), jacobianAddPointing(), jacobianAddPolyfit(), jacobianAddTemperature(), jacobianCalc(), jacobianCalcAbsSpecies(), jacobianCalcPointing(), jacobianCalcPolyfit(), jacobianCalcTemperature(), jacobianClose(), last(), SourceText::Line(), linesElowToJoule(), main(), MdRecord::MdRecord(), SpeciesTag::Name(), LineRecord::Naux(), nc_read_from_file(), nc_write_to_file(), Agenda::nelem(), operator<<(), VectorView::operator=(), Vector::operator=(), MRecord::operator=(), Array< base >::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_method_args(), ArtsParser::parse_numvector(), ArtsParser::parse_numvector_from_string(), ArtsParser::parse_stringarray_from_string(), ParticleTypeAdd(), ParticleTypeAddAll(), perturbation_field_1d(), perturbation_field_2d(), perturbation_field_3d(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), phase_functionCalc(), pmomCalc(), pnd_fieldCalc(), ppath_append(), ppath_calc(), ppath_copy(), ppath_start_stepping(), Print(), MRecord::print(), Agenda::print(), MdRecord::PrintTemplate(), LineRecord::ReadFromArtsStream(), LineRecord::ReadFromHitran2004Stream(), LineRecord::ReadFromHitranStream(), LineRecord::ReadFromJplStream(), LineRecord::ReadFromMytran2Stream(), refr_indexThayer(), rte_std(), RteCalc(), RteCalcMC(), Sample_los(), Sample_ppathlengthLOS(), scat_data_monoCalc(), scat_data_rawCheck(), ScatteringMonteCarlo(), Select(), sensor_aux_vectors(), sensor_responseAntenna(), sensor_responseBackend(), sensor_responseBeamSwitching(), sensor_responseMixer(), sensor_responseMultiMixerBackend(), 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(), test12(), VectorInsertGridPoints(), write_method_header(), write_method_header_documentation(), xml_write_to_stream(), xsec_species(), ybatchMetProfiles(), ybatchMetProfilesClear(), and za_gridOpt().

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

References Array< base >::nelem().

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

References Array< base >::nelem().


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

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