/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/Statistics/interface/LinearFitErrorsIn2Coord.h
35 строк
984 B
Cms Build
Clang-Format
03 июн 2019, 06:44
03 июн 2019, 06:44
6a63925
Код
Авторство
О чём код?
#ifndef LinearFitErrorsIn2Coord_H #define LinearFitErrorsIn2Coord_H #include <vector> /** Straight line fit for data with errors on both coordinates * source: Numerical Recipes */ class LinearFitErrorsIn2Coord { public: /** Approached slope: * - rescale y and sigy by var(x)/var(y) * - fit a straight line with weights derived from * the scaled sum sigx^2 + sigy^2 */ float slope(const std::vector<float>& x, const std::vector<float>& y, int ndat, const std::vector<float>& sigx, const std::vector<float>& sigy) const; /** Approached intercept computed with approached slope */ float intercept(const std::vector<float>& x, const std::vector<float>& y, int ndat, const std::vector<float>& sigx, const std::vector<float>& sigy) const; private: float variance(const std::vector<float>& x, int ndat) const; }; #endif