Go to the documentation of this file.
35 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
45 for (
Index i=0; i<
y.nelem(); i++)
46 y[i] += ys[k][i] * scale;
52 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
62 for (
Index i=0; i<
y.nelem(); i++)
75 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
85 for (
Index i=0; i<
y.nelem(); i++)
86 for (
Index j=0; j<
y.nelem(); j++)
87 cov(i, j) += (ys[k][i] -
y[i]) * (ys[k][j] -
y[j]) * scale;
97 for (
Index i=0; i<n; i++)
104 std::sort(calc.begin(), calc.end());
110 return (calc[(n-1)/2] + calc[n/2]) / 2;
void transform(VectorView y, double(&my_func)(double), ConstVectorView x)
A generic transform function for vectors, which can be used to implement mathematical functions opera...
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.
Vector y(Workspace &ws) noexcept
Stuff related to generating y-data from raw data.
Numeric median(const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
Get the median of the vector in the range.
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
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.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
void avg(VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the average of the ranged ys.
Constants of physical expressions as constexpr.
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
constexpr T pow2(T x)
power of two
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
A constant view of a Vector.
Index nelem() const
Number of elements.
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.