35 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
46 y[
i] += ys[k][
i] * scale;
52 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
68 var(std, y, ys, start, end_tmp);
75 const Index end = end_tmp >= 0 ? end_tmp : 1 + ys.
nelem() + end_tmp;
87 cov(
i, j) += (ys[k][
i] - y[
i]) * (ys[k][j] - y[j]) * scale;
104 std::sort(calc.begin(), calc.end());
110 return (calc[(n-1)/2] + calc[n/2]) / 2;
INDEX Index
The type to use for all integer numbers and indices.
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.
Index nelem() const
Number of elements.
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 T pow2(T x)
power of two
Index nelem() const
Returns the number of elements.
Iterator1D begin()
Return iterator to first element.
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.
Iterator1D end()
Return iterator behind last element.
Stuff related to generating y-data from raw data.
NUMERIC Numeric
The type to use for all floating point numbers.
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.
A constant view of a Vector.
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
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...
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Numeric median(const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
Get the median of the vector in the range.
Numeric sqrt(const Rational r)
Square root.