ARTS  2.2.66
m_basic_types.cc File Reference

Workspace functions for straightforward operations on variables of basic types. More...

#include <cmath>
#include "arts.h"
#include "array.h"
#include "matpackI.h"
#include "matpackII.h"
#include "matpackIII.h"
#include "matpackIV.h"
#include "matpackV.h"
#include "matpackVI.h"
#include "matpackVII.h"
#include "mystring.h"
#include "exceptions.h"
#include "make_array.h"
#include "math_funcs.h"
#include "messages.h"
#include "logic.h"
#include "sorting.h"
#include "gridded_fields.h"

Go to the source code of this file.

Functions

void ArrayOfIndexSet (ArrayOfIndex &aoi, const ArrayOfIndex &values, const Verbosity &)
 WORKSPACE METHOD: ArrayOfIndexSet. More...
 
void ArrayOfIndexSetConstant (ArrayOfIndex &aoi, const Index &nelem, const Index &value, const Verbosity &)
 WORKSPACE METHOD: ArrayOfIndexSetConstant. More...
 
void ArrayOfIndexLinSpace (ArrayOfIndex &x, const Index &start, const Index &stop, const Index &step, const Verbosity &verbosity)
 WORKSPACE METHOD: ArrayOfIndexLinSpace. More...
 
void ArrayOfStringSet (ArrayOfString &sa, const ArrayOfString &sa2, const Verbosity &)
 WORKSPACE METHOD: ArrayOfStringSet. More...
 
void FlagOff (Index &x, const Verbosity &)
 WORKSPACE METHOD: FlagOff. More...
 
void FlagOn (Index &x, const Verbosity &)
 WORKSPACE METHOD: FlagOn. More...
 
void IndexSet (Index &x, const Index &value, const Verbosity &)
 WORKSPACE METHOD: IndexSet. More...
 
void IndexStepDown (Index &xout, const Index &xin, const Verbosity &)
 WORKSPACE METHOD: IndexStepDown. More...
 
void IndexStepUp (Index &xout, const Index &xin, const Verbosity &)
 WORKSPACE METHOD: IndexStepUp. More...
 
