51 num += xs[i]*(fs[i]-fm);
52 den += xs[i]*(xs[i]-xm);
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
void linearRegression(std::vector< CepsReal > &xs, std::vector< CepsReal > &fs, CepsReal &a, CepsReal &b)
Performs a linear regression with least squares, put results in a and b coefficients.
const _Type & min(const CepsVector< _Type, _Alloc > &vec)
Returns the minimum of the vector, const version.