#pragma once #include "Defines.h" #include "mAlgPseudo_global.h" #include "mAlgDefines.h" #include "mAlgMatrix.h" // 这是内部用的一些拟合相关的函数类 class M_ALGPSEUDO_EXPORT iAlgPseuFitHelper { public: // 计算“x--->y”的回归曲线方程系数 static bool _fitXtoY(VecDouble vecXs, VecDouble vecYs, VecDouble &vecCoefs, bool isZero = true); // 计算“y--->x”的回归曲线方程系数(反推) static bool _fitYtoX(VecDouble vecXs, VecDouble vecYs, VecDouble &vecCoefs, bool isZero = false); // 计算相关性系数 // vecXs是横坐标,vecYs为纵坐标,vecCoefs为系数 static bool _calR2(VecDouble vecXs, VecDouble vecYs, VecDouble vecCoefs, double &R2); // 多项式转换 static bool _calMultiPolyX(double x, double &y, VecDouble vecCoefs); private: };