ARTS  2.3.1285(git:92a29ea9-dirty)
linalg Namespace Reference

Functions

void avg (VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the average of the ranged ys. More...
 
void std (VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the standard deviation of the ranged ys. More...
 
void var (VectorView var, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the variance of the ranged ys. More...
 
void cov (MatrixView cov, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the covariance matrix of the ranged ys. More...
 
Numeric median (const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
 Get the median of the vector in the range. More...
 

Function Documentation

◆ avg()

void linalg::avg ( VectorView  y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the average of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]yN-dimensional Vector; Averages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 32 of file raw.cc.

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

◆ cov()

void linalg::cov ( MatrixView  cov,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the covariance matrix of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]covN-by-N-dimensional Matrix; Covariance matrix
[in]yAverages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 72 of file raw.cc.

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

◆ median()

Numeric linalg::median ( const ConstVectorView  v,
const ArrayOfIndex pos = ArrayOfIndex{} 
)

Get the median of the vector in the range.

If pos is empty, use all numbers

Parameters
[in]vA Vector of any length
[in]posPositions to use in the vector

Definition at line 90 of file raw.cc.

References i, n, Array< base >::nelem(), and ConstVectorView::nelem().

Referenced by ybatchTroposphericCorrectionNaiveMedianForward().

◆ std()

void linalg::std ( VectorView  std,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the standard deviation of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]stdN-dimensional Vector; Standard deviations
[in]yAverages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 66 of file raw.cc.

References VectorView::begin(), VectorView::end(), sqrt(), transform(), and var().

◆ var()