void MatrixAddScalar (Matrix &out, const Matrix &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: MatrixAddScalar. More...
 
void MatrixMatrixMultiply (Matrix &Y, const Matrix &M, const Matrix &X, const Verbosity &)
 WORKSPACE METHOD: MatrixMatrixMultiply. More...
 
void Matrix1ColFromVector (Matrix &m, const Vector &v, const Verbosity &)
 WORKSPACE METHOD: Matrix1ColFromVector. More...
 
void Matrix2ColFromVectors (Matrix &m, const Vector &v1, const Vector &v2, const Verbosity &)
 WORKSPACE METHOD: Matrix2ColFromVectors. More...
 
void Matrix3ColFromVectors (Matrix &m, const Vector &v1, const Vector &v2, const Vector &v3, const Verbosity &)
 WORKSPACE METHOD: Matrix3ColFromVectors. More...
 
void Matrix1RowFromVector (Matrix &m, const Vector &v, const Verbosity &)
 WORKSPACE METHOD: Matrix1RowFromVector. More...
 
void Matrix2RowFromVectors (Matrix &m, const Vector &v1, const Vector &v2, const Verbosity &)
 WORKSPACE METHOD: Matrix2RowFromVectors. More...
 
void Matrix3RowFromVectors (Matrix &m, const Vector &v1, const Vector &v2, const Vector &v3, const Verbosity &)
 WORKSPACE METHOD: Matrix3RowFromVectors. More...
 
void MatrixScale (Matrix &out, const Matrix &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: MatrixScale. More...
 
void MatrixSet (Matrix &x, const Matrix &values, const Verbosity &)
 WORKSPACE METHOD: MatrixSet. More...
 
void MatrixSetConstant (Matrix &x, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: MatrixSetConstant. More...
 
void NumericAdd (Numeric &out, const Numeric &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: NumericAdd. More...
 
void NumericInvScale (Numeric &out, const Numeric &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: NumericInvScale. More...
 
void NumericScale (Numeric &out, const Numeric &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: NumericScale. More...
 
void NumericSet (Numeric &x, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: NumericSet. More...
 
void SparseSparseMultiply (Sparse &Y, const Sparse &M, const Sparse &X, const Verbosity &)
 WORKSPACE METHOD: SparseSparseMultiply. More...
 
void StringSet (String &s, const String &s2, const Verbosity &)
 WORKSPACE METHOD: StringSet. More...
 
void Tensor3AddScalar (Tensor3 &out, const Tensor3 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor3AddScalar. More...
 
void Tensor3Scale (Tensor3 &out, const Tensor3 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor3Scale. More...
 
void Tensor3SetConstant (Tensor3 &x, const Index &npages, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: Tensor3SetConstant. More...
 
void Tensor4AddScalar (Tensor4 &out, const Tensor4 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor4AddScalar. More...
 
void Tensor4Scale (Tensor4 &out, const Tensor4 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor4Scale. More...
 
void Tensor4SetConstant (Tensor4 &x, const Index &nbooks, const Index &npages, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: Tensor4SetConstant. More...
 
void Tensor5Scale (Tensor5 &out, const Tensor5 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor5Scale. More...
 
void Tensor5SetConstant (Tensor5 &x, const Index &nshelves, const Index &nbooks, const Index &npages, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: Tensor5SetConstant. More...
 
void Tensor6Scale (Tensor6 &out, const Tensor6 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor6Scale. More...
 
void Tensor6SetConstant (Tensor6 &x, const Index &nvitrines, const Index &nshelves, const Index &nbooks, const Index &npages, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: Tensor6SetConstant. More...
 
void Tensor7Scale (Tensor7 &out, const Tensor7 &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: Tensor7Scale. More...
 
void Tensor7SetConstant (Tensor7 &x, const Index &nlibraries, const Index &nvitrines, const Index &nshelves, const Index &nbooks, const Index &npages, const Index &nrows, const Index &ncols, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: Tensor7SetConstant. More...
 
void VectorAddScalar (Vector &out, const Vector &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: VectorAddScalar. More...
 
void VectorCrop (Vector &out, const Vector &in, const Numeric &min_value, const Numeric &max_value, const Verbosity &)
 WORKSPACE METHOD: VectorCrop. More...
 
void VectorFlip (Vector &out, const Vector &in, const Verbosity &)
 WORKSPACE METHOD: VectorFlip. More...
 
void VectorInsertGridPoints (Vector &og, const Vector &ingrid, const Vector &points, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorInsertGridPoints. More...
 
void VectorLinSpace (Vector &x, const Numeric &start, const Numeric &stop, const Numeric &step, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorLinSpace. More...
 
void VectorLogSpace (Vector &x, const Numeric &start, const Numeric &stop, const Numeric &step, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorLogSpace. More...
 
void VectorMatrixMultiply (Vector &y, const Matrix &M, const Vector &x, const Verbosity &)
 WORKSPACE METHOD: VectorMatrixMultiply. More...
 
void VectorNLinSpace (Vector &x, const Index &n, const Numeric &start, const Numeric &stop, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorNLinSpace. More...
 
void VectorNLogSpace (Vector &x, const Index &n, const Numeric &start, const Numeric &stop, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorNLogSpace. More...
 
void VectorScale (Vector &out, const Vector &in, const Numeric &value, const Verbosity &)
 WORKSPACE METHOD: VectorScale. More...
 
void VectorSetConstant (Vector &x, const Index &n, const Numeric &value, const Verbosity &verbosity)
 WORKSPACE METHOD: VectorSetConstant. More...
 
void VectorSet (Vector &x, const Vector &values, const Verbosity &)
 WORKSPACE METHOD: VectorSet. More...
 
void Compare (const Numeric &var1, const Numeric &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const Vector &var1, const Vector &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const Matrix &var1, const Matrix &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const Tensor3 &var1, const Tensor3 &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const Tensor7 &var1, const Tensor7 &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const ArrayOfVector &var1, const ArrayOfVector &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const ArrayOfMatrix &var1, const ArrayOfMatrix &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 
void Compare (const GriddedField3 &var1, const GriddedField3 &var2, const Numeric &maxabsdiff, const String &error_message, const String &var1name, const String &var2name, const String &, const String &, const Verbosity &verbosity)
 WORKSPACE METHOD: Compare. More...
 

Detailed Description

Workspace functions for straightforward operations on variables of basic types.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2002-05-08

This file includes workspace functions for variables of basic types, such as Matrix and ArrayOfIndex. The functions are mainly of two types:

  1. Initiation of variables by keyword arguments, such as StringSet.
  2. Basic math, such as MatrixVectorMultiply.

These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_basic_types.cc.

Function Documentation

◆ ArrayOfIndexLinSpace()

void ArrayOfIndexLinSpace ( ArrayOfIndex out,
const Index start,
const Index stop,
const Index step,
const Verbosity verbosity 
)

WORKSPACE METHOD: ArrayOfIndexLinSpace.

Initializes an ArrayOfIndex with linear spacing.

The first element equals always the start value, and the spacing equals always the step value, but the last value can deviate from the stop value. step can be both positive and negative.

The created array is [start, start+step, start+2*step, ...] <br>

Author
Oliver Lemke
Parameters
[out]outGeneric output
[in]startGeneric Input
[in]stopGeneric Input
[in]stepGeneric Input

Definition at line 96 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Array< base >::nelem().

Referenced by ArrayOfIndexLinSpace_g().

◆ ArrayOfIndexSet()

void ArrayOfIndexSet ( ArrayOfIndex out,
const ArrayOfIndex value,
const Verbosity verbosity 
)

WORKSPACE METHOD: ArrayOfIndexSet.

Creates an ArrayOfIndex from the given list of numbers.

Author
Oliver Lemke
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 75 of file m_basic_types.cc.

Referenced by ArrayOfIndexSet_g().

◆ ArrayOfIndexSetConstant()

void ArrayOfIndexSetConstant ( ArrayOfIndex out,
const Index nelem,
const Index value,
const Verbosity verbosity 
)

WORKSPACE METHOD: ArrayOfIndexSetConstant.

Creates an ArrayOfIndex of length nelem, with all values identical.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]nelemWS Input
[in]valueGeneric Input

Definition at line 84 of file m_basic_types.cc.

Referenced by ArrayOfIndexSetConstant_g().

◆ ArrayOfStringSet()

void ArrayOfStringSet ( ArrayOfString out,
const ArrayOfString value,
const Verbosity verbosity 
)

WORKSPACE METHOD: ArrayOfStringSet.

Sets a String array according the given text. The format is text = ["String1","String2",...]

Author
Oliver Lemke
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 126 of file m_basic_types.cc.

References Array< base >::nelem().

Referenced by ArrayOfStringSet_g().

◆ Compare() [1/8]

void Compare ( const ArrayOfMatrix var1,
const ArrayOfMatrix var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1400 of file m_basic_types.cc.

References Compare(), and Array< base >::nelem().

◆ Compare() [2/8]

void Compare ( const ArrayOfVector var1,
const ArrayOfVector var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1355 of file m_basic_types.cc.

References Compare(), and Array< base >::nelem().

◆ Compare() [3/8]

void Compare ( const GriddedField3 var1,
const GriddedField3 var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1445 of file m_basic_types.cc.

References Compare(), GriddedField3::data, GriddedField::get_dim(), GriddedField::get_grid_name(), and GriddedField::get_grid_size().

◆ Compare() [4/8]

void Compare ( const Matrix var1,
const Matrix var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1189 of file m_basic_types.cc.

References abs, CREATE_OUT2, ConstMatrixView::ncols(), and ConstMatrixView::nrows().

◆ Compare() [5/8]

void Compare ( const Numeric var1,
const Numeric var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1116 of file m_basic_types.cc.

References abs, and CREATE_OUT2.

Referenced by Compare(), Compare_sg_ArrayOfMatrixArrayOfMatrix_g(), Compare_sg_ArrayOfVectorArrayOfVector_g(), Compare_sg_GriddedField3GriddedField3_g(), Compare_sg_MatrixMatrix_g(), Compare_sg_NumericNumeric_g(), Compare_sg_Tensor3Tensor3_g(), Compare_sg_Tensor7Tensor7_g(), and Compare_sg_VectorVector_g().

◆ Compare() [6/8]

void Compare ( const Tensor3 var1,
const Tensor3 var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1240 of file m_basic_types.cc.

References abs, CREATE_OUT2, ConstTensor3View::ncols(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

◆ Compare() [7/8]

void Compare ( const Tensor7 var1,
const Tensor7 var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1291 of file m_basic_types.cc.

References abs, CREATE_OUT2, ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), and ConstTensor7View::nvitrines().

◆ Compare() [8/8]

void Compare ( const Vector var1,
const Vector var2,
const Numeric maxabsdiff,
const String error_message,
const String var1_wsvname,
const String var2_wsvname,
const String maxabsdiff_wsvname,
const String error_message_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: Compare.

Checks the consistency between two variables.

The two variables are checked to not deviate outside the specified value (maxabsdiff). An error is issued if this is not fulfilled.

The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.

Author
Oliver Lemke
Parameters
[in]var1Generic Input
[in]var2Generic Input
[in]maxabsdiffGeneric Input (Default: "")
[in]error_messageGeneric Input (Default: "")
[in]var1_wsvnameGeneric Input Name
[in]var2_wsvnameGeneric Input Name
[in]maxabsdiff_wsvnameGeneric Input Name
[in]error_message_wsvnameGeneric Input Name

Definition at line 1144 of file m_basic_types.cc.

References abs, CREATE_OUT2, and ConstVectorView::nelem().

◆ FlagOff()

void FlagOff ( Index flag,
const Verbosity verbosity 
)

WORKSPACE METHOD: FlagOff.

Sets an index variable that acts as an on/off flag to 0.

Author
Patrick Eriksson
Parameters
[out]flagGeneric output

Definition at line 136 of file m_basic_types.cc.

Referenced by FlagOff_g().

◆ FlagOn()

void FlagOn ( Index flag,
const Verbosity verbosity 
)

WORKSPACE METHOD: FlagOn.

Sets an index variable that acts as an on/off flag to 1.

Author
Patrick Eriksson
Parameters
[out]flagGeneric output

Definition at line 143 of file m_basic_types.cc.

Referenced by FlagOn_g().

◆ IndexSet()

void IndexSet ( Index out,
const Index value,
const Verbosity verbosity 
)

WORKSPACE METHOD: IndexSet.

Sets an index workspace variable to the given value.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 150 of file m_basic_types.cc.

Referenced by IndexSet_g().

◆ IndexStepDown()

void IndexStepDown ( Index out,
const Index in,
const Verbosity verbosity 
)

WORKSPACE METHOD: IndexStepDown.

Performas: out = in - 1

Input and output can be same variable.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input

Definition at line 159 of file m_basic_types.cc.

Referenced by IndexStepDown_g().

◆ IndexStepUp()

void IndexStepUp ( Index out,
const Index in,
const Verbosity verbosity 
)

WORKSPACE METHOD: IndexStepUp.

Performas: out = in + 1

Input and output can be same variable.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input

Definition at line 168 of file m_basic_types.cc.

Referenced by IndexStepUp_g().

◆ Matrix1ColFromVector()

void Matrix1ColFromVector ( Matrix out,
const Vector v,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix1ColFromVector.

Forms a matrix containing one column from a vector.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]vGeneric Input

Definition at line 230 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix1ColFromVector_g().

◆ Matrix1RowFromVector()

void Matrix1RowFromVector ( Matrix out,
const Vector v,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix1RowFromVector.

Forms a matrix containing one row from a vector.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]vGeneric Input

Definition at line 285 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix1RowFromVector_g().

◆ Matrix2ColFromVectors()

void Matrix2ColFromVectors ( Matrix out,
const Vector v1,
const Vector v2,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix2ColFromVectors.

Forms a matrix containing two columns from two vectors.

The vectors are included as columns in the matrix in the same order as they are given.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]v1Generic Input
[in]v2Generic Input

Definition at line 244 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix2ColFromVectors_g().

◆ Matrix2RowFromVectors()

void Matrix2RowFromVectors ( Matrix out,
const Vector v1,
const Vector v2,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix2RowFromVectors.

Forms a matrix containing two rows from two vectors.

The vectors are included as rows in the matrix in the same order as they are given.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]v1Generic Input
[in]v2Generic Input

Definition at line 299 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix2RowFromVectors_g().

◆ Matrix3ColFromVectors()

void Matrix3ColFromVectors ( Matrix out,
const Vector v1,
const Vector v2,
const Vector v3,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix3ColFromVectors.

Forms a matrix containing three columns from three vectors.

The vectors are included as columns in the matrix in the same order as they are given.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]v1Generic Input
[in]v2Generic Input
[in]v3Generic Input

Definition at line 264 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix3ColFromVectors_g().

◆ Matrix3RowFromVectors()

void Matrix3RowFromVectors ( Matrix out,
const Vector v1,
const Vector v2,
const Vector v3,
const Verbosity verbosity 
)

WORKSPACE METHOD: Matrix3RowFromVectors.

Forms a matrix containing three rows from three vectors.

The vectors are included as rows in the matrix in the same order as they are given.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]v1Generic Input
[in]v2Generic Input
[in]v3Generic Input

Definition at line 319 of file m_basic_types.cc.

References joker, ConstVectorView::nelem(), and Matrix::resize().

Referenced by Matrix3RowFromVectors_g().

◆ MatrixAddScalar()

void MatrixAddScalar ( Matrix out,
const Matrix in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: MatrixAddScalar.

Adds a scalar to all elements of a matrix.

The result can either be stored in the same or another matrix.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 177 of file m_basic_types.cc.

References ConstMatrixView::ncols(), ConstMatrixView::nrows(), and Matrix::resize().

Referenced by MatrixAddScalar_g().

◆ MatrixMatrixMultiply()

void MatrixMatrixMultiply ( Matrix out,
const Matrix m,
const Matrix x,
const Verbosity verbosity 
)

WORKSPACE METHOD: MatrixMatrixMultiply.

Multiply a Matrix with another Matrix and store the result in the result Matrix.

This just computes the normal Matrix-Matrix product, Y=M*X. It is ok if Y and X are the same Matrix. This function is handy for multiplying the H Matrix to batch spectra.

Author
Stefan Buehler
Parameters
[out]outGeneric output
[in]mGeneric Input
[in]xGeneric Input

Definition at line 200 of file m_basic_types.cc.

References M, mult(), ConstMatrixView::ncols(), ConstMatrixView::nrows(), and Matrix::resize().

Referenced by MatrixMatrixMultiply_g().

◆ MatrixScale()

void MatrixScale ( Matrix out,
const Matrix in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: MatrixScale.

Scales all elements of a matrix with the specified value.

The result can either be stored in the same or another variable.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 341 of file m_basic_types.cc.

References ConstMatrixView::ncols(), ConstMatrixView::nrows(), and Matrix::resize().

Referenced by MatrixScale_g().

◆ MatrixSet()

void MatrixSet ( Matrix out,
const Matrix value,
const Verbosity verbosity 
)

WORKSPACE METHOD: MatrixSet.

Initialize a Matrix from the given list of numbers.

Usage: <br> MatrixSet(m1, [1, 2, 3; 4, 5, 6])

Author
Oliver Lemke
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 364 of file m_basic_types.cc.

Referenced by MatrixSet_g().

◆ MatrixSetConstant()

void MatrixSetConstant ( Matrix out,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: MatrixSetConstant.

Creates a matrix and sets all elements to the specified value.

The size is determined by ncols and nrows.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 373 of file m_basic_types.cc.

References Matrix::resize().

Referenced by MatrixSetConstant_g().

◆ NumericAdd()

void NumericAdd ( Numeric out,
const Numeric in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: NumericAdd.

Adds a numeric and a value (out = in+value).

The result can either be stored in the same or another numeric. (in and out can be the same varible, but not out and value)

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 385 of file m_basic_types.cc.

Referenced by NumericAdd_g().

◆ NumericInvScale()

void NumericInvScale ( Numeric out,
const Numeric in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: NumericInvScale.

Inversely scales/divides a numeric with a value (out = in/value).

The result can either be stored in the same or another numeric. (in and out can be the same varible, but not out and value)

Author
Jana Mendrok
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 395 of file m_basic_types.cc.

Referenced by NumericInvScale_g().

◆ NumericScale()

void NumericScale ( Numeric out,
const Numeric in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: NumericScale.

Scales/multiplies a numeric with a value (out = in*value).

The result can either be stored in the same or another numeric. (in and out can be the same varible, but not out and value)

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 405 of file m_basic_types.cc.

Referenced by NumericScale_g().

◆ NumericSet()

void NumericSet ( Numeric out,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: NumericSet.

Sets a numeric workspace variable to the given value.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 415 of file m_basic_types.cc.

Referenced by NumericSet_g().

◆ SparseSparseMultiply()

void SparseSparseMultiply ( Sparse out,
const Sparse m1,
const Sparse m2,
const Verbosity verbosity 
)

WORKSPACE METHOD: SparseSparseMultiply.

Multiplies a Sparse with another Sparse, result stored in Sparse.

Makes the calculation: out = m1 * m2

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]m1Generic Input
[in]m2Generic Input

Definition at line 424 of file m_basic_types.cc.

References M, mult(), Sparse::ncols(), and Sparse::nrows().

Referenced by SparseSparseMultiply_g().

◆ StringSet()

void StringSet ( String out,
const String text,
const Verbosity verbosity 
)

WORKSPACE METHOD: StringSet.

Sets a String to the given text string.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]textGeneric Input

Definition at line 452 of file m_basic_types.cc.

Referenced by StringSet_g().

◆ Tensor3AddScalar()

void Tensor3AddScalar ( Tensor3 out,
const Tensor3 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor3AddScalar.

Adds a scalar value to all elements of a tensor3.

The result can either be stored in the same or another variable.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 461 of file m_basic_types.cc.

References ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and Tensor3::resize().

Referenced by Tensor3AddScalar_g().

◆ Tensor3Scale()

void Tensor3Scale ( Tensor3 out,
const Tensor3 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor3Scale.

Scales all elements of a tensor with the specified value.

The result can either be stored in the same or another variable.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 481 of file m_basic_types.cc.

References ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and Tensor3::resize().

Referenced by Tensor3Scale_g().

◆ Tensor3SetConstant()

void Tensor3SetConstant ( Tensor3 out,
const Index npages,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor3SetConstant.

Creates a tensor and sets all elements to the specified value.

The size is determined by ncols, nrows etc.

Author
Claudia Emde
Parameters
[out]outGeneric output
[in]npagesWS Input
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 501 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Tensor3::resize().

Referenced by Tensor3SetConstant_g().

◆ Tensor4AddScalar()

void Tensor4AddScalar ( Tensor4 out,
const Tensor4 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor4AddScalar.

Adds a scalar value to all elements of a tensor4.

The result can either be stored in the same or another variable.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 522 of file m_basic_types.cc.

References ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor4View::npages(), ConstTensor4View::nrows(), and Tensor4::resize().

Referenced by Tensor4AddScalar_g().

◆ Tensor4Scale()

void Tensor4Scale ( Tensor4 out,
const Tensor4 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor4Scale.

Scales all elements of a tensor with the specified value.

The result can either be stored in the same or another variable.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 542 of file m_basic_types.cc.

References ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor4View::npages(), ConstTensor4View::nrows(), and Tensor4::resize().

Referenced by Tensor4Scale_g().

◆ Tensor4SetConstant()

void Tensor4SetConstant ( Tensor4 out,
const Index nbooks,
const Index npages,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor4SetConstant.

Creates a tensor and sets all elements to the specified value.

The size is determined by ncols, nrows etc.

Author
Claudia Emde
Parameters
[out]outGeneric output
[in]nbooksWS Input
[in]npagesWS Input
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 562 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Tensor4::resize().

Referenced by Tensor4SetConstant_g().

◆ Tensor5Scale()

void Tensor5Scale ( Tensor5 out,
const Tensor5 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor5Scale.

Scales all elements of a tensor with the specified value.

The result can either be stored in the same or another variable.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 585 of file m_basic_types.cc.

References ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), and Tensor5::resize().

Referenced by Tensor5Scale_g().

◆ Tensor5SetConstant()

void Tensor5SetConstant ( Tensor5 out,
const Index nshelves,
const Index nbooks,
const Index npages,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor5SetConstant.

Creates a tensor and sets all elements to the specified value.

The size is determined by ncols, nrows etc.

Author
Claudia Emde
Parameters
[out]outGeneric output
[in]nshelvesWS Input
[in]nbooksWS Input
[in]npagesWS Input
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 606 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Tensor5::resize().

Referenced by Tensor5SetConstant_g().

◆ Tensor6Scale()

void Tensor6Scale ( Tensor6 out,
const Tensor6 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor6Scale.

Scales all elements of a tensor with the specified value.

The result can either be stored in the same or another variable.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 631 of file m_basic_types.cc.

References ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), and Tensor6::resize().

Referenced by Tensor6Scale_g().

◆ Tensor6SetConstant()

void Tensor6SetConstant ( Tensor6 out,
const Index nvitrines,
const Index nshelves,
const Index nbooks,
const Index npages,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor6SetConstant.

Creates a tensor and sets all elements to the specified value.

The size is determined by ncols, nrows etc.

Author
Claudia Emde
Parameters
[out]outGeneric output
[in]nvitrinesWS Input
[in]nshelvesWS Input
[in]nbooksWS Input
[in]npagesWS Input
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 652 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Tensor6::resize().

Referenced by Tensor6SetConstant_g().

◆ Tensor7Scale()

void Tensor7Scale ( Tensor7 out,
const Tensor7 in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor7Scale.

Scales all elements of a tensor with the specified value.

The result can either be stored in the same or another variable.

Author
Mattias Ekstrom
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 679 of file m_basic_types.cc.

References ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), ConstTensor7View::nvitrines(), and Tensor7::resize().

Referenced by Tensor7Scale_g().

◆ Tensor7SetConstant()

void Tensor7SetConstant ( Tensor7 out,
const Index nlibraries,
const Index nvitrines,
const Index nshelves,
const Index nbooks,
const Index npages,
const Index nrows,
const Index ncols,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: Tensor7SetConstant.

Creates a tensor and sets all elements to the specified value.

The size is determined by ncols, nrows etc.

Author
Claudia Emde
Parameters
[out]outGeneric output
[in]nlibrariesWS Input
[in]nvitrinesWS Input
[in]nshelvesWS Input
[in]nbooksWS Input
[in]npagesWS Input
[in]nrowsWS Input
[in]ncolsWS Input
[in]valueGeneric Input

Definition at line 700 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Tensor7::resize().

Referenced by Tensor7SetConstant_g().

◆ VectorAddScalar()

void VectorAddScalar ( Vector out,
const Vector in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorAddScalar.

Adds a scalar to all elements of a vector.

The result can either be stored in the same or another vector.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 729 of file m_basic_types.cc.

References ConstVectorView::nelem(), and Vector::resize().

Referenced by VectorAddScalar_g().

◆ VectorCrop()

void VectorCrop ( Vector out,
const Vector in,
const Numeric min_value,
const Numeric max_value,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorCrop.

Keeps only values of a vector inside the specified range.

All values outside the range [min_value,max-value] are removed. Note the default values, that basically should act as -+Inf.

The result can either be stored in the same or another vector.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]min_valueGeneric Input (Default: "-99e99")
[in]max_valueGeneric Input (Default: "99e99")

Definition at line 752 of file m_basic_types.cc.

References ConstVectorView::nelem(), and Vector::resize().

Referenced by VectorCrop_g().

◆ VectorFlip()

void VectorFlip ( Vector out,
const Vector in,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorFlip.

Flips a vector.

The output is the input vector in reversed order. The result can either be stored in the same or another vector.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input

Definition at line 787 of file m_basic_types.cc.

References ConstVectorView::nelem(), and Vector::resize().

Referenced by VectorFlip_g().

◆ VectorInsertGridPoints()

void VectorInsertGridPoints ( Vector out,
const Vector in,
const Vector points,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorInsertGridPoints.

Insert some additional points into a grid.

This method can for example be used to add line center frequencies to a regular frequency grid. If the original grid is [1,2,3], and the additional points are [2.2,2.4], the result will be [1,2,2.2,2.4,3].

It is assumed that the original grid is sorted, otherwise a runtime error is thrown. The vector with the points to insert does not have to be sorted. If some of the input points are already in the grid, these points are not inserted again. New points outside the original grid are appended at the appropriate end. Input vector and output vector can be the same.

Generic output: <br> Vector : The new grid vector.

Generic input: <br> Vector : The original grid vector. <br> Vector : The points to insert.

Author
Stefan Buehler
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]pointsGeneric Input

Definition at line 811 of file m_basic_types.cc.

References arts_exit(), CREATE_OUT2, CREATE_OUT3, get_sorted_indexes(), is_decreasing(), is_increasing(), Array< base >::nelem(), ConstVectorView::nelem(), and Vector::resize().

Referenced by choose_abs_nls_pert(), and VectorInsertGridPoints_g().

◆ VectorLinSpace()

void VectorLinSpace ( Vector out,
const Numeric start,
const Numeric stop,
const Numeric step,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorLinSpace.

Initializes a vector with linear spacing.

The first element equals always the start value, and the spacing equals always the step value, but the last value can deviate from the stop value. step can be both positive and negative.

The created vector is [start, start+step, start+2*step, ...] <br>

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]startGeneric Input
[in]stopGeneric Input
[in]stepGeneric Input

Definition at line 939 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, linspace(), and ConstVectorView::nelem().

Referenced by Test(), and VectorLinSpace_g().

◆ VectorLogSpace()

void VectorLogSpace ( Vector out,
const Numeric start,
const Numeric stop,
const Numeric step,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorLogSpace.

Initializes a vector with logarithmic spacing.

The first element equals always the start value, and the spacing equals always the step value, but note that the last value can deviate from the stop value. The keyword step can be both positive and negative.

Note, that although start has to be given in direct coordinates, step has to be given in log coordinates.

Explicitly, the vector is: <br> exp([ln(start), ln(start)+step, ln(start)+2*step, ...])

Author
Stefan Buehler
Parameters
[out]outGeneric output
[in]startGeneric Input
[in]stopGeneric Input
[in]stepGeneric Input

Definition at line 962 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, linspace(), ConstVectorView::nelem(), and transform().

Referenced by VectorLogSpace_g().

◆ VectorMatrixMultiply()

void VectorMatrixMultiply ( Vector out,
const Matrix m,
const Vector v,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorMatrixMultiply.

Multiply a Vector with a Matrix and store the result in another Vector.

This just computes the normal Matrix-Vector product, y=M*x. It is ok if input and output Vector are the same. This function is handy for multiplying the H Matrix to spectra.

Author
Stefan Buehler
Parameters
[out]outGeneric output
[in]mGeneric Input
[in]vGeneric Input

Definition at line 986 of file m_basic_types.cc.

References M, mult(), ConstVectorView::nelem(), and Vector::resize().

Referenced by VectorMatrixMultiply_g().

◆ VectorNLinSpace()

void VectorNLinSpace ( Vector out,
const Index nelem,
const Numeric start,
const Numeric stop,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorNLinSpace.

Creates a vector with length nelem, equally spaced between the given end values.

The length (nelem) must be larger than 1.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]nelemWS Input
[in]startGeneric Input
[in]stopGeneric Input

Definition at line 1014 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and nlinspace().

Referenced by VectorNLinSpace_g().

◆ VectorNLogSpace()

void VectorNLogSpace ( Vector out,
const Index nelem,
const Numeric start,
const Numeric stop,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorNLogSpace.

Creates a vector with length nelem, equally logarithmically spaced between the given end values.

The length (nelem) must be larger than 1.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]nelemWS Input
[in]startGeneric Input
[in]stopGeneric Input

Definition at line 1040 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and nlogspace().

Referenced by antenna_responseVaryingGaussian(), p_gridDensify(), VectorNLogSpace_g(), ybatchMetProfiles(), and ybatchMetProfilesClear().

◆ VectorScale()

void VectorScale ( Vector out,
const Vector in,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorScale.

Scales all elements of a vector with the same value.

The result can either be stored in the same or another vector.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]inGeneric Input
[in]valueGeneric Input

Definition at line 1066 of file m_basic_types.cc.

References ConstVectorView::nelem(), and Vector::resize().

Referenced by VectorScale_g().

◆ VectorSet()

void VectorSet ( Vector out,
const Vector value,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorSet.

Create a vector from the given list of numbers.

<br> VectorSet(p_grid, [1000, 100, 10] ) <br> Will create a p_grid vector with these three elements.

Author
Stefan Buehler
Parameters
[out]outGeneric output
[in]valueGeneric Input

Definition at line 1107 of file m_basic_types.cc.

Referenced by VectorSet_g().

◆ VectorSetConstant()

void VectorSetConstant ( Vector out,
const Index nelem,
const Numeric value,
const Verbosity verbosity 
)

WORKSPACE METHOD: VectorSetConstant.

Creates a vector and sets all elements to the specified value.

The vector length is determined by nelem.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]nelemWS Input
[in]valueGeneric Input

Definition at line 1089 of file m_basic_types.cc.

References CREATE_OUT2, CREATE_OUT3, and Vector::resize().

Referenced by VectorSetConstant_g